diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d1d77d0ce1..ac3cc9a1eb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,12 +16,86 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-05 00:18 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib\hbblat\tests\blatcmd.prg + * contrib\hbblat\tests\blattest.prg + * contrib\hbct\tests\datetime.prg + * contrib\hbcurl\tests\ftp_uldl.prg + * contrib\hbfimage\tests\fitest.prg + * contrib\hbformat\hbfmtcls.prg + * contrib\hbformat\utils\hbformat.prg + * contrib\hbfoxpro\dll.prg + * contrib\hbgd\gd.prg + * contrib\hbgd\gdbarcod.prg + * contrib\hbgd\tests\animgif.prg + * contrib\hbgd\tests\antialia.prg + * contrib\hbgd\tests\counter.prg + * contrib\hbgd\tests\gdtest.prg + * contrib\hbgd\tests\gdtestcl.prg + * contrib\hbgd\tests\test_out.prg + * contrib\hbgd\tests\testdpi.prg + * contrib\hbgd\tests\tostring.prg + * contrib\hbmagic\tests\hbmagit.prg + * contrib\hbmisc\fcomma.prg + * contrib\hbmxml\tests\testmxml.prg + * contrib\hbmysql\tsqlbrw.prg + * contrib\hbnf\menu1.prg + * contrib\hbnf\pegs.prg + * contrib\hbnf\popadder.prg + * contrib\hbnf\savesets.prg + * contrib\hbnf\tempfile.prg + * contrib\hbpgsql\tests\cache.prg + * contrib\hbpgsql\tests\dbf2pg.prg + * contrib\hbpgsql\tests\simple.prg + * contrib\hbpgsql\tests\stress.prg + * contrib\hbqt\qtgui\hbqt_errorsys.prg + * contrib\hbsms\tests\send.prg + * contrib\hbsqlit3\hdbcsqlt.prg + * contrib\hbsqlit3\tests\authoriz.prg + * contrib\hbsqlit3\tests\backup.prg + * contrib\hbsqlit3\tests\hdbctest.prg + * contrib\hbsqlit3\tests\hooks.prg + * contrib\hbtip\cgi.prg + * contrib\hbtip\client.prg + * contrib\hbtip\ftpcli.prg + * contrib\hbtip\httpcli.prg + * contrib\hbtip\sessid.prg + * contrib\hbtip\tests\dnldftp.prg + * contrib\hbtip\tests\gmail.prg + * contrib\hbtip\tests\upld_ftp.prg + * contrib\hbwin\tests\dlg.prg + * contrib\hbwin\tests\testsvc.prg + * contrib\hbwin\win_tcom.prg + * contrib\hbxpp\tgetx.prg + * contrib\hbxpp\xppop.prg + * contrib\hbziparc\ziparc.prg + * examples\hbbtree\tbtree.prg + * examples\httpsrv\modules\info.prg + * examples\httpsrv\modules\testajax.prg + * examples\rddado\adordd.prg + * examples\terminal\terminal.prg + * src\rdd\usrrdd\rdds\arrayrdd.prg + * src\rdd\usrrdd\rdds\logrdd.prg + * src\rtl\achoice.prg + * src\rtl\radiogrp.prg + * src\rtl\tclass.prg + * tests\usrrdd\exlog.prg + * using HB_DEFAULT() instead of DEFAULT ... TO ... + % deleted '#include "common.ch"' where possible + ; please pay attention to places where multiple values are + accepted and DEFAULT applied. It's possible some of these + might have been slipped my attention and converted to + HB_DEFAULT(), causing regression. + + * src/rdd/usrrdd/rdds/arrayrdd.prg + ! typos in recent mods + 2012-06-04 15:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbmk2_qt.hb ! Tweaked: ( QString * ) casted argument to be compilable. * contrib/hbqt/qtgui/qth/QFileDialog.qth - + Enabled: getOpenFileName() etc. methods which we commented out because + + Enabled: getOpenFileName() etc. methods which we commented out because of lack of knowledge how those should been handelled. 2012-06-04 23:24 UTC+0200 Viktor Szakats (harbour syenar.net) diff --git a/harbour/contrib/hbblat/tests/blatcmd.prg b/harbour/contrib/hbblat/tests/blatcmd.prg index 015fc2f98f..e77953f54b 100644 --- a/harbour/contrib/hbblat/tests/blatcmd.prg +++ b/harbour/contrib/hbblat/tests/blatcmd.prg @@ -50,8 +50,6 @@ * */ -#include "common.ch" - PROCEDURE Main() LOCAL cCmd := win_GetCommandLineParam() @@ -67,4 +65,4 @@ PROCEDURE Main() ? nRet ENDIF -RETURN + RETURN diff --git a/harbour/contrib/hbblat/tests/blattest.prg b/harbour/contrib/hbblat/tests/blattest.prg index 7173d47ccc..a905ec7010 100644 --- a/harbour/contrib/hbblat/tests/blattest.prg +++ b/harbour/contrib/hbblat/tests/blattest.prg @@ -51,7 +51,6 @@ */ -#include "common.ch" #include "hbblat.ch" #define ADDRESS_FROM "yourname@domain.com" // put here your address from @@ -115,9 +114,7 @@ PROCEDURE Main() ? "Blat Error String: ", oBlat:BlatErrorString() ? - ? IIF( nRet == 0, "mail sent correctly!", "mail NOT sent" ) + ? iif( nRet == 0, "mail sent correctly!", "mail NOT sent" ) ? -RETURN - -//----------------------------------------- + RETURN diff --git a/harbour/contrib/hbct/tests/datetime.prg b/harbour/contrib/hbct/tests/datetime.prg index 191be9aa20..09f8ebd32d 100644 --- a/harbour/contrib/hbct/tests/datetime.prg +++ b/harbour/contrib/hbct/tests/datetime.prg @@ -54,7 +54,6 @@ #include "inkey.ch" -#include "common.ch" #include "setcurs.ch" diff --git a/harbour/contrib/hbcurl/tests/ftp_uldl.prg b/harbour/contrib/hbcurl/tests/ftp_uldl.prg index 118acd1a35..aad86da7e6 100644 --- a/harbour/contrib/hbcurl/tests/ftp_uldl.prg +++ b/harbour/contrib/hbcurl/tests/ftp_uldl.prg @@ -6,7 +6,6 @@ #include "hbcurl.ch" -#include "common.ch" #include "fileio.ch" #define UPLOAD_FILE_AS "test_ul.bin" @@ -54,7 +53,7 @@ PROCEDURE Main( cDL, cUL ) ? "Press key..." Inkey( 0 ) - DEFAULT cUL TO "ftp_uldl.prg" + hb_default( @cUL, "ftp_uldl.prg" ) ? curl_easy_setopt( curl, HB_CURLOPT_UPLOAD ) ? curl_easy_setopt( curl, HB_CURLOPT_URL, REMOTE_URL ) @@ -122,7 +121,7 @@ PROCEDURE Main( cDL, cUL ) ? "Press key..." Inkey( 0 ) - DEFAULT cDL TO "ftp://ftp.cisco.com/README" + hb_default( @cDL, "ftp://ftp.cisco.com/README" ) /* Now let's download to a file */ @@ -168,7 +167,7 @@ PROCEDURE Main( cDL, cUL ) ? "Press key..." Inkey( 0 ) - DEFAULT cDL TO "ftp://ftp.cisco.com/" + hb_default( @cDL, "ftp://ftp.cisco.com/" ) /* Now let's download a dirlist to memory */ diff --git a/harbour/contrib/hbfimage/tests/fitest.prg b/harbour/contrib/hbfimage/tests/fitest.prg index af76eda7ac..cb0f4586ee 100644 --- a/harbour/contrib/hbfimage/tests/fitest.prg +++ b/harbour/contrib/hbfimage/tests/fitest.prg @@ -10,7 +10,6 @@ #include "freeimag.ch" -#include "common.ch" #include "fileio.ch" #define IMAGES_IN "" @@ -224,13 +223,13 @@ PROCEDURE Main() ? "Look at " + IMAGES_OUT + " folder for output images" ? -RETURN + RETURN PROCEDURE fi_Error( cFormat, cMessage ) ? "ERROR!..." ? "Format : ", cFormat ? "Message : ", cMessage -RETURN + RETURN PROCEDURE TraceLog( c ) HB_SYMBOL_UNUSED( c ) diff --git a/harbour/contrib/hbformat/hbfmtcls.prg b/harbour/contrib/hbformat/hbfmtcls.prg index 5ff7037504..e4afd34546 100644 --- a/harbour/contrib/hbformat/hbfmtcls.prg +++ b/harbour/contrib/hbformat/hbfmtcls.prg @@ -52,7 +52,6 @@ #include "hbclass.ch" -#include "common.ch" #include "fileio.ch" #define RF_STATE_FUNC 1 @@ -464,7 +463,7 @@ METHOD FormatLine( cLine, lContinued ) CLASS HBFORMATCODE RETURN cLine ENDIF - DEFAULT lContinued TO .F. + hb_default( @lContinued, .F. ) lFirst := !lContinued nLen := Len( cLine ) @@ -635,7 +634,7 @@ METHOD ConvertCmd( cLine, nBegin, nEnd, lFirstOnly ) CLASS HBFORMATCODE LOCAL nPos, cToken := Upper( SubStr( cLine, nBegin, nEnd - nBegin ) ) IF ::lCase - DEFAULT lFirstOnly TO .F. + hb_default( @lFirstOnly, .F. ) IF ( ( nPos := At( "," + cToken, ::cCommands ) ) != 0 .AND. ( Len(cToken ) >= 4 ; .OR. SubStr( ::cCommands, nPos + Len( cToken ) + 1, 1 ) == "," ) ) ; .OR. ; @@ -851,7 +850,7 @@ STATIC FUNCTION FindNotQuoted( subs, stroka, nPos2 ) LOCAL nPos1, i, c, nState := 0, cSymb - DEFAULT nPos2 TO 1 + hb_default( @nPos2, 1 ) DO WHILE .T. IF ( nPos1 := hb_At( subs, stroka, nPos2 ) ) == 0 diff --git a/harbour/contrib/hbformat/utils/hbformat.prg b/harbour/contrib/hbformat/utils/hbformat.prg index cb20c2495a..1d2eaac29c 100644 --- a/harbour/contrib/hbformat/utils/hbformat.prg +++ b/harbour/contrib/hbformat/utils/hbformat.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "directry.ch" ANNOUNCE HB_GTSYS diff --git a/harbour/contrib/hbfoxpro/dll.prg b/harbour/contrib/hbfoxpro/dll.prg index 6b743137eb..fe0e855eb4 100644 --- a/harbour/contrib/hbfoxpro/dll.prg +++ b/harbour/contrib/hbfoxpro/dll.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbdyn.ch" /* diff --git a/harbour/contrib/hbgd/gd.prg b/harbour/contrib/hbgd/gd.prg index 3c4424f73a..6146e6ee65 100644 --- a/harbour/contrib/hbgd/gd.prg +++ b/harbour/contrib/hbgd/gd.prg @@ -50,8 +50,6 @@ * */ -#include "common.ch" - FUNCTION gdImageChar( im, font, x, y, char, color ) RETURN gdImageString( im, font, x, y, char, color ) @@ -72,9 +70,9 @@ FUNCTION gdImageFTWidth( fontname, ptsize, angle ) LOCAL cErr LOCAL aRect := Array( 8 ) - DEFAULT fontname TO "Arial" - DEFAULT ptsize TO 8 - DEFAULT angle TO 0 + hb_default( @fontname, "Arial" ) + hb_default( @ptsize , 8 ) + hb_default( @angle , 0 ) cErr := gdImageStringFTEx( , @aRect, 0, fontname, ptsize, angle, 0, 0, "M" ) @@ -89,9 +87,9 @@ FUNCTION gdImageFTHeight( fontname, ptsize, angle ) LOCAL cErr LOCAL aRect := Array( 8 ) - DEFAULT fontname TO "Arial" - DEFAULT ptsize TO 8 - DEFAULT angle TO 0 + hb_default( @fontname, "Arial" ) + hb_default( @ptsize , 8 ) + hb_default( @angle , 0 ) cErr := gdImageStringFTEx( , @aRect, 0, fontname, ptsize, angle, 0, 0, "M" ) IF cErr == "" @@ -107,9 +105,9 @@ FUNCTION gdImageFTSize( string, fontname, ptsize, angle ) LOCAL cErr LOCAL aRect := Array( 8 ) - DEFAULT fontname TO "Arial" - DEFAULT ptsize TO 8 - DEFAULT angle TO 0 + hb_default( @fontname, "Arial" ) + hb_default( @ptsize , 8 ) + hb_default( @angle , 0 ) cErr := gdImageStringFTEx( , @aRect, 0, fontname, ptsize, angle, 0, 0, string ) @@ -135,7 +133,7 @@ FUNCTION gdImageStringFT( im, fg, fontname, ptsize, angle, x, y, string, ; FUNCTION gdImageFromFile( cFile ) LOCAL cPath, cName, cExt, cDrive LOCAL cType, cMime - LOCAL hFile := {=>} + LOCAL hFile := { => } LOCAL oImage IF hb_FileExists( cFile ) diff --git a/harbour/contrib/hbgd/gdbarcod.prg b/harbour/contrib/hbgd/gdbarcod.prg index abe0cc0600..f346e3e95e 100644 --- a/harbour/contrib/hbgd/gdbarcod.prg +++ b/harbour/contrib/hbgd/gdbarcod.prg @@ -51,7 +51,6 @@ */ #include "hbclass.ch" -#include "common.ch" #define CODEC 100 #define CODEB 101 @@ -433,7 +432,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode Local cBarCode := "" Local cconc := "" - DEFAULT cModeCode TO "B" + hb_default( @cModeCode, "B" ) ::settext( cText ) diff --git a/harbour/contrib/hbgd/tests/animgif.prg b/harbour/contrib/hbgd/tests/animgif.prg index 256158c425..f9e50f5445 100644 --- a/harbour/contrib/hbgd/tests/animgif.prg +++ b/harbour/contrib/hbgd/tests/animgif.prg @@ -11,7 +11,6 @@ */ #include "gd.ch" -#include "common.ch" #define IMAGES_IN "imgs_in" + hb_ps() #define IMAGES_OUT "imgs_out" + hb_ps() diff --git a/harbour/contrib/hbgd/tests/antialia.prg b/harbour/contrib/hbgd/tests/antialia.prg index 79bdbc626b..8578c44fa9 100644 --- a/harbour/contrib/hbgd/tests/antialia.prg +++ b/harbour/contrib/hbgd/tests/antialia.prg @@ -9,7 +9,6 @@ */ #include "gd.ch" -#include "common.ch" #define IMAGES_IN "imgs_in" + hb_ps() #define IMAGES_OUT "imgs_out" + hb_ps() diff --git a/harbour/contrib/hbgd/tests/counter.prg b/harbour/contrib/hbgd/tests/counter.prg index 2079b3d627..c701aca8ed 100644 --- a/harbour/contrib/hbgd/tests/counter.prg +++ b/harbour/contrib/hbgd/tests/counter.prg @@ -12,7 +12,6 @@ */ #include "gd.ch" -#include "common.ch" /* Some digits images from: http://www.digitmania.holowww.com/all.html */ @@ -30,8 +29,8 @@ PROCEDURE Main( cValue, cBaseImage ) LOCAL n, nValue // A value if not passed - DEFAULT cValue TO Str( hb_RandomInt( 1, 10^DISPLAY_NUM ), DISPLAY_NUM ) - DEFAULT cBaseImage TO "57chevy.gif" + hb_default( @cValue , Str( hb_RandomInt( 1, 10^DISPLAY_NUM ), DISPLAY_NUM ) ) + hb_default( @cBaseImage, "57chevy.gif" ) IF !File( IMAGES_IN + cBaseImage ) ? "ERROR: Base Image File '" + IMAGES_IN + cBaseImage + "' not found" diff --git a/harbour/contrib/hbgd/tests/gdtest.prg b/harbour/contrib/hbgd/tests/gdtest.prg index 263bcb4fb4..f3d3ad2b04 100644 --- a/harbour/contrib/hbgd/tests/gdtest.prg +++ b/harbour/contrib/hbgd/tests/gdtest.prg @@ -9,7 +9,6 @@ */ #include "gd.ch" -#include "common.ch" #define IMAGES_IN "imgs_in" + hb_ps() #define IMAGES_OUT "imgs_out" + hb_ps() diff --git a/harbour/contrib/hbgd/tests/gdtestcl.prg b/harbour/contrib/hbgd/tests/gdtestcl.prg index f0d18822c9..2791ed0534 100644 --- a/harbour/contrib/hbgd/tests/gdtestcl.prg +++ b/harbour/contrib/hbgd/tests/gdtestcl.prg @@ -9,7 +9,6 @@ */ #include "gd.ch" -#include "common.ch" #define IMAGES_IN "imgs_in" + hb_ps() #define IMAGES_OUT "imgs_out" + hb_ps() diff --git a/harbour/contrib/hbgd/tests/test_out.prg b/harbour/contrib/hbgd/tests/test_out.prg index b7ee9d0cd7..dff56e58b8 100644 --- a/harbour/contrib/hbgd/tests/test_out.prg +++ b/harbour/contrib/hbgd/tests/test_out.prg @@ -9,7 +9,6 @@ */ #include "gd.ch" -#include "common.ch" #command WRITE => FWrite( 1, + CHR(13)+CHR(10) ) #command OutHTML => WRITE @@ -21,7 +20,8 @@ PROCEDURE Main(...) LOCAL cQuery := GetEnv( "QUERY_STRING" ) LOCAL hParams := { => } - LOCAL cText, cImg, nPt, nWidth, nHeight, cPhoto + LOCAL cImg, nPt, nWidth, nHeight, cPhoto + // LOCAL cText IF Empty( aParams ) IF !Empty( cQuery ) @@ -39,7 +39,7 @@ PROCEDURE Main(...) do case case cPar == "txt" - cText := hb_hGet( hParams, cPar ) + // cText := hb_hGet( hParams, cPar ) case cPar == "img" cImg := hb_hGet( hParams, cPar ) @@ -63,8 +63,8 @@ PROCEDURE Main(...) //__OutDebug( cQuery, ValToPrg( hParams ) ) //----------------------------------------------------------------------------------------- - //DEFAULT cText TO "Testo di Prova" - DEFAULT nPt TO 30 + //hb_default( @cText, "Testo di Prova" ) + hb_default( @nPt, 30 ) IF cImg != NIL //OutJpg( cImg, nPt ) @@ -104,7 +104,7 @@ RETURN PROCEDURE StartHTML( cTitle ) - DEFAULT cTitle TO "" + hb_default( @cTitle, "" ) WRITE 'content-type: text/html' WRITE 'Pragma: no-cache' @@ -116,7 +116,7 @@ PROCEDURE StartHTML( cTitle ) WRITE "" RETURN -PROCEDURE EndHTML( cTitle ) +PROCEDURE EndHTML() WRITE "" WRITE "" RETURN @@ -159,22 +159,23 @@ RETURN PROCEDURE OutJpg( cText, nPitch ) LOCAL cOS := OS() LOCAL cPath := IIF( Left( cOS, 10 ) == "Windows NT", "C:\winnt\fonts\", "C:\windows\fonts\" ) - LOCAL oI, cyan, blue + LOCAL oI + // LOCAL cyan + LOCAL blue LOCAL aSize, nWidth, nHeight, nX, nY LOCAL cFont := cPath + "verdana.ttf" - - DEFAULT cText TO "Sample TEXT" - DEFAULT nPitch TO 30 + hb_default( @cText , "Sample TEXT" ) + hb_default( @nPitch, 30 ) /* Create an image in memory */ oI := GDImage( 400, 100 ) /* Allocate background */ - cyan := oI:SetColor(0, 255, 255) + // cyan := oI:SetColor(0, 255, 255) /* Allocate drawing color */ - blue := oI:SetColor(0, 0, 200) + // blue := oI:SetColor(0, 0, 200) //oI:SetTransparent( blue ) oI:SetFontName( cFont ) @@ -214,7 +215,8 @@ FUNCTION GetVars( cFields, cSeparator ) LOCAL hHashVars := { => } LOCAL aField, cField, aFields LOCAL cName, xValue - DEFAULT cSeparator TO "&" + + hb_default( @cSeparator, "&" ) aFields := HB_RegExSplit( cSeparator, cFields ) @@ -287,7 +289,7 @@ RETURN hHashVars * FUNCTION URLDecode( cStr ) LOCAL cRet := "", i, cCar - LOCAL lNumeric := .T. + // LOCAL lNumeric := .T. FOR i := 1 TO Len( cStr ) cCar := cStr[i] @@ -306,14 +308,14 @@ FUNCTION URLDecode( cStr ) ENDCASE - IF (cRet[i] > "9" .or. cRet[i] < "0") .and. cRet[i] != "." - lNumeric := .F. - ENDIF + // IF (cRet[i] > "9" .or. cRet[i] < "0") .and. cRet[i] != "." + // lNumeric := .F. + // ENDIF NEXT - *IF lNumeric - * cRet := Val( cRet ) - *ENDIF + // IF lNumeric + // cRet := Val( cRet ) + // ENDIF RETURN cRet diff --git a/harbour/contrib/hbgd/tests/testdpi.prg b/harbour/contrib/hbgd/tests/testdpi.prg index 2915673a44..14835e0425 100644 --- a/harbour/contrib/hbgd/tests/testdpi.prg +++ b/harbour/contrib/hbgd/tests/testdpi.prg @@ -10,7 +10,6 @@ */ #include "gd.ch" -#include "common.ch" #define IMAGES_IN "imgs_in" + hb_ps() #define IMAGES_OUT "imgs_out" + hb_ps() @@ -39,4 +38,3 @@ PROCEDURE Main() oI:SaveGif( IMAGES_OUT + "testdpi.gif" ) RETURN - diff --git a/harbour/contrib/hbgd/tests/tostring.prg b/harbour/contrib/hbgd/tests/tostring.prg index a769667867..f63ba8bd05 100644 --- a/harbour/contrib/hbgd/tests/tostring.prg +++ b/harbour/contrib/hbgd/tests/tostring.prg @@ -10,7 +10,6 @@ #include "gd.ch" -#include "common.ch" #define IMAGES_IN "imgs_in" + hb_ps() #define IMAGES_OUT "imgs_out" + hb_ps() diff --git a/harbour/contrib/hbmagic/tests/hbmagit.prg b/harbour/contrib/hbmagic/tests/hbmagit.prg index 651936eeeb..b4dcb70438 100644 --- a/harbour/contrib/hbmagic/tests/hbmagit.prg +++ b/harbour/contrib/hbmagic/tests/hbmagit.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbmagic.ch" #include "simpleio.ch" diff --git a/harbour/contrib/hbmisc/fcomma.prg b/harbour/contrib/hbmisc/fcomma.prg index 441a65a32b..21def4eff6 100644 --- a/harbour/contrib/hbmisc/fcomma.prg +++ b/harbour/contrib/hbmisc/fcomma.prg @@ -65,7 +65,6 @@ #include "hbusrrdd.ch" #include "fileio.ch" #include "error.ch" -#include "common.ch" ANNOUNCE FCOMMA diff --git a/harbour/contrib/hbmxml/tests/testmxml.prg b/harbour/contrib/hbmxml/tests/testmxml.prg index 5e3cb95ffa..c7ad5751c7 100644 --- a/harbour/contrib/hbmxml/tests/testmxml.prg +++ b/harbour/contrib/hbmxml/tests/testmxml.prg @@ -19,7 +19,6 @@ * */ -#include "common.ch" #include "hbmxml.ch" #include "simpleio.ch" diff --git a/harbour/contrib/hbmysql/tsqlbrw.prg b/harbour/contrib/hbmysql/tsqlbrw.prg index d5b12a1c52..eb11808524 100644 --- a/harbour/contrib/hbmysql/tsqlbrw.prg +++ b/harbour/contrib/hbmysql/tsqlbrw.prg @@ -53,7 +53,6 @@ #include "hbclass.ch" -#include "common.ch" #include "inkey.ch" #include "dbstruct.ch" diff --git a/harbour/contrib/hbnf/menu1.prg b/harbour/contrib/hbnf/menu1.prg index 15e84fd3de..0731571649 100644 --- a/harbour/contrib/hbnf/menu1.prg +++ b/harbour/contrib/hbnf/menu1.prg @@ -36,8 +36,6 @@ PASS "VGA" OR "VGA" AS A COMMAND LINE PARAMETER FOR 50-LINE MODE. */ -#include "common.ch" - #define LEFTARROW 19 #define RIGHTARROW 4 #define ENTER 13 diff --git a/harbour/contrib/hbnf/pegs.prg b/harbour/contrib/hbnf/pegs.prg index b9e014a630..616c17c907 100644 --- a/harbour/contrib/hbnf/pegs.prg +++ b/harbour/contrib/hbnf/pegs.prg @@ -30,7 +30,6 @@ */ #include "inkey.ch" -#include "common.ch" #include "setcurs.ch" #translate SINGLEBOX(, , , ) => ; diff --git a/harbour/contrib/hbnf/popadder.prg b/harbour/contrib/hbnf/popadder.prg index c246ad02ba..22bd7c6cf2 100644 --- a/harbour/contrib/hbnf/popadder.prg +++ b/harbour/contrib/hbnf/popadder.prg @@ -34,7 +34,6 @@ #include "inkey.ch" #include "setcurs.ch" #include "achoice.ch" -#include "common.ch" // Set up manifest constants to access the window colors in the array aWinColor #define W_BORDER 1 diff --git a/harbour/contrib/hbnf/savesets.prg b/harbour/contrib/hbnf/savesets.prg index 9bf5524924..a3d234efbc 100644 --- a/harbour/contrib/hbnf/savesets.prg +++ b/harbour/contrib/hbnf/savesets.prg @@ -28,20 +28,19 @@ */ #include "set.ch" -#include "common.ch" -#Define FT_EXTRA_SETS 2 -#DEFINE FT_SET_CENTURY _SET_COUNT + 1 -#DEFINE FT_SET_BLINK _SET_COUNT + 2 +#define FT_EXTRA_SETS 2 +#define FT_SET_CENTURY _SET_COUNT + 1 +#define FT_SET_BLINK _SET_COUNT + 2 -#IFDEF FT_TEST +#ifdef FT_TEST FUNCTION MAIN LOCAL ASETS := FT_SAVESETS() INKEY(0) RETURN Nil #endif -FUNCTION FT_SAVESETS() +FUNCTION FT_SAVESETS() LOCAL aOldSets := ARRAY(_SET_COUNT + FT_EXTRA_SETS) diff --git a/harbour/contrib/hbnf/tempfile.prg b/harbour/contrib/hbnf/tempfile.prg index 2465b911b6..dad258e0a0 100644 --- a/harbour/contrib/hbnf/tempfile.prg +++ b/harbour/contrib/hbnf/tempfile.prg @@ -93,15 +93,14 @@ #else - #include "common.ch" #include "fileio.ch" FUNCTION FT_TEMPFIL( cPath, lHide, nHandle ) LOCAL cFile - Default cPath to ".\" - Default lHide to .f. + hb_default( @cPath, ".\" ) + hb_default( @lHide, .F. ) cPath := alltrim( cPath ) diff --git a/harbour/contrib/hbpgsql/tests/cache.prg b/harbour/contrib/hbpgsql/tests/cache.prg index 7a567bfe2b..13f93cde55 100644 --- a/harbour/contrib/hbpgsql/tests/cache.prg +++ b/harbour/contrib/hbpgsql/tests/cache.prg @@ -6,7 +6,6 @@ * This samples show how to use dbf to cache postgres records. */ -#include "common.ch" #include "postgres.ch" #define DB_ALIAS 1 @@ -221,7 +220,7 @@ FUNCTION SQLFetch( fetchall ) LOCAL nPos LOCAL lEof := .F. - DEFAULT Fetchall TO .F. + hb_default( @Fetchall, .F. ) /* Procura pela tabela no array */ i := AScan( s_aTableTemp, {| aVal | aVal[ DB_ALIAS ] == cAlias } ) @@ -511,7 +510,7 @@ FUNCTION QuickQuery( cQuery ) PROCEDURE MakeDBF( cAlias, aStructure, aIndex ) LOCAL cFile, i, cIndex, cKey - DEFAULT aIndex TO {} + hb_default( @aIndex, {} ) cFile := TempFile() dbCreate( cFile, aStructure ) @@ -536,8 +535,8 @@ PROCEDURE MakeDBF( cAlias, aStructure, aIndex ) FUNCTION TempFile( cPath, cExt ) LOCAL cString - DEFAULT cPath TO hb_DirTemp() - DEFAULT cExt TO "tmp" + hb_default( @cPath, hb_DirTemp() ) + hb_default( @cExt, "tmp" ) cString := cPath + StrZero( Int( hb_random( Val( StrTran( Time(), ":", "" ) ) ) ), 8 ) + "." + cExt diff --git a/harbour/contrib/hbpgsql/tests/dbf2pg.prg b/harbour/contrib/hbpgsql/tests/dbf2pg.prg index af8a9204be..78ecbab750 100644 --- a/harbour/contrib/hbpgsql/tests/dbf2pg.prg +++ b/harbour/contrib/hbpgsql/tests/dbf2pg.prg @@ -52,7 +52,6 @@ */ #include "inkey.ch" -#include "common.ch" PROCEDURE Main( ... ) diff --git a/harbour/contrib/hbpgsql/tests/simple.prg b/harbour/contrib/hbpgsql/tests/simple.prg index b84eba9063..b35d8a8656 100644 --- a/harbour/contrib/hbpgsql/tests/simple.prg +++ b/harbour/contrib/hbpgsql/tests/simple.prg @@ -2,8 +2,6 @@ * $Id$ */ -#include "common.ch" - PROCEDURE Main( cHost, cDatabase, cUser, cPass ) LOCAL oServer, oQuery, oRow, i, x, aTables, aStruct diff --git a/harbour/contrib/hbpgsql/tests/stress.prg b/harbour/contrib/hbpgsql/tests/stress.prg index 529099321f..583b4eb8f3 100644 --- a/harbour/contrib/hbpgsql/tests/stress.prg +++ b/harbour/contrib/hbpgsql/tests/stress.prg @@ -6,7 +6,6 @@ * VERY IMPORTANT: Don't use this querys as sample, they are used for stress tests !!! */ -#include "common.ch" #include "postgres.ch" PROCEDURE Main( cServer, cDatabase, cUser, cPass ) diff --git a/harbour/contrib/hbqt/qtgui/hbqt_errorsys.prg b/harbour/contrib/hbqt/qtgui/hbqt_errorsys.prg index 704865a180..931aba428e 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_errorsys.prg +++ b/harbour/contrib/hbqt/qtgui/hbqt_errorsys.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "error.ch" #include "hbqtgui.ch" @@ -206,8 +205,9 @@ STATIC PROCEDURE hbqt_messageBox( cMsg, cInfo, cTitle, nIcon ) LOCAL oMB IF hbqt_IsActiveApplication() - DEFAULT cTitle TO "Information" - DEFAULT nIcon TO QMessageBox_Information + + hb_default( @cTitle, "Information" ) + hb_default( @nIcon, QMessageBox_Information ) oMB := QMessageBox() oMB:setText( cMsg ) diff --git a/harbour/contrib/hbsms/tests/send.prg b/harbour/contrib/hbsms/tests/send.prg index a7e2c58461..e61df4339e 100644 --- a/harbour/contrib/hbsms/tests/send.prg +++ b/harbour/contrib/hbsms/tests/send.prg @@ -7,14 +7,12 @@ * www - http://www.harbour-project.org */ -#include "common.ch" - PROCEDURE Main( cPort ) #if defined( __PLATFORM__WINDOWS ) - DEFAULT cPort TO "\\.\COM22" + hb_default( @cPort, "\\.\COM22" ) #elif defined( __PLATFORM__DARWIN ) - DEFAULT cPort TO "/dev/cu.myport-COM1-1" + hb_default( @cPort, "/dev/cu.myport-COM1-1" ) #endif ? "start" diff --git a/harbour/contrib/hbsqlit3/hdbcsqlt.prg b/harbour/contrib/hbsqlit3/hdbcsqlt.prg index 41092bc5a4..dd9a627862 100644 --- a/harbour/contrib/hbsqlit3/hdbcsqlt.prg +++ b/harbour/contrib/hbsqlit3/hdbcsqlt.prg @@ -189,7 +189,7 @@ method executeUpdate( cSql ) class hdbcSQLTStatement method Close() class hdbcSQLTStatement - if !ISNIL( ::pRes ) + if !HB_ISNIL( ::pRes ) sqlite3_finalize( ::pRes ) diff --git a/harbour/contrib/hbsqlit3/tests/authoriz.prg b/harbour/contrib/hbsqlit3/tests/authoriz.prg index 8cdbff8de6..0e9c8ee000 100644 --- a/harbour/contrib/hbsqlit3/tests/authoriz.prg +++ b/harbour/contrib/hbsqlit3/tests/authoriz.prg @@ -76,7 +76,6 @@ * that contain additional details about the action to be authorized. */ -#include "common.ch" #include "hbsqlit3.ch" PROCEDURE main() @@ -107,7 +106,7 @@ PROCEDURE main() Qout( cErrorMsg(sqlite3_set_authorizer(pDb, @Authorizer3() /*"Authorizer3"*/)) ) QOut( cSQLTEXT := "SELECT * FROM main.person WHERE age BETWEEN 20 AND 40" ) - Qout( cErrorMsg(sqlite3_exec(pDb, cSQLTEXT, cb), FALSE) ) + Qout( cErrorMsg(sqlite3_exec(pDb, cSQLTEXT, cb), .F. ) ) sqlite3_sleep( 3000 ) // @@ -196,9 +195,9 @@ STATIC FUNCTION cErrorMsg( nError, lShortMsg ) { SQLITE_DONE , "SQLITE_DONE" , "sqlite3_step() has finished executing" } ; }, nIndex, cErrorMsg := "UNKNOWN" - DEFAULT lShortMsg TO .T. + hb_default( @lShortMsg, .T. ) - IF hb_IsNumeric( nError ) + IF HB_ISNUMERIC( nError ) IF nError == 0 cErrorMsg := "SQLITE_OK" ELSE diff --git a/harbour/contrib/hbsqlit3/tests/backup.prg b/harbour/contrib/hbsqlit3/tests/backup.prg index c9d490fe7b..2c3b8a0c1d 100644 --- a/harbour/contrib/hbsqlit3/tests/backup.prg +++ b/harbour/contrib/hbsqlit3/tests/backup.prg @@ -64,7 +64,6 @@ * with the backup operation. */ -#include "common.ch" #include "hbsqlit3.ch" PROCEDURE main() @@ -171,9 +170,9 @@ STATIC FUNCTION cErrorMsg( nError, lShortMsg ) { SQLITE_DONE , "SQLITE_DONE" , "sqlite3_step() has finished executing" } ; }, nIndex, cErrorMsg := "UNKNOWN" - DEFAULT lShortMsg TO .T. + hb_default( @lShortMsg, .T. ) - IF hb_IsNumeric( nError ) + IF HB_ISNUMERIC( nError ) IF nError == 0 cErrorMsg := "SQLITE_OK" ELSE diff --git a/harbour/contrib/hbsqlit3/tests/hdbctest.prg b/harbour/contrib/hbsqlit3/tests/hdbctest.prg index 8cac62e47d..ae4696fac5 100644 --- a/harbour/contrib/hbsqlit3/tests/hdbctest.prg +++ b/harbour/contrib/hbsqlit3/tests/hdbctest.prg @@ -2,8 +2,6 @@ * $Id$ */ -#include "common.ch" - PROCEDURE Main() LOCAL oConn, oMeta, oStmt, cSql, n, oRs diff --git a/harbour/contrib/hbsqlit3/tests/hooks.prg b/harbour/contrib/hbsqlit3/tests/hooks.prg index 312547114c..b9c5919599 100644 --- a/harbour/contrib/hbsqlit3/tests/hooks.prg +++ b/harbour/contrib/hbsqlit3/tests/hooks.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbsqlit3.ch" PROCEDURE main() @@ -184,9 +183,9 @@ STATIC FUNCTION cErrorMsg( nError, lShortMsg ) { SQLITE_DONE , "SQLITE_DONE" , "sqlite3_step() has finished executing" } ; }, nIndex, cErrorMsg := "UNKNOWN" - DEFAULT lShortMsg TO .T. + hb_default( @lShortMsg, .T. ) - IF hb_IsNumeric( nError ) + IF HB_ISNUMERIC( nError ) IF nError == 0 cErrorMsg := "SQLITE_OK" ELSE diff --git a/harbour/contrib/hbtip/cgi.prg b/harbour/contrib/hbtip/cgi.prg index ba3952d077..a04cfc4d28 100644 --- a/harbour/contrib/hbtip/cgi.prg +++ b/harbour/contrib/hbtip/cgi.prg @@ -62,7 +62,6 @@ #include "hbclass.ch" -#include "common.ch" #include "fileio.ch" #define CGI_IN 0 @@ -419,7 +418,7 @@ STATIC FUNCTION HtmlTag( xVal, cKey, cDefault ) LOCAL cVal := "" - DEFAULT cDefault TO "" + hb_default( @cDefault, "" ) IF ! Empty( xVal ) .AND. ! Empty( cKey ) IF hb_HHasKey( xVal, cKey ) @@ -442,7 +441,7 @@ STATIC FUNCTION HtmlAllTag( hTags, cSep ) LOCAL cVal := "" - DEFAULT cSep TO " " + hb_default( @cSep, " " ) hb_HEval( hTags, {| k | cVal += HtmlTag( hTags, k ) + cSep } ) @@ -477,7 +476,7 @@ STATIC FUNCTION HtmlAllOption( hOptions, cSep ) LOCAL cVal := "" IF ! Empty( hOptions ) - DEFAULT cSep TO " " + hb_default( @cSep, " " ) hb_HEval( hOptions, {| k | cVal += HtmlOption( hOptions, k,,, .T. ) + cSep } ) ENDIF @@ -488,7 +487,7 @@ STATIC FUNCTION HtmlValue( xVal, cKey, cDefault ) LOCAL cVal := "" - DEFAULT cDefault TO "" + hb_default( @cDefault, "" ) IF ! Empty( xVal ) .AND. ! Empty( cKey ) IF hb_HHasKey( xVal, cKey ) @@ -508,7 +507,7 @@ STATIC FUNCTION HtmlAllValue( hValues, cSep ) LOCAL cVal := "" IF ! Empty( hValues ) - DEFAULT cSep TO " " + hb_default( @cSep, " " ) hb_HEval( hValues, {| k | cVal += HtmlValue( hValues, k ) + cSep } ) ENDIF @@ -523,7 +522,7 @@ STATIC FUNCTION HtmlScript( hVal, cKey ) LOCAL nPos LOCAL cTmp - DEFAULT cKey TO "script" + hb_default( @cKey, "script" ) IF ! Empty( hVal ) IF ( nPos := hb_HPos( hVal, cKey ) ) != 0 @@ -566,7 +565,7 @@ STATIC FUNCTION HtmlStyle( hVal, cKey ) LOCAL nPos LOCAL cTmp - DEFAULT cKey TO "style" + hb_default( @cKey, "style" ) IF ! Empty( hVal ) IF ( nPos := hb_HPos( hVal, cKey ) ) != 0 @@ -609,7 +608,7 @@ STATIC FUNCTION HtmlLinkRel( hVal, cKey ) LOCAL nPos LOCAL cTmp - DEFAULT cKey TO "link" + hb_default( @cKey, "link" ) IF ! Empty( hVal ) IF ( nPos := hb_HPos( hVal, cKey ) ) != 0 diff --git a/harbour/contrib/hbtip/client.prg b/harbour/contrib/hbtip/client.prg index e2b7d21954..feab021b28 100644 --- a/harbour/contrib/hbtip/client.prg +++ b/harbour/contrib/hbtip/client.prg @@ -70,7 +70,6 @@ #include "hbclass.ch" -#include "common.ch" #include "error.ch" #include "fileio.ch" @@ -719,7 +718,7 @@ METHOD InetErrorCode( SocketCon ) CLASS tIPClient METHOD InetErrorDesc( SocketCon ) CLASS tIPClient LOCAL cMsg := "" - DEFAULT SocketCon TO ::SocketCon + hb_default( @SocketCon, ::SocketCon ) IF ! Empty( SocketCon ) IF ::lTLS diff --git a/harbour/contrib/hbtip/ftpcli.prg b/harbour/contrib/hbtip/ftpcli.prg index 42ce534299..89732ce1f2 100644 --- a/harbour/contrib/hbtip/ftpcli.prg +++ b/harbour/contrib/hbtip/ftpcli.prg @@ -93,7 +93,6 @@ #include "hbclass.ch" -#include "common.ch" #include "directry.ch" #include "tip.ch" @@ -389,10 +388,10 @@ METHOD List( cSpec ) CLASS tIPClientFTP METHOD UserCommand( cCommand, lPasv, lReadPort, lGetReply ) CLASS tIPClientFTP - DEFAULT cCommand TO "" - DEFAULT lPasv TO .T. - DEFAULT lReadPort TO .T. - DEFAULT lGetReply TO .F. + hb_default( @cCommand , "" ) + hb_default( @lPasv , .T. ) + hb_default( @lReadPort, .T. ) + hb_default( @lGetReply, .F. ) IF ::bUsePasv .AND. lPasv .AND. !::Pasv() RETURN .F. @@ -568,8 +567,8 @@ METHOD MGET( cSpec, cLocalPath ) CLASS tIPClientFTP LOCAL cStr, cFile - DEFAULT cSpec TO "" - DEFAULT cLocalPath TO "" + hb_default( @cSpec, "" ) + hb_default( @cLocalPath, "" ) IF ::bUsePasv IF ! ::Pasv() @@ -619,7 +618,7 @@ METHOD UpLoadFile( cLocalFile, cRemoteFile ) CLASS tIPClientFTP hb_FNameSplit( cLocalFile, @cPath, @cFile,@cExt ) - DEFAULT cRemoteFile TO cFile + cExt + hb_default( @cRemoteFile, cFile + cExt ) ::bEof := .F. ::oUrl:cFile := cRemoteFile @@ -656,7 +655,7 @@ METHOD LS( cSpec ) CLASS tIPClientFTP LOCAL cStr - DEFAULT cSpec TO "" + hb_default( @cSpec, "" ) IF ::bUsePasv .AND. ! ::Pasv() //::bUsePasv := .F. @@ -697,7 +696,7 @@ METHOD DownLoadFile( cLocalFile, cRemoteFile ) CLASS tIPClientFTP hb_FNameSplit( cLocalFile, @cPath, @cFile, @cExt ) - DEFAULT cRemoteFile TO cFile + cExt + hb_default( @cRemoteFile, cFile + cExt ) ::bEof := .F. ::oUrl:cFile := cRemoteFile diff --git a/harbour/contrib/hbtip/httpcli.prg b/harbour/contrib/hbtip/httpcli.prg index 56cb40dc56..0f89f23ef9 100644 --- a/harbour/contrib/hbtip/httpcli.prg +++ b/harbour/contrib/hbtip/httpcli.prg @@ -52,7 +52,6 @@ #include "hbclass.ch" -#include "common.ch" #include "fileio.ch" CREATE CLASS tIPClientHTTP FROM tIPClient @@ -414,7 +413,7 @@ METHOD getcookies( cHost, cPath ) CLASS tIPClientHTTP LOCAL x, y, aDomKeys := {}, aKeys, z, cKey, aPathKeys, nPath LOCAL a, b, cOut := "", c, d - DEFAULT cHost TO ::oUrl:cServer + hb_default( @cHost, ::oUrl:cServer ) IF cPath == NIL cPath := ::oUrl:cPath @@ -481,7 +480,7 @@ METHOD Boundary( nType ) CLASS tIPClientHTTP LOCAL cBound := ::cBoundary LOCAL i - DEFAULT nType TO 0 + hb_default( @nType, 0 ) IF Empty( cBound ) cBound := Replicate( "-", 27 ) + Space( 11 ) FOR i := 28 TO 38 diff --git a/harbour/contrib/hbtip/sessid.prg b/harbour/contrib/hbtip/sessid.prg index f73f89b110..c729a65bbc 100644 --- a/harbour/contrib/hbtip/sessid.prg +++ b/harbour/contrib/hbtip/sessid.prg @@ -75,7 +75,7 @@ FUNCTION TIP_GENERATESID( cCRCKey ) LOCAL cRet LOCAL nRand, nKey := 0 - DEFAULT cCRCKey TO CRC_KEY_STRING + hb_default( @cCRCKey, CRC_KEY_STRING ) cCRCKey := Left( cCRCKey, 10 ) // Max Lenght must to be of 10 chars @@ -105,7 +105,7 @@ FUNCTION TIP_CHECKSID( cSID, cCRCKey ) LOCAL cBaseKeys := BASE_KEY_STRING LOCAL nRand, nKey := 0 - DEFAULT cCRCKey TO CRC_KEY_STRING + hb_default( @cCRCKey, CRC_KEY_STRING ) cCRCKey := Left( cCRCKey, 10 ) // Max Lenght must to be of 10 chars @@ -132,8 +132,8 @@ FUNCTION TIP_DATETOGMT( dDate, cTime ) LOCAL aDays := { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" } LOCAL aMonths := { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" } - DEFAULT dDate TO DATE() - DEFAULT cTime TO TIME() + hb_default( @dDate, Date() ) + hb_default( @cTime, Time() ) nDay := Day( dDate ) nMonth := Month( dDate ) diff --git a/harbour/contrib/hbtip/tests/dnldftp.prg b/harbour/contrib/hbtip/tests/dnldftp.prg index 3ca8137d97..712a5772a6 100644 --- a/harbour/contrib/hbtip/tests/dnldftp.prg +++ b/harbour/contrib/hbtip/tests/dnldftp.prg @@ -6,9 +6,7 @@ * Download an file from an ftp server */ -#include "common.ch" - -PROCEDURE MAIN( cFile ) +PROCEDURE Main( cFile ) ? TRP20FTPEnv( cFile ) diff --git a/harbour/contrib/hbtip/tests/gmail.prg b/harbour/contrib/hbtip/tests/gmail.prg index c3a172422f..c59aff2a2e 100644 --- a/harbour/contrib/hbtip/tests/gmail.prg +++ b/harbour/contrib/hbtip/tests/gmail.prg @@ -7,14 +7,13 @@ * www - http://harbour-project.org */ -#include "common.ch" #include "simpleio.ch" PROCEDURE Main( cFrom, cPassword, cTo ) - DEFAULT cFrom TO "" - DEFAULT cPassword TO "" - DEFAULT cTo TO "addressee@domain.com" + hb_default( @cFrom , "" ) + hb_default( @cPassword, "" ) + hb_default( @cTo , "addressee@domain.com" ) ? hb_SendMail( "smtp.gmail.com",; 465,; diff --git a/harbour/contrib/hbtip/tests/upld_ftp.prg b/harbour/contrib/hbtip/tests/upld_ftp.prg index ca1121a03d..4a1f5a750e 100644 --- a/harbour/contrib/hbtip/tests/upld_ftp.prg +++ b/harbour/contrib/hbtip/tests/upld_ftp.prg @@ -7,7 +7,6 @@ * Send an file or list of files to ftp server */ -#include "common.ch" #include "directry.ch" PROCEDURE MAIN( cMask ) diff --git a/harbour/contrib/hbwin/tests/dlg.prg b/harbour/contrib/hbwin/tests/dlg.prg index ddb5eec0f2..07e09ec955 100644 --- a/harbour/contrib/hbwin/tests/dlg.prg +++ b/harbour/contrib/hbwin/tests/dlg.prg @@ -8,7 +8,6 @@ * resource editor (Pelles C) * 06/10/2010 - 00:16:41 - [vailtom] */ -#include "common.ch" // Some constants #define IDD_DIALOG1 101 diff --git a/harbour/contrib/hbwin/tests/testsvc.prg b/harbour/contrib/hbwin/tests/testsvc.prg index a05639373c..a0c7f2cfff 100644 --- a/harbour/contrib/hbwin/tests/testsvc.prg +++ b/harbour/contrib/hbwin/tests/testsvc.prg @@ -52,15 +52,13 @@ #include "hbwin.ch" -#include "common.ch" - #define _SERVICE_NAME "Harbour_Test_Service" PROCEDURE Main( cMode ) LOCAL nError LOCAL cMsg - DEFAULT cMode TO "S" /* NOTE: Must be the default action */ + hb_default( @cMode, "S" ) /* NOTE: Must be the default action */ SWITCH Upper( cMode ) CASE "I" diff --git a/harbour/contrib/hbwin/win_tcom.prg b/harbour/contrib/hbwin/win_tcom.prg index 38a98c1b76..aaf176140e 100644 --- a/harbour/contrib/hbwin/win_tcom.prg +++ b/harbour/contrib/hbwin/win_tcom.prg @@ -51,7 +51,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "hbwin.ch" diff --git a/harbour/contrib/hbxpp/tgetx.prg b/harbour/contrib/hbxpp/tgetx.prg index 9101f0d6f1..97b0dca177 100644 --- a/harbour/contrib/hbxpp/tgetx.prg +++ b/harbour/contrib/hbxpp/tgetx.prg @@ -52,8 +52,6 @@ #include "hbclass.ch" -#include "common.ch" - CREATE CLASS xpp_Get INHERIT Get EXPORTED: diff --git a/harbour/contrib/hbxpp/xppop.prg b/harbour/contrib/hbxpp/xppop.prg index 9e4a7100eb..8451040697 100644 --- a/harbour/contrib/hbxpp/xppop.prg +++ b/harbour/contrib/hbxpp/xppop.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbclass.ch" ANNOUNCE XPP_OP_OVERLOAD diff --git a/harbour/contrib/hbziparc/ziparc.prg b/harbour/contrib/hbziparc/ziparc.prg index 01e1a3ecf8..c6b75a00be 100644 --- a/harbour/contrib/hbziparc/ziparc.prg +++ b/harbour/contrib/hbziparc/ziparc.prg @@ -53,7 +53,6 @@ * */ -#include "common.ch" #include "directry.ch" #include "fileio.ch" @@ -65,7 +64,7 @@ THREAD STATIC t_lReadOnly := .F. PROCEDURE SetZipReadOnly( lReadOnly ) - DEFAULT lReadOnly TO .F. + hb_default( @lReadOnly, .F. ) t_lReadOnly := lReadOnly @@ -174,7 +173,7 @@ FUNCTION hb_GetFilesInZip( cFileName, lVerbose ) IF !Empty( hUnzip := hb_UnzipOpen( cFileName ) ) - DEFAULT lVerbose TO .F. + hb_default( @lVerbose, .F. ) nErr := hb_UnzipFileFirst( hUnzip ) DO WHILE nErr == 0 @@ -289,8 +288,8 @@ FUNCTION hb_ZipFile( cFileName,; LOCAL aFile LOCAL tmp - DEFAULT lOverwrite TO .F. - DEFAULT lFullPath TO .T. + hb_default( @lOverwrite, .F. ) + hb_default( @lFullPath, .T. ) /* TODO: Implement */ HB_SYMBOL_UNUSED( lFullPath ) @@ -309,18 +308,18 @@ FUNCTION hb_ZipFile( cFileName,; IF !Empty( hZip := hb_ZipOpen( cFileName, iif( ! lOverwrite .AND. hb_FileExists( cFileName ), HB_ZIP_OPEN_ADDINZIP, NIL ) ) ) - DEFAULT acFiles TO {} - DEFAULT acExclude TO {} - DEFAULT lWithPath TO .F. - DEFAULT lWithDrive TO .F. - - IF hb_isString( acFiles ) + IF HB_ISSTRING( acFiles ) acFiles := { acFiles } ENDIF - IF hb_isString( acExclude ) + IF HB_ISSTRING( acExclude ) acExclude := { acExclude } ENDIF + hb_default( @acFiles, {} ) + hb_default( @acExclude, {} ) + hb_default( @lWithPath, .F. ) + hb_default( @lWithDrive, .F. ) + // ; /* NOTE: Try not to add the .zip file to itself. */ @@ -363,7 +362,7 @@ FUNCTION hb_ZipFile( cFileName,; IF ( hHandle := FOpen( cFileToZip, FO_READ ) ) != F_ERROR - IF hb_isBlock( bUpdate ) + IF HB_ISBLOCK( bUpdate ) Eval( bUpdate, cFileToZip, nPos++ ) ENDIF @@ -378,7 +377,7 @@ FUNCTION hb_ZipFile( cFileName,; DO WHILE ( nLen := FRead( hHandle, @cBuffer, hb_BLen( cBuffer ) ) ) > 0 - IF hb_isBlock( bProgress ) + IF HB_ISBLOCK( bProgress ) nRead += nLen Eval( bProgress, nRead, nSize ) ENDIF @@ -420,7 +419,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles, LOCAL cTime LOCAL cBuffer := Space( t_nReadBuffer ) - DEFAULT lWithPath TO .F. + hb_default( @lWithPath, .F. ) IF lWithPath .AND. ! hb_DirExists( cPath ) .AND. hb_DirCreate( cPath ) != 0 lRetVal := .F. @@ -439,8 +438,8 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles, IF !Empty( hUnzip := hb_UnzipOpen( cFileName ) ) - IF hb_isNumeric( acFiles ) .OR. ; - hb_isString( acFiles ) + IF HB_ISNUMERIC( acFiles ) .OR. ; + HB_ISSTRING( acFiles ) acFiles := { acFiles } ENDIF @@ -473,7 +472,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles, nRead := 0 DO WHILE ( nLen := hb_UnzipFileRead( hUnzip, @cBuffer, hb_BLen( cBuffer ) ) ) > 0 - IF hb_isBlock( bProgress ) + IF HB_ISBLOCK( bProgress ) nRead += nLen Eval( bProgress, nRead, nSize ) ENDIF @@ -485,7 +484,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles, hb_FSetDateTime( cPath + cZipName, dDate, cTime ) - IF hb_isBlock( bUpdate ) + IF HB_ISBLOCK( bUpdate ) Eval( bUpdate, cZipName, nPos ) ENDIF ENDIF @@ -521,7 +520,7 @@ FUNCTION hb_ZipDeleteFiles( cFileName, acFiles ) ENDIF ENDIF - IF hb_isString( acFiles ) + IF HB_ISSTRING( acFiles ) acFiles := { acFiles } ENDIF diff --git a/harbour/examples/hbbtree/tbtree.prg b/harbour/examples/hbbtree/tbtree.prg index dcd120cc57..29325eba51 100644 --- a/harbour/examples/hbbtree/tbtree.prg +++ b/harbour/examples/hbbtree/tbtree.prg @@ -34,10 +34,9 @@ */ #include "hbclass.ch" -#include "common.ch" #include "hb_btree.ch" -CLASS TBTree STATIC +CREATE CLASS TBTree STATIC HIDDEN: DATA nHandle /* hb_btree handle */ @@ -66,7 +65,7 @@ METHOD New( cFileName, nPageSize, nKeySize, nFlags, nBuffers ) CLASS TBTree RETURN NIL METHOD Open( cFileName, nFlags, nBuffers ) CLASS TBTree - ::nHandle := hb_btreeopen( cFileName, nFlags, nBuffers ) + ::nHandle := hb_btreeopen( cFileName, nFlags, nBuffers ) IF ::nHandle >= 1 RETURN SELF ENDIF diff --git a/harbour/examples/httpsrv/modules/info.prg b/harbour/examples/httpsrv/modules/info.prg index 78eadf56f2..6f4eba00e3 100644 --- a/harbour/examples/httpsrv/modules/info.prg +++ b/harbour/examples/httpsrv/modules/info.prg @@ -56,7 +56,6 @@ */ -#include "common.ch" #include "hbclass.ch" MEMVAR _SERVER, _REQUEST, _GET, _POST, _COOKIE, _SESSION, _HTTP_REQUEST, _HTTP_RESPONSE diff --git a/harbour/examples/httpsrv/modules/testajax.prg b/harbour/examples/httpsrv/modules/testajax.prg index a3e0551991..a707b399d1 100644 --- a/harbour/examples/httpsrv/modules/testajax.prg +++ b/harbour/examples/httpsrv/modules/testajax.prg @@ -50,8 +50,6 @@ * */ -#include "common.ch" - MEMVAR _REQUEST FUNCTION HRBMAIN() @@ -64,6 +62,4 @@ FUNCTION HRBMAIN() ENDIF ENDIF -RETURN cHtml - - + RETURN cHtml diff --git a/harbour/examples/rddado/adordd.prg b/harbour/examples/rddado/adordd.prg index 1b65ce9fab..5a88d2d11c 100644 --- a/harbour/examples/rddado/adordd.prg +++ b/harbour/examples/rddado/adordd.prg @@ -77,7 +77,6 @@ #include "fileio.ch" #include "error.ch" #include "adordd.ch" -#include "common.ch" #include "dbstruct.ch" #include "dbinfo.ch" diff --git a/harbour/examples/terminal/terminal.prg b/harbour/examples/terminal/terminal.prg index 8549b62b53..5c5e2c37df 100644 --- a/harbour/examples/terminal/terminal.prg +++ b/harbour/examples/terminal/terminal.prg @@ -61,8 +61,6 @@ //----------------------------------------------------------------------// //----------------------------------------------------------------------// -#include "common.ch" - //#include "wvtwin.ch" #define WSABASEERR 10000 @@ -101,8 +99,8 @@ Function RmtSvrInitialize( cServerInfo, nTimeoutClient, nTimeRefresh ) s_srvrSocket := NIL s_commSocket := NIL - DEFAULT nTimeoutClient TO 60 // 60 SECONDS - DEFAULT nTimeRefresh TO .5 // 0.5 SECONDS + hb_default( @nTimeoutClient, 60 ) // in seconds + hb_default( @nTimeRefresh , 0.5 ) // in seconds nTimeRefresh := 0.1 @@ -229,7 +227,7 @@ Function RmtSvrSendClient( nMode, xData ) endif t_:= xData - DEFAULT t_ TO { 0, 0, maxrow( .t. ), maxcol( .t. ) } + hb_default( @t_, { 0, 0, maxrow( .t. ), maxcol( .t. ) } ) cOdd := "" cEvn := "" diff --git a/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg b/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg index a9180c0344..745af661db 100644 --- a/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg +++ b/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg @@ -66,7 +66,6 @@ #include "fileio.ch" #include "error.ch" #include "dbstruct.ch" -#include "common.ch" #include "dbinfo.ch" #include "hbtrace.ch" @@ -421,7 +420,7 @@ STATIC FUNCTION AR_CLOSE( nWA ) HB_TRACE( HB_TR_DEBUG, hb_StrFormat( "nWA = %1$d", nWA ) ) - IF HB_HB_ISARRAY( aDBFData ) + IF HB_ISARRAY( aDBFData ) /* decrease open number */ aDBFData[ DATABASE_OPENNUMBER ]-- @@ -1171,7 +1170,7 @@ STATIC FUNCTION AR_ORDCREATE( nWA, aOrderCreate ) aWAData := USRRDD_AREADATA( nWA ) aDBFData := aWAData[ WADATA_DATABASE ] - IF HB_HB_ISARRAY( aOrderCreate[ UR_ORCR_CONDINFO ] ) + IF HB_ISARRAY( aOrderCreate[ UR_ORCR_CONDINFO ] ) aOCInfo := aOrderCreate[ UR_ORCR_CONDINFO ] ELSE aOCInfo := aOrderCreate[ UR_ORCR_CONDINFO ] := ; diff --git a/harbour/src/rdd/usrrdd/rdds/logrdd.prg b/harbour/src/rdd/usrrdd/rdds/logrdd.prg index 35009c128d..681f489363 100644 --- a/harbour/src/rdd/usrrdd/rdds/logrdd.prg +++ b/harbour/src/rdd/usrrdd/rdds/logrdd.prg @@ -256,7 +256,7 @@ FUNCTION hb_LogRddActive( lActive ) lOldActive := aRDDData[ ARRAY_ACTIVE ] - IF HB_HB_ISLOGICAL( lActive ) + IF HB_ISLOGICAL( lActive ) aRDDData[ ARRAY_ACTIVE ] := lActive ENDIF @@ -273,7 +273,7 @@ FUNCTION hb_LogRddMsgLogBlock( bMsgLogBlock ) bOldMsgLogBlock := aRDDData[ ARRAY_MSGLOGBLOCK ] - IF HB_HB_ISBLOCK( bMsgLogBlock ) + IF HB_ISBLOCK( bMsgLogBlock ) aRDDData[ ARRAY_MSGLOGBLOCK ] := bMsgLogBlock ENDIF @@ -290,7 +290,7 @@ FUNCTION hb_LogRddUserLogBlock( bUserLogBlock ) bOldUserLogBlock := aRDDData[ ARRAY_MSGLOGBLOCK ] - IF HB_HB_ISBLOCK( bUserLogBlock ) + IF HB_ISBLOCK( bUserLogBlock ) aRDDData[ ARRAY_USERLOGBLOCK ] := bUserLogBlock ENDIF @@ -404,7 +404,7 @@ STATIC PROCEDURE ToLog( cCmd, nWA, xPar1, xPar2, xPar3 ) bUserLogBlock := aRDDData[ ARRAY_USERLOGBLOCK ] // If not defined a User codeblock - IF !HB_HB_ISBLOCK( bUserLogBlock ) + IF !HB_ISBLOCK( bUserLogBlock ) nHandle := aRDDData[ ARRAY_FHANDLE ] @@ -419,7 +419,7 @@ STATIC PROCEDURE ToLog( cCmd, nWA, xPar1, xPar2, xPar3 ) // If defined a codeblock I send to user infos and he has to return a formatted string // Look at local ToString() function for details - IF HB_HB_ISBLOCK( bMsgLogBlock ) + IF HB_ISBLOCK( bMsgLogBlock ) cLog := Eval( bMsgLogBlock, cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 ) ELSE cLog := DToS( Date() ) + " " + Time() + " " + cTag + ": " + PadR( cRDDName + "_" + cCmd, 20 ) + " - " + ToString( cCmd, nWA, xPar1, xPar2, xPar3 ) diff --git a/harbour/src/rtl/achoice.prg b/harbour/src/rtl/achoice.prg index 33ff3b1a4c..08099e2046 100644 --- a/harbour/src/rtl/achoice.prg +++ b/harbour/src/rtl/achoice.prg @@ -22,7 +22,6 @@ #include "achoice.ch" #include "color.ch" -#include "common.ch" #include "inkey.ch" #include "setcurs.ch" diff --git a/harbour/src/rtl/radiogrp.prg b/harbour/src/rtl/radiogrp.prg index 7a9192378b..a5b3ebd309 100644 --- a/harbour/src/rtl/radiogrp.prg +++ b/harbour/src/rtl/radiogrp.prg @@ -54,7 +54,6 @@ #include "button.ch" #include "color.ch" -#include "common.ch" #include "setcurs.ch" /* NOTE: Harbour doesn't support CA-Cl*pper 5.3 GUI functionality, but diff --git a/harbour/src/rtl/tclass.prg b/harbour/src/rtl/tclass.prg index 81d9c1cac3..a7439762f3 100644 --- a/harbour/src/rtl/tclass.prg +++ b/harbour/src/rtl/tclass.prg @@ -78,7 +78,6 @@ /* Harbour Class HBClass to build classes */ -#include "common.ch" #include "hboo.ch" REQUEST HBObject diff --git a/harbour/tests/usrrdd/exlog.prg b/harbour/tests/usrrdd/exlog.prg index fcaf80d7c4..9a4e20f8f9 100644 --- a/harbour/tests/usrrdd/exlog.prg +++ b/harbour/tests/usrrdd/exlog.prg @@ -2,7 +2,6 @@ * $Id$ */ -#include "common.ch" #include "dbinfo.ch" #include "hbusrrdd.ch"