From d554fd3e64ddd77e0ce58a3c4e52fa9d74a57c42 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Oct 2012 18:01:04 +0000 Subject: [PATCH] 2012-10-08 19:32 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/xhb/dbgfx.prg * contrib/xhb/decode.prg * contrib/xhb/dumpvar.prg * contrib/xhb/hblognet.prg * contrib/xhb/hjwindow.prg * contrib/xhb/htjlist.prg * contrib/xhb/htmutil.prg * contrib/xhb/stream.prg * contrib/xhb/tcgi.prg * contrib/xhb/tedit.prg * contrib/xhb/tfile.prg * contrib/xhb/tframe.prg * contrib/xhb/thtm.prg * contrib/xhb/ttable.prg * contrib/xhb/txml.prg * contrib/xhb/xhbcomp.prg * contrib/xhb/xhberr.prg * contrib/xhb/xhbfunp.prg * contrib/xhb/xhbmemo.prg * contrib/xhb/xhbole.prg * contrib/xhb/xhbtedit.prg * contrib/xhb/xhw32prn.prg * use __defaultNIL() instead of DEFAULT TO * deleted common.ch from all files --- harbour/ChangeLog | 27 ++++- harbour/contrib/xhb/dbgfx.prg | 3 +- harbour/contrib/xhb/decode.prg | 2 - harbour/contrib/xhb/dumpvar.prg | 13 +- harbour/contrib/xhb/hblognet.prg | 1 - harbour/contrib/xhb/hjwindow.prg | 51 ++++---- harbour/contrib/xhb/htjlist.prg | 51 ++++---- harbour/contrib/xhb/htmutil.prg | 73 ++++++----- harbour/contrib/xhb/stream.prg | 5 +- harbour/contrib/xhb/tcgi.prg | 3 +- harbour/contrib/xhb/tedit.prg | 13 +- harbour/contrib/xhb/tfile.prg | 25 ++-- harbour/contrib/xhb/tframe.prg | 13 +- harbour/contrib/xhb/thtm.prg | 201 +++++++++++++++---------------- harbour/contrib/xhb/ttable.prg | 101 ++++++++-------- harbour/contrib/xhb/txml.prg | 1 - harbour/contrib/xhb/xhbcomp.prg | 1 - harbour/contrib/xhb/xhberr.prg | 3 +- harbour/contrib/xhb/xhbfunp.prg | 2 - harbour/contrib/xhb/xhbmemo.prg | 31 +++-- harbour/contrib/xhb/xhbole.prg | 1 - harbour/contrib/xhb/xhbtedit.prg | 63 +++++----- harbour/contrib/xhb/xhw32prn.prg | 13 +- 23 files changed, 349 insertions(+), 348 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c64bde158d..9dc9903dfd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,32 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-08 19:32 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/xhb/dbgfx.prg + * contrib/xhb/decode.prg + * contrib/xhb/dumpvar.prg + * contrib/xhb/hblognet.prg + * contrib/xhb/hjwindow.prg + * contrib/xhb/htjlist.prg + * contrib/xhb/htmutil.prg + * contrib/xhb/stream.prg + * contrib/xhb/tcgi.prg + * contrib/xhb/tedit.prg + * contrib/xhb/tfile.prg + * contrib/xhb/tframe.prg + * contrib/xhb/thtm.prg + * contrib/xhb/ttable.prg + * contrib/xhb/txml.prg + * contrib/xhb/xhbcomp.prg + * contrib/xhb/xhberr.prg + * contrib/xhb/xhbfunp.prg + * contrib/xhb/xhbmemo.prg + * contrib/xhb/xhbole.prg + * contrib/xhb/xhbtedit.prg + * contrib/xhb/xhw32prn.prg + * use __defaultNIL() instead of DEFAULT TO + * deleted common.ch from all files + 2012-10-08 19:14 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/xhb/hjwindow.prg * contrib/xhb/htmutil.prg @@ -164164,7 +164190,6 @@ * contrib/xhb/makefile.vc * removed the "-TP" (force source as c++) msvc compiler flag - 2007-11-03 02:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/bmdbfcdx/bmdbfcdx1.c * replaced all direct access to hb_set structure with functions diff --git a/harbour/contrib/xhb/dbgfx.prg b/harbour/contrib/xhb/dbgfx.prg index b2e29f0a37..4283f3ffb0 100644 --- a/harbour/contrib/xhb/dbgfx.prg +++ b/harbour/contrib/xhb/dbgfx.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "fileio.ch" STATIC s_lToOutDebug := .T. @@ -103,7 +102,7 @@ PROCEDURE HB_ToLogFile( cLogFile, ... ) RETURN ENDIF - DEFAULT cLogFile TO "logfile.log" + __defaultNIL( @cLogFile, "logfile.log" ) IF cLogFile != NIL diff --git a/harbour/contrib/xhb/decode.prg b/harbour/contrib/xhb/decode.prg index 5b0b6e5736..9416aa2155 100644 --- a/harbour/contrib/xhb/decode.prg +++ b/harbour/contrib/xhb/decode.prg @@ -51,8 +51,6 @@ * */ -#include "common.ch" - /* PROCEDURE Main() LOCAL aArray diff --git a/harbour/contrib/xhb/dumpvar.prg b/harbour/contrib/xhb/dumpvar.prg index e7d516eeff..3c5c485951 100644 --- a/harbour/contrib/xhb/dumpvar.prg +++ b/harbour/contrib/xhb/dumpvar.prg @@ -51,7 +51,6 @@ */ #include "hbclass.ch" -#include "common.ch" /* * (C) 2003 - Francesco Saverio Giudice @@ -88,7 +87,7 @@ FUNCTION HB_DumpVar( xVar, lRecursive, nMaxRecursionLevel ) // TraceLog( "HB_DumpVariable: xVar, lAssocAsObj, lRecursive", xVar, lAssocAsObj, lRecursive ) - DEFAULT nMaxRecursionLevel TO 0 + __defaultNIL( @nMaxRecursionLevel, 0 ) RETURN __HB_DumpVar( xVar, , lRecursive, nIndent, nRecursionLevel, nMaxRecursionLevel ) @@ -98,8 +97,8 @@ STATIC FUNCTION __HB_DumpVar( xVar, lAssocAsObj, lRecursive, nIndent, nRecursion LOCAL cString := "", cKey LOCAL nEolLen - DEFAULT lAssocAsObj TO .F. - DEFAULT lRecursive TO .F. + __defaultNIL( @lAssocAsObj, .F. ) + __defaultNIL( @lRecursive, .F. ) // TraceLog( "Recursion: xVar, nRecursionLevel, nMaxRecursionLevel", xVar, nRecursionLevel, nMaxRecursionLevel ) @@ -177,7 +176,7 @@ STATIC FUNCTION DShowProperties( oVar, nScope, lRecursive, nIndent, nRecursionLe LOCAL aMethods, aMth LOCAL cString := "" - DEFAULT nIndent TO 0 + __defaultNIL( @nIndent, 0 ) IF HB_ISOBJECT( oVar ) // lOldScope := __SetClassScope( .F. ) @@ -216,7 +215,7 @@ STATIC FUNCTION DShowArray( aVar, lRecursive, nIndent, nRecursionLevel, nMaxRecu LOCAL xVal, nChar, nEolLen LOCAL cString := "" - DEFAULT nIndent TO 0 + __defaultNIL( @nIndent, 0 ) //TraceLog( "DShowArray: aVar, lRecursive", aVar, lRecursive ) @@ -247,7 +246,7 @@ STATIC FUNCTION DShowHash( hVar, lRecursive, nIndent, nRecursionLevel, nMaxRecur LOCAL nEolLen LOCAL cString := "" - DEFAULT nIndent TO 0 + __defaultNIL( @nIndent, 0 ) //TraceLog( "DShowHash: hVar, ValType( hVar ), lRecursive", hVar, ValType( hVar ), ValToPrg( hVar ), lRecursive ) diff --git a/harbour/contrib/xhb/hblognet.prg b/harbour/contrib/xhb/hblognet.prg index 738c5b25a7..9d6d1914c0 100644 --- a/harbour/contrib/xhb/hblognet.prg +++ b/harbour/contrib/xhb/hblognet.prg @@ -50,7 +50,6 @@ */ #include "hbclass.ch" -#include "common.ch" #define CRLF Chr( 13 ) + Chr( 10 ) diff --git a/harbour/contrib/xhb/hjwindow.prg b/harbour/contrib/xhb/hjwindow.prg index 6a18cfcfe0..41ad25f3f1 100644 --- a/harbour/contrib/xhb/hjwindow.prg +++ b/harbour/contrib/xhb/hjwindow.prg @@ -45,7 +45,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "cgi.ch" CLASS TJsWindow @@ -131,13 +130,13 @@ ENDCLASS METHOD New( cVarName, cUrl, cName, x, y, w, h ) CLASS TJsWindow - DEFAULT cVarName TO "newWin" - DEFAULT cURL TO " " - DEFAULT cName TO cVarName - DEFAULT x TO 100 - DEFAULT y TO 100 - DEFAULT h TO 300 - DEFAULT w TO 300 + __defaultNIL( @cVarName, "newWin" ) + __defaultNIL( @cURL, " " ) + __defaultNIL( @cName, cVarName ) + __defaultNIL( @x, 100 ) + __defaultNIL( @y, 100 ) + __defaultNIL( @h, 300 ) + __defaultNIL( @w, 300 ) ::nH := HtmlPageHandle() ::oHtm := HtmlPageObject() @@ -165,19 +164,19 @@ METHOD SetFeatures( alwaysRaised, alwaysLowered, ; LOCAL cStr := "" - DEFAULT alwaysRaised TO ::alwaysRaised - DEFAULT alwaysLowered TO ::alwaysLowered - DEFAULT Resizable TO ::Resizable - DEFAULT Menubar TO ::Menubar - DEFAULT personalBar TO ::personalBar - DEFAULT dependent TO ::dependent - DEFAULT location TO ::location - DEFAULT directories TO ::directories - DEFAULT Scrollbars TO ::Scrollbars - DEFAULT Status TO ::Status - DEFAULT TitleBar TO ::TitleBar - DEFAULT Toolbar TO ::Toolbar - DEFAULT copyHistory TO ::copyHistory + __defaultNIL( @alwaysRaised, ::alwaysRaised ) + __defaultNIL( @alwaysLowered, ::alwaysLowered ) + __defaultNIL( @Resizable, ::Resizable ) + __defaultNIL( @Menubar, ::Menubar ) + __defaultNIL( @personalBar, ::personalBar ) + __defaultNIL( @dependent, ::dependent ) + __defaultNIL( @location, ::location ) + __defaultNIL( @directories, ::directories ) + __defaultNIL( @Scrollbars, ::Scrollbars ) + __defaultNIL( @Status, ::Status ) + __defaultNIL( @TitleBar, ::TitleBar ) + __defaultNIL( @Toolbar, ::Toolbar ) + __defaultNIL( @copyHistory, ::copyHistory ) IF alwaysRaised cStr += "alwaysraised=yes," @@ -259,10 +258,10 @@ METHOD SetSize( x, y, h, w ) CLASS TJsWindow LOCAL cStr := "" - DEFAULT x TO ::ScreenX - DEFAULT y TO ::ScreenY - DEFAULT h TO ::height - DEFAULT w TO ::width + __defaultNIL( @x, ::ScreenX ) + __defaultNIL( @y, ::ScreenY ) + __defaultNIL( @h, ::height ) + __defaultNIL( @w, ::width ) ::ScreenX := x ::ScreenY := y @@ -430,7 +429,7 @@ METHOD ImageURL( cImage, cUrl, nHeight, nBorder, ; LOCAL cStr := "" - DEFAULT cUrl TO "" + __defaultNIL( @cUrl, "" ) IF cName != NIL cStr += ' NAME= "' + cName + '"' + CRLF() diff --git a/harbour/contrib/xhb/htjlist.prg b/harbour/contrib/xhb/htjlist.prg index 18903f8805..d2929aa15b 100644 --- a/harbour/contrib/xhb/htjlist.prg +++ b/harbour/contrib/xhb/htjlist.prg @@ -49,7 +49,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "cgi.ch" CLASS TJsList @@ -98,16 +97,16 @@ METHOD New( name, lOpen, width, height, bgColor, ; LOCAL cStr - DEFAULT name TO "l" - DEFAULT lOpen TO .F. - DEFAULT WIDTH TO 200 - DEFAULT HEIGHT TO 22 - DEFAULT BGCOLOR TO "white" - DEFAULT FONT TO "Verdana" - DEFAULT fntColor TO "black" - DEFAULT fntSize TO 2 - DEFAULT cMinusImg TO "minus.gif" - DEFAULT cPlusImg TO "plus.gif" + __defaultNIL( @name, "l" ) + __defaultNIL( @lOpen, .F. ) + __defaultNIL( @WIDTH, 200 ) + __defaultNIL( @HEIGHT, 22 ) + __defaultNIL( @BGCOLOR, "white" ) + __defaultNIL( @FONT, "Verdana" ) + __defaultNIL( @fntColor, "black" ) + __defaultNIL( @fntSize, 2 ) + __defaultNIL( @cMinusImg, "minus.gif" ) + __defaultNIL( @cPlusImg, "plus.gif" ) ::font := FONT ::size := fntSize @@ -157,10 +156,10 @@ METHOD NewNode( name, lOpen, width, height, bgColor ) CLASS TJsList LOCAL cStr := "" - DEFAULT lOpen TO .F. - DEFAULT WIDTH TO 200 - DEFAULT HEIGHT TO 22 - DEFAULT BGCOLOR TO "white" + __defaultNIL( @lOpen, .F. ) + __defaultNIL( @WIDTH, 200 ) + __defaultNIL( @HEIGHT, 22 ) + __defaultNIL( @BGCOLOR, "white" ) cStr += "" //SPACE(10) cStr += name + "= new List(" cStr += iif( lOpen, "true,", "false," ) @@ -186,10 +185,10 @@ METHOD SetFont( name, font, fntColor, fntSize ) CLASS TJsList LOCAL cStr := "" - DEFAULT name TO ::cCurrentNode - DEFAULT FONT TO ::font - DEFAULT fntColor TO ::fontColor - DEFAULT fntSize TO ::Size + __defaultNIL( @name, ::cCurrentNode ) + __defaultNIL( @FONT, ::font ) + __defaultNIL( @fntColor, ::fontColor ) + __defaultNIL( @fntSize, ::Size ) cStr += name + [.setFont("] + htmlSpace( 2 ) + name + htmlSpace( 2 ) cStr += ::cCurrentNode + '.addItem( "' + cUrl + '"' + iif( bgColor != NIL, ',"' + bgColor + '"', "" ) + ');' + CRLF() ::nItems++ @@ -232,9 +231,9 @@ METHOD AddLink( name, url, img, bgColor ) CLASS TJsList LOCAL cStr := "" LOCAL cUrl - DEFAULT name TO "o" - DEFAULT url TO "" - DEFAULT img TO "webpage.jpg" + __defaultNIL( @name, "o" ) + __defaultNIL( @url, "" ) + __defaultNIL( @img, "webpage.jpg" ) cUrl := "" + htmlSpace( 2 ) + name + htmlSpace( 2 ) cStr += ::cCurrentNode + '.addItem( "' + curl + '"' + iif( bgColor != NIL, ',"' + bgColor + '"', "" ) + ');' + CRLF() ::nItems++ @@ -259,8 +258,8 @@ METHOD Build( xPos, yPos ) CLASS TJsList LOCAL i LOCAL cStr := "" - DEFAULT xPos TO 5 - DEFAULT yPos TO 5 + __defaultNIL( @xPos, 5 ) + __defaultNIL( @yPos, 5 ) cStr += ::cMainNode + ".build(" + hb_ntos( xPos ) + "," + hb_ntos( yPos ) + ");" + CRLF() cStr += "}" + CRLF() diff --git a/harbour/contrib/xhb/htmutil.prg b/harbour/contrib/xhb/htmutil.prg index 94bb528dd8..16ee365eb4 100644 --- a/harbour/contrib/xhb/htmutil.prg +++ b/harbour/contrib/xhb/htmutil.prg @@ -44,7 +44,6 @@ * */ -#include "common.ch" #include "html.ch" #include "hbclass.ch" @@ -58,7 +57,7 @@ STATIC s_aGreek := {} PROCEDURE BackButton( cImage, oHtm ) - DEFAULT cImage TO "back.gif" + __defaultNIL( @cImage, "back.gif" ) IF oHtm == NIL oHtm := HtmlPageObject() @@ -116,12 +115,12 @@ FUNCTION PutCounter( oHtm, nNumber, cDir, nDigits, nWidth, bgColor, nBorder ) oHtm := HtmlPageObject() ENDIF - DEFAULT nNumber TO 0 - DEFAULT cDir TO "/images/counters/" - DEFAULT nWidth TO 50 - DEFAULT nDigits TO Len( hb_ntos( nNumber ) ) - DEFAULT nBorder TO 1 - DEFAULT BGCOLOR TO "black" + __defaultNIL( @nNumber, 0 ) + __defaultNIL( @cDir, "/images/counters/" ) + __defaultNIL( @nWidth, 50 ) + __defaultNIL( @nDigits, Len( hb_ntos( nNumber ) ) ) + __defaultNIL( @nBorder, 1 ) + __defaultNIL( @BGCOLOR, "black" ) IF HB_ISNUMERIC( nNumber ) cStr := StrZero( nNumber, nDigits ) @@ -158,8 +157,8 @@ PROCEDURE htmlBrowse( oHtm, cAction, lUseLinks ) LOCAL aFlds := dbStruct() LOCAL cAlign - DEFAULT cAction TO "confirm('RECORD: '+this.name+'\nPlace your action here !!!')" - DEFAULT lUseLinks TO .F. + __defaultNIL( @cAction, "confirm('RECORD: '+this.name+'\nPlace your action here !!!')" ) + __defaultNIL( @lUseLinks, .F. ) /* // browse caption... @@ -231,8 +230,8 @@ PROCEDURE htmlBrowseSql( oHtm, cAction, lUseLinks, cTarget, oServer, oQuery ) LOCAL cAlign - DEFAULT cAction TO "confirm('RECORD: '+this.name+'\nPlace your action here !!!')" - DEFAULT lUseLinks TO .F. + __defaultNIL( @cAction, "confirm('RECORD: '+this.name+'\nPlace your action here !!!')" ) + __defaultNIL( @lUseLinks, .F. ) /* // browse caption... @@ -387,13 +386,13 @@ ENDCLASS METHOD New( cVarName, cUrl, cName, x, y, w, h ) CLASS JWindow - DEFAULT cVarName TO "newWin" - DEFAULT cURL TO " " - DEFAULT cName TO cVarName //"newWin" - DEFAULT x TO 100 - DEFAULT y TO 100 - DEFAULT h TO 300 - DEFAULT w TO 300 + __defaultNIL( @cVarName, "newWin" ) + __defaultNIL( @cURL, " " ) + __defaultNIL( @cName, cVarName ) + __defaultNIL( @x, 100 ) + __defaultNIL( @y, 100 ) + __defaultNIL( @h, 300 ) + __defaultNIL( @w, 300 ) ::nH := HtmlPageHandle() ::oHtm := HtmlPageObject() @@ -425,19 +424,19 @@ METHOD SetFeatures( alwaysRaised, alwaysLowered, ; LOCAL cStr := "" - DEFAULT alwaysRaised TO ::alwaysRaised - DEFAULT alwaysLowered TO ::alwaysLowered - DEFAULT Resizable TO ::Resizable - DEFAULT Menubar TO ::Menubar - DEFAULT personalBar TO ::personalBar - DEFAULT dependent TO ::dependent - DEFAULT location TO ::location - DEFAULT directories TO ::directories - DEFAULT Scrollbars TO ::Scrollbars - DEFAULT Status TO ::Status - DEFAULT TitleBar TO ::TitleBar - DEFAULT Toolbar TO ::Toolbar - DEFAULT copyHistory TO ::copyHistory + __defaultNIL( @alwaysRaised, ::alwaysRaised ) + __defaultNIL( @alwaysLowered, ::alwaysLowered ) + __defaultNIL( @Resizable, ::Resizable ) + __defaultNIL( @Menubar, ::Menubar ) + __defaultNIL( @personalBar, ::personalBar ) + __defaultNIL( @dependent, ::dependent ) + __defaultNIL( @location, ::location ) + __defaultNIL( @directories, ::directories ) + __defaultNIL( @Scrollbars, ::Scrollbars ) + __defaultNIL( @Status, ::Status ) + __defaultNIL( @TitleBar, ::TitleBar ) + __defaultNIL( @Toolbar, ::Toolbar ) + __defaultNIL( @copyHistory, ::copyHistory ) IF alwaysRaised cStr += "alwaysraised=yes," @@ -521,10 +520,10 @@ METHOD SetSize( x, y, h, w ) CLASS JWindow LOCAL cStr := "" - DEFAULT x TO ::ScreenX - DEFAULT y TO ::ScreenY - DEFAULT h TO ::height - DEFAULT w TO ::width + __defaultNIL( @x, ::ScreenX ) + __defaultNIL( @y, ::ScreenY ) + __defaultNIL( @h, ::height ) + __defaultNIL( @w, ::width ) ::ScreenX := x ::ScreenY := y @@ -698,7 +697,7 @@ METHOD ImageURL( cImage, cUrl, nHeight, nBorder, ; LOCAL cStr := "" - DEFAULT cUrl TO "" + __defaultNIL( @cUrl, "" ) IF cName != NIL cStr += ' NAME= "' + cName + '"' + CRLF() diff --git a/harbour/contrib/xhb/stream.prg b/harbour/contrib/xhb/stream.prg index 637c0b230f..3048691679 100644 --- a/harbour/contrib/xhb/stream.prg +++ b/harbour/contrib/xhb/stream.prg @@ -52,7 +52,6 @@ #include "hbclass.ch" -#include "common.ch" #include "fileio.ch" #xtranslate THROW() => (Eval(ErrorBlock(), ), Break()) @@ -219,7 +218,7 @@ METHOD New( cFile, nMode ) CLASS TStreamFileWriter ::cFile := cFile IF hb_FileExists( cFile ) - DEFAULT nMode TO FO_READWRITE + __defaultNIL( @nMode, FO_READWRITE ) ::Handle := FOpen( cFile, nMode ) IF ::Handle <= 0 @@ -229,7 +228,7 @@ METHOD New( cFile, nMode ) CLASS TStreamFileWriter ::nLength := FSeek( ::Handle, 0, FS_END ) ::nPosition := ::nLength ELSE - DEFAULT nMode TO FC_NORMAL + __defaultNIL( @nMode, FC_NORMAL ) ::Handle := FCreate( cFile, nMode ) IF ::Handle <= 0 diff --git a/harbour/contrib/xhb/tcgi.prg b/harbour/contrib/xhb/tcgi.prg index 95b5e8eabe..e747156edc 100644 --- a/harbour/contrib/xhb/tcgi.prg +++ b/harbour/contrib/xhb/tcgi.prg @@ -45,7 +45,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "cgi.ch" CLASS TCgi FROM THtml @@ -206,7 +205,7 @@ METHOD Field( cQueryName ) CLASS TCgi LOCAL cRet := "" LOCAL nRet - DEFAULT cQueryName TO "" + __defaultNIL( @cQueryName, "" ) nRet := AScan( ::aQueryFields, ; {| x | Upper( x[ 1 ] ) == Upper( cQueryName ) } ) diff --git a/harbour/contrib/xhb/tedit.prg b/harbour/contrib/xhb/tedit.prg index e7518a281b..d37308a97c 100644 --- a/harbour/contrib/xhb/tedit.prg +++ b/harbour/contrib/xhb/tedit.prg @@ -45,7 +45,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "cgi.ch" #define _OPTION_TEXT 1 @@ -513,11 +512,11 @@ METHOD New( cName, cAction, cMethod, lFrame, cCaption, nWidth ) CLASS THtmlForm HB_SYMBOL_UNUSED( cAction ) - DEFAULT cName TO "Form1" - DEFAULT cMethod TO "POST" - DEFAULT lFrame TO .F. - DEFAULT cCaption TO "" - DEFAULT nWidth TO 90 + __defaultNIL( @cName, "Form1" ) + __defaultNIL( @cMethod, "POST" ) + __defaultNIL( @lFrame, .F. ) + __defaultNIL( @cCaption, "" ) + __defaultNIL( @nWidth, 90 ) ::oHtm := HtmlPageObject() ::Name := cName ::Method := cMethod @@ -542,7 +541,7 @@ RETURN Self METHOD Put( lPutControls ) CLASS THtmlForm - DEFAULT lPutControls TO .F. + __defaultNIL( @lPutControls, .F. ) IF ! HB_ISNUMERIC( ::width ) ::width := 90 diff --git a/harbour/contrib/xhb/tfile.prg b/harbour/contrib/xhb/tfile.prg index 02e84cf4d2..07303164f9 100644 --- a/harbour/contrib/xhb/tfile.prg +++ b/harbour/contrib/xhb/tfile.prg @@ -45,7 +45,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "fileio.ch" #include "cgi.ch" @@ -154,7 +153,7 @@ METHOD New( cName ) CLASS TCgiFile METHOD Open( nMode ) CLASS TCgiFile - DEFAULT nMode TO FO_EXCLUSIVE + __defaultNIL( @nMode, FO_EXCLUSIVE ) ::Handle := FOpen( ::Name, nMode ) IF ::Handle > 0 ::Size() @@ -170,7 +169,7 @@ METHOD CREATE ( nAttr ) CLASS TCgiFile LOCAL nSuccess - DEFAULT nAttr TO 0 + __defaultNIL( @nAttr, 0 ) nSuccess := FCreate( ::Name, nAttr ) ::Handle := nSuccess @@ -201,8 +200,8 @@ METHOD Size() CLASS TCgiFile METHOD _Read( nSize, cBuff ) CLASS TCgiFile - DEFAULT nSize TO 1024 - DEFAULT cBuff TO Space( nSize ) + __defaultNIL( @nSize, 1024 ) + __defaultNIL( @cBuff, Space( nSize ) ) ::BytesRead := FRead( ::Handle, @cBuff, nSize ) ::Buffer := cBuff @@ -219,8 +218,8 @@ METHOD ReadAhead( nSize, cBuff ) CLASS TCgiFile LOCAL nCurrent - DEFAULT nSize TO 1024 - DEFAULT cBuff TO Space( nSize ) + __defaultNIL( @nSize, 1024 ) + __defaultNIL( @cBuff, Space( nSize ) ) // --> save position in file nCurrent := FPOS( ::Handle ) @@ -243,7 +242,7 @@ METHOD Readline( nSize ) CLASS TCgiFile LOCAL nCurrent LOCAL nCr - DEFAULT nSize TO 1024 + __defaultNIL( @nSize, 1024 ) IF nSize <= 0 RETURN "" @@ -378,7 +377,7 @@ METHOD SKIP( nLines ) CLASS TCgiFile LOCAL nCount := 0 LOCAL nPos := FPOS( ::Handle ) - DEFAULT nLines TO 1 + __defaultNIL( @nLines, 1 ) IF nLines <= 0 // don't accept < 0 @@ -404,7 +403,7 @@ METHOD SKIP( nLines ) CLASS TCgiFile METHOD MaxPages( nPageSize ) CLASS TCgiFile - DEFAULT nPageSize TO ::nPageSize + __defaultNIL( @nPageSize, ::nPageSize ) RETURN ::Size() / nPageSize @@ -414,7 +413,7 @@ METHOD MaxPages( nPageSize ) CLASS TCgiFile METHOD PrevPage( nBytes ) CLASS TCgiFile - DEFAULT nBytes TO 1024 + __defaultNIL( @nBytes, 1024 ) IF nBytes <= 0 RETURN "" @@ -435,7 +434,7 @@ METHOD PrevPage( nBytes ) CLASS TCgiFile METHOD NextPage( nBytes ) CLASS TCgiFile - DEFAULT nBytes TO 1024 + __defaultNIL( @nBytes, 1024 ) IF nBytes <= 0 RETURN "" @@ -464,7 +463,7 @@ METHOD PrevLine( nBytes ) CLASS TCgiFile LOCAL nPrev LOCAL cTemp - DEFAULT nBytes TO 256 + __defaultNIL( @nBytes, 256 ) IF nOrigPos == 0 diff --git a/harbour/contrib/xhb/tframe.prg b/harbour/contrib/xhb/tframe.prg index f36d8038bd..45ff67e1e9 100644 --- a/harbour/contrib/xhb/tframe.prg +++ b/harbour/contrib/xhb/tframe.prg @@ -45,7 +45,6 @@ */ #include "hbclass.ch" -#include "common.ch" #include "cgi.ch" @@ -75,7 +74,7 @@ METHOD New( cFName, cTitle ) CLASS THtmlFrameSet LOCAL cStr - DEFAULT cTitle TO "" + __defaultNIL( @cTitle, "" ) ::FName := cFName ::Title := cTitle @@ -172,11 +171,11 @@ METHOD Frame( cName, cURL, lBorder, lResize, lScrolling, ; LOCAL cStr - DEFAULT lBorder TO .T. - DEFAULT lResize TO .T. - DEFAULT lScrolling TO .F. - DEFAULT cScrolling TO "AUTO" - DEFAULT cTarget TO "_self" + __defaultNIL( @lBorder, .T. ) + __defaultNIL( @lResize, .T. ) + __defaultNIL( @lScrolling, .F. ) + __defaultNIL( @cScrolling, "AUTO" ) + __defaultNIL( @cTarget, "_self" ) cStr := " ', ' BGCOLOR="' + cColor + '" ' ) + METHOD SetPageColor( cColor, lBody ) INLINE DEFAULT( lBody, .T. ), ::cStr += iif( lBody, '', ' BGCOLOR="' + cColor + '" ' ) - METHOD SetTextColor( cColor, lBody ) INLINE DEFAULT( lBody , .T. ), ::cStr += iif( lBody, '', ' TEXT="' + cColor + '" ' ) + METHOD SetTextColor( cColor, lBody ) INLINE DEFAULT( lBody, .T. ), ::cStr += iif( lBody, '', ' TEXT="' + cColor + '" ' ) - METHOD SetBgImage( cImage, lBody ) INLINE DEFAULT( lBody , .T. ), ::cStr += iif( lBody, '', ' BACKGROUND="' + cImage + '" ' ) + METHOD SetBgImage( cImage, lBody ) INLINE DEFAULT( lBody, .T. ), ::cStr += iif( lBody, '', ' BACKGROUND="' + cImage + '" ' ) METHOD CLOSE() @@ -148,8 +147,8 @@ CLASS THtml DEFAULT( cols, 2 ), ; DEFAULT( gutter, 5 ), ; DEFAULT( width, 100 ), ; - ::cStr += '' , ; - ::cStr += txt , ; + ::cStr += '', ; + ::cStr += txt, ; ::cStr += "" METHOD PutHeading( cText, nWeight, lCentered ) @@ -293,7 +292,7 @@ METHOD cgiNew( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; cBaseURL, cBaseTarget, ; nRefresh, cRefreshURL, cStyleScr, ; lNocache, NOF, nMarginTop, nMarginHeight, ; - nMarginWidth, nMarginLeft , .T. , cFile ) + nMarginWidth, nMarginLeft, .T., cFile ) METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; BGIMAGE, BGCOLOR, txtColor, aJsCode, ; @@ -307,21 +306,21 @@ METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; LOCAL i - DEFAULT lCgi TO .F. + __defaultNIL( @lCgi, .F. ) ::lCgi := lCgi IF lCgi - DEFAULT cTitle TO "New CGI-HTML page" - DEFAULT cLinkTitle TO cTitle - DEFAULT cRefreshURL TO "" - DEFAULT cCharset TO "windows-1251" - DEFAULT lNocache TO .F. + __defaultNIL( @cTitle, "New CGI-HTML page" ) + __defaultNIL( @cLinkTitle, cTitle ) + __defaultNIL( @cRefreshURL, "" ) + __defaultNIL( @cCharset, "windows-1251" ) + __defaultNIL( @lNocache, .F. ) ELSE - DEFAULT cFile TO "file1.htm" - DEFAULT cTitle TO "New HTML page" - DEFAULT cLinkTitle TO cTitle - DEFAULT cRefreshURL TO "" - DEFAULT cCharset TO "windows-1251" - DEFAULT lNocache TO .F. + __defaultNIL( @cFile, "file1.htm" ) + __defaultNIL( @cTitle, "New HTML page" ) + __defaultNIL( @cLinkTitle, cTitle ) + __defaultNIL( @cRefreshURL, "" ) + __defaultNIL( @cCharset, "windows-1251" ) + __defaultNIL( @lNocache, .F. ) ENDIF @@ -527,10 +526,10 @@ METHOD SetFont( cFont, lBold, lItalic, lULine, nSize, cColor, lSet ) CLASS THtml LOCAL cStr := CRLF() + '" diff --git a/harbour/contrib/xhb/ttable.prg b/harbour/contrib/xhb/ttable.prg index e4a9dfcea2..814d183711 100644 --- a/harbour/contrib/xhb/ttable.prg +++ b/harbour/contrib/xhb/ttable.prg @@ -66,7 +66,6 @@ #include "ttable.ch" #include "set.ch" #include "ord.ch" -#include "common.ch" #include "inkey.ch" #include "dbinfo.ch" #include "error.ch" @@ -86,11 +85,11 @@ FUNCTION NetDbUse( cDataBase, cAlias, nSeconds, cDriver, ; LOCAL cOldScreen := SaveScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1 ) LOCAL lFirstPass := .T. - DEFAULT cDriver TO "DBFCDX" - DEFAULT lNew TO .T. - DEFAULT lOpenMode TO NET_OPEN_MODE - DEFAULT lReadOnly TO .F. - DEFAULT nSeconds TO s_nNetDelay + __defaultNIL( @cDriver, "DBFCDX" ) + __defaultNIL( @lNew, .T. ) + __defaultNIL( @lOpenMode, NET_OPEN_MODE ) + __defaultNIL( @lReadOnly, .F. ) + __defaultNIL( @nSeconds, s_nNetDelay ) s_lNetOk := .F. nSeconds *= 1.00 @@ -160,8 +159,8 @@ FUNCTION NetLock( nType, lReleaseLocks, nSeconds ) RETURN lSuccess ENDIF - DEFAULT lReleaseLocks TO .F. - DEFAULT nSeconds TO s_nNetDelay + __defaultNIL( @lReleaseLocks, .F. ) + __defaultNIL( @nSeconds, s_nNetDelay ) nWaitTime := nSeconds @@ -253,7 +252,7 @@ FUNCTION NetFunc( bBlock, nSeconds ) LOCAL lForever // Retry forever? - DEFAULT nSeconds TO s_nNetDelay + __defaultNIL( @nSeconds, s_nNetDelay ) lForever := ( nSeconds == 0 ) // Keep trying as long as specified or default @@ -348,7 +347,7 @@ FUNCTION NetReCall() FUNCTION NetRecLock( nSeconds ) - DEFAULT nSeconds TO s_nNetDelay + __defaultNIL( @nSeconds, s_nNetDelay ) s_lNetOk := .F. @@ -361,7 +360,7 @@ FUNCTION NetRecLock( nSeconds ) FUNCTION NetFileLock( nSeconds ) s_lNetOk := .F. - DEFAULT nSeconds TO s_nNetDelay + __defaultNIL( @nSeconds, s_nNetDelay ) IF NetLock( NET_FILELOCK, , nSeconds ) s_lNetOk := .T. @@ -373,8 +372,8 @@ FUNCTION NetAppend( nSeconds, lReleaseLocks ) LOCAL nOrd - DEFAULT lReleaseLocks TO .T. - DEFAULT nSeconds TO s_nNetDelay + __defaultNIL( @lReleaseLocks, .T. ) + __defaultNIL( @nSeconds, s_nNetDelay ) s_lNetOk := .F. nOrd := ordSetFocus( 0 ) // --> set order to 0 to append ??? @@ -409,7 +408,7 @@ FUNCTION NetCommitAll() FUNCTION IsLocked( nRecId ) - DEFAULT nRecID TO RecNo() + __defaultNIL( @nRecID, RecNo() ) RETURN AScan( dbRLockList(), {| n | n == nRecID } ) > 0 @@ -454,13 +453,13 @@ FUNCTION TableNew( cDBF, cALIAS, cOrderBag, cDRIVER, ; LOCAL oDB LOCAL o - DEFAULT lNET TO .T. - DEFAULT lNEW TO .T. - DEFAULT lREADONLY TO .F. - DEFAULT cDRIVER TO "DBFCDX" - DEFAULT cPATH TO Set( _SET_DEFAULT ) - DEFAULT cAlias TO FixExt( cDbf ) - DEFAULT cOrderBag TO FixExt( cDbf ) //+".CDX" + __defaultNIL( @lNET, .T. ) + __defaultNIL( @lNEW, .T. ) + __defaultNIL( @lREADONLY, .F. ) + __defaultNIL( @cDRIVER, "DBFCDX" ) + __defaultNIL( @cPATH, Set( _SET_DEFAULT ) ) + __defaultNIL( @cAlias, FixExt( cDbf ) ) + __defaultNIL( @cOrderBag, FixExt( cDbf ) ) lAuto := Set( _SET_AUTOPEN, .F. ) @@ -547,7 +546,7 @@ METHOD NEW( cAlias ) CLASS HBRecord LOCAL aStruc LOCAL aItem - DEFAULT cAlias TO Alias() + __defaultNIL( @cAlias, Alias() ) ::Alias := cAlias ::Buffer := {} @@ -788,13 +787,13 @@ METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; LOCAL cOldRdd - DEFAULT lNET TO .F. - DEFAULT lNEW TO .T. - DEFAULT lREADONLY TO .F. - DEFAULT cDRIVER TO "DBFCDX" - DEFAULT cPATH TO Set( _SET_DEFAULT ) - DEFAULT cAlias TO FixExt( cDbf ) - DEFAULT cOrderBag TO FixExt( cDbf ) //+".CDX" + __defaultNIL( @lNET, .F. ) + __defaultNIL( @lNEW, .T. ) + __defaultNIL( @lREADONLY, .F. ) + __defaultNIL( @cDRIVER, "DBFCDX" ) + __defaultNIL( @cPATH, Set( _SET_DEFAULT ) ) + __defaultNIL( @cAlias, FixExt( cDbf ) ) + __defaultNIL( @cOrderBag, FixExt( cDbf ) ) ::IsNew := lNEW @@ -805,7 +804,7 @@ METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; ::cOrderBag := FixExt( cOrderBag ) cOldRdd := rddSetDefault( ::driver ) - ::cOrderFile := ::cOrderBag + ordBagExt() //".CDX" + ::cOrderFile := ::cOrderBag + ordBagExt() //".cdx" rddSetDefault( cOldRdd ) ::Driver := cDRIVER ::aOrders := {} @@ -847,7 +846,7 @@ METHOD OPEN() CLASS HBTable METHOD PROCEDURE DBMove( nDirection ) CLASS HBTable - DEFAULT nDirection TO 0 + __defaultNIL( @nDirection, 0 ) DO CASE CASE nDirection == 0 @@ -944,7 +943,7 @@ METHOD PROCEDURE READ( lKeepBuffer ) CLASS HBTable LOCAL adata := Array( 1, 2 ) LOCAL Buffer - DEFAULT lKeepBuffer TO .F. + __defaultNIL( @lKeepBuffer, .F. ) //? len( ::Buffer ) @@ -975,7 +974,7 @@ METHOD PROCEDURE ReadBlank( lKeepBuffer ) CLASS HBTable LOCAL adata := Array( 1, 2 ) LOCAL Buffer - DEFAULT lKeepBuffer TO .F. + __defaultNIL( @lKeepBuffer, .F. ) ( ::Alias )->( dbGoBottom() ) ( ::Alias )->( dbSkip( 1 ) ) // go EOF @@ -1009,7 +1008,7 @@ METHOD Write( lKeepBuffer ) CLASS HBTable LOCAL xBuffer LOCAL n - DEFAULT lKeepBuffer TO .F. + __defaultNIL( @lKeepBuffer, .F. ) IF ( lKeepBuffer == .T. ) .OR. ( ::lMonitor == .T. ) @@ -1050,7 +1049,7 @@ METHOD BUFWrite( aBuffer ) CLASS HBTable LOCAL nOrd := ( ::Alias )->( ordSetFocus() ) LOCAL Buffer - DEFAULT aBuffer TO ::Buffer + __defaultNIL( @aBuffer, ::Buffer ) IF ::isNet IF !( ::Alias )->( NetRecLock() ) @@ -1079,7 +1078,7 @@ METHOD __oTDelete( lKeepBuffer ) // ::Delete() LOCAL lDeleted := Set( _SET_DELETED, .F. ) // make deleted records visible // temporarily... - DEFAULT lKeepBuffer TO .F. + __defaultNIL( @lKeepBuffer, .F. ) ::Read() @@ -1122,7 +1121,7 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable LOCAL nRec := ::RecNo() LOCAL aBuffers - DEFAULT nBuffer TO _WRITE_BUFFER + __defaultNIL( @nBuffer, _WRITE_BUFFER ) IF nLevel == NIL nLevel := 0 @@ -1138,7 +1137,7 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable nLen := Len( ::deleteBuffers ) - DEFAULT nLevel TO nLen + __defaultNIL( @nLevel, nLen ) IF nLevel == 0 .OR. nLevel == nLen // DO ALL... FOR EACH aBuffers IN ::deleteBuffers @@ -1187,7 +1186,7 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable IF !Empty( ::WriteBuffers ) nLen := Len( ::WriteBuffers ) - DEFAULT nLevel TO nLen + __defaultNIL( @nLevel, nLen ) IF nLevel == 0 .OR. nLen == nLevel // Do All... @@ -1255,7 +1254,7 @@ METHOD AddOrder( cTag, cKey, cLabel, ; LOCAL oOrd - DEFAULT cOrderFile TO ::cOrderBag + __defaultNIL( @cOrderFile, ::cOrderBag ) oOrd := HBOrder():New( cTag, cKey, cLabel, ; cFor, cWhile, ; @@ -1284,7 +1283,7 @@ METHOD REINDEX() CLASS HBTable IF hb_FileExists( ::cPath + ::cOrderFile ) IF FErase( ::cPath + ::cOrderFile ) != 0 - // --> ALERT(".CDX *NOT* Deleted !!!" ) + // --> ALERT(".cdx *NOT* Deleted !!!" ) ENDIF ENDIF @@ -1323,7 +1322,7 @@ METHOD FastReindex() CLASS HBTable ::Isnet := .F. IF hb_FileExists( ::cPath + ::cOrderFile ) IF FErase( ::cPath + ::cOrderFile ) != 0 - // --> ALERT(".CDX *NOT* Deleted !!!" ) + // --> ALERT(".cdx *NOT* Deleted !!!" ) ENDIF ENDIF @@ -1417,7 +1416,7 @@ PROCEDURE AddChild( oChild, cKey ) CLASS HBTable // ::addChild() /**** * FixExt( cFileName ) -* extract .CDX filename from .DBF filename +* extract .cdx filename from .dbf filename */ STATIC FUNCTION FixExt( cFileName ) @@ -1513,13 +1512,13 @@ ENDCLASS METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderBag ) CLASS HBOrder - DEFAULT cKey TO ".T." - DEFAULT lUnique TO .F. - DEFAULT cFor TO ".T." - DEFAULT cWhile TO ".T." - DEFAULT bEval TO {|| .T. } - DEFAULT nInterval TO 1 - DEFAULT cLabel TO cTag + __defaultNIL( @cKey, ".T." ) + __defaultNIL( @lUnique, .F. ) + __defaultNIL( @cFor, ".T." ) + __defaultNIL( @cWhile, ".T." ) + __defaultNIL( @bEval, {|| .T. } ) + __defaultNIL( @nInterval, 1 ) + __defaultNIL( @cLabel, cTag ) ::cOrderBag := cOrderBag ::Tag := cTag ::cKey := cKey @@ -1536,7 +1535,7 @@ METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderB METHOD PROCEDURE CREATE() CLASS HBOrder - DEFAULT ::cOrderBag TO ::oTable:cOrderBag + __defaultNIL( @::cOrderBag, ::oTable:cOrderBag ) // ? "<<<", ::alias, ::cOrderBag diff --git a/harbour/contrib/xhb/txml.prg b/harbour/contrib/xhb/txml.prg index 4a1a364d2a..41e623a5d5 100644 --- a/harbour/contrib/xhb/txml.prg +++ b/harbour/contrib/xhb/txml.prg @@ -52,7 +52,6 @@ * */ -#include "common.ch" #include "fileio.ch" #include "hbxml.ch" #include "hbclass.ch" diff --git a/harbour/contrib/xhb/xhbcomp.prg b/harbour/contrib/xhb/xhbcomp.prg index 1e0b0418d6..901a51f14e 100644 --- a/harbour/contrib/xhb/xhbcomp.prg +++ b/harbour/contrib/xhb/xhbcomp.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbclass.ch" ANNOUNCE XHB_LIB diff --git a/harbour/contrib/xhb/xhberr.prg b/harbour/contrib/xhb/xhberr.prg index 8a1b0ec90b..addfaf64c2 100644 --- a/harbour/contrib/xhb/xhberr.prg +++ b/harbour/contrib/xhb/xhberr.prg @@ -66,7 +66,6 @@ * LogError() */ -#include "common.ch" #include "error.ch" #include "fileio.ch" #include "set.ch" @@ -640,7 +639,7 @@ STATIC FUNCTION strvalue( c, l ) LOCAL cr := "" - DEFAULT l TO .F. + __defaultNIL( @l, .F. ) SWITCH ValType( c ) CASE "C" diff --git a/harbour/contrib/xhb/xhbfunp.prg b/harbour/contrib/xhb/xhbfunp.prg index 5b13a05799..eb7b217ee4 100644 --- a/harbour/contrib/xhb/xhbfunp.prg +++ b/harbour/contrib/xhb/xhbfunp.prg @@ -50,8 +50,6 @@ * */ -#include "common.ch" - #include "hbgtinfo.ch" FUNCTION gtSetClipboard( x ) ; RETURN hb_gtInfo( HB_GTI_CLIPBOARDDATA, x ) diff --git a/harbour/contrib/xhb/xhbmemo.prg b/harbour/contrib/xhb/xhbmemo.prg index 17f62c90f9..2c41d0937d 100644 --- a/harbour/contrib/xhb/xhbmemo.prg +++ b/harbour/contrib/xhb/xhbmemo.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbclass.ch" #include "memoedit.ch" #include "inkey.ch" @@ -82,7 +81,7 @@ METHOD MemoInit( xUDF ) CLASS XHB_TMemoEditor LOCAL nUdfReturn - DEFAULT xUDF TO NIL + __defaultNIL( @xUDF, NIL ) ::aEditKeys := { K_DOWN,; K_UP,; @@ -294,8 +293,8 @@ METHOD HandleUdf( nKey, nUdfReturn, lEdited ) CLASS XHB_TMemoEditor A little trick to be able to handle a nUdfReturn with value of NIL like it had a value of ME_DEFAULT */ - DEFAULT nUdfReturn TO ME_DEFAULT - DEFAULT lEdited TO .F. + __defaultNIL( @nUdfReturn, ME_DEFAULT ) + __defaultNIL( @lEdited, .F. ) // I won't reach this point during ME_INIT since ME_DEFAULT ends // initialization phase of MemoEdit() @@ -417,21 +416,21 @@ FUNCTION xhb_MemoEdit( cString,; LOCAL oEd - DEFAULT cString TO "" - DEFAULT nTop TO 0 - DEFAULT nLeft TO 0 - DEFAULT nBottom TO MaxRow() - DEFAULT nRight TO MaxCol() - DEFAULT lEditMode TO .T. - DEFAULT nLineLength TO NIL + __defaultNIL( @cString, "" ) + __defaultNIL( @nTop, 0 ) + __defaultNIL( @nLeft, 0 ) + __defaultNIL( @nBottom, MaxRow() ) + __defaultNIL( @nRight, MaxCol() ) + __defaultNIL( @lEditMode, .T. ) + __defaultNIL( @nLineLength, NIL ) /* 24/10/2005 - NG says 4, but clipper 5.2e inserts 3 spaces when pressing K_TAB */ - DEFAULT nTabSize TO 3 - DEFAULT nTextBuffRow TO 1 - DEFAULT nTextBuffColumn TO 0 - DEFAULT nWindowRow TO 0 - DEFAULT nWindowColumn TO nTextBuffColumn + __defaultNIL( @nTabSize, 3 ) + __defaultNIL( @nTextBuffRow, 1 ) + __defaultNIL( @nTextBuffColumn, 0 ) + __defaultNIL( @nWindowRow, 0 ) + __defaultNIL( @nWindowColumn, nTextBuffColumn ) // 2006/JUL/22 - E.F. Check argument types. // diff --git a/harbour/contrib/xhb/xhbole.prg b/harbour/contrib/xhb/xhbole.prg index a1b902b238..acd9567d3c 100644 --- a/harbour/contrib/xhb/xhbole.prg +++ b/harbour/contrib/xhb/xhbole.prg @@ -72,7 +72,6 @@ FUNCTION CreateOLEObject() #include "hbclass.ch" -#include "common.ch" #include "error.ch" #define EG_OLEEXCEPTION 1001 diff --git a/harbour/contrib/xhb/xhbtedit.prg b/harbour/contrib/xhb/xhbtedit.prg index 6b03f6d7d1..bf6fb01ba8 100644 --- a/harbour/contrib/xhb/xhbtedit.prg +++ b/harbour/contrib/xhb/xhbtedit.prg @@ -92,7 +92,6 @@ * Modifications are based upon the following source file: */ -#include "common.ch" #include "hbclass.ch" #include "error.ch" #include "fileio.ch" @@ -261,18 +260,18 @@ ENDCLASS METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabSize, nTextRow, nTextCol, nWndRow, nWndCol ) CLASS XHBEditor - DEFAULT cString TO "" - DEFAULT nTop TO 0 - DEFAULT nLeft TO 0 - DEFAULT nBottom TO MaxRow() - DEFAULT nRight TO MaxCol() - DEFAULT lEditMode TO .T. - DEFAULT nLineLength TO NIL - DEFAULT nTabSize TO NIL - DEFAULT nTextRow TO 1 - DEFAULT nTextCol TO 0 // 1 Clipper Documentations says it is 0 - DEFAULT nWndRow TO 0 // 1 " - DEFAULT nWndCol TO 0 // 1 " + __defaultNIL( @ cString, "" ) + __defaultNIL( @ nTop, 0 ) + __defaultNIL( @ nLeft, 0 ) + __defaultNIL( @ nBottom, MaxRow() ) + __defaultNIL( @ nRight, MaxCol() ) + __defaultNIL( @ lEditMode, .T. ) + __defaultNIL( @ nLineLength, NIL ) + __defaultNIL( @ nTabSize, NIL ) + __defaultNIL( @ nTextRow, 1 ) + __defaultNIL( @ nTextCol, 0 ) + __defaultNIL( @ nWndRow, 0 ) + __defaultNIL( @ nWndCol, 0 ) // 2006/JUL/22 - E.F. To avoid run time error. IF nTop > nBottom .OR. nLeft > nRight @@ -399,10 +398,10 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS METHOD Resize( nTop, nLeft, nBottom, nRight ) CLASS XHBEditor // don't change coordinates not given - DEFAULT nTop to ::nTop - DEFAULT nLeft to ::nLeft - DEFAULT nBottom to ::nBottom - DEFAULT nRight to ::nRight + __defaultNIL( @nTop, ::nTop ) + __defaultNIL( @nLeft, ::nLeft ) + __defaultNIL( @nBottom, ::nBottom ) + __defaultNIL( @nRight, ::nRight ) ::nTop := nTop ::nLeft := nLeft @@ -523,7 +522,7 @@ METHOD RefreshLine( lRefreshColSel ) CLASS XHBEditor LOCAL nORow LOCAL nCol, nFirstCol - DEFAULT lRefreshColSel TO .F. + __defaultNIL( @lRefreshColSel, .F. ) IF ::nRow <= ::LastRow() @@ -1774,8 +1773,8 @@ METHOD K_Esc() CLASS XHBEditor METHOD AddLine( cLine, lSoftCR ) CLASS XHBEditor - DEFAULT cLine TO "" - DEFAULT lSoftCR TO .F. + __defaultNIL( @cLine, "" ) + __defaultNIL( @lSoftCR, .F. ) AAdd( ::aText, HBTextLine():New( cLine, lSoftCR ) ) @@ -1787,8 +1786,8 @@ METHOD AddLine( cLine, lSoftCR ) CLASS XHBEditor METHOD InsertLine( cLine, lSoftCR, nRow ) CLASS XHBEditor - DEFAULT nRow TO ::nRow - DEFAULT lSoftCR TO .F. + __defaultNIL( @nRow, ::nRow ) + __defaultNIL( @lSoftCR, .F. ) IF nRow > ::LastRow() IF Len( cLine ) == 0 @@ -1807,7 +1806,7 @@ METHOD InsertLine( cLine, lSoftCR, nRow ) CLASS XHBEditor METHOD RemoveLine( nRow ) CLASS XHBEditor - DEFAULT nRow TO ::nRow + __defaultNIL( @nRow, ::nRow ) hb_ADel( ::aText, nRow, .T. ) @@ -1819,7 +1818,7 @@ METHOD RemoveLine( nRow ) CLASS XHBEditor METHOD GetLine( nRow ) CLASS XHBEditor - DEFAULT nRow TO ::nRow + __defaultNIL( @nRow, ::nRow ) IF nRow <= ::LastRow() .AND. nRow > 0 IF ::lEditAllow .OR. Empty( ::nTabWidth ) @@ -1839,7 +1838,7 @@ METHOD GetLine( nRow ) CLASS XHBEditor METHOD DelTextRight( nRow ) CLASS XHBEditor - DEFAULT nRow TO ::nRow + __defaultNIL( @nRow, ::nRow ) IF !::lEditAllow RETURN Self @@ -2006,7 +2005,7 @@ METHOD GotoCol( nCol ) CLASS XHBEditor METHOD GotoPos( nRow, nCol, lRefresh ) CLASS XHBEditor - DEFAULT lRefresh TO .F. + __defaultNIL( @lRefresh, .F. ) DispBegin() // to minimize flicker @@ -2311,8 +2310,8 @@ METHOD DeHilite() CLASS XHBEditor METHOD SetPos( nRow, nCol ) CLASS XHBEditor - DEFAULT nRow to ::nPhysRow - DEFAULT nCol to ::nPhysCol + __defaultNIL( @nRow, ::nPhysRow ) + __defaultNIL( @nCol, ::nPhysCol ) ::nPhysRow := nRow ::nPhysCol := nCol @@ -2389,7 +2388,7 @@ METHOD GetText( lSoftCr ) CLASS XHBEditor LOCAL cString := "", cSoft := "" LOCAL cEOL := hb_eol() - DEFAULT lSoftCr TO .F. + __defaultNIL( @lSoftCr, .F. ) IF ::LastRow() > 0 @@ -2423,7 +2422,7 @@ METHOD GetTextSelection( lSoftCr ) CLASS XHBEditor LOCAL nRowSelEnd LOCAL nI - DEFAULT lSoftCr TO .F. + __defaultNIL( @lSoftCr, .F. ) IF !::lSelActive RETURN cString @@ -2832,7 +2831,7 @@ METHOD AddText( cString, lAtPos ) CLASS XHBEditor ::InsertState( .T. ) ENDIF - DEFAULT lAtPos TO .F. + __defaultNIL( @lAtPos, .F. ) IF ! lAtPos .OR. nAtRow > ::LastRow() FOR i := 1 TO nLines @@ -3067,7 +3066,7 @@ METHOD BrowseText( nPassedKey, lHandleOneKey ) CLASS XHBEditor LOCAL nKey, bKeyBlock - DEFAULT lHandleOneKey TO .F. + __defaultNIL( @lHandleOneKey, .F. ) DO WHILE ! ::lExitEdit diff --git a/harbour/contrib/xhb/xhw32prn.prg b/harbour/contrib/xhb/xhw32prn.prg index 4d69c6ac02..c188a4cbcf 100644 --- a/harbour/contrib/xhb/xhw32prn.prg +++ b/harbour/contrib/xhb/xhw32prn.prg @@ -64,7 +64,6 @@ RETURN NIL #else #include "hbclass.ch" -#include "common.ch" #define TA_LEFT 0 #define TA_BOTTOM 8 @@ -104,16 +103,16 @@ METHOD StartPage() CLASS WIN32PRN METHOD TextOut( cString, lNewLine, lUpdatePosX, nAlignHori, nAlignVert ) CLASS WIN32PRN - DEFAULT nAlignHori TO ::SetTextHori - DEFAULT nAlignVert TO ::SetTextVert + __defaultNIL( @nAlignHori, ::SetTextHori ) + __defaultNIL( @nAlignVert, ::SetTextVert ) RETURN ::WIN_PRN:TextOut( cString, lNewLine, lUpdatePosX, ; HB_BITOR( nAlignHori, nAlignVert ) ) METHOD TextOutAt( nPosX, nPosY, cString, lNewLine, lUpdatePosX, nAlignHori, nAlignVert ) CLASS WIN32PRN - DEFAULT nAlignHori TO ::SetTextHori - DEFAULT nAlignVert TO ::SetTextVert + __defaultNIL( @nAlignHori, ::SetTextHori ) + __defaultNIL( @nAlignVert, ::SetTextVert ) RETURN ::WIN_PRN:TextOutAt( nPosX, nPosY, cString, lNewLine, lUpdatePosX, ; HB_BITOR( nAlignHori, nAlignVert ) ) @@ -122,8 +121,8 @@ METHOD TextAtFont( nPosX, nPosY, cString, cFont, nPointSize, ; nWidth, nBold, lUnderLine, lItalic, lNewLine, ; lUpdatePosX, nColor, nAlignHori, nAlignVert ) CLASS WIN32PRN - DEFAULT nAlignHori TO ::SetTextHori - DEFAULT nAlignVert TO ::SetTextVert + __defaultNIL( @nAlignHori, ::SetTextHori ) + __defaultNIL( @nAlignVert, ::SetTextVert ) RETURN ::WIN_PRN:TextAtFont( nPosX, nPosY, cString, cFont, nPointSize, ; nWidth, nBold, lUnderLine, lItalic, lNewLine, ;