svnno****@sourc*****
svnno****@sourc*****
2009年 7月 2日 (木) 01:21:53 JST
Revision: 3568 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3568 Author: yutakapon Date: 2009-07-02 01:21:53 +0900 (Thu, 02 Jul 2009) Log Message: ----------- TTLãã¯ãã§ãCè¨èªã¹ã¿ã¤ã«ã®ã³ã¡ã³ã(/* ï½ */)ããµãã¼ãããã ãã ããããã©ã«ãã§ã¯ç¡å¹ã¨ãã¦ããã4.63ãªãªã¼ã¹å¾ã«æå¹åï¼ ï¼å®å®ãã¦ãããªããæ£å¼ãªãªã¼ã¹ãã¦ããããã©ã Modified Paths: -------------- trunk/teraterm/ttpmacro/ttmparse.c -------------- next part -------------- Modified: trunk/teraterm/ttpmacro/ttmparse.c =================================================================== --- trunk/teraterm/ttpmacro/ttmparse.c 2009-07-01 12:51:45 UTC (rev 3567) +++ trunk/teraterm/ttpmacro/ttmparse.c 2009-07-01 16:21:53 UTC (rev 3568) @@ -11,6 +11,8 @@ #include "ttmdlg.h" #include "ttmparse.h" +/* C¾êX^CÌRgðT|[g·é©Ç¤© (2009.7.2 yutaka) */ +//#define SUPPORT_C_STYLE_COMMENT WORD TTLStatus = 0; char LineBuff[MaxLineLen]; // sobt@ÌTCYðg£µ½B(2007.6.9 maya) @@ -329,7 +331,9 @@ BYTE GetFirstChar() { + static int commenting = 0; BYTE b; + int comment_starting = 0; if (LinePtr<LineLen) b = LineBuff[LinePtr]; @@ -340,6 +344,52 @@ LinePtr++; if (LinePtr<LineLen) b = LineBuff[LinePtr]; } + +#ifdef SUPPORT_C_STYLE_COMMENT + if (commenting) { + while (LinePtr < LineLen) { + /* RgÌIíèªoÄéÜÅXLbv */ + if (LineBuff[LinePtr] == '*' && LineBuff[LinePtr + 1] == '/') { + commenting = 0; + LinePtr += 2; + break; + } + LinePtr++; + } + /* êsÉRgÌIíèªÈ©Á½çAÌsðÇÞB*/ + if (commenting) + return 0; // next line + + if (LinePtr < LineLen) + b = LineBuff[LinePtr]; + else + b = 0; + } + + /* C¾êRgÌnÜè */ + if (LineBuff[LinePtr] == '/' && LineBuff[LinePtr + 1] == '*') { + comment_starting = 1; + LinePtr += 2; + while (LinePtr < LineLen) { + /* RgÌIíèªoÄéÜÅXLbv */ + if (LineBuff[LinePtr] == '*' && LineBuff[LinePtr + 1] == '/') { + LinePtr += 2; + comment_starting = 0; + break; + } + LinePtr++; + } + if (LinePtr < LineLen) + b = LineBuff[LinePtr]; + else + b = 0; + + /* RgÌIíèªêsÉoêµÈ¢êÍAi±IÉL^·éB*/ + if (comment_starting) + commenting = 1; + } +#endif + if ((b>' ') && (b!=';')) { LinePtr++;