From ae7906d528a2e5a5f371f257285e18892e69e797 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Oct 2012 20:51:51 +0000 Subject: [PATCH] 2012-10-08 22:49 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/tests/activex.prg * contrib/gtwvg/tests/cuigdlgs.prg * contrib/gtwvg/tests/demowvg.prg * contrib/gtwvg/tests/demowvg1.prg * contrib/gtwvg/tests/demoxbp.prg * contrib/gtwvg/tests/dyndlgs.prg * contrib/gtwvg/tests/modal.prg * contrib/gtwvg/tests/tbrowser.prg * contrib/gtwvg/tests/utils.prg * contrib/gtwvg/tests/wvtcls.prg * contrib/gtwvg/tests/xbp.prg * contrib/hbgd/gdchart.prg * extras/hbvpdf/hbvpdf.prg * extras/httpsrv/modules/cookie.prg * extras/httpsrv/modules/showcounter.prg * changed DEFAULT TO to hb_default()/__defaultNIL() * deleted common.ch from all files. It's not used anymore in Harbour repo. --- harbour/ChangeLog | 20 +++ harbour/contrib/gtwvg/tests/activex.prg | 3 +- harbour/contrib/gtwvg/tests/cuigdlgs.prg | 1 - harbour/contrib/gtwvg/tests/demowvg.prg | 3 +- harbour/contrib/gtwvg/tests/demowvg1.prg | 3 +- harbour/contrib/gtwvg/tests/demoxbp.prg | 1 - harbour/contrib/gtwvg/tests/dyndlgs.prg | 1 - harbour/contrib/gtwvg/tests/modal.prg | 25 ++- harbour/contrib/gtwvg/tests/tbrowser.prg | 1 - harbour/contrib/gtwvg/tests/utils.prg | 7 +- harbour/contrib/gtwvg/tests/wvtcls.prg | 1 - harbour/contrib/gtwvg/tests/xbp.prg | 1 - harbour/contrib/hbgd/gdchart.prg | 147 ++++++++++-------- harbour/extras/hbvpdf/hbvpdf.prg | 1 - harbour/extras/httpsrv/modules/cookie.prg | 5 +- .../extras/httpsrv/modules/showcounter.prg | 7 +- 16 files changed, 128 insertions(+), 99 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3afec0c9fa..cf1e58e1e2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,26 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-08 22:49 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/gtwvg/tests/activex.prg + * contrib/gtwvg/tests/cuigdlgs.prg + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/tests/demowvg1.prg + * contrib/gtwvg/tests/demoxbp.prg + * contrib/gtwvg/tests/dyndlgs.prg + * contrib/gtwvg/tests/modal.prg + * contrib/gtwvg/tests/tbrowser.prg + * contrib/gtwvg/tests/utils.prg + * contrib/gtwvg/tests/wvtcls.prg + * contrib/gtwvg/tests/xbp.prg + * contrib/hbgd/gdchart.prg + * extras/hbvpdf/hbvpdf.prg + * extras/httpsrv/modules/cookie.prg + * extras/httpsrv/modules/showcounter.prg + * changed DEFAULT TO to hb_default()/__defaultNIL() + * deleted common.ch from all files. It's not used anymore + in Harbour repo. + 2012-10-08 22:09 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/activex.prg * contrib/gtwvg/class.prg diff --git a/harbour/contrib/gtwvg/tests/activex.prg b/harbour/contrib/gtwvg/tests/activex.prg index 03472322da..53ffe433ff 100644 --- a/harbour/contrib/gtwvg/tests/activex.prg +++ b/harbour/contrib/gtwvg/tests/activex.prg @@ -9,7 +9,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" @@ -317,7 +316,7 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA ) LOCAL oCom - DEFAULT nActiveX TO 2 + hb_default( @nActiveX, 2 ) oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. ) diff --git a/harbour/contrib/gtwvg/tests/cuigdlgs.prg b/harbour/contrib/gtwvg/tests/cuigdlgs.prg index a5326e6c48..e28351010a 100644 --- a/harbour/contrib/gtwvg/tests/cuigdlgs.prg +++ b/harbour/contrib/gtwvg/tests/cuigdlgs.prg @@ -9,7 +9,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index e303ea34b8..55a4ff5bd1 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -26,7 +26,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" @@ -215,7 +214,7 @@ FUNCTION hb_GTSYS() PROCEDURE WvtConsoleGets( nMode ) - DEFAULT nMode TO 0 + hb_default( @nMode, 0 ) IF hb_mtvm() hb_threadStart( {| oCrt | hb_gtReload( 'WVT' ) , ; diff --git a/harbour/contrib/gtwvg/tests/demowvg1.prg b/harbour/contrib/gtwvg/tests/demowvg1.prg index 8ca3e3aaeb..c9f4d444c8 100644 --- a/harbour/contrib/gtwvg/tests/demowvg1.prg +++ b/harbour/contrib/gtwvg/tests/demowvg1.prg @@ -11,7 +11,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" @@ -149,7 +148,7 @@ STATIC FUNCTION MyChoice( aChoices ) LOCAL scr, clr, nChoice - DEFAULT aChoices TO { "One", "Two", "Three", "Four", "Five", "Six", "Seven" } + hb_default( @aChoices, { "One", "Two", "Three", "Four", "Five", "Six", "Seven" } ) scr := SaveScreen( 7, 48, 13, 55 ) clr := SetColor( "N/W*,GR+/B*,,,GR+/B" ) diff --git a/harbour/contrib/gtwvg/tests/demoxbp.prg b/harbour/contrib/gtwvg/tests/demoxbp.prg index f9a000c89d..6fca1cd680 100644 --- a/harbour/contrib/gtwvg/tests/demoxbp.prg +++ b/harbour/contrib/gtwvg/tests/demoxbp.prg @@ -19,7 +19,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" diff --git a/harbour/contrib/gtwvg/tests/dyndlgs.prg b/harbour/contrib/gtwvg/tests/dyndlgs.prg index 00823d40b0..3030624075 100644 --- a/harbour/contrib/gtwvg/tests/dyndlgs.prg +++ b/harbour/contrib/gtwvg/tests/dyndlgs.prg @@ -9,7 +9,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" diff --git a/harbour/contrib/gtwvg/tests/modal.prg b/harbour/contrib/gtwvg/tests/modal.prg index 97b92ea38d..b4cb89adf8 100644 --- a/harbour/contrib/gtwvg/tests/modal.prg +++ b/harbour/contrib/gtwvg/tests/modal.prg @@ -8,7 +8,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" @@ -103,12 +102,12 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) LOCAL pal_ := { "w+/n", "w/r", "n/w", "n/bg", "r/bg", "N/W", "n/B", "w+/B" } LOCAL aTrg_ , x_ := {} - DEFAULT cCaption TO "Your Attention Please!" - DEFAULT aButtons_ TO { "OK" } - DEFAULT aText_ TO {} - DEFAULT aMessage_ TO {} - DEFAULT sel TO 1 - DEFAULT nTime TO 10 + hb_default( @cCaption , "Your Attention Please!" ) + hb_default( @aButtons_ , { "OK" } ) + hb_default( @aText_ , {} ) + hb_default( @aMessage_ , {} ) + hb_default( @sel , 1 ) + hb_default( @nTime , 10 ) IF nTime == 0 nTime := 10000 // Seconds @@ -289,12 +288,12 @@ FUNCTION CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidden, ; LOCAL oCrt, aPos - DEFAULT cTitle TO 'Info' - DEFAULT xIcon TO 'VW_DFT' - DEFAULT lModal TO .T. - DEFAULT lHidden TO .F. - DEFAULT lCenter TO .F. - DEFAULT lNoTitleBar TO .F. + hb_default( @cTitle , 'Info' ) + hb_default( @xIcon , 'VW_DFT' ) + hb_default( @lModal , .T. ) + hb_default( @lHidden , .F. ) + hb_default( @lCenter , .F. ) + hb_default( @lNoTitleBar , .F. ) aPos := iif( lCenter, { -1, -1 }, iif( nRow == NIL, { nT, nL }, { nRow,nCol } ) ) diff --git a/harbour/contrib/gtwvg/tests/tbrowser.prg b/harbour/contrib/gtwvg/tests/tbrowser.prg index 9e224e3dcb..41973ae83b 100644 --- a/harbour/contrib/gtwvg/tests/tbrowser.prg +++ b/harbour/contrib/gtwvg/tests/tbrowser.prg @@ -15,7 +15,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" diff --git a/harbour/contrib/gtwvg/tests/utils.prg b/harbour/contrib/gtwvg/tests/utils.prg index 4c70287ec2..8f97fb9aa0 100644 --- a/harbour/contrib/gtwvg/tests/utils.prg +++ b/harbour/contrib/gtwvg/tests/utils.prg @@ -9,7 +9,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" @@ -260,7 +259,7 @@ FUNCTION WvtSetObjects( aObject ) ELSE ASize( aObject, WVT_OBJ_VRBLS ) - DEFAULT aObject[ WVT_OBJ_STATE ] TO OBJ_STATE_DISP + hb_default( @aObject[ WVT_OBJ_STATE ], OBJ_STATE_DISP ) AAdd( t_aObjects, aObject ) ENDIF @@ -307,7 +306,7 @@ FUNCTION VouChoice( aChoices ) LOCAL scr, clr, nChoice - DEFAULT aChoices TO { "One", "Two", "Three", "Four", "Five", "Six", "Seven" } + hb_default( @aChoices, { "One", "Two", "Three", "Four", "Five", "Six", "Seven" } ) scr := SaveScreen( 7, 48, 13, 55 ) clr := SetColor( "N/W*,GR+/B*,,,GR+/B" ) @@ -346,7 +345,7 @@ FUNCTION BuildWvgToolBar( oDA, nActiveX ) LOCAL oTBar - DEFAULT nActiveX TO 0 + hb_default( @nActiveX, 0 ) oTBar := WvgToolBar():new( oDA, , { 0, 0 }, { oDA:currentSize()[ 1 ], 30 }, , .T. ) diff --git a/harbour/contrib/gtwvg/tests/wvtcls.prg b/harbour/contrib/gtwvg/tests/wvtcls.prg index 7a1b4491c3..23ce48e3cf 100644 --- a/harbour/contrib/gtwvg/tests/wvtcls.prg +++ b/harbour/contrib/gtwvg/tests/wvtcls.prg @@ -15,7 +15,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" diff --git a/harbour/contrib/gtwvg/tests/xbp.prg b/harbour/contrib/gtwvg/tests/xbp.prg index b87aa91430..c7ca18335f 100644 --- a/harbour/contrib/gtwvg/tests/xbp.prg +++ b/harbour/contrib/gtwvg/tests/xbp.prg @@ -9,7 +9,6 @@ // #include "inkey.ch" -#include "common.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" diff --git a/harbour/contrib/hbgd/gdchart.prg b/harbour/contrib/hbgd/gdchart.prg index dacf6b32be..eb1ebb0b77 100644 --- a/harbour/contrib/hbgd/gdchart.prg +++ b/harbour/contrib/hbgd/gdchart.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbclass.ch" #include "gd.ch" @@ -90,8 +89,8 @@ ENDCLASS METHOD New( sx, sy ) CLASS GDChart - DEFAULT sx TO 320 - DEFAULT sy TO 200 + __defaultNIL( @sx, 320 ) + __defaultNIL( @sy, 200 ) ::cTitle := "Chart" ::aSeries := {} @@ -146,10 +145,10 @@ METHOD PieChart() CLASS GDChart nWidth := __HGetValue( hDefs, "WIDTH" ) cFontPitch := __HGetValue( hDefs, "FONTPITCH" ) - DEFAULT x TO ::CenterWidth() - DEFAULT y TO ::CenterHeight() - DEFAULT nWidth TO Min( ::Width(), ::Height() ) - DEFAULT cFontPitch TO "TINY" + __defaultNIL( @x , ::CenterWidth() ) + __defaultNIL( @y , ::CenterHeight() ) + __defaultNIL( @nWidth , Min( ::Width(), ::Height() ) ) + __defaultNIL( @cFontPitch, "TINY" ) DO CASE CASE cFontPitch == "TINY" @@ -193,9 +192,9 @@ METHOD PieChart() CLASS GDChart colorp := __HGetValue( hElement, "COLOR" ) nVal := hElement[ "VALUE" ] nDim := 360 * ( ( nVal / nTot ) * 100 ) / 100 - DEFAULT lFilled TO .F. - DEFAULT nExtrude TO 0 - DEFAULT colorp TO ::SetColor( 0, 0, 0 ) + __defaultNIL( @lFilled , .F. ) + __defaultNIL( @nExtrude, 0 ) + __defaultNIL( @colorp , ::SetColor( 0, 0, 0 ) ) IF lExtruded nPosX := x + nExtrude * Cos( ::Radians( nDegree + nDim / 2 ) ) nPosY := y + nExtrude * Sin( ::Radians( nDegree + nDim / 2 ) ) @@ -229,9 +228,9 @@ METHOD PieChart() CLASS GDChart nPitch := __HGetValue( hFont, "PITCH" ) nAngle := __HGetValue( hFont, "ANGLE" ) textcolor := __HGetValue( hFont, "COLOR" ) - DEFAULT cFontName TO "Arial" - DEFAULT nPitch TO 8 - DEFAULT nAngle TO 0 + __defaultNIL( @cFontName, "Arial" ) + __defaultNIL( @nPitch , 8 ) + __defaultNIL( @nAngle , 0 ) ENDIF nPosX := nPosX + ( ( nExtrude + nWidth ) / 4 ) * Cos( ::Radians( nDegree + nDim / 2 ) ) nPosY := nPosY + ( ( nExtrude + nWidth ) / 4 ) * Sin( ::Radians( nDegree + nDim / 2 ) ) @@ -290,17 +289,17 @@ METHOD VerticalBarChart() CLASS GDChart cAxisPict := __HGetValue( hDefs, "AXISPICT" ) cFontPitch := __HGetValue( hDefs, "FONTPITCH" ) - DEFAULT x TO 0 - DEFAULT y TO 0 - DEFAULT nWidth TO ::Width() - DEFAULT nHeight TO ::Height() - DEFAULT color TO ::GetColor() - DEFAULT lShowAxis TO .T. - DEFAULT lShowGrid TO .T. - DEFAULT cAxisPict TO "@E 9,999.99" - DEFAULT cFontPitch TO "TINY" + __defaultNIL( @x , 0 ) + __defaultNIL( @y , 0 ) + __defaultNIL( @nWidth , ::Width() ) + __defaultNIL( @nHeight , ::Height() ) + __defaultNIL( @color , ::GetColor() ) + __defaultNIL( @lShowAxis , .T. ) + __defaultNIL( @lShowGrid , .T. ) + __defaultNIL( @cAxisPict , "@E 9,999.99" ) + __defaultNIL( @cFontPitch, "TINY" ) - DEFAULT nBorder TO 4 + __defaultNIL( @nBorder, 4 ) /* hData := ["TITLE"], ["VALUE"], ["FILLED"], ["COLOR"], ["TILE"], ["EXTRUDE"] @@ -335,10 +334,17 @@ METHOD VerticalBarChart() CLASS GDChart nTot += hElement[ "VALUE" ] NEXT - DEFAULT nLeftLabelSpace TO nBorder + Len( LTrim( Transform( nMax, cAxisPict ) ) ) * ::GetFontWidth() + nBorder - DEFAULT nRightLabelSpace TO nLeftLabelSpace //nBorder + Len( hb_ntos( nMax ) ) * ::GetFontWidth() + nBorder - DEFAULT nBottomLabelSpace TO nBorder + nMaxLabel * ::GetFontWidth() + nBorder - DEFAULT nMaxValue TO nMax + IF nLeftLabelSpace == NIL + nLeftLabelSpace := nBorder + Len( LTrim( Transform( nMax, cAxisPict ) ) ) * ::GetFontWidth() + nBorder + ENDIF + IF nRightLabelSpace == NIL + nRightLabelSpace := nLeftLabelSpace //nBorder + Len( hb_ntos( nMax ) ) * ::GetFontWidth() + nBorder + ENDIF + IF nBottomLabelSpace == NIL + nBottomLabelSpace := nBorder + nMaxLabel * ::GetFontWidth() + nBorder + ENDIF + + __defaultNIL( @nMaxValue , nMax ) IF lShowAxis IF lShowLabelLeft @@ -411,9 +417,9 @@ METHOD VerticalBarChart() CLASS GDChart nVal := hElement[ "VALUE" ] nDim := ( nVal / nMaxValue ) * nHeight - DEFAULT lFilled TO .F. + __defaultNIL( @lFilled , .F. ) //DEFAULT nExtrude TO 0 - DEFAULT colorp TO ::SetColor( 0, 0, 0 ) + __defaultNIL( @colorp , ::SetColor( 0, 0, 0 ) ) nPosX := x + ( nSize * ( hElement:__enumIndex() - 1 ) ) nPosY := y @@ -475,17 +481,17 @@ METHOD HorizontalBarChart() CLASS GDChart cAxisPict := __HGetValue( hDefs, "AXISPICT" ) cFontPitch := __HGetValue( hDefs, "FONTPITCH" ) - DEFAULT x TO 0 - DEFAULT y TO 0 - DEFAULT nWidth TO ::Width() - DEFAULT nHeight TO ::Height() - DEFAULT color TO ::GetColor() - DEFAULT lShowAxis TO .T. - DEFAULT lShowGrid TO .T. - DEFAULT cAxisPict TO "@E 9,999.99" - DEFAULT cFontPitch TO "TINY" + __defaultNIL( @x , 0 ) + __defaultNIL( @y , 0 ) + __defaultNIL( @nWidth , ::Width() ) + __defaultNIL( @nHeight , ::Height() ) + __defaultNIL( @color , ::GetColor() ) + __defaultNIL( @lShowAxis , .T. ) + __defaultNIL( @lShowGrid , .T. ) + __defaultNIL( @cAxisPict , "@E 9,999.99" ) + __defaultNIL( @cFontPitch, "TINY" ) - DEFAULT nBorder TO 4 + __defaultNIL( @nBorder, 4 ) /* hData := ["TITLE"], ["VALUE"], ["FILLED"], ["COLOR"], ["TILE"], ["EXTRUDE"] @@ -517,11 +523,21 @@ METHOD HorizontalBarChart() CLASS GDChart nMaxLabel := Max( nMaxLabel, Len( iif( cLabel != NIL, cLabel, "" ) ) ) nTot += hElement[ "VALUE" ] NEXT - DEFAULT nLeftLabelSpace TO nBorder + nMaxLabel * ::GetFontWidth() + nBorder - DEFAULT nRightLabelSpace TO nBorder + ( Len( LTrim( Transform( nMax, cAxisPict ) ) ) * ::GetFontWidth() / 2 ) - DEFAULT nTopLabelSpace TO nBorder + ::GetFontHeight() + nBorder - DEFAULT nBottomLabelSpace TO nTopLabelSpace // nBorder + ::GetFontHeight() + nBorder - DEFAULT nMaxValue TO nMax + + IF nLeftLabelSpace == NIL + nLeftLabelSpace := nBorder + nMaxLabel * ::GetFontWidth() + nBorder + ENDIF + IF nRightLabelSpace == NIL + nRightLabelSpace := nBorder + ( Len( LTrim( Transform( nMax, cAxisPict ) ) ) * ::GetFontWidth() / 2 ) + ENDIF + IF nTopLabelSpace == NIL + nTopLabelSpace := nBorder + ::GetFontHeight() + nBorder + ENDIF + IF nBottomLabelSpace == NIL + nBottomLabelSpace := nTopLabelSpace // nBorder + ::GetFontHeight() + nBorder + ENDIF + + __defaultNIL( @nMaxValue, nMax ) IF lShowAxis IF lShowLabelLeft @@ -593,9 +609,9 @@ METHOD HorizontalBarChart() CLASS GDChart colorp := __HGetValue( hElement, "COLOR" ) nVal := hElement[ "VALUE" ] nDim := ( nVal / nMaxValue ) * nWidth - DEFAULT lFilled TO .F. + __defaultNIL( @lFilled , .F. ) //DEFAULT nExtrude TO 0 - DEFAULT colorp TO ::SetColor( 0, 0, 0 ) + __defaultNIL( @colorp , ::SetColor( 0, 0, 0 ) ) nPosX := x nPosY := y + ( nSize * ( hElement:__enumIndex() - 1 ) ) @@ -660,17 +676,17 @@ METHOD LineChart() CLASS GDChart cAxisPict := __HGetValue( hDefs, "AXISPICT" ) cFontPitch := __HGetValue( hDefs, "FONTPITCH" ) - DEFAULT x TO 0 - DEFAULT y TO 0 - DEFAULT nWidth TO ::Width() - DEFAULT nHeight TO ::Height() - DEFAULT colorp TO ::GetColor() - DEFAULT lShowAxis TO .T. - DEFAULT lShowGrid TO .T. - DEFAULT cAxisPict TO "@E 9,999.99" - DEFAULT cFontPitch TO "TINY" + __defaultNIL( @x , 0 ) + __defaultNIL( @y , 0 ) + __defaultNIL( @nWidth , ::Width() ) + __defaultNIL( @nHeight , ::Height() ) + __defaultNIL( @colorp , ::GetColor() ) + __defaultNIL( @lShowAxis , .T. ) + __defaultNIL( @lShowGrid , .T. ) + __defaultNIL( @cAxisPict , "@E 9,999.99" ) + __defaultNIL( @cFontPitch, "TINY" ) - DEFAULT nBorder TO 4 + __defaultNIL( @nBorder, 4 ) /* hData := ["TITLE"], ["VALUE"], ["FILLED"], ["COLOR"], ["TILE"], ["EXTRUDE"] @@ -715,11 +731,18 @@ METHOD LineChart() CLASS GDChart nMinLabel := Max( nMinLabel, Len( iif( cLabel != NIL, cLabel, "" ) ) ) NEXT - DEFAULT nLeftLabelSpace TO nBorder + Max( Len( LTrim( Transform( nMax, cAxisPict ) ) ), Len( LTrim( Transform( nMin, cAxisPict ) ) ) ) * ::GetFontWidth() + nBorder - DEFAULT nRightLabelSpace TO nLeftLabelSpace - DEFAULT nBottomLabelSpace TO nBorder + nMaxLabel * ::GetFontWidth() + nBorder - DEFAULT nMaxValue TO nMax - DEFAULT nMinValue TO nMin + IF nLeftLabelSpace == NIL + nLeftLabelSpace := nBorder + Max( Len( LTrim( Transform( nMax, cAxisPict ) ) ), Len( LTrim( Transform( nMin, cAxisPict ) ) ) ) * ::GetFontWidth() + nBorder + ENDIF + IF nRightLabelSpace == NIL + nRightLabelSpace := nLeftLabelSpace + ENDIF + IF nBottomLabelSpace == NIL + nBottomLabelSpace := nBorder + nMaxLabel * ::GetFontWidth() + nBorder + ENDIF + + __defaultNIL( @nMaxValue, nMax ) + __defaultNIL( @nMinValue, nMin ) IF lShowAxis IF lShowLabelLeft @@ -821,7 +844,7 @@ METHOD LineChart() CLASS GDChart //DEFAULT lFilled TO .F. //DEFAULT nExtrude TO 0 - DEFAULT colorp TO ::SetColor( 0, 0, 0 ) + __defaultNIL( @colorp , ::SetColor( 0, 0, 0 ) ) nPosX := x + ( nSize * ( hElement:__enumIndex() - 1 ) ) nPosY := y diff --git a/harbour/extras/hbvpdf/hbvpdf.prg b/harbour/extras/hbvpdf/hbvpdf.prg index dc66a77e3c..397a4c159c 100644 --- a/harbour/extras/hbvpdf/hbvpdf.prg +++ b/harbour/extras/hbvpdf/hbvpdf.prg @@ -2419,7 +2419,6 @@ STATIC FUNCTION FileSize( nHandle ) RETURN nLength // next 3 function written by Peter Kulek -//modified for compatibility with common.ch by V.K. //modified DATE processing by V.K. static function Array2File(cFile,aRay,nDepth,hFile) local nBytes := 0 diff --git a/harbour/extras/httpsrv/modules/cookie.prg b/harbour/extras/httpsrv/modules/cookie.prg index 7b9ff1e63c..0a79960c0d 100644 --- a/harbour/extras/httpsrv/modules/cookie.prg +++ b/harbour/extras/httpsrv/modules/cookie.prg @@ -50,7 +50,6 @@ * */ -#include "common.ch" #include "hbclass.ch" MEMVAR _REQUEST @@ -66,8 +65,8 @@ FUNCTION HRBMAIN() //hb_ToOutDebug( "cCookie = %s, cAction = %s\n\r", hb_ValToExp( cCookie ), cAction ) - DEFAULT cCookie TO "" - DEFAULT cAction TO "" + hb_default( @cCookie, "" ) + hb_default( @cAction, "" ) // Sample page embedded TEXT INTO cHtml diff --git a/harbour/extras/httpsrv/modules/showcounter.prg b/harbour/extras/httpsrv/modules/showcounter.prg index 622bb05f36..a27dc391d8 100644 --- a/harbour/extras/httpsrv/modules/showcounter.prg +++ b/harbour/extras/httpsrv/modules/showcounter.prg @@ -55,7 +55,6 @@ MEMVAR _SERVER // defined in uHTTPD MEMVAR _REQUEST // defined in uHTTPD -#include "common.ch" #include "gd.ch" #define IMAGES_IN ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "contrib" + hb_ps() + "hbgd" + hb_ps() + "tests" + hb_ps() + "digits" + hb_ps() @@ -99,10 +98,10 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) //LOCAL cFile // 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 ) + IF !hb_FileExists( IMAGES_IN + cBaseImage ) //hb_ToOutDebug( "ERROR: Base Image File '" + IMAGES_IN + cBaseImage + "' not found" ) //THROW( "ERROR: Base Image File '" + IMAGES_IN + cBaseImage + "' not found" ) RETURN NIL