svnno****@sourc*****
svnno****@sourc*****
2011年 9月 14日 (水) 00:56:43 JST
Revision: 4630 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4630 Author: maya Date: 2011-09-14 00:56:41 +0900 (Wed, 14 Sep 2011) Log Message: ----------- ifdefined ãã¯ãã³ãã³ãã«æ´æ°ãªãã©ã«ã渡ã㨠TypInteger ãè¿ãåé¡ãä¿®æ£ GetFactor ã使ãã¨æ£ããå¤å®ãããªãã®ã§å¦çãåãåºãã¦å®è£ ãã Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html trunk/teraterm/ttpmacro/ttmparse.c -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2011-09-13 12:38:11 UTC (rev 4629) +++ trunk/doc/en/html/about/history.html 2011-09-13 15:56:41 UTC (rev 4630) @@ -42,6 +42,7 @@ <li>Bug fixes <ul> <li>XMODEM: The first packet is sent out twice by using the xmodem sending function. <br>cf. <a href="http://logmett.com/forum/viewtopic.php?f=2&t=354">why the first xmodem packet been always send out twice?</a></li> + <!--li><a href="../macro/command/ifdefined.html">ifdefined</a>É®eðn·Æ"®^Ï"Æ»è·éâèðC³µ½B</li--> </ul> </li> Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2011-09-13 12:38:11 UTC (rev 4629) +++ trunk/doc/ja/html/about/history.html 2011-09-13 15:56:41 UTC (rev 4630) @@ -42,6 +42,7 @@ <li>oOC³ <ul> <li>XMODEM: MAñÌpPbgª2ñçêéâèðC³µ½B<br>cf. <a href="http://logmett.com/forum/viewtopic.php?f=2&t=354">why the first xmodem packet been always send out twice?</a></li> + <li><a href="../macro/command/ifdefined.html">ifdefined</a>É®eðn·Æ"®^Ï"Æ»è·éâèðC³µ½B</li> </ul> </li> Modified: trunk/teraterm/ttpmacro/ttmparse.c =================================================================== --- trunk/teraterm/ttpmacro/ttmparse.c 2011-09-13 12:38:11 UTC (rev 4629) +++ trunk/teraterm/ttpmacro/ttmparse.c 2011-09-13 15:56:41 UTC (rev 4630) @@ -1721,12 +1721,46 @@ // for ifdefined (2006.9.23 maya) void GetVarType(LPWORD ValType, int far *Val, LPWORD Err) { - GetFactor(ValType,Val,Err); + TName Name; + WORD WId; + TVarId VarId; + int Index; + + if (GetIdentifier(Name)) { + if (CheckReservedWord(Name,&WId)) { + *ValType = TypUnknown; + } + else { + CheckVar(Name, ValType, &VarId); + switch (*ValType) { + case TypIntArray: + if (GetIndex(&Index, Err)) { + if (Index >= 0 && Index < IntAryVal[VarId].size) { + *ValType = TypInteger; + } + else { + *ValType = TypUnknown; + } + } + break; + case TypStrArray: + if (GetIndex(&Index, Err)) { + VarId = GetStrVarFromArray(VarId, Index, Err); + if (*Err == 0) { + *ValType = TypString; + } + else { + *ValType = TypUnknown; + } + } + break; + } + } + } + else { + *ValType = TypUnknown; + } - if (*Err == ErrVarNotInit) { - ValType = TypUnknown; - } - *Err = 0; }