diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2bb1a76959..4295f7c2ff 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,26 @@ +1999-12-29 19:00 EDT David G. Holm + + * doc/gmake.txt + + Added mention of -DHARBOUR_USE_CRS_GTAPI and + -DHARBOUR_USE_SLN_GTAPI for os2/gcc and linux/gcc. + + * tests/boxtest.prg + ! Changed function name from test() to main(), because of + limitations with some versions of Harbour, such as MingW32. + + * tests/Makefile + ! Moved tstprag.prg from PRG_SOURCES to BAD_PRG_SOURCES. + + * tests/readhrb.prg + ! Added error checking after attempting to open the source HRB + file, because otherwise the program attempts to display a very + large random number of bytes from a file handle that doesn't + exist, resulting in what appears to be an infinite loop. + + * tests/tstprag.prg + ! Added // NOTEST as first line in this test program that + won't compile. + 19991227-08:30 GMT+2 Chen Kedem * source/rtl/readvar.prg + doc for READVAR() diff --git a/harbour/doc/gmake.txt b/harbour/doc/gmake.txt index 3d5e3f01cc..cc7c401c7a 100644 --- a/harbour/doc/gmake.txt +++ b/harbour/doc/gmake.txt @@ -160,12 +160,20 @@ For MSVC on Win95/WinNT: For GCC on Linux: HB_ARCHITECTURE linux HB_COMPILER gcc + Note: If you have an ncurses library or a slang library, you may + want to try one of the following two values for C_USR: + -DHARBOUR_USE_CRS_GTAPI + -DHARBOUR_USE_SLN_GTAPI For GCC on OS/2: Note: You must point C_INCLUDE_PATH to the EMX include directory and you must also point LIBRARY_PATH to the EMX library directory. HB_ARCHITECTURE os2 HB_COMPILER gcc + Note: If you have an ncurses library or a slang library, you may + want to try one of the following two values for C_USR: + -DHARBOUR_USE_CRS_GTAPI + -DHARBOUR_USE_SLN_GTAPI For IBM Visual Age C++ on OS/2: Note: You must create an empty unistd.h in the IBMCPP\INCLUDE directory. diff --git a/harbour/tests/Makefile b/harbour/tests/Makefile index beeecce836..e950d7ddf5 100644 --- a/harbour/tests/Makefile +++ b/harbour/tests/Makefile @@ -16,10 +16,10 @@ LIBS=\ vm \ rdd \ rtl \ - macro \ + macro \ pp \ runner \ - common \ + common \ ifeq ($(PM),) PM := $(pm) @@ -144,7 +144,6 @@ PRG_SOURCES=\ testwarn.prg \ tstalias.prg \ tstcolor.prg \ - tstprag.prg \ version.prg \ while.prg \ @@ -170,6 +169,7 @@ BAD_PRG_SOURCES=\ statics2.prg \ test10.prg \ testid.prg \ + tstprag.prg \ vec1.prg \ C_SOURCES=\ diff --git a/harbour/tests/boxtest.prg b/harbour/tests/boxtest.prg index 23b8ccb768..891c0a1675 100644 --- a/harbour/tests/boxtest.prg +++ b/harbour/tests/boxtest.prg @@ -2,7 +2,7 @@ * $Id$ */ -function test() +function main() CLS diff --git a/harbour/tests/readhrb.prg b/harbour/tests/readhrb.prg index 6c8290bdd4..0f0d3adc2a 100644 --- a/harbour/tests/readhrb.prg +++ b/harbour/tests/readhrb.prg @@ -42,63 +42,65 @@ function Main( cFrom ) endif hFile := fOpen( cFrom ) - - cBlock := fReadStr( hFile, 4 ) - nSymbols := asc(substr(cBlock,1,1)) +; - asc(substr(cBlock,2,1)) *256 +; - asc(substr(cBlock,3,1)) *65536 +; - asc(substr(cBlock,4,1)) *16777216 - for n := 1 to nSymbols - cBlock := fReadStr( hFile, 1 ) - do while asc( cBlock ) != 0 - QQOut( cBlock ) - cBlock := fReadStr( hFile, 1 ) - enddo - cScope := fReadStr( hFile, 1 ) - QQOut(" Scope ", Hex2Val(asc(cScope))) - cScope := fReadStr( hFile, 1 ) - nIdx := asc( cScope ) + 1 - QQOut(" Type ", aTypes[ nIdx ] ) - QOut() - next n - - cBlock := fReadStr( hFile, 4 ) - nFuncs := asc(substr(cBlock,1,1)) +; - asc(substr(cBlock,2,1)) *256 +; - asc(substr(cBlock,3,1)) *65536 +; - asc(substr(cBlock,4,1)) *16777216 - for n := 1 to nFuncs - QOut() - cBlock := fReadStr( hFile, 1 ) - do while asc( cBlock ) != 0 - QQOut( cBlock ) - cBlock := fReadStr( hFile, 1 ) - enddo - QOut( "Len = " ) + if hFile == -1 + QOut( "No such file:", cFrom ) + else cBlock := fReadStr( hFile, 4 ) - - nLenCount := asc(substr(cBlock,1,1)) +; - asc(substr(cBlock,2,1)) *256 +; - asc(substr(cBlock,3,1)) *65536 +; - asc(substr(cBlock,4,1)) *16777216 +1 - QQOut( str(nLenCount) ) - QOut() - - for m:=1 to nLenCount + nSymbols := asc(substr(cBlock,1,1)) +; + asc(substr(cBlock,2,1)) *256 +; + asc(substr(cBlock,3,1)) *65536 +; + asc(substr(cBlock,4,1)) *16777216 + for n := 1 to nSymbols cBlock := fReadStr( hFile, 1 ) - nVal := asc( cBlock ) - QQOut( Hex2Val( nVal ) ) - if nVal > 32 .and. nVal < 128 - QQOut( "("+cBlock+")" ) - endif - if m != nLenCount - QQOut(",") - endif - next m - next n + do while asc( cBlock ) != 0 + QQOut( cBlock ) + cBlock := fReadStr( hFile, 1 ) + enddo + cScope := fReadStr( hFile, 1 ) + QQOut(" Scope ", Hex2Val(asc(cScope))) + cScope := fReadStr( hFile, 1 ) + nIdx := asc( cScope ) + 1 + QQOut(" Type ", aTypes[ nIdx ] ) + QOut() + next n - fClose( cFrom ) + cBlock := fReadStr( hFile, 4 ) + nFuncs := asc(substr(cBlock,1,1)) +; + asc(substr(cBlock,2,1)) *256 +; + asc(substr(cBlock,3,1)) *65536 +; + asc(substr(cBlock,4,1)) *16777216 + for n := 1 to nFuncs + QOut() + cBlock := fReadStr( hFile, 1 ) + do while asc( cBlock ) != 0 + QQOut( cBlock ) + cBlock := fReadStr( hFile, 1 ) + enddo + QOut( "Len = " ) + cBlock := fReadStr( hFile, 4 ) + nLenCount := asc(substr(cBlock,1,1)) +; + asc(substr(cBlock,2,1)) *256 +; + asc(substr(cBlock,3,1)) *65536 +; + asc(substr(cBlock,4,1)) *16777216 +1 + QQOut( str(nLenCount) ) + QOut() + + for m:=1 to nLenCount + cBlock := fReadStr( hFile, 1 ) + nVal := asc( cBlock ) + QQOut( Hex2Val( nVal ) ) + if nVal > 32 .and. nVal < 128 + QQOut( "("+cBlock+")" ) + endif + if m != nLenCount + QQOut(",") + endif + next m + next n + + fClose( cFrom ) + end if set( _SET_ALTERNATE, .F. ) return nil diff --git a/harbour/tests/tstprag.prg b/harbour/tests/tstprag.prg index bb3f3522b1..106c63e148 100644 --- a/harbour/tests/tstprag.prg +++ b/harbour/tests/tstprag.prg @@ -1,3 +1,4 @@ +//NOTEST /* * $Id$ */