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.
This commit is contained in:
Viktor Szakats
2012-10-08 20:51:51 +00:00
parent 1f08777480
commit ae7906d528
16 changed files with 128 additions and 99 deletions

View File

@@ -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

View File

@@ -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. )

View File

@@ -9,7 +9,6 @@
//
#include "inkey.ch"
#include "common.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"

View File

@@ -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' ) , ;

View File

@@ -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" )

View File

@@ -19,7 +19,6 @@
//
#include "inkey.ch"
#include "common.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"

View File

@@ -9,7 +9,6 @@
//
#include "inkey.ch"
#include "common.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"

View File

@@ -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 } ) )

View File

@@ -15,7 +15,6 @@
//
#include "inkey.ch"
#include "common.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"

View File

@@ -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. )

View File

@@ -15,7 +15,6 @@
//
#include "inkey.ch"
#include "common.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"

View File

@@ -9,7 +9,6 @@
//
#include "inkey.ch"
#include "common.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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