svnno****@sourc*****
svnno****@sourc*****
2010年 8月 21日 (土) 17:18:06 JST
Revision: 4033 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4033 Author: maya Date: 2010-08-21 17:18:06 +0900 (Sat, 21 Aug 2010) Log Message: ----------- strjoin, strtrim, strsplit ãã¯ãã³ãã³ãã® special å¼æ°ãåé¤ãã Modified Paths: -------------- trunk/doc/en/html/macro/command/strjoin.html trunk/doc/en/html/macro/command/strsplit.html trunk/doc/en/html/macro/command/strtrim.html trunk/doc/ja/html/macro/command/strjoin.html trunk/doc/ja/html/macro/command/strsplit.html trunk/doc/ja/html/macro/command/strtrim.html trunk/teraterm/ttpmacro/ttl.c -------------- next part -------------- Modified: trunk/doc/en/html/macro/command/strjoin.html =================================================================== --- trunk/doc/en/html/macro/command/strjoin.html 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/doc/en/html/macro/command/strjoin.html 2010-08-21 08:18:06 UTC (rev 4033) @@ -20,7 +20,7 @@ <h2>Format</h2> <pre class="macro-syntax"> -strjoin <strvar> <separator> <count> [<special>] +strjoin <strvar> <separator> <count> </pre> <h2>Remarks</h2> @@ -37,30 +37,6 @@ The <count> is specified the maximum number of substrings to concatenate. </p> -<p> -If <special> is non-zero, following strings in <message> is treated as spacial character.<br> -If <special> is not specified then 1 is used. -</p> - -<table> - <tr> - <th>input</th> - <th>output</th> - </tr> - <tr> - <td>\\</td> - <td>"\"</td> - </tr> - <tr> - <td>\n</td> - <td>line feed</td> - </tr> - <tr> - <td>\t</td> - <td>tab</td> - </tr> -</table> - <h2>Example</h2> <pre class="macro-example"> Modified: trunk/doc/en/html/macro/command/strsplit.html =================================================================== --- trunk/doc/en/html/macro/command/strsplit.html 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/doc/en/html/macro/command/strsplit.html 2010-08-21 08:18:06 UTC (rev 4033) @@ -20,7 +20,7 @@ <h2>Format</h2> <pre class="macro-syntax"> -strsplit <strval> <separator> <count> [<special>] +strsplit <strval> <separator> <count> </pre> <h2>Remarks</h2> @@ -38,30 +38,6 @@ If a number of substrings is smaller than <count>, the remaining groupmatchstr variables stores NULL. </p> -<p> -If <special> is non-zero, following strings in <message> is treated as spacial character.<br> -If <special> is not specified then 1 is used. -</p> - -<table> - <tr> - <th>input</th> - <th>output</th> - </tr> - <tr> - <td>\\</td> - <td>"\"</td> - </tr> - <tr> - <td>\n</td> - <td>line feed</td> - </tr> - <tr> - <td>\t</td> - <td>tab</td> - </tr> -</table> - <!--p> ÀÛɪ³ê½ÂðVXeÏ result Éi[·éB </p--> Modified: trunk/doc/en/html/macro/command/strtrim.html =================================================================== --- trunk/doc/en/html/macro/command/strtrim.html 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/doc/en/html/macro/command/strtrim.html 2010-08-21 08:18:06 UTC (rev 4033) @@ -20,7 +20,7 @@ <h2>Format</h2> <pre class="macro-syntax"> -strtrim <strvar> <trimchars> [<special>] +strtrim <strvar> <trimchars> </pre> <h2>Remarks</h2> @@ -29,30 +29,6 @@ Removes all occurrences of a set of characters specified in the <trimchars> from the beginning end end of the string variable <strvar>. </p> -<p> -If <special> is non-zero, following strings in <message> is treated as spacial character.<br> -If <special> is not specified then 1 is used. -</p> - -<table> - <tr> - <th>input</th> - <th>output</th> - </tr> - <tr> - <td>\\</td> - <td>"\"</td> - </tr> - <tr> - <td>\n</td> - <td>line feed</td> - </tr> - <tr> - <td>\t</td> - <td>tab</td> - </tr> -</table> - <h2>Example</h2> <pre class="macro-example"> Modified: trunk/doc/ja/html/macro/command/strjoin.html =================================================================== --- trunk/doc/ja/html/macro/command/strjoin.html 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/doc/ja/html/macro/command/strjoin.html 2010-08-21 08:18:06 UTC (rev 4033) @@ -20,7 +20,7 @@ <h2>`®</h2> <pre class="macro-syntax"> -strjoin <strvar> <separator> <count> [<special>] +strjoin <strvar> <separator> <count> </pre> <h2>ðà</h2> @@ -37,30 +37,6 @@ <count> ÉÍAA·éª¶ñÌÅåi9Ⱥjðwè·éB </p> -<p> -<special> ª 1 ÌêÍA<separator> ÉÜÜêéȺ̶ñÍÁê¶ÆµÄµíêéB<br> -<special> ªwè³êÈ¢êÍ 1 ªgp³êéB -</p> - -<table> - <tr> - <th>üÍ</th> - <th>oÍ</th> - </tr> - <tr> - <td>\\</td> - <td>"\"</td> - </tr> - <tr> - <td>\n</td> - <td>üs</td> - </tr> - <tr> - <td>\t</td> - <td>^u</td> - </tr> -</table> - <h2>á</h2> <pre class="macro-example"> Modified: trunk/doc/ja/html/macro/command/strsplit.html =================================================================== --- trunk/doc/ja/html/macro/command/strsplit.html 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/doc/ja/html/macro/command/strsplit.html 2010-08-21 08:18:06 UTC (rev 4033) @@ -20,7 +20,7 @@ <h2>`®</h2> <pre class="macro-syntax"> -strsplit <strval> <separator> <count> [<special>] +strsplit <strval> <separator> <count> </pre> <h2>ðà</h2> @@ -39,30 +39,6 @@ </p> <p> -<special> ª 1 ÌêÍA<separator> ÉÜÜêéȺ̶ñÍÁê¶ÆµÄµíêéB<br> -<special> ªwè³êÈ¢êÍ 1 ªgp³êéB -</p> - -<table> - <tr> - <th>üÍ</th> - <th>oÍ</th> - </tr> - <tr> - <td>\\</td> - <td>"\"</td> - </tr> - <tr> - <td>\n</td> - <td>üs</td> - </tr> - <tr> - <td>\t</td> - <td>^u</td> - </tr> -</table> - -<p> ÀÛɪ³ê½ÂðVXeÏ result Éi[·éB </p> Modified: trunk/doc/ja/html/macro/command/strtrim.html =================================================================== --- trunk/doc/ja/html/macro/command/strtrim.html 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/doc/ja/html/macro/command/strtrim.html 2010-08-21 08:18:06 UTC (rev 4033) @@ -20,7 +20,7 @@ <h2>`®</h2> <pre class="macro-syntax"> -strtrim <strvar> <trimchars> [<special>] +strtrim <strvar> <trimchars> </pre> <h2>ðà</h2> @@ -29,30 +29,6 @@ ¶ñÏ <strvar>ÌæªÆö©çA<trimchars> Åwè³ê½¶ð·×Äí·éB </p> -<p> -<special> ª 1 ÌêÍA<separator> ÉÜÜêéȺ̶ñÍÁê¶ÆµÄµíêéB<br> -<special> ªwè³êÈ¢êÍ 1 ªgp³êéB -</p> - -<table> - <tr> - <th>üÍ</th> - <th>oÍ</th> - </tr> - <tr> - <td>\\</td> - <td>"\"</td> - </tr> - <tr> - <td>\n</td> - <td>üs</td> - </tr> - <tr> - <td>\t</td> - <td>^u</td> - </tr> -</table> - <h2>á</h2> <pre class="macro-example"> Modified: trunk/teraterm/ttpmacro/ttl.c =================================================================== --- trunk/teraterm/ttpmacro/ttl.c 2010-08-21 04:50:45 UTC (rev 4032) +++ trunk/teraterm/ttpmacro/ttl.c 2010-08-21 08:18:06 UTC (rev 4033) @@ -3567,29 +3567,18 @@ TStrVal trimchars; WORD Err, VarId; int srclen; - int i, start, end, sp; + int i, start, end; char *srcptr, *p; char table[256]; Err = 0; GetStrVar(&VarId,&Err); GetStrVal(trimchars,&Err); - // get 3rd arg(optional) if given - if (CheckParameterGiven()) { - GetIntVal(&sp, &Err); - } else { - /* ftHgͧäR[hµ¢Æ·éB*/ - sp = 1; - } + if ((Err==0) && (GetFirstChar()!=0)) Err = ErrSyntax; if (Err!=0) return Err; - if (sp) { - // üsR[hðÏ··é - RestoreNewLine(trimchars); - } - srcptr = StrVarPtr(VarId); srclen = strlen(srcptr); @@ -3631,7 +3620,7 @@ #define MAXVARNUM 9 TStrVal src, delimchars, buf; WORD Err; - int maxvar, sp; + int maxvar; int srclen, len; int i, count; char *p; @@ -3641,13 +3630,7 @@ GetStrVal(src,&Err); GetStrVal(delimchars,&Err); GetIntVal(&maxvar,&Err); - // get 3rd arg(optional) if given - if (CheckParameterGiven()) { - GetIntVal(&sp, &Err); - } else { - /* ftHgͧäR[hµ¢Æ·éB*/ - sp = 1; - } + if ((Err==0) && (GetFirstChar()!=0)) Err = ErrSyntax; if (Err!=0) return Err; @@ -3655,11 +3638,6 @@ if (maxvar < 1 || maxvar > MAXVARNUM) return ErrSyntax; - if (sp) { - // üsR[hðÏ··é - RestoreNewLine(delimchars); - } - // f~^Í1¶ÌÝÆ·éB len = strlen(delimchars); if (len != 1) @@ -3733,7 +3711,7 @@ TStrVal delimchars, buf; WORD Err, VarId; WORD VarType; - int maxvar, sp; + int maxvar; int srclen; int i; char *srcptr, *p; @@ -3742,13 +3720,7 @@ GetStrVar(&VarId,&Err); GetStrVal(delimchars,&Err); GetIntVal(&maxvar,&Err); - // get 3rd arg(optional) if given - if (CheckParameterGiven()) { - GetIntVal(&sp, &Err); - } else { - /* ftHgͧäR[hµ¢Æ·éB*/ - sp = 1; - } + if ((Err==0) && (GetFirstChar()!=0)) Err = ErrSyntax; if (Err!=0) return Err; @@ -3756,11 +3728,6 @@ if (maxvar < 1 || maxvar > MAXVARNUM) return ErrSyntax; - if (sp) { - // üsR[hðÏ··é - RestoreNewLine(delimchars); - } - srcptr = StrVarPtr(VarId); srclen = strlen(srcptr);