svnno****@sourc*****
svnno****@sourc*****
2010年 7月 30日 (金) 01:35:37 JST
Revision: 3959 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3959 Author: yutakapon Date: 2010-07-30 01:35:37 +0900 (Fri, 30 Jul 2010) Log Message: ----------- ãµã³ãã«ã³ã¼ãä¿®æ£ Modified Paths: -------------- trunk/doc/en/html/macro/command/filetruncate.html trunk/doc/ja/html/macro/command/filetruncate.html -------------- next part -------------- Modified: trunk/doc/en/html/macro/command/filetruncate.html =================================================================== --- trunk/doc/en/html/macro/command/filetruncate.html 2010-07-28 15:44:25 UTC (rev 3958) +++ trunk/doc/en/html/macro/command/filetruncate.html 2010-07-29 16:35:37 UTC (rev 3959) @@ -51,16 +51,28 @@ </pre> <pre class="macro-example"> -; Quotas the limitation size of a log file. -maxsize = 1024 +; Opens a log file at the macro file directory. +getdir dir +sprintf2 filename '%s\test.log' dir logopen filename 0 0 +; Limitation of a file size +maxsize = 512 +counter = 0 + :loop -logwrite '...' +counter = counter + 1 +sprintf2 line 'counter = %d' counter +logwrite line +logwrite #13#10 filetruncate filename maxsize -do something... -if err goto exit +if result = -1 then + messagebox 'file truncate error' 'filetruncate' + goto skip +endif +if counter > 32 goto skip goto loop -:exit + +:skip logclose </pre> Modified: trunk/doc/ja/html/macro/command/filetruncate.html =================================================================== --- trunk/doc/ja/html/macro/command/filetruncate.html 2010-07-28 15:44:25 UTC (rev 3958) +++ trunk/doc/ja/html/macro/command/filetruncate.html 2010-07-29 16:35:37 UTC (rev 3959) @@ -50,16 +50,28 @@ </pre> <pre class="macro-example"> -; Ot@CÌTCYÉãÀðݯé -maxsize = 1024 +; }Nª éêÉOt@Cðìé +getdir dir +sprintf2 filename '%s\test.log' dir logopen filename 0 0 +; t@CÌãÀTCY +maxsize = 512 +counter = 0 + :loop -logwrite '...' +counter = counter + 1 +sprintf2 line 'counter = %d' counter +logwrite line +logwrite #13#10 filetruncate filename maxsize -do something... -if err goto exit +if result = -1 then + messagebox 'file truncate error' 'filetruncate' + goto skip +endif +if counter > 32 goto skip goto loop -:exit + +:skip logclose </pre>