diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c39d7431bb..b3111eeeff 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,15 @@ +19991004-19:23 GMT+1 Victor Szel + * tests/broken/*.* moved to tests/working + tests/working/Makefile + * moved to the BAD_PRG_SOURCES + - tests/broken/ + - Removed + * tests/working/hscript/*.* moved to samples/hscript + * Moved + * source/rtl/mlcount.c + * BYTE type changed to USHORT. + * Hungarian notation slighly corrected. + 19991004-18:58 GMT+1 Victor Szel + source/runner/stdalone/hbrun.prg + Added (now for sure) diff --git a/harbour/tests/working/hscript/bld32exe.bat b/harbour/samples/hscript/bld32exe.bat similarity index 100% rename from harbour/tests/working/hscript/bld32exe.bat rename to harbour/samples/hscript/bld32exe.bat diff --git a/harbour/tests/working/hscript/bldguest.bat b/harbour/samples/hscript/bldguest.bat similarity index 100% rename from harbour/tests/working/hscript/bldguest.bat rename to harbour/samples/hscript/bldguest.bat diff --git a/harbour/tests/working/hscript/cgi.ch b/harbour/samples/hscript/cgi.ch similarity index 100% rename from harbour/tests/working/hscript/cgi.ch rename to harbour/samples/hscript/cgi.ch diff --git a/harbour/tests/working/hscript/dir.hs b/harbour/samples/hscript/dir.hs similarity index 100% rename from harbour/tests/working/hscript/dir.hs rename to harbour/samples/hscript/dir.hs diff --git a/harbour/tests/working/hscript/guestbk.htm b/harbour/samples/hscript/guestbk.htm similarity index 100% rename from harbour/tests/working/hscript/guestbk.htm rename to harbour/samples/hscript/guestbk.htm diff --git a/harbour/tests/working/hscript/guestbk.ini b/harbour/samples/hscript/guestbk.ini similarity index 100% rename from harbour/tests/working/hscript/guestbk.ini rename to harbour/samples/hscript/guestbk.ini diff --git a/harbour/tests/working/hscript/guestbk.prg b/harbour/samples/hscript/guestbk.prg similarity index 100% rename from harbour/tests/working/hscript/guestbk.prg rename to harbour/samples/hscript/guestbk.prg diff --git a/harbour/tests/working/hscript/guestbk.txt b/harbour/samples/hscript/guestbk.txt similarity index 100% rename from harbour/tests/working/hscript/guestbk.txt rename to harbour/samples/hscript/guestbk.txt diff --git a/harbour/tests/working/hscript/hb32.bat b/harbour/samples/hscript/hb32.bat similarity index 100% rename from harbour/tests/working/hscript/hb32.bat rename to harbour/samples/hscript/hb32.bat diff --git a/harbour/tests/working/hscript/hello.hs b/harbour/samples/hscript/hello.hs similarity index 100% rename from harbour/tests/working/hscript/hello.hs rename to harbour/samples/hscript/hello.hs diff --git a/harbour/tests/working/hscript/hscript.prg b/harbour/samples/hscript/hscript.prg similarity index 100% rename from harbour/tests/working/hscript/hscript.prg rename to harbour/samples/hscript/hscript.prg diff --git a/harbour/tests/working/hscript/makehs.bat b/harbour/samples/hscript/makehs.bat similarity index 100% rename from harbour/tests/working/hscript/makehs.bat rename to harbour/samples/hscript/makehs.bat diff --git a/harbour/tests/working/hscript/makehtm.bat b/harbour/samples/hscript/makehtm.bat similarity index 100% rename from harbour/tests/working/hscript/makehtm.bat rename to harbour/samples/hscript/makehtm.bat diff --git a/harbour/tests/working/hscript/multiply.hs b/harbour/samples/hscript/multiply.hs similarity index 100% rename from harbour/tests/working/hscript/multiply.hs rename to harbour/samples/hscript/multiply.hs diff --git a/harbour/tests/working/hscript/readme.txt b/harbour/samples/hscript/readme.txt similarity index 100% rename from harbour/tests/working/hscript/readme.txt rename to harbour/samples/hscript/readme.txt diff --git a/harbour/tests/working/hscript/ugly.hs b/harbour/samples/hscript/ugly.hs similarity index 100% rename from harbour/tests/working/hscript/ugly.hs rename to harbour/samples/hscript/ugly.hs diff --git a/harbour/source/rtl/mlcount.c b/harbour/source/rtl/mlcount.c index 4e83a67b0c..3760fb2069 100644 --- a/harbour/source/rtl/mlcount.c +++ b/harbour/source/rtl/mlcount.c @@ -37,33 +37,33 @@ HARBOUR HB_MLCOUNT( void ) { - char * pString = hb_parc( 1 ); - BYTE bLineLength = ISNUM( 2 ) ? hb_parni( 2 ) : 79; - BYTE bTabLength = ISNUM( 3 ) ? hb_parni( 3 ) : 4; - BYTE bLastSpace = 0; - BYTE bCurLength = 0; - BOOL bWordWrap = ISLOG( 4 ) ? hb_parl( 4 ) : TRUE; - ULONG ulLen = hb_parclen( 1 ); - ULONG ulLines = 0; + char * pszString = hb_parc( 1 ); + USHORT uiLineLength = ISNUM( 2 ) ? hb_parni( 2 ) : 79; + USHORT uiTabLength = ISNUM( 3 ) ? hb_parni( 3 ) : 4; + USHORT uiLastSpace = 0; + USHORT uiCurLength = 0; + BOOL bWordWrap = ISLOG( 4 ) ? hb_parl( 4 ) : TRUE; + ULONG ulLen = hb_parclen( 1 ); + ULONG ulLines = 0; ULONG ulPos; - if( bLineLength < 4 || bLineLength > 254 ) - bLineLength = 79; + if( uiLineLength < 4 || uiLineLength > 254 ) + uiLineLength = 79; - if( bTabLength > bLineLength ) - bTabLength = bLineLength - 1; + if( uiTabLength > uiLineLength ) + uiTabLength = uiLineLength - 1; for( ulPos = 0; ulPos < ulLen; ulPos++ ) { - switch( pString[ ulPos ] ) + switch( pszString[ ulPos ] ) { case HB_CHAR_HT: - bCurLength += bTabLength; + uiCurLength += uiTabLength; break; case HB_CHAR_LF: - bCurLength = 0; - bLastSpace = 0; + uiCurLength = 0; + uiLastSpace = 0; ulLines++; break; @@ -71,32 +71,32 @@ HARBOUR HB_MLCOUNT( void ) break; case ' ': - bCurLength++; - bLastSpace = bCurLength; + uiCurLength++; + uiLastSpace = uiCurLength; break; default: - bCurLength++; + uiCurLength++; } - if( bCurLength > bLineLength ) + if( uiCurLength > uiLineLength ) { - if( bWordWrap ) + if( bWordWrap ) { - if( bLastSpace == 0 ) - bCurLength = 1; + if( uiLastSpace == 0 ) + uiCurLength = 1; else - bCurLength = bCurLength - bLastSpace; + uiCurLength = uiCurLength - uiLastSpace; } else - bCurLength = 1; + uiCurLength = 1; ulLines++; - bLastSpace = 0; + uiLastSpace = 0; } } - if( bCurLength > 0 ) + if( uiCurLength > 0 ) ulLines++; hb_retnl( ulLines ); diff --git a/harbour/tests/broken/clasname.prg b/harbour/tests/broken/clasname.prg deleted file mode 100644 index 3032128c8a..0000000000 --- a/harbour/tests/broken/clasname.prg +++ /dev/null @@ -1,47 +0,0 @@ -// -// $Id$ -// - -// The following code tests the application of the className message -// against the "fundemental" types of Clipper. - -// These tests were written by Dave Pearson -// and are placed into the public domain. - -Function Main() - - // First, try all the types. This checks that the VM can cope. - - aeval( { NIL, "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },; - {|x| qout( x:className ) } ) - - // Now try against values "in the code". This checks that the - // compiler can cope. - - qout( NIL:className ) - qout( "":className ) - qout( 0:className ) - qout( ctod( "" ):className ) - qout( .f.:className ) - qout( {|| nil }:className ) - qout( ErrorNew():className ) - - // For fun, do it again while ensuring the parser doesn't care about - // whitespace. - - qout( NIL : className ) - qout( "" : className ) - qout( 0 : className ) - qout( ctod( "" ) : className ) - qout( .f. : className ) - qout( {|| nil } : className ) - qout( ErrorNew() : className ) - - // Now for some sillier ones. If the above work the following should - // work too. - - qout( ( NIL:className ):className ) - qout( qout( ( NIL:className ):className ):className ) - -Return( NIL ) - diff --git a/harbour/tests/working/Makefile b/harbour/tests/working/Makefile index 23176007a9..a93cc963a4 100644 --- a/harbour/tests/working/Makefile +++ b/harbour/tests/working/Makefile @@ -36,7 +36,6 @@ PRG_SOURCES=\ calling.prg \ cdow.prg \ clasinit.prg \ - clasname.prg \ classch.prg \ classes.prg \ clsdata.prg \ @@ -157,10 +156,13 @@ PRG_HEADERS=\ BAD_PRG_SOURCES=\ alias.prg \ + clasname.prg \ dupvars.prg \ extend1.prg \ keywords.prg \ linecont.prg \ + lnlenli1.prg \ + lnlenli2.prg \ setkeys.prg \ spawn.prg \ spawn2.prg \ @@ -168,6 +170,7 @@ BAD_PRG_SOURCES=\ statics2.prg \ test10.prg \ testid.prg \ + vec1.prg \ C_SOURCES=\ diff --git a/harbour/tests/working/clasname.prg b/harbour/tests/working/clasname.prg index 79753321c4..c01c9b901b 100644 --- a/harbour/tests/working/clasname.prg +++ b/harbour/tests/working/clasname.prg @@ -1,3 +1,4 @@ +//NOTEST // // $Id$ // @@ -12,10 +13,10 @@ Function Main() // First, try all the types. This checks that the VM can cope. - aEval( { /* NIL, */ "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },; + aeval( { NIL, "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },; {|x| qout( x:className ) } ) -/* // Now try against values "in the code". This checks that the + // Now try against values "in the code". This checks that the // compiler can cope. qout( NIL:className ) @@ -41,7 +42,7 @@ Function Main() // work too. qout( ( NIL:className ):className ) - qout( qout( ( NIL:className ):className ):className ) */ + qout( qout( ( NIL:className ):className ):className ) Return( NIL ) diff --git a/harbour/tests/broken/lnlenli1.prg b/harbour/tests/working/lnlenli1.prg similarity index 99% rename from harbour/tests/broken/lnlenli1.prg rename to harbour/tests/working/lnlenli1.prg index 6dc29dfbfb..414f990a23 100644 --- a/harbour/tests/broken/lnlenli1.prg +++ b/harbour/tests/working/lnlenli1.prg @@ -1,3 +1,4 @@ +//NOTEST // // $Id$ // diff --git a/harbour/tests/broken/lnlenli2.prg b/harbour/tests/working/lnlenli2.prg similarity index 99% rename from harbour/tests/broken/lnlenli2.prg rename to harbour/tests/working/lnlenli2.prg index 7c7f1bd9fc..c9ee772ab4 100644 --- a/harbour/tests/broken/lnlenli2.prg +++ b/harbour/tests/working/lnlenli2.prg @@ -1,3 +1,4 @@ +//NOTEST // // $Id$ // diff --git a/harbour/tests/broken/vec1.prg b/harbour/tests/working/vec1.prg similarity index 96% rename from harbour/tests/broken/vec1.prg rename to harbour/tests/working/vec1.prg index b7e8da30ea..45631cef8c 100644 --- a/harbour/tests/broken/vec1.prg +++ b/harbour/tests/working/vec1.prg @@ -1,3 +1,4 @@ +//NOTEST // // $Id$ //