[Ttssh2-commit] [5155] マクロコマンドの引数に配列変数そのものを受け取れるように調整

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2013年 3月 22日 (金) 19:06:07 JST


Revision: 5155
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5155
Author:   maya
Date:     2013-03-22 19:06:04 +0900 (Fri, 22 Mar 2013)
Log Message:
-----------
マクロコマンドの引数に配列変数そのものを受け取れるように調整

Modified Paths:
--------------
    trunk/teraterm/ttpmacro/ttmparse.c
    trunk/teraterm/ttpmacro/ttmparse.h

-------------- next part --------------
Modified: trunk/teraterm/ttpmacro/ttmparse.c
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.c	2013-03-22 03:12:27 UTC (rev 5154)
+++ trunk/teraterm/ttpmacro/ttmparse.c	2013-03-22 10:06:04 UTC (rev 5155)
@@ -1823,3 +1823,55 @@
 {
 	return ((VarId>>16)-1);
 }
+
+void GetIntAryVar(PVarId VarId, LPWORD Err)
+{
+	TName Name;
+	WORD VarType;
+
+	if (*Err!=0) return;
+
+	if (GetIdentifier(Name)) {
+		if (CheckVar(Name, &VarType, VarId)) {
+			if (VarType != TypIntArray) {
+				*Err = ErrTypeMismatch;
+			}
+		}
+		else {
+			*Err = ErrTypeMismatch;
+		}
+	}
+	else
+		*Err = ErrSyntax;
+}
+
+void GetStrAryVar(PVarId VarId, LPWORD Err)
+{
+	TName Name;
+	WORD VarType;
+
+	if (*Err!=0) return;
+
+	if (GetIdentifier(Name)) {
+		if (CheckVar(Name, &VarType, VarId)) {
+			if (VarType != TypStrArray) {
+				*Err = ErrTypeMismatch;
+			}
+		}
+		else {
+			*Err = ErrTypeMismatch;
+		}
+	}
+	else
+		*Err = ErrSyntax;
+}
+
+int GetIntAryVarSize(TVarId VarId)
+{
+	return IntAryVal[VarId].size;
+}
+
+int GetStrAryVarSize(TVarId VarId)
+{
+	return StrAryVal[VarId].size;
+}

Modified: trunk/teraterm/ttpmacro/ttmparse.h
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.h	2013-03-22 03:12:27 UTC (rev 5154)
+++ trunk/teraterm/ttpmacro/ttmparse.h	2013-03-22 10:06:04 UTC (rev 5155)
@@ -312,6 +312,10 @@
 TVarId GetStrVarFromArray(TVarId VarId, int Index, LPWORD Err);
 BOOL GetIndex(int *Index, LPWORD Err);
 TVarId GetArrayVarId(TVarId VarId);
+void GetIntAryVar(PVarId VarId, LPWORD Err);
+void GetStrAryVar(PVarId VarId, LPWORD Err);
+int GetIntAryVarSize(TVarId VarId);
+int GetStrAryVarSize(TVarId VarId);
 
 extern WORD TTLStatus;
 extern char LineBuff[MaxLineLen];



Ttssh2-commit メーリングリストの案内
Back to archive index