diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8fa2eb48a4..fd44f3693e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,20 @@ +2000-08-08 17:15 UTC-0400 David G. Holm + + * tests/fsplit.prg + + Added a MAIN() wrapper, so that the program will work with + all versions of Harbour. + ! Changed nbyte parameter in fsplit() to actually be numeric. + ! Changed the read/write buffer size to match the split size, + so that the program will actually split the input file into + multiple files of the desired size, rather than using a size + that is the next largest multiple of 8KB. + * tests/onidle.prg + ! Changed text to match program behaviour (i.e., press any key + or wait 30 seconds). + * tests/testwarn.prg + + Changes THEMAIN() to MAIN(), so that the program will work + with all versions of Harbour. + 2000-08-08 18:05 UTC+0100 Ryszard Glab *include/hberrors.h diff --git a/harbour/tests/fsplit.prg b/harbour/tests/fsplit.prg index 3ade0ddcef..f839e2c8ed 100644 --- a/harbour/tests/fsplit.prg +++ b/harbour/tests/fsplit.prg @@ -4,12 +4,16 @@ #include "fileio.ch" +procedure main( cSource, cSplit, nByte ) + ? fsplit( cSource, cSplit, VAL( nByte ) ) +quit + function fsplit ( csource, csplit, nbyte ) local i // general counter local ccommand := "" // dos command for joining files local cexist := "" // batch file error checker -local nbufsize := 8 // 8k for buffer Read/Write +local nbufsize := 8 // default buffer Read/Write size local hsource := 0 // file handle for source file local hdestination := 0 // file handle for destination file local cbuffer := "" // buffer for read/write @@ -42,7 +46,8 @@ endif csplit := if( csplit == nil, "split.", csplit + "." ) // default size of each split file 360 x 1024 bytes -nbyte := if( nbyte == nil, 368640, val( nbyte ) * 1024 ) +nbufsize := if( empty( nbyte ), 360, nbyte ) +nbyte := nbufsize * 1024 // open the source file BEGIN SEQUENCE diff --git a/harbour/tests/onidle.prg b/harbour/tests/onidle.prg index 64a06eafaf..8435804cf3 100644 --- a/harbour/tests/onidle.prg +++ b/harbour/tests/onidle.prg @@ -13,7 +13,7 @@ LOCAL nPrev:=SECONDS() CLS ? " Time: Memory used: Miliseconds elapsed" ? - ? "Can you see it ??? :) Press ESC or wait 5 seconds" + ? "Can you see it ??? :) Press any key or wait 30 seconds" ? ? @ 10,2 SAY "Memory before TEST() call" + STR( MEMORY(HB_MEM_USED) ) diff --git a/harbour/tests/testwarn.prg b/harbour/tests/testwarn.prg index ba285cba5d..0509df854f 100644 --- a/harbour/tests/testwarn.prg +++ b/harbour/tests/testwarn.prg @@ -55,7 +55,7 @@ MEMVAR Var1 AS STRING STATIC lGlobal AS LOGICAL -PROCEDURE THEMAIN( optional ) +PROCEDURE MAIN( optional ) STATIC lStatic := 0, oMyObj As Class WrongClass