[Ttssh2-commit] [3958] マクロコマンド filetruncate を追加した。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 7月 29日 (木) 00:44:25 JST


Revision: 3958
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3958
Author:   yutakapon
Date:     2010-07-29 00:44:25 +0900 (Thu, 29 Jul 2010)

Log Message:
-----------
マクロコマンド filetruncate を追加した。

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 14:47:28 UTC (rev 3957)
+++ trunk/doc/en/html/macro/command/filetruncate.html	2010-07-28 15:44:25 UTC (rev 3958)
@@ -35,8 +35,8 @@
 <h2>Example</h2>
 
 <pre class="macro-example">
+; Changes 32 bytes of a file.
 filetruncate 'test.exe' 32
-
 if result = -1 then
 	messagebox 'file truncate error' 'filetruncate'
 else
@@ -44,5 +44,25 @@
 endif
 </pre>
 
+<pre class="macro-example">
+; Makes 8M bytes of a file containing all zero data.
+size = 8*1024*1024
+filetruncate 'bigfile.bin' size
+</pre>
+
+<pre class="macro-example">
+; Quotas the limitation size of a log file.
+maxsize = 1024
+logopen filename 0 0
+:loop
+logwrite '...'
+filetruncate filename maxsize
+do something...
+if err goto exit
+goto loop
+:exit
+logclose
+</pre>
+
 </body>
 </html>

Modified: trunk/doc/ja/html/macro/command/filetruncate.html
===================================================================
--- trunk/doc/ja/html/macro/command/filetruncate.html	2010-07-28 14:47:28 UTC (rev 3957)
+++ trunk/doc/ja/html/macro/command/filetruncate.html	2010-07-28 15:44:25 UTC (rev 3958)
@@ -34,8 +34,8 @@
 <h2>—á</h2>
 
 <pre class="macro-example">
+; ƒtƒ@ƒCƒ‹‚ð32ƒoƒCƒg‚ɐ؂è‹l‚ß‚é
 filetruncate 'test.exe' 32
-
 if result = -1 then
 	messagebox 'file truncate error' 'filetruncate'
 else
@@ -43,5 +43,25 @@
 endif
 </pre>
 
+<pre class="macro-example">
+; 8MB‚Ì‹óƒtƒ@ƒCƒ‹‚ðì‚é
+size = 8*1024*1024
+filetruncate 'bigfile.bin' size
+</pre>
+
+<pre class="macro-example">
+; ƒƒOƒtƒ@ƒCƒ‹‚̃TƒCƒY‚ɏãŒÀ‚ðÝ‚¯‚é
+maxsize = 1024
+logopen filename 0 0
+:loop
+logwrite '...'
+filetruncate filename maxsize
+do something...
+if err goto exit
+goto loop
+:exit
+logclose
+</pre>
+
 </body>
 </html>



Ttssh2-commit メーリングリストの案内
Back to archive index