[Ttssh2-commit] [5304] チケット #31361 マクロ:未サポートのコマンド

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2013年 6月 2日 (日) 23:58:50 JST


Revision: 5304
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5304
Author:   yutakapon
Date:     2013-06-02 23:58:50 +0900 (Sun, 02 Jun 2013)
Log Message:
-----------
チケット #31361 マクロ:未サポートのコマンド

サポートしていないマクロコマンドが使われた場合、現状"Syntax Error"となるが、わかりにくいので、 "Command not supported"のようなエラーメッセージにする。

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/31361

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

-------------- next part --------------
Modified: trunk/teraterm/ttpmacro/ttl.c
===================================================================
--- trunk/teraterm/ttpmacro/ttl.c	2013-06-02 14:52:45 UTC (rev 5303)
+++ trunk/teraterm/ttpmacro/ttl.c	2013-06-02 14:58:50 UTC (rev 5304)
@@ -6113,7 +6113,7 @@
 					Err = ErrSyntax;
 			}
 		}
-		else Err = ErrSyntax;
+		else Err = ErrNotSupported;
 	}
 	else
 		Err = ErrSyntax;

Modified: trunk/teraterm/ttpmacro/ttmparse.c
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.c	2013-06-02 14:52:45 UTC (rev 5303)
+++ trunk/teraterm/ttpmacro/ttmparse.c	2013-06-02 14:58:50 UTC (rev 5304)
@@ -87,6 +87,8 @@
 	char Msg[41];
 	int i;
 
+	strncpy_s(Msg, sizeof(Msg), "Unknown error message number.", _TRUNCATE);
+
 	switch (Err) {
 		case ErrCloseParent: strncpy_s(Msg, sizeof(Msg),"\")\" expected.", _TRUNCATE); break;
 		case ErrCantCall: strncpy_s(Msg, sizeof(Msg),"Can't call sub.", _TRUNCATE); break;
@@ -107,6 +109,7 @@
 		case ErrOutOfRange: strncpy_s(Msg, sizeof(Msg), "Index out of range.", _TRUNCATE); break;
 		case ErrCloseBracket: strncpy_s(Msg, sizeof(Msg), "\"]\" expected.", _TRUNCATE); break;
 		case ErrFewMemory: strncpy_s(Msg, sizeof(Msg), "Can't allocate memory.", _TRUNCATE); break;
+		case ErrNotSupported: strncpy_s(Msg, sizeof(Msg), "Command not supported.", _TRUNCATE); break;
 	}
 
 	i = OpenErrDlg(Msg,LineBuff);

Modified: trunk/teraterm/ttpmacro/ttmparse.h
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.h	2013-06-02 14:52:45 UTC (rev 5303)
+++ trunk/teraterm/ttpmacro/ttmparse.h	2013-06-02 14:58:50 UTC (rev 5304)
@@ -37,6 +37,7 @@
 #define ErrOutOfRange       17
 #define ErrCloseBracket     18
 #define ErrFewMemory        19
+#define ErrNotSupported     20
 
 #define TypUnknown  0
 #define TypInteger  1



Ttssh2-commit メーリングリストの案内
Zurück zum Archiv-Index