From c0dc8c254dcc040f055ffceac976bff088441fd1 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 4 Oct 2012 10:54:07 +0000 Subject: [PATCH] 2012-10-04 12:47 UTC+0200 Viktor Szakats (harbour syenar.net) * src/rtl/tget.prg ! fixed regression from 2012-01-29 17:22 UTC+0100 when non-numeric index was allowed on a non-hash variable and then an RTE generated. Caused rto_get.prg to RTE in the middle. * contrib/gtwvg/activex.prg * contrib/gtwvg/class.prg * contrib/gtwvg/tests/demoxbp.prg * contrib/gtwvg/tests/utils.prg * contrib/rddads/doc/en/adsfuncs.txt * contrib/rddads/doc/en/readme.txt * contrib/xhb/tfile.prg * contrib/xhb/txml.prg * contrib/xhb/xhbole.prg * doc/windll.txt * extras/gtwvw/gtwvw.c * extras/gtwvw/hbgtwvw.h * extras/gtwvw/tests/maincoor.prg * extras/gtwvw/wvwcheck.c * extras/gtwvw/wvwdraw.c * extras/gtwvw/wvwedit.c * extras/gtwvw/wvwfuncs.c * extras/gtwvw/wvwmenu.c * extras/gtwvw/wvwpush.c * extras/gtwvw/wvwstbar.c * extras/gtwvw/wvwtbar.c * extras/hbdoc/tmplates.prg * tests/gtcolors.prg * tests/ipclnt.prg * tests/ipsvr.prg * tests/rto_get.prg * tests/rto_tb.prg * tests/usrrdd/exarr.prg * tests/usrrdd/exfcm.prg * tests/usrrdd/exhsx.prg * tests/usrrdd/exlog.prg * tests/usrrdd/exmemo.prg * tests/usrrdd/exrlx.prg * tests/wcecon.prg * full formatting using hbformat (where needed) * Win32 -> Windows * 32-bit deleted where it didn't make sense * using K_* constants ! fixed != operators where used on strings (more to come) Thanks to Jose F. Gimenez for the ones in txml.prg. * avoid "common.ch" % use hb_ntos() in Harbour specific code --- harbour/ChangeLog | 50 ++++++ harbour/contrib/gtwvg/activex.prg | 2 +- harbour/contrib/gtwvg/class.prg | 2 +- harbour/contrib/gtwvg/tests/demoxbp.prg | 2 +- harbour/contrib/gtwvg/tests/utils.prg | 5 +- harbour/contrib/rddads/doc/en/adsfuncs.txt | 81 +++++----- harbour/contrib/rddads/doc/en/readme.txt | 7 +- harbour/contrib/xhb/tfile.prg | 170 +++++++++------------ harbour/contrib/xhb/txml.prg | 6 +- harbour/contrib/xhb/xhbole.prg | 2 +- harbour/doc/windll.txt | 4 +- harbour/extras/gtwvw/gtwvw.c | 8 +- harbour/extras/gtwvw/hbgtwvw.h | 4 +- harbour/extras/gtwvw/tests/maincoor.prg | 58 +++---- harbour/extras/gtwvw/wvwcheck.c | 6 +- harbour/extras/gtwvw/wvwdraw.c | 6 +- harbour/extras/gtwvw/wvwedit.c | 6 +- harbour/extras/gtwvw/wvwfuncs.c | 6 +- harbour/extras/gtwvw/wvwmenu.c | 6 +- harbour/extras/gtwvw/wvwpush.c | 6 +- harbour/extras/gtwvw/wvwstbar.c | 6 +- harbour/extras/gtwvw/wvwtbar.c | 6 +- harbour/extras/hbdoc/tmplates.prg | 2 - harbour/src/rtl/tget.prg | 9 +- harbour/tests/gtcolors.prg | 4 +- harbour/tests/ipclnt.prg | 2 - harbour/tests/ipsvr.prg | 4 +- harbour/tests/rto_get.prg | 25 ++- harbour/tests/rto_tb.prg | 23 ++- harbour/tests/usrrdd/exarr.prg | 68 +++++---- harbour/tests/usrrdd/exfcm.prg | 46 +++--- harbour/tests/usrrdd/exhsx.prg | 45 +++--- harbour/tests/usrrdd/exlog.prg | 23 +-- harbour/tests/usrrdd/exmemo.prg | 6 +- harbour/tests/usrrdd/exrlx.prg | 42 ++--- harbour/tests/wcecon.prg | 2 +- 36 files changed, 405 insertions(+), 345 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5f6bcae45a..fd6488e581 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,56 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-04 12:47 UTC+0200 Viktor Szakats (harbour syenar.net) + * src/rtl/tget.prg + ! fixed regression from 2012-01-29 17:22 UTC+0100 + when non-numeric index was allowed on a non-hash + variable and then an RTE generated. + Caused rto_get.prg to RTE in the middle. + + * contrib/gtwvg/activex.prg + * contrib/gtwvg/class.prg + * contrib/gtwvg/tests/demoxbp.prg + * contrib/gtwvg/tests/utils.prg + * contrib/rddads/doc/en/adsfuncs.txt + * contrib/rddads/doc/en/readme.txt + * contrib/xhb/tfile.prg + * contrib/xhb/txml.prg + * contrib/xhb/xhbole.prg + * doc/windll.txt + * extras/gtwvw/gtwvw.c + * extras/gtwvw/hbgtwvw.h + * extras/gtwvw/tests/maincoor.prg + * extras/gtwvw/wvwcheck.c + * extras/gtwvw/wvwdraw.c + * extras/gtwvw/wvwedit.c + * extras/gtwvw/wvwfuncs.c + * extras/gtwvw/wvwmenu.c + * extras/gtwvw/wvwpush.c + * extras/gtwvw/wvwstbar.c + * extras/gtwvw/wvwtbar.c + * extras/hbdoc/tmplates.prg + * tests/gtcolors.prg + * tests/ipclnt.prg + * tests/ipsvr.prg + * tests/rto_get.prg + * tests/rto_tb.prg + * tests/usrrdd/exarr.prg + * tests/usrrdd/exfcm.prg + * tests/usrrdd/exhsx.prg + * tests/usrrdd/exlog.prg + * tests/usrrdd/exmemo.prg + * tests/usrrdd/exrlx.prg + * tests/wcecon.prg + * full formatting using hbformat (where needed) + * Win32 -> Windows + * 32-bit deleted where it didn't make sense + * using K_* constants + ! fixed != operators where used on strings (more to come) + Thanks to Jose F. Gimenez for the ones in txml.prg. + * avoid "common.ch" + % use hb_ntos() in Harbour specific code + 2012-10-04 04:56 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/tests/dyndlgs.prg * contrib/gtwvg/tests/wvtcls.prg diff --git a/harbour/contrib/gtwvg/activex.prg b/harbour/contrib/gtwvg/activex.prg index 8214dd3d50..5a532d864c 100644 --- a/harbour/contrib/gtwvg/activex.prg +++ b/harbour/contrib/gtwvg/activex.prg @@ -154,7 +154,7 @@ METHOD WvgActiveXControl:Create( oParent, oOwner, aPos, aSize, aPresParams, lVis ::license := cLicense ::hContainer := ::oParent:getHWND() - IF ValType( ::hContainer ) + ValType( ::CLSID ) != "NC" + IF ! HB_ISNUMERIC( ::hContainer ) .OR. ! HB_ISSTRING( ::CLSID ) RETURN NIL ENDIF diff --git a/harbour/contrib/gtwvg/class.prg b/harbour/contrib/gtwvg/class.prg index e096476ff0..22d91a188a 100644 --- a/harbour/contrib/gtwvg/class.prg +++ b/harbour/contrib/gtwvg/class.prg @@ -380,7 +380,7 @@ METHOD wvtDialog:Execute() ENDIF ENDDO ELSE - DO WHILE ( ::Inkey() != K_ESC ) + DO WHILE ::Inkey() != K_ESC ENDDO ENDIF diff --git a/harbour/contrib/gtwvg/tests/demoxbp.prg b/harbour/contrib/gtwvg/tests/demoxbp.prg index c60efaaac7..fec60158fa 100644 --- a/harbour/contrib/gtwvg/tests/demoxbp.prg +++ b/harbour/contrib/gtwvg/tests/demoxbp.prg @@ -258,7 +258,7 @@ FUNCTION Main() oCrt:show() DO WHILE .T. - IF inkey() == 27 + IF inkey() == K_ESC EXIT ENDIF ENDDO diff --git a/harbour/contrib/gtwvg/tests/utils.prg b/harbour/contrib/gtwvg/tests/utils.prg index 81a2bae048..539e6a6449 100644 --- a/harbour/contrib/gtwvg/tests/utils.prg +++ b/harbour/contrib/gtwvg/tests/utils.prg @@ -477,7 +477,7 @@ FUNCTION ClearStatusMsg() FUNCTION WvtPictures( nSlot,cFilePic ) IF nSlot != NIL .AND. nSlot <= 20 .AND. file( cFilePic ) - IF t_pic_[ nSlot ] != cFilePic + IF !( t_pic_[ nSlot ] == cFilePic ) IF Wvt_LoadPicture( cFilePic, nSlot ) t_pic_[ nSlot ] := cFilePic ENDIF @@ -524,7 +524,8 @@ FUNCTION MyError( oError ) ? procname( 2 ), procline( 2 ) ? procname( 3 ), procline( 3 ) ? procname( 4 ), procline( 4 ) - DO WHILE inkey() != 27; ENDDO + DO WHILE inkey() != K_ESC + ENDDO RETURN NIL diff --git a/harbour/contrib/rddads/doc/en/adsfuncs.txt b/harbour/contrib/rddads/doc/en/adsfuncs.txt index e13df4800e..86c23b50da 100644 --- a/harbour/contrib/rddads/doc/en/adsfuncs.txt +++ b/harbour/contrib/rddads/doc/en/adsfuncs.txt @@ -43,7 +43,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit only + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -83,7 +83,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit only + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -114,7 +114,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -183,7 +183,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -218,7 +218,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -251,7 +251,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -282,7 +282,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -314,7 +314,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -348,7 +348,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -384,7 +384,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -415,7 +415,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -454,7 +454,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -492,7 +492,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -541,7 +541,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -591,7 +591,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -637,7 +637,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -680,7 +680,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit + * Windows * $FILES$ * Library is RddAds * Header is ads.ch @@ -714,6 +714,7 @@ * DLLs doing all the indexing. So to do progress meters * you need to implement this. * $EXAMPLES$ + * #include "inkey.ch" * PROCEDURE Main() * ... * AdsRegCallBack( {| nPercent | outputstuff( nPercent ) } ) @@ -722,18 +723,18 @@ * The codeblock can return .T. to abort. */ * INDEX ON First+LAST+LABEL1+LABEL2 TAG First * AdsClrCallBack() - * RETURN + * RETURN * * FUNCTION outputstuff( nPercent ) /* The "callback" function */ * ? "output stuff", nPercent - * RETURN Inkey() == 27 - * /* If press ESC, returns .T. to abort. */ + * RETURN Inkey() == K_ESC + * /* If press ESC, returns .T. to abort. */ * $STATUS$ * R * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -765,7 +766,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -802,7 +803,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -841,7 +842,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -877,7 +878,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -913,7 +914,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -955,7 +956,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -987,7 +988,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * $SEEALSO$ @@ -1035,7 +1036,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1066,7 +1067,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1112,7 +1113,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1153,7 +1154,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1190,7 +1191,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1230,7 +1231,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1260,7 +1261,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * $SEEALSO$ * ADSCONNECT60() @@ -1299,7 +1300,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1337,7 +1338,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1376,7 +1377,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1413,7 +1414,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Ads 7.x and above, Windows 32-bit, Linux + * Ads 7.x and above, Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch @@ -1448,7 +1449,7 @@ * $COMPLIANCE$ * Harbour extension * $PLATFORMS$ - * Windows 32-bit, Linux + * Windows, Linux * $FILES$ * Library is RddAds * Header is ads.ch diff --git a/harbour/contrib/rddads/doc/en/readme.txt b/harbour/contrib/rddads/doc/en/readme.txt index f1863c4fbb..1cf41f6de2 100644 --- a/harbour/contrib/rddads/doc/en/readme.txt +++ b/harbour/contrib/rddads/doc/en/readme.txt @@ -128,6 +128,7 @@ * codeblock by the ADS server. * * + * #include "inkey.ch" * PROCEDURE Main() * ... * AdsRegCallBack( {| nPercent | outputstuff( nPercent ) } ) @@ -136,12 +137,12 @@ * The codeblock can return .T. to abort. */ * INDEX ON First+LAST+LABEL1+LABEL2 TAG First * AdsClrCallBack() - * RETURN + * RETURN * * FUNCTION outputstuff( nPercent ) /* The "callback" function */ * ? "output stuff", nPercent - * RETURN Inkey() == 27 - * /* If press ESC, returns .T. to abort. */ + * RETURN Inkey() == K_ESC + * /* If press ESC, returns .T. to abort. */ *
* * For programmers who are already familiar with the ACE engine, diff --git a/harbour/contrib/xhb/tfile.prg b/harbour/contrib/xhb/tfile.prg index 5f358859fa..8e85c4f3bf 100644 --- a/harbour/contrib/xhb/tfile.prg +++ b/harbour/contrib/xhb/tfile.prg @@ -49,9 +49,10 @@ #include "fileio.ch" #include "cgi.ch" -#translate FPOS() => FSEEK( , 0, FS_RELATIVE ) +#translate FPOS( ) => FSeek( , 0, FS_RELATIVE ) CLASS TCgiFile + DATA Buffer INIT "" DATA Name INIT "" DATA Handle @@ -66,24 +67,24 @@ CLASS TCgiFile METHOD Open( nMode ) - METHOD CLOSE() INLINE Fclose( ::Handle ),; - ::Handle := - 999 + METHOD CLOSE() INLINE FClose( ::Handle ), ; + ::Handle := - 999 - METHOD RENAME( c ) INLINE Frename( ::File, c ) == 0 + METHOD RENAME( c ) INLINE FRename( ::File, c ) == 0 - METHOD ERASE() INLINE Ferase( ::File ) == 0 + METHOD ERASE() INLINE FErase( ::File ) == 0 METHOD Exists() INLINE File( ::File ) - METHOD Error() INLINE Ferror() != 0 + METHOD Error() INLINE FError() != 0 - METHOD Tell() INLINE Fseek( ::handle, FS_RELATIVE, 0 ) + METHOD Tell() INLINE FSeek( ::handle, FS_RELATIVE, 0 ) METHOD Pointer() INLINE FPOS( ::handle ) METHOD ReadStr( n ) INLINE ::Buffer := ; - Freadstr( ::Handle, n ) - METHOD Write( c, n ) INLINE Fwrite( ::Handle, c, n ) + FReadStr( ::Handle, n ) + METHOD Write( c, n ) INLINE FWrite( ::Handle, c, n ) METHOD WriteByte( nByte ) @@ -93,15 +94,15 @@ CLASS TCgiFile METHOD GetBuffer() INLINE ::Buffer - METHOD GoTop() INLINE Fseek( ::Handle, 0 ) + METHOD GoTop() INLINE FSeek( ::Handle, 0 ) - METHOD GoBottom() INLINE Fseek( ::Handle, 0, FS_END ) + METHOD GoBottom() INLINE FSeek( ::Handle, 0, FS_END ) - METHOD Bof() INLINE( FPOS( ::Handle ) == 0 ) + METHOD BOF() INLINE( FPOS( ::Handle ) == 0 ) - METHOD Eof() INLINE FPOS( ::Handle ) == ::FileSize + METHOD EOF() INLINE FPOS( ::Handle ) == ::FileSize - METHOD SEEK( n, o ) INLINE Fseek( ::Handle, n, o ) + METHOD SEEK( n, o ) INLINE FSeek( ::Handle, n, o ) METHOD CREATE( nAttr ) @@ -133,10 +134,8 @@ CLASS TCgiFile ENDCLASS - METHOD New( cName ) CLASS TCgiFile - ::Name := cName ::Buffer := "" ::Handle := 0 @@ -146,22 +145,22 @@ METHOD New( cName ) CLASS TCgiFile ::nPage := 0 ::nPageSize := 1024 ::nRecord := 0 -RETURN Self + + RETURN Self /* ** ::Open( [] ) --> lSuccess */ - METHOD Open( nMode ) CLASS TCgiFile - DEFAULT nMode TO FO_EXCLUSIVE - ::Handle := Fopen( ::Name, nMode ) + ::Handle := FOpen( ::Name, nMode ) IF ::Handle > 0 ::Size() ENDIF -RETURN ::Handle > 0 + + RETURN ::Handle > 0 /* ** ::Create( [] ) --> lSuccess @@ -169,13 +168,13 @@ RETURN ::Handle > 0 METHOD CREATE ( nAttr ) CLASS TCgiFile - LOCAL nSuccess + DEFAULT nAttr TO 0 - nSuccess := Fcreate( ::Name, nAttr ) + nSuccess := FCreate( ::Name, nAttr ) ::Handle := nSuccess -RETURN nSuccess != - 1 + RETURN nSuccess != -1 /* ** ::Size() --> nFileSize @@ -183,35 +182,32 @@ RETURN nSuccess != - 1 ** RETURNs the size in bytes of the current file. */ - METHOD Size() CLASS TCgiFile - LOCAL nCurrent LOCAL nLength nCurrent := FPOS( ::Handle ) - nLength := Fseek( ::Handle, 0, FS_END ) + nLength := FSeek( ::Handle, 0, FS_END ) - Fseek( ::Handle, nCurrent ) + FSeek( ::Handle, nCurrent ) ::FileSize := nLength -RETURN nLength + RETURN nLength /* ** ::Read( [], [@] ) --> nBytesRead */ - METHOD _Read( nSize, cBuff ) CLASS TCgiFile DEFAULT nSize TO 1024 DEFAULT cBuff TO Space( nSize ) - ::BytesRead := Fread( ::Handle, @cBuff, nSize ) + ::BytesRead := FRead( ::Handle, @cBuff, nSize ) ::Buffer := cBuff -RETURN cBuff //nBytesRead ) + RETURN cBuff //nBytesRead ) /* ** ::ReadAhead( [], [@] ) --> nBytesRead @@ -219,7 +215,6 @@ RETURN cBuff //nBytesRead ) ** Read forward in the file without moving the pointer. */ - METHOD ReadAhead( nSize, cBuff ) CLASS TCgiFile LOCAL nCurrent @@ -227,25 +222,23 @@ METHOD ReadAhead( nSize, cBuff ) CLASS TCgiFile DEFAULT nSize TO 1024 DEFAULT cBuff TO Space( nSize ) - // --> save position in file +// --> save position in file nCurrent := FPOS( ::Handle ) - // --> read ahead - ::BytesRead := Fread( ::Handle, @cBuff, nSize ) +// --> read ahead + ::BytesRead := FRead( ::Handle, @cBuff, nSize ) - // --> RETURN to saved position - Fseek( ::Handle, nCurrent ) +// --> RETURN to saved position + FSeek( ::Handle, nCurrent ) -RETURN cBuff + RETURN cBuff /* ** ::ReadLine( [] ) --> cLine */ - METHOD Readline( nSize ) CLASS TCgiFile - LOCAL cString LOCAL nCurrent LOCAL nCr @@ -256,92 +249,86 @@ METHOD Readline( nSize ) CLASS TCgiFile RETURN "" ENDIF - nCurrent := Fseek( ::Handle, 0, 1 ) - cString := Freadstr( ::Handle, nSize ) + nCurrent := FSeek( ::Handle, 0, 1 ) + cString := FReadStr( ::Handle, nSize ) nCr := At( Chr( 13 ), cString ) - Fseek( ::Handle, nCurrent, 0 ) - Fseek( ::Handle, nCr + 1, 1 ) + FSeek( ::Handle, nCurrent, 0 ) + FSeek( ::Handle, nCr + 1, 1 ) - ::Buffer := Substr( cString, 1, nCr - 1 ) + ::Buffer := SubStr( cString, 1, nCr - 1 ) ::nRecord ++ -RETURN ::Buffer + RETURN ::Buffer /* ** ::ReadByte() --> nByte or -1 if unsuccessfull */ - METHOD ReadByte() CLASS TCgiFile LOCAL nBytes LOCAL cBuff := Space( 1 ) - nBytes := Fread( ::Handle, @cBuff, hb_BLen( cBuff ) ) + nBytes := FRead( ::Handle, @cBuff, hb_BLen( cBuff ) ) -RETURN iif( nBytes > 0, Asc( cBuff ), - 1 ) + RETURN iif( nBytes > 0, Asc( cBuff ), -1 ) /* ** ::ReadInt() --> nUnsignedInt or -1 if unsuccessfull */ - METHOD ReadInt() CLASS TCgiFile LOCAL nBytes LOCAL cBuff := Space( 2 ) - nBytes := Fread( ::Handle, @cBuff, hb_BLen( cBuff ) ) + nBytes := FRead( ::Handle, @cBuff, hb_BLen( cBuff ) ) -RETURN iif( nBytes > 0, Bin2i( cBuff ), - 1 ) + RETURN iif( nBytes > 0, Bin2I( cBuff ), -1 ) /* ** ::ReadLong() --> nLong or -1 if unsuccessfull */ - METHOD ReadLong() CLASS TCgiFile LOCAL nBytes LOCAL cBuff := Space( 4 ) - nBytes := Fread( ::Handle, @cBuff, hb_BLen( cBuff ) ) + nBytes := FRead( ::Handle, @cBuff, hb_BLen( cBuff ) ) -RETURN iif( nBytes > 0, Bin2l( cBuff ), - 1 ) + RETURN iif( nBytes > 0, Bin2L( cBuff ), -1 ) /* ** ::WriteByte( nByte ) --> lSuccess */ - METHOD WriteByte( nByte ) CLASS TCgiFile + LOCAL lSuccess := ( FWrite( ::nHandle, hb_BCode( nByte ), 1 ) == 1 ) - LOCAL lSuccess := ( Fwrite( ::nHandle, hb_BCode( nByte ), 1 ) == 1 ) -RETURN lSuccess + RETURN lSuccess /* ** ::WriteInt( nInt ) --> lSuccess */ - METHOD WriteInt( nInt ) CLASS TCgiFile + LOCAL lSuccess := ( FWrite( ::nHandle, I2Bin( nInt ), 2 ) == 2 ) - LOCAL lSuccess := ( Fwrite( ::nHandle, I2bin( nInt ), 2 ) == 2 ) -RETURN lSuccess + RETURN lSuccess /* ** ::WriteLong( nLong ) --> lSuccess */ - METHOD WriteLong( nLong ) CLASS TCgiFile + LOCAL lSuccess := ( FWrite( ::nHandle, L2Bin( nLong ), 4 ) == 4 ) - LOCAL lSuccess := ( Fwrite( ::nHandle, L2bin( nLong ), 4 ) == 4 ) -RETURN lSuccess + RETURN lSuccess /* ** ::GOTO( ) --> nPrevPos @@ -350,9 +337,7 @@ RETURN lSuccess ** */ - -METHOD Goto( nLine ) CLASS TCgiFile - +METHOD GOTO( nLine ) CLASS TCgiFile LOCAL nCount := 1 LOCAL nPos := FPOS( ::Handle ) @@ -379,7 +364,7 @@ METHOD Goto( nLine ) CLASS TCgiFile nCount ++ ENDDO -RETURN nPos + RETURN nPos /* ** ::Skip( [] ) --> nPrevPos @@ -388,10 +373,8 @@ RETURN nPos ** */ - METHOD SKIP( nLines ) CLASS TCgiFile - LOCAL nCount := 0 LOCAL nPos := FPOS( ::Handle ) @@ -412,28 +395,25 @@ METHOD SKIP( nLines ) CLASS TCgiFile ::ReadLine() nCount ++ ENDDO -RETURN nPos + + RETURN nPos /* ** ::MaxPages( ) --> nMaxPages */ - METHOD MaxPages( nPageSize ) CLASS TCgiFile - DEFAULT nPageSize TO ::nPageSize -RETURN ::Size() / nPageSize + + RETURN ::Size() / nPageSize /* ** ::PrevPage( [] ) --> cPage */ - METHOD PrevPage( nBytes ) CLASS TCgiFile - - DEFAULT nBytes TO 1024 IF nBytes <= 0 @@ -441,23 +421,20 @@ METHOD PrevPage( nBytes ) CLASS TCgiFile ENDIF IF !::BOF() - Fseek( ::Handle, - nBytes, FS_RELATIVE ) - ::cPage := Freadstr( ::Handle, nBytes ) - Fseek( ::Handle, - nBytes, FS_RELATIVE ) + FSeek( ::Handle, - nBytes, FS_RELATIVE ) + ::cPage := FReadStr( ::Handle, nBytes ) + FSeek( ::Handle, - nBytes, FS_RELATIVE ) ::nPage -- ENDIF -RETURN ::cPage + RETURN ::cPage /* ** ::NextPage( [] ) --> cPage */ - METHOD NextPage( nBytes ) CLASS TCgiFile - - DEFAULT nBytes TO 1024 IF nBytes <= 0 @@ -465,11 +442,11 @@ METHOD NextPage( nBytes ) CLASS TCgiFile ENDIF IF !::EOF() - ::cPage := Freadstr( ::Handle, nBytes ) + ::cPage := FReadStr( ::Handle, nBytes ) ::nPage ++ ENDIF -RETURN ::cPage + RETURN ::cPage /* ** ::PrevLine( [] ) --> ::Buffer @@ -477,7 +454,6 @@ RETURN ::cPage METHOD PrevLine( nBytes ) CLASS TCgiFile - LOCAL fHandle := ::Handle LOCAL nOrigPos := FPOS( fHandle ) LOCAL nMaxRead @@ -499,20 +475,20 @@ METHOD PrevLine( nBytes ) CLASS TCgiFile lMoved := .T. // Check preceeding 2 chars for CR+LF - Fseek( fHandle, - 2, FS_RELATIVE ) + FSeek( fHandle, - 2, FS_RELATIVE ) cTemp := Space( 2 ) - Fread( fHandle, @cTemp, hb_BLen( cTemp ) ) + FRead( fHandle, @cTemp, hb_BLen( cTemp ) ) IF cTemp == CRLF() - Fseek( fHandle, - 2, FS_RELATIVE ) + FSeek( fHandle, - 2, FS_RELATIVE ) ENDIF nMaxRead := Min( nBytes, FPOS( fHandle ) ) cBuff := Space( nMaxRead ) - nNewPos := Fseek( fHandle, - nMaxRead, FS_RELATIVE ) - Fread( fHandle, @cBuff, nMaxRead ) - nWhereCrLf := Rat( CRLF(), cBuff ) + nNewPos := FSeek( fHandle, - nMaxRead, FS_RELATIVE ) + FRead( fHandle, @cBuff, nMaxRead ) + nWhereCrLf := RAt( CRLF(), cBuff ) IF nWhereCrLf == 0 nPrev := nNewPos @@ -521,12 +497,12 @@ METHOD PrevLine( nBytes ) CLASS TCgiFile ELSE nPrev := nNewPos + nWhereCrLf + 1 - ::Buffer := Substr( cBuff, nWhereCrLf + 2 ) + ::Buffer := SubStr( cBuff, nWhereCrLf + 2 ) ENDIF - Fseek( fHandle, nPrev, FS_SET ) + FSeek( fHandle, nPrev, FS_SET ) ENDIF -RETURN iif( lMoved, ::Buffer, "" ) + RETURN iif( lMoved, ::Buffer, "" ) diff --git a/harbour/contrib/xhb/txml.prg b/harbour/contrib/xhb/txml.prg index 0b45576eec..3c49e4927e 100644 --- a/harbour/contrib/xhb/txml.prg +++ b/harbour/contrib/xhb/txml.prg @@ -266,7 +266,7 @@ RETURN Self METHOD MatchCriteria( oFound ) CLASS TXmlIteratorScan - IF ::cName != NIL .and. ( oFound:cName == NIL .or. ::cName != oFound:cName ) + IF ::cName != NIL .and. ( oFound:cName == NIL .or. !( ::cName == oFound:cName ) ) RETURN .F. ENDIF @@ -275,11 +275,11 @@ METHOD MatchCriteria( oFound ) CLASS TXmlIteratorScan ENDIF IF ::cValue != NIL .and. ; - hb_HScan( oFound:aAttributes, {| xKey, cValue| HB_SYMBOL_UNUSED( xKey ), ::cValue == cValue}) == 0 + hb_HScan( oFound:aAttributes, {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), ::cValue == cValue } ) == 0 RETURN .F. ENDIF - IF ::cData != NIL .and. ( oFound:cData == NIL .or. ::cData != oFound:cData ) + IF ::cData != NIL .and. ( oFound:cData == NIL .or. !( ::cData == oFound:cData ) ) RETURN .F. ENDIF diff --git a/harbour/contrib/xhb/xhbole.prg b/harbour/contrib/xhb/xhbole.prg index 1d21e711ae..a1b902b238 100644 --- a/harbour/contrib/xhb/xhbole.prg +++ b/harbour/contrib/xhb/xhbole.prg @@ -230,7 +230,7 @@ OLE OPERATOR "==" METHOD OleValueExactEqual WITH xArg IS ::OleValue == xArg OLE OPERATOR "=" METHOD OleValueEqual WITH xArg IS ::OleValue = xArg -OLE OPERATOR "!=" METHOD OleValueNotEqual WITH xArg IS ::OleValue != xArg +OLE OPERATOR "!=" METHOD OleValueNotEqual WITH xArg IS ::OleValue != xArg /* Intentionally using != operator */ OLE OPERATOR "+" METHOD OleValuePlus WITH xArg IS ::OleValue + xArg diff --git a/harbour/doc/windll.txt b/harbour/doc/windll.txt index 97f7283624..0bb37162c8 100644 --- a/harbour/doc/windll.txt +++ b/harbour/doc/windll.txt @@ -2,8 +2,8 @@ * $Id$ */ -Windows 32-bit DLLs with Harbour code -===================================== +Windows DLLs with Harbour code +============================== Programs created with Clipper or Harbour are traditionally a monolithic EXE containing all executable code. This includes diff --git a/harbour/extras/gtwvw/gtwvw.c b/harbour/extras/gtwvw/gtwvw.c index e3fac996d3..9f6f984053 100644 --- a/harbour/extras/gtwvw/gtwvw.c +++ b/harbour/extras/gtwvw/gtwvw.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * @@ -1177,7 +1177,7 @@ static const char * hb_gt_wvw_Version( PHB_GT pGT, int iType ) if ( iType == 0 ) return HB_GT_DRVNAME( HB_GT_NAME ); - return( "Harbour Terminal: Win32 buffered WVW" ); + return( "Harbour Terminal: Windows buffered WVW" ); } diff --git a/harbour/extras/gtwvw/hbgtwvw.h b/harbour/extras/gtwvw/hbgtwvw.h index c23fab65d1..8d05a4175c 100644 --- a/harbour/extras/gtwvw/hbgtwvw.h +++ b/harbour/extras/gtwvw/hbgtwvw.h @@ -4,13 +4,13 @@ /* * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * WITH MULTIPLE WINDOW SUPPORT * Copyright 2004 Budyanto Dj. * * initially based on: * - * Header File for Video subsystem for Win32 using GUI windows instead of Console + * Header File for Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * www - http://harbour-project.org diff --git a/harbour/extras/gtwvw/tests/maincoor.prg b/harbour/extras/gtwvw/tests/maincoor.prg index 5bb58621aa..39fc926b5d 100644 --- a/harbour/extras/gtwvw/tests/maincoor.prg +++ b/harbour/extras/gtwvw/tests/maincoor.prg @@ -9,33 +9,39 @@ Standard Mode of GTWVW. */ +#include "inkey.ch" -proc main - setcolor("N/W") +PROCEDURE Main() - WVW_SetMainCoord(.F.) //Standard Mode - fillscreen() + SetColor( "N/W" ) - WVW_SetMainCoord(.T.) //MainCoord Mode - fillscreen() -return + WVW_SetMainCoord( .F. ) //Standard Mode + fillscreen() -proc fillscreen() -local i,j - scroll() - WVW_nOpenWindow("Win2", 10,10,19,69) - WVW_nOpenWindow("Win3", 15,15,22,75) - devpos(0,0) - ?? "I'm gonna fill this (" + alltrim(str(maxrow()+1)) + "x" + alltrim(str(maxcol()+1)) + ") screen" - devpos(1,0) - for i := 1 to maxrow()-1 - for j := 0 to maxcol() - ?? alltrim(str(j % 10,0)) - next - next - ?? "Done. Press ESC to exit." - do while inkey(0)!=27 - enddo - WVW_lCloseWindow() - WVW_lCloseWindow() -return + WVW_SetMainCoord( .T. ) //MainCoord Mode + fillscreen() + + RETURN + +PROCEDURE fillscreen() + + LOCAL i, j + + Scroll() + WVW_nOpenWindow( "Win2", 10, 10, 19, 69 ) + WVW_nOpenWindow( "Win3", 15, 15, 22, 75 ) + DevPos( 0, 0 ) + ?? "I'm gonna fill this (" + hb_ntos( MaxRow() + 1 ) + "x" + hb_ntos( MaxCol() + 1 ) + ") screen" + DevPos( 1, 0 ) + FOR i := 1 TO MaxRow() - 1 + FOR j := 0 TO MaxCol() + ?? AllTrim( Str( j % 10, 0 ) ) + NEXT + NEXT + ?? "Done. Press ESC to exit." + DO WHILE Inkey( 0 ) != K_ESC + ENDDO + WVW_lCloseWindow() + WVW_lCloseWindow() + + RETURN diff --git a/harbour/extras/gtwvw/wvwcheck.c b/harbour/extras/gtwvw/wvwcheck.c index 56b6bf6955..cfd45d8f90 100644 --- a/harbour/extras/gtwvw/wvwcheck.c +++ b/harbour/extras/gtwvw/wvwcheck.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw checkbox/progressbar functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwdraw.c b/harbour/extras/gtwvw/wvwdraw.c index 74053470e9..f48889a569 100644 --- a/harbour/extras/gtwvw/wvwdraw.c +++ b/harbour/extras/gtwvw/wvwdraw.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw draw functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwedit.c b/harbour/extras/gtwvw/wvwedit.c index e0d2498b07..09585b6ece 100644 --- a/harbour/extras/gtwvw/wvwedit.c +++ b/harbour/extras/gtwvw/wvwedit.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw edit functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwfuncs.c b/harbour/extras/gtwvw/wvwfuncs.c index f4deff2fd3..21a31016d7 100644 --- a/harbour/extras/gtwvw/wvwfuncs.c +++ b/harbour/extras/gtwvw/wvwfuncs.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw draw functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwmenu.c b/harbour/extras/gtwvw/wvwmenu.c index 631ec31df2..7e780d8a23 100644 --- a/harbour/extras/gtwvw/wvwmenu.c +++ b/harbour/extras/gtwvw/wvwmenu.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw menu Functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwpush.c b/harbour/extras/gtwvw/wvwpush.c index 907f7a3a36..888c9aa136 100644 --- a/harbour/extras/gtwvw/wvwpush.c +++ b/harbour/extras/gtwvw/wvwpush.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw pushbutton/ combobox functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwstbar.c b/harbour/extras/gtwvw/wvwstbar.c index a7004396ee..851e9f2a8f 100644 --- a/harbour/extras/gtwvw/wvwstbar.c +++ b/harbour/extras/gtwvw/wvwstbar.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw statusbar/scrollbar functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/gtwvw/wvwtbar.c b/harbour/extras/gtwvw/wvwtbar.c index e7d44980d7..9a03695397 100644 --- a/harbour/extras/gtwvw/wvwtbar.c +++ b/harbour/extras/gtwvw/wvwtbar.c @@ -3,7 +3,7 @@ */ /* - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * with multiple windows support * Copyright 2004 Budyanto Dj. * gtwvw toolbar and tooltips functions @@ -12,14 +12,14 @@ * =Id: gtwvt.c,v 1.60 2004/01/26 08:14:07 vouchcac Exp = * * Harbour Project source code: - * Video subsystem for Win32 using GUI windows instead of Console + * Video subsystem for Windows using GUI windows instead of Console * Copyright 2003 Peter Rees * Rees Software & Systems Ltd * based on * Bcc ConIO Video subsystem by * Copyright 2002 Marek Paliwoda * Copyright 2002 Przemyslaw Czerpak - * Video subsystem for Win32 compilers + * Video subsystem for Windows compilers * Copyright 1999-2000 Paul Tucker * Copyright 2002 Przemyslaw Czerpak * diff --git a/harbour/extras/hbdoc/tmplates.prg b/harbour/extras/hbdoc/tmplates.prg index 4cc3072dcc..2833036cb5 100644 --- a/harbour/extras/hbdoc/tmplates.prg +++ b/harbour/extras/hbdoc/tmplates.prg @@ -338,8 +338,6 @@ PROCEDURE init_Templates() { "SUNOS", "This is available on the SUNOS platform" }, ; { "Unix", "This is available on the Unix platform(s)" }, ; { "Win", "This is available on the MS-Windows platform(s)" }, ; - { "Win32", "This is available on the MS-Windows (32-bit) platform(s)" }, ; - { "Win64", "This is available on the MS-Windows (64-bit) platform(s)" }, ; { "WinCE", "This is available on the MS-Windows-CE platform" } ; } diff --git a/harbour/src/rtl/tget.prg b/harbour/src/rtl/tget.prg index 4fd345466b..00fb739911 100644 --- a/harbour/src/rtl/tget.prg +++ b/harbour/src/rtl/tget.prg @@ -510,13 +510,15 @@ METHOD varPut( xValue ) CLASS GET nLen := Len( aSubs ) aValue := Eval( ::bBlock ) FOR i := 1 TO nLen - 1 - IF ValType( aSubs[ i ] ) $ "NCDT" + IF HB_ISNUMERIC( aSubs[ i ] ) .OR. ; + ( HB_ISHASH( aValue ) .AND. ValType( aSubs[ i ] ) $ "CDT" ) aValue := aValue[ aSubs[ i ] ] ELSE EXIT ENDIF NEXT - IF ValType( aSubs[ i ] ) $ "NCDT" + IF HB_ISNUMERIC( aSubs[ i ] ) .OR. ; + ( HB_ISHASH( aValue ) .AND. ValType( aSubs[ i ] ) $ "CDT" ) aValue[ aSubs[ i ] ] := xValue ENDIF ELSE @@ -541,7 +543,8 @@ METHOD varGet() CLASS GET nLen := Len( aSubs ) xValue := Eval( ::bBlock ) FOR i := 1 TO nLen - IF ValType( aSubs[ i ] ) $ "NCDT" + IF HB_ISNUMERIC( aSubs[ i ] ) .OR. ; + ( HB_ISHASH( xValue ) .AND. ValType( aSubs[ i ] ) $ "CDT" ) xValue := xValue[ aSubs[ i ] ] ELSE EXIT diff --git a/harbour/tests/gtcolors.prg b/harbour/tests/gtcolors.prg index cc364c52da..7341d00c63 100644 --- a/harbour/tests/gtcolors.prg +++ b/harbour/tests/gtcolors.prg @@ -11,6 +11,8 @@ * */ +#include "inkey.ch" + PROCEDURE Main( xBlink ) LOCAL bg, fg, n @@ -30,7 +32,7 @@ PROCEDURE Main( xBlink ) NEXT ? ? - WHILE Inkey( 0 ) != 13 + WHILE Inkey( 0 ) != K_ENTER ENDDO RETURN diff --git a/harbour/tests/ipclnt.prg b/harbour/tests/ipclnt.prg index 2118e868b3..062896151d 100644 --- a/harbour/tests/ipclnt.prg +++ b/harbour/tests/ipclnt.prg @@ -2,8 +2,6 @@ * $Id$ */ -#include "common.ch" - #include "hbsocket.ch" #define ADDRESS "127.0.0.1" diff --git a/harbour/tests/ipsvr.prg b/harbour/tests/ipsvr.prg index 4dde2f4248..8adb34c716 100644 --- a/harbour/tests/ipsvr.prg +++ b/harbour/tests/ipsvr.prg @@ -2,7 +2,7 @@ * $Id$ */ -#include "common.ch" +#include "inkey.ch" #include "hbsocket.ch" @@ -46,7 +46,7 @@ PROCEDURE Main() ? "accept socket request" hb_threadDetach( hb_threadStart( @process(), hSocket ) ) ENDIF - IF Inkey() == 27 + IF Inkey() == K_ESC ? "quitting - esc pressed" EXIT ENDIF diff --git a/harbour/tests/rto_get.prg b/harbour/tests/rto_get.prg index fd37fe3084..26fdcf2e08 100644 --- a/harbour/tests/rto_get.prg +++ b/harbour/tests/rto_get.prg @@ -52,7 +52,6 @@ /* NOTE: This source can be compiled with both Harbour and CA-Cl*pper. */ -#include "common.ch" #include "error.ch" #include "fileio.ch" #include "inkey.ch" @@ -93,10 +92,18 @@ PROCEDURE Main( cArg01, cArg02, cArg03, cArg04 ) LOCAL nOldRow LOCAL nOldCol - DEFAULT cArg01 TO "" - DEFAULT cArg02 TO "" - DEFAULT cArg03 TO "" - DEFAULT cArg04 TO "" + IF cArg01 == NIL + cArg01 := "" + ENDIF + IF cArg02 == NIL + cArg02 := "" + ENDIF + IF cArg03 == NIL + cArg03 := "" + ENDIF + IF cArg04 == NIL + cArg04 := "" + ENDIF SET DATE ANSI @@ -726,10 +733,12 @@ PROCEDURE Main( cArg01, cArg02, cArg03, cArg04 ) PROCEDURE TGetTOVS( o, aKeys, lInsert ) LOCAL tmp, tmp1 - DEFAULT lInsert TO .F. + IF !( ValType( lInsert ) == "L" ) + lInsert := .F. + ENDIF FOR tmp := 1 TO Len( aKeys ) - IF ISCHAR( aKeys[ tmp ] ) + IF ValType( aKeys[ tmp ] ) == "C" FOR tmp1 := 1 TO Len( aKeys[ tmp ] ) IF lInsert TEST_CALL( o, "o:insert( '" + SubStr( aKeys[ tmp ], tmp1, 1 ) + "' )", {|| o:insert( SubStr( aKeys[ tmp ], tmp1, 1 ) ) } ) @@ -737,7 +746,7 @@ PROCEDURE TGetTOVS( o, aKeys, lInsert ) TEST_CALL( o, "o:overStrike( '" + SubStr( aKeys[ tmp ], tmp1, 1 ) + "' )", {|| o:overStrike( SubStr( aKeys[ tmp ], tmp1, 1 ) ) } ) ENDIF NEXT - ELSEIF ISNUM( aKeys[ tmp ] ) + ELSEIF ValType( aKeys[ tmp ] ) == "N" DO CASE CASE aKeys[ tmp ] == K_INS ; lInsert := ! lInsert CASE aKeys[ tmp ] == K_HOME ; TEST_LINE( o:Home() ) diff --git a/harbour/tests/rto_tb.prg b/harbour/tests/rto_tb.prg index 3528749f82..6a913c2a79 100644 --- a/harbour/tests/rto_tb.prg +++ b/harbour/tests/rto_tb.prg @@ -63,7 +63,6 @@ /* NOTE: This source can be compiled with both Harbour and CA-Cl*pper. */ -#include "common.ch" #include "error.ch" #include "fileio.ch" @@ -97,10 +96,18 @@ PROCEDURE Main( cArg01, cArg02, cArg03, cArg04 ) LOCAL cCommandLine - DEFAULT cArg01 TO "" - DEFAULT cArg02 TO "" - DEFAULT cArg03 TO "" - DEFAULT cArg04 TO "" + IF cArg01 == NIL + cArg01 := "" + ENDIF + IF cArg02 == NIL + cArg02 := "" + ENDIF + IF cArg03 == NIL + cArg03 := "" + ENDIF + IF cArg04 == NIL + cArg04 := "" + ENDIF SET DATE ANSI @@ -306,7 +313,7 @@ PROCEDURE TBRAssign( xVar ) o := TBrowseNew( 10, 10, 20, 50 ) ; TEST_L_TBR( o:nLeft := xVar ) o := TBrowseNew( 10, 10, 20, 50 ) ; TEST_L_TBR( o:nRight := xVar ) // ; This is needed for CA-Cl*pper 5.x otherwise an unmaskable (bug?) RTE would be thrown. [vszakats] - IF ISNUMBER( xVar ) .AND. xVar < o:nBottom + IF ValType( xVar ) == "N" .AND. xVar < o:nBottom o := TBrowseNew( 10, 10, 20, 50 ) ; TEST_L_TBR( o:nTop := xVar ) ENDIF o := TBrowseNew( 10, 10, 20, 50 ) ; TEST_L_TBR( o:RightVisible := xVar ) @@ -501,7 +508,7 @@ PROCEDURE LogTBRVars( o, desc, xResult ) FOR tmp := 1 TO o:colCount FWrite( s_fhnd, " Column: " + StrZero( tmp, 3 ) + hb_eol() ) col := o:GetColumn( tmp ) - IF ISOBJECT( col ) + IF ValType( col ) == "O" FWrite( s_fhnd, " Block " + XToStr( col:Block ) + hb_eol() ) FWrite( s_fhnd, " Cargo " + XToStr( col:Cargo ) + hb_eol() ) FWrite( s_fhnd, " ColorBlock " + XToStr( col:ColorBlock ) + hb_eol() ) @@ -548,7 +555,7 @@ PROCEDURE LogTBCVars( o, desc, xResult ) FWrite( s_fhnd, "---------------------" + hb_eol() ) FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_eol() ) FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_eol() ) - IF ISOBJECT( o ) + IF ValType( o ) == "O" FWrite( s_fhnd, " Block " + XToStr( o:Block ) + hb_eol() ) FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_eol() ) FWrite( s_fhnd, " ColorBlock " + XToStr( o:ColorBlock ) + hb_eol() ) diff --git a/harbour/tests/usrrdd/exarr.prg b/harbour/tests/usrrdd/exarr.prg index 43d9ce9383..203fef23d1 100644 --- a/harbour/tests/usrrdd/exarr.prg +++ b/harbour/tests/usrrdd/exarr.prg @@ -55,6 +55,7 @@ REQUEST ARRAYRDD #define USE_DBCREATE_EXTENSIONS PROCEDURE Main() + LOCAL aStruct SET DATE ANSI @@ -63,35 +64,36 @@ PROCEDURE Main() CLS ? "Create a new dbf in memory using dbCreate() command" - aStruct := { { "NAME" , "C", 40, 0 } ,; - { "ADDRESS" , "C", 40, 0 } ,; - { "BIRTHDAY" , "D", 8, 0 } ,; - { "AGE" , "N", 3, 0 } } + aStruct := { ; + { "NAME" , "C", 40, 0 } , ; + { "ADDRESS" , "C", 40, 0 } , ; + { "BIRTHDAY" , "D", 8, 0 } , ; + { "AGE" , "N", 3, 0 } } #ifndef USE_DBCREATE_EXTENSIONS ? "Create it" dbCreate( "arrtest.dbf", aStruct, "ARRAYRDD" ) - wait + WAIT ? "Open it" USE arrtest.dbf VIA "ARRAYRDD" - wait + WAIT #else ? "Create it and leave opened" - dbCreate( "arrtest.dbf", aStruct, "ARRAYRDD", .T., "arrtest" ) - wait + dbCreate( "arrtest.dbf", aStruct, "ARRAYRDD", .T. , "arrtest" ) + WAIT #endif ? "Show structure" ? hb_ValToExp( dbStruct() ) WAIT - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() - ? RECNO(), '"' + FIELD->NAME + '"' - DBGOBOTTOM() - ? RECNO(), '"' + FIELD->NAME + '"' - DBGOTOP() - ? RECNO(), '"' + FIELD->NAME + '"' + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() + ? RecNo(), '"' + FIELD->NAME + '"' + dbGoBottom() + ? RecNo(), '"' + FIELD->NAME + '"' + dbGoTop() + ? RecNo(), '"' + FIELD->NAME + '"' WAIT ? "Adding some data" @@ -101,7 +103,7 @@ PROCEDURE Main() field->birthday := SToD( "19670103" ) field->age := 39 - ? RECNO(), '"' + FIELD->NAME + '"' + ? RecNo(), '"' + FIELD->NAME + '"' dbAppend() field->name := "Mouse Mickey" @@ -110,34 +112,34 @@ PROCEDURE Main() field->age := 66 WHILE !EOF() - ? RECNO(), '"' + FIELD->NAME + '"' - IF RECNO() == 20 - INKEY( 0 ) + ? RecNo(), '"' + FIELD->NAME + '"' + IF RecNo() == 20 + Inkey( 0 ) ENDIF - DBSKIP() + dbSkip() ENDDO - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() WAIT - DBGOBOTTOM() - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() + dbGoBottom() + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() WAIT WHILE !BOF() - ? RECNO(), '[' + FIELD->NAME + ']' - IF RECNO() == LASTREC() - 20 - INKEY( 0 ) + ? RecNo(), '[' + FIELD->NAME + ']' + IF RecNo() == LastRec() - 20 + Inkey( 0 ) ENDIF - DBSKIP( -1 ) + dbSkip( -1 ) ENDDO - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() WAIT ? "Show it - Please don't press any key except movement keys and ESC" ? " to exit from browse(), otherwise you will get an error" ? " due to missing index support" WAIT - BROWSE() + Browse() -RETURN + RETURN diff --git a/harbour/tests/usrrdd/exfcm.prg b/harbour/tests/usrrdd/exfcm.prg index d8fb8afd55..1a0477c9b5 100644 --- a/harbour/tests/usrrdd/exfcm.prg +++ b/harbour/tests/usrrdd/exfcm.prg @@ -7,38 +7,38 @@ REQUEST FCOMMA PROCEDURE Main() USE test.csv VIA "FCOMMA" - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() - ? RECNO(), '"' + FIELD->LINE + '"' - DBGOBOTTOM() - ? RECNO(), '"' + FIELD->LINE + '"' - DBGOTOP() - ? RECNO(), '"' + FIELD->LINE + '"' + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() + ? RecNo(), '"' + FIELD->LINE + '"' + dbGoBottom() + ? RecNo(), '"' + FIELD->LINE + '"' + dbGoTop() + ? RecNo(), '"' + FIELD->LINE + '"' WAIT DO WHILE !EOF() - ? RECNO(), '"' + FIELD->LINE + '"' - IF RECNO() == 20 - INKEY( 0 ) + ? RecNo(), '"' + FIELD->LINE + '"' + IF RecNo() == 20 + Inkey( 0 ) ENDIF - DBSKIP() + dbSkip() ENDDO - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() WAIT - DBGOBOTTOM() - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() + dbGoBottom() + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() WAIT DO WHILE !BOF() - ? RECNO(), '[' + FIELD->LINE + ']' - IF RECNO() == LASTREC() - 20 - INKEY( 0 ) + ? RecNo(), '[' + FIELD->LINE + ']' + IF RecNo() == LastRec() - 20 + Inkey( 0 ) ENDIF - DBSKIP( -1 ) + dbSkip( -1 ) ENDDO - ? "ALIAS", ALIAS(), "RECNO", RECNO(), ; - "BOF", BOF(), "EOF", EOF(), "LASTREC", LASTREC() + ? "ALIAS", Alias(), "RECNO", RecNo(), ; + "BOF", BOF(), "EOF", EOF(), "LASTREC", LastRec() WAIT - BROWSE() + Browse() RETURN diff --git a/harbour/tests/usrrdd/exhsx.prg b/harbour/tests/usrrdd/exhsx.prg index 427074fd3b..d5b781afe5 100644 --- a/harbour/tests/usrrdd/exhsx.prg +++ b/harbour/tests/usrrdd/exhsx.prg @@ -5,41 +5,44 @@ #include "dbinfo.ch" PROCEDURE Main() + FIELD FIRST, LAST, STREET, CITY LOCAL n, hs - dbCreate("_tst", { { "FIRST", "C", 20, 0 },; - { "LAST", "C", 20, 0 },; - { "STREET", "C", 30, 0 },; - { "CITY", "C", 30, 0 },; - { "STATE", "C", 2, 0 },; - { "ZIP", "C", 10, 0 },; - { "HIREDATE", "D", 8, 0 },; - { "MARRIED", "L", 1, 0 },; - { "AGE", "N", 2, 0 },; - { "SALARY", "N", 6, 0 },; - { "NOTES", "C", 70, 0 } } ) + dbCreate( "_tst", { ; + { "FIRST", "C", 20, 0 }, ; + { "LAST", "C", 20, 0 }, ; + { "STREET", "C", 30, 0 }, ; + { "CITY", "C", 30, 0 }, ; + { "STATE", "C", 2, 0 }, ; + { "ZIP", "C", 10, 0 }, ; + { "HIREDATE", "D", 8, 0 }, ; + { "MARRIED", "L", 1, 0 }, ; + { "AGE", "N", 2, 0 }, ; + { "SALARY", "N", 6, 0 }, ; + { "NOTES", "C", 70, 0 } } ) USE _tst - HSX_CREATE( "_tst", "FIRST+LAST+STREET+CITY", 2, 0, .T., 3 ) + HSX_CREATE( "_tst", "FIRST+LAST+STREET+CITY", 2, 0, .T. , 3 ) APPEND FROM test /* Look for all records which have 'SHERMAN' string inside */ hs := HSX_HANDLE( "_tst" ) - HS_SET( hs, "SHERMAN" ) - DO WHILE ( n := HS_NEXT( hs ) ) > 0 - DBGOTO( n ) - IF HS_VERIFY( hs ) > 0 - ? RTRIM( FIRST+LAST+STREET+CITY ) + hs_Set( hs, "SHERMAN" ) + DO WHILE ( n := hs_Next( hs ) ) > 0 + dbGoto( n ) + IF hs_Verify( hs ) > 0 + ? RTrim( FIRST + LAST + STREET + CITY ) ENDIF ENDDO WAIT /* Does RDD support Record Map Filters? */ - IF DBINFO( DBI_RM_SUPPORTED ) + IF dbInfo( DBI_RM_SUPPORTED ) /* if yest then let set filter for all records with 'SHERMAN' word and look at them in browser */ - HS_FILTER( hs, "SHERMAN" ) - DBGOTOP() - BROWSE() + hs_Filter( hs, "SHERMAN" ) + dbGoTop() + Browse() ENDIF + RETURN diff --git a/harbour/tests/usrrdd/exlog.prg b/harbour/tests/usrrdd/exlog.prg index dcf2e33ba5..24b15aef85 100644 --- a/harbour/tests/usrrdd/exlog.prg +++ b/harbour/tests/usrrdd/exlog.prg @@ -16,22 +16,22 @@ PROCEDURE Main() // Set LOGRDD as default RDD otherwise I have to set explicitly use // with DRIVER option - RDDSetDefault( "LOGRDD" ) + rddSetDefault( "LOGRDD" ) // Adding Memofile Info rddInfo( RDDI_MEMOVERSION, DB_MEMOVER_CLIP, "LOGRDD" ) // Define Log File Name and position hb_LogRddLogFileName( "logs\changes.log" ) // Define Tag to add for each line logged - hb_LogRddTag( NETNAME() + "\" + hb_USERNAME() ) + hb_LogRddTag( NetName() + "\" + hb_UserName() ) // Activate Logging, it can be stopped/started at any moment hb_LogRddActive( .T. ) // Uncomment next command to change logged string that I have to return to standard LOGRDD file - // hb_LogRddMsgLogBlock( {| cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 | MyToString( cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 ) } ) +// hb_LogRddMsgLogBlock( {| cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 | MyToString( cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 ) } ) // Uncomment next command to change standard destination of my logged string - // hb_LogRddUserLogBlock( {| cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 | hb_toOutDebug( MyToString( cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 ) + "\n\r" ) } ) +// hb_LogRddUserLogBlock( {| cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 | hb_toOutDebug( MyToString( cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 ) + "\n\r" ) } ) // Start program logic @@ -49,6 +49,7 @@ PROCEDURE Main() RETURN STATIC FUNCTION MyToString( cCmd, nWA, xPar1, xPar2, xPar3 ) + LOCAL cString DO CASE @@ -60,30 +61,32 @@ STATIC FUNCTION MyToString( cCmd, nWA, xPar1, xPar2, xPar3 ) cString := hb_ValToExp( xPar1 ) CASE cCmd == "OPEN" // Parameters received: xPar1 = aOpenInfo - // cString := 'Table : "' + xPar1[ UR_OI_NAME ] + '", Alias : "' + Alias() + '", WorkArea : ' + LTrim( Str( nWA ) ) + // cString := 'Table : "' + xPar1[ UR_OI_NAME ] + '", Alias : "' + Alias() + '", WorkArea : ' + hb_ntos( nWA ) // In this example I don't want to log Open Command CASE cCmd == "CLOSE" // Parameters received: xPar1 = cTableName, xPar2 = cAlias - //cString := 'Table : "' + xPar1 + '", Alias : "' + xPar2 + '", WorkArea : ' + LTrim( Str( nWA ) ) + //cString := 'Table : "' + xPar1 + '", Alias : "' + xPar2 + '", WorkArea : ' + hb_ntos( nWA ) // In this example I don't want to log Close Command CASE cCmd == "APPEND" // Parameters received: xPar1 = lUnlockAll - cString := Alias() + "->RecNo() = " + LTrim( Str( RecNo() ) ) + cString := Alias() + "->RecNo() = " + hb_ntos( RecNo() ) CASE cCmd == "DELETE" // Parameters received: none - cString := Alias() + "->RecNo() = " + LTrim( Str( RecNo() ) ) + cString := Alias() + "->RecNo() = " + hb_ntos( RecNo() ) CASE cCmd == "RECALL" // Parameters received: none - cString := Alias() + "->RecNo() = " + LTrim( Str( RecNo() ) ) + cString := Alias() + "->RecNo() = " + hb_ntos( RecNo() ) CASE cCmd == "PUTVALUE" // Parameters received: xPar1 = nField, xPar2 = xValue, xPar3 = xOldValue HB_SYMBOL_UNUSED( xPar3 ) // Here don't log previous value - cString := Alias() + "(" + LTrim( Str( RecNo() ) ) + ")->" + PadR( FieldName( xPar1 ), 10 ) + " := " + hb_LogRddValueToText( xPar2 ) + cString := Alias() + "(" + hb_ntos( RecNo() ) + ")->" + PadR( FieldName( xPar1 ), 10 ) + " := " + hb_LogRddValueToText( xPar2 ) CASE cCmd == "ZAP" // Parameters received: none cString := 'Alias : "' + Alias() + ' Table : "' + dbInfo( DBI_FULLPATH ) + '"' ENDCASE + RETURN cString FUNCTION hb_LogRddInherit() + RETURN "DBFCDX" diff --git a/harbour/tests/usrrdd/exmemo.prg b/harbour/tests/usrrdd/exmemo.prg index 5ba1d7dce5..bed1a596d1 100644 --- a/harbour/tests/usrrdd/exmemo.prg +++ b/harbour/tests/usrrdd/exmemo.prg @@ -8,8 +8,8 @@ REQUEST SMTCDX PROCEDURE Main() - DBCREATE( "table1", { { "F1", "M", 4, 0 } }, "DBTCDX" ) - DBCREATE( "table2", { { "F1", "M", 4, 0 } }, "FPTCDX" ) - DBCREATE( "table3", { { "F1", "M", 4, 0 } }, "SMTCDX" ) + dbCreate( "table1", { { "F1", "M", 4, 0 } }, "DBTCDX" ) + dbCreate( "table2", { { "F1", "M", 4, 0 } }, "FPTCDX" ) + dbCreate( "table3", { { "F1", "M", 4, 0 } }, "SMTCDX" ) RETURN diff --git a/harbour/tests/usrrdd/exrlx.prg b/harbour/tests/usrrdd/exrlx.prg index 60cc5fabf5..eb924e6119 100644 --- a/harbour/tests/usrrdd/exrlx.prg +++ b/harbour/tests/usrrdd/exrlx.prg @@ -6,44 +6,44 @@ REQUEST RLCDX PROCEDURE Main() - DBCREATE( "_tst", { { "F1", "C", 10, 0 } }, "RLCDX" ) + dbCreate( "_tst", { { "F1", "C", 10, 0 } }, "RLCDX" ) USE _tst VIA "RLCDX" SHARED - ? "Table: ", ALIAS(), " open VIA: ", RDDNAME() + ? "Table: ", Alias(), " open VIA: ", rddName() ? "APPEND" - DBAPPEND() + dbAppend() ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) ? "APPEND" - DBAPPEND() + dbAppend() ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) ? "UNLOCK" - DBUNLOCK() + dbUnlock() ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) - ? "Locking record 1", DBRLOCK( 1 ) - ? "Locking record 1", DBRLOCK( 1 ) - ? "Locking record 1", DBRLOCK( 1 ) - ? "Locking record 2", DBRLOCK( 2 ) + ? "Locking record 1", dbRLock( 1 ) + ? "Locking record 1", dbRLock( 1 ) + ? "Locking record 1", dbRLock( 1 ) + ? "Locking record 2", dbRLock( 2 ) ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) ? "UnLocking record 1..." - DBRUNLOCK(1) + dbRUnlock( 1 ) ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) ? "UnLocking record 2..." - DBRUNLOCK(2) + dbRUnlock( 2 ) ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) ? "UnLocking record 1..." - DBRUNLOCK(1) + dbRUnlock( 1 ) ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) ? "UnLocking record 1..." - DBRUNLOCK(1) + dbRUnlock( 1 ) ? "Current record locks:" - AEVAL( DBRLOCKLIST(), {| nRecNo | qqout( nRecNo ) } ) + AEval( dbRLockList(), {| nRecNo | QQOut( nRecNo ) } ) CLOSE diff --git a/harbour/tests/wcecon.prg b/harbour/tests/wcecon.prg index ef5c5b7a49..72610da6d1 100644 --- a/harbour/tests/wcecon.prg +++ b/harbour/tests/wcecon.prg @@ -98,7 +98,7 @@ proc main() ? ? "@ - interrupt, keycodes test " - while ( k := inkey( 0 ) ) != 64 + while ( k := inkey( 0 ) ) != hb_keyCode( "@" ) ? ; devout( "key=" + str( k, 4 ) + ", char='" + chr( k ) + "'" ) enddo