diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5470d560ee..7ba9e69563 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +19990530-17:30 CET Eddie Runia + * source/rtl/files.c + fixed 0x00 byte handling of fReadStr + * tests/working/readhrb.prg + now a Harbour program + * tests/working/readhrb.lnk + removed. No longer necessary + 19990530-11:18 EST Les. Griffith * added logic for _fscommit in files.c diff --git a/harbour/source/rtl/files.c b/harbour/source/rtl/files.c index 1b5d583a2a..6a43c11153 100644 --- a/harbour/source/rtl/files.c +++ b/harbour/source/rtl/files.c @@ -638,7 +638,7 @@ HARBOUR FREADSTR() while( readed < bytes ) { nRead = read(handle,ch,1); - if( nRead < 1 || ch[0] == 0 ) + if( nRead < 1 ) break; buffer[readed]=ch[0]; readed++; diff --git a/harbour/tests/working/readhrb.lnk b/harbour/tests/working/readhrb.lnk deleted file mode 100644 index 83d353f8d8..0000000000 --- a/harbour/tests/working/readhrb.lnk +++ /dev/null @@ -1,5 +0,0 @@ -OUTPUT READHRB.exe - - FILE READHRB.OBJ - LIB BLXCLP52, BLXRATEX - diff --git a/harbour/tests/working/readhrb.prg b/harbour/tests/working/readhrb.prg index ec063117a5..c1e75ca134 100644 --- a/harbour/tests/working/readhrb.prg +++ b/harbour/tests/working/readhrb.prg @@ -1,4 +1,3 @@ -//NOTEST /* ReadHRB @@ -6,6 +5,7 @@ ReadHRB {No .HRB extension please} */ +#include "set.ch" function Main( cFrom ) @@ -18,11 +18,12 @@ function Main( cFrom ) local cMode := "SYMBOL" local cScope local nLenCount + local nIdx + local aTypes := { "NOLINK", "FUNC", "EXTERN" } - SET EXACT ON - SET DATE TO BRITISH - SET ALTERNATE TO readhrb.out - SET ALTERNATE ON + set( _SET_EXACT, .T. ) + set( _SET_ALTERNATE, "readhrb.out" ) + set( _SET_ALTERNATE, .T. ) if cFrom == NIL cFrom := "hello.hrb" @@ -46,7 +47,8 @@ function Main( cFrom ) cScope := fReadStr( hFile, 1 ) QQOut(" Scope ", Hex2Val(asc(cScope))) cScope := fReadStr( hFile, 1 ) - QQOut(" Type ", { "NOLINK", "FUNC", "EXTERN" }[ asc(cScope)+1 ] ) + nIdx := asc( cScope ) + 1 + QQOut(" Type ", aTypes[ nIdx ] ) QOut() next n @@ -87,8 +89,7 @@ function Main( cFrom ) fClose( cFrom ) - SET ALTERNATE OFF - CLOSE ALTERNATE + set( _SET_ALTERNATE, .F. ) return nil