From 68c738b9bab4b1c66dcc95e2d4e794da623def8f Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 20 Jun 2009 20:25:26 +0000 Subject: [PATCH] 2009-06-20 22:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbapi.h * harbour/source/vm/extend.c * renamed existing hb_par*() and hb_stor*() functions which supports variable number of parameters (...) into hb_parv*() and hb_storv*() * added new hb_par*() and hb_stor*() functions which use strict number of parameters. New hb_par*() functions do not make hidden conversion between types, f.e. hb_parl() returns 1 only for logical parameters which contain .T. * harbour/include/extend.api * map Clipper _par*() functions to hb_parv*() * map Clipper _stor*() functions to hb_storv*() * harbour/source/vm/dynsym.c * harbour/source/vm/hvm.c * harbour/source/vm/maindllp.c * harbour/source/vm/thread.c * harbour/source/vm/classes.c * harbour/source/rtl/cdpapi.c * harbour/source/rtl/mlcfunc.c * harbour/contrib/hbnf/dispc.c * harbour/contrib/hbnf/mouse.c * harbour/contrib/hbnf/getenvrn.c * harbour/contrib/hbhpdf/harupdf.c * harbour/contrib/gtwvg/wvgcuig.c * harbour/contrib/gtwvg/wvgwin.c * harbour/contrib/gtwvg/wvgutils.c * harbour/contrib/gtwvg/wvgcore.c * harbour/contrib/gtwvg/wvgwing.c * harbour/contrib/rddads/adsfunc.c * harbour/contrib/rddads/ads1.c * harbour/contrib/rddads/adsmgmnt.c * harbour/contrib/hbmisc/hb_f.c * harbour/contrib/hbwin/wapi_commctrl.c * replaced hb_par*() and hb_stor*() calls used with additional parameters by hb_parv*() and hb_storv*() TODO: update examples/hbwhat/*.c files * harbour/examples/uhttpd2/socket.c * harbour/examples/httpsrv/socket.c * changed hb_parni() to hb_parnidef() * harbour/source/vm/itemapi.c * removed some conversion which are not necessary for CA-Cl*pper compatibility * harbour/source/macro/macrolex.c * replaced HB_LEX_IS*() macros by by HB_IS*() ones --- harbour/ChangeLog | 50 ++ harbour/contrib/gtwvg/wvgcore.c | 256 +++---- harbour/contrib/gtwvg/wvgcuig.c | 160 ++-- harbour/contrib/gtwvg/wvgutils.c | 111 ++- harbour/contrib/gtwvg/wvgwin.c | 18 +- harbour/contrib/gtwvg/wvgwing.c | 36 +- harbour/contrib/hbhpdf/harupdf.c | 38 +- harbour/contrib/hbmisc/hb_f.c | 12 +- harbour/contrib/hbnf/dispc.c | 2 +- harbour/contrib/hbnf/getenvrn.c | 4 +- harbour/contrib/hbnf/mouse.c | 16 +- harbour/contrib/hbwin/wapi_commctrl.c | 16 +- harbour/contrib/rddads/ads1.c | 2 +- harbour/contrib/rddads/adsfunc.c | 6 +- harbour/contrib/rddads/adsmgmnt.c | 210 ++--- harbour/examples/httpsrv/socket.c | 2 +- harbour/examples/uhttpd2/socket.c | 2 +- harbour/include/extend.api | 30 +- harbour/include/hbapi.h | 104 ++- harbour/source/macro/macrolex.c | 42 +- harbour/source/rtl/cdpapi.c | 2 +- harbour/source/rtl/mlcfunc.c | 4 +- harbour/source/vm/classes.c | 8 +- harbour/source/vm/dynsym.c | 8 +- harbour/source/vm/extend.c | 1017 ++++++++++++++++++++++--- harbour/source/vm/hvm.c | 8 +- harbour/source/vm/itemapi.c | 12 +- harbour/source/vm/maindllp.c | 64 +- harbour/source/vm/thread.c | 2 +- 29 files changed, 1550 insertions(+), 692 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9a6593abbd..c0525b0a5e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,56 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-20 22:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbapi.h + * harbour/source/vm/extend.c + * renamed existing hb_par*() and hb_stor*() functions which supports + variable number of parameters (...) into hb_parv*() and hb_storv*() + * added new hb_par*() and hb_stor*() functions which use strict number + of parameters. New hb_par*() functions do not make hidden conversion + between types, f.e. hb_parl() returns 1 only for logical parameters + which contain .T. + + * harbour/include/extend.api + * map Clipper _par*() functions to hb_parv*() + * map Clipper _stor*() functions to hb_storv*() + + * harbour/source/vm/dynsym.c + * harbour/source/vm/hvm.c + * harbour/source/vm/maindllp.c + * harbour/source/vm/thread.c + * harbour/source/vm/classes.c + * harbour/source/rtl/cdpapi.c + * harbour/source/rtl/mlcfunc.c + * harbour/contrib/hbnf/dispc.c + * harbour/contrib/hbnf/mouse.c + * harbour/contrib/hbnf/getenvrn.c + * harbour/contrib/hbhpdf/harupdf.c + * harbour/contrib/gtwvg/wvgcuig.c + * harbour/contrib/gtwvg/wvgwin.c + * harbour/contrib/gtwvg/wvgutils.c + * harbour/contrib/gtwvg/wvgcore.c + * harbour/contrib/gtwvg/wvgwing.c + * harbour/contrib/rddads/adsfunc.c + * harbour/contrib/rddads/ads1.c + * harbour/contrib/rddads/adsmgmnt.c + * harbour/contrib/hbmisc/hb_f.c + * harbour/contrib/hbwin/wapi_commctrl.c + * replaced hb_par*() and hb_stor*() calls used with additional parameters + by hb_parv*() and hb_storv*() + TODO: update examples/hbwhat/*.c files + + * harbour/examples/uhttpd2/socket.c + * harbour/examples/httpsrv/socket.c + * changed hb_parni() to hb_parnidef() + + * harbour/source/vm/itemapi.c + * removed some conversion which are not necessary for CA-Cl*pper + compatibility + + * harbour/source/macro/macrolex.c + * replaced HB_LEX_IS*() macros by by HB_IS*() ones + 2009-06-20 12:01 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbxbp/xbpdataref.prg diff --git a/harbour/contrib/gtwvg/wvgcore.c b/harbour/contrib/gtwvg/wvgcore.c index 48d10910e2..335617e33e 100644 --- a/harbour/contrib/gtwvg/wvgcore.c +++ b/harbour/contrib/gtwvg/wvgcore.c @@ -1082,10 +1082,10 @@ HB_FUNC( WVT_DRAWBOXRAISED ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); hb_wvt_DrawBoxRaised( _s->hdc, iTop-1, iLeft-1, iBottom+1, iRight+1 ); #if defined(__SETGUI__) @@ -1104,10 +1104,10 @@ HB_FUNC( WVT_DRAWBOXRECESSED ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); hb_wvt_DrawBoxRecessed( _s->hdc, iTop-1, iLeft-1, iBottom+1, iRight+1 ); #if defined(__SETGUI__) @@ -1126,10 +1126,10 @@ HB_FUNC( WVT_DRAWBOXGROUP ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); hb_wvt_DrawBoxGroup( _s->hdc, iTop, iLeft, iBottom, iRight ); #if defined(__SETGUI__) @@ -1148,10 +1148,10 @@ HB_FUNC( WVT_DRAWBOXGROUPRAISED ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); hb_wvt_DrawBoxGroupRaised( _s->hdc, iTop, iLeft, iBottom, iRight ); #if defined(__SETGUI__) @@ -1175,12 +1175,12 @@ HB_FUNC( WVT_DRAWIMAGE ) int iLeft, iTop, iRight, iBottom; xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) ); - iTop = xy.y + hb_parni( 6,1 ); - iLeft = xy.x + hb_parni( 6,2 ) ; + iTop = xy.y + hb_parvni( 6,1 ); + iLeft = xy.x + hb_parvni( 6,2 ) ; xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y - 1 + hb_parni( 6,3 ); - iRight = xy.x - 1 + hb_parni( 6,4 ); + iBottom = xy.y - 1 + hb_parvni( 6,3 ); + iRight = xy.x - 1 + hb_parvni( 6,4 ); if ( HB_ISNUM( 5 ) ) { @@ -1242,12 +1242,12 @@ HB_FUNC( WVT_DRAWLABEL ) bgClr = hb_wvt_BgColorParam( 7 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) ); - xy.x += hb_parni( 17,2 ); - xy.y += hb_parni( 17,1 ); + xy.x += hb_parvni( 17,2 ); + xy.y += hb_parvni( 17,1 ); SetBkColor( _s->hdc, bgClr ); SetTextColor( _s->hdc, fgClr ); - SetTextAlign( _s->hdc, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); + SetTextAlign( _s->hdc, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parvni( 4 ) ) ); hOldFont = ( HFONT ) SelectObject( _s->hdc, hFont ); ExtTextOut( _s->hdc, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL ); @@ -1258,7 +1258,7 @@ HB_FUNC( WVT_DRAWLABEL ) { SetBkColor( _s->hGuiDC, bgClr ); SetTextColor( _s->hGuiDC, fgClr ); - SetTextAlign( _s->hGuiDC, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); + SetTextAlign( _s->hGuiDC, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parvni( 4 ) ) ); hOldFontGui = ( HFONT ) SelectObject( _s->hGuiDC, hFont ); ExtTextOut( _s->hGuiDC, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL ); @@ -1286,11 +1286,11 @@ HB_FUNC( WVT_DRAWOUTLINE ) int iTop, iLeft, iBottom, iRight; xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - iTop = xy.y - 1 + hb_parni( 8,1 ); - iLeft = xy.x - 1 + hb_parni( 8,2 ); + iTop = xy.y - 1 + hb_parvni( 8,1 ); + iLeft = xy.x - 1 + hb_parvni( 8,2 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y + hb_parni( 8,3 ); - iRight = xy.x + hb_parni( 8,4 ); + iBottom = xy.y + hb_parvni( 8,3 ); + iRight = xy.x + hb_parvni( 8,4 ); hOldPenGUI = hOldPen = 0; @@ -1343,10 +1343,10 @@ HB_FUNC( WVT_DRAWLINE ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 11,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 11,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 11,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 11,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 11,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 11,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 11,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 11,4 ); int iOrient, iFormat, iAlign, iStyle, iThick; int x, y, iOffset; @@ -1556,10 +1556,10 @@ HB_FUNC( WVT_DRAWELLIPSE ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); SelectObject( _s->hdc, _s->currentBrush ); SelectObject( _s->hdc, _s->currentPen ); @@ -1581,10 +1581,10 @@ HB_FUNC( WVT_DRAWRECTANGLE ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); SelectObject( _s->hdc, _s->currentBrush ); SelectObject( _s->hdc, _s->currentPen ); @@ -1606,10 +1606,10 @@ HB_FUNC( WVT_DRAWROUNDRECT ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iHt, iWd; iHt = hb_parni( 6 ); @@ -1635,10 +1635,10 @@ HB_FUNC( WVT_DRAWFOCUSRECT ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); RECT rc = { 0,0,0,0 }; rc.left = iLeft; @@ -1663,10 +1663,10 @@ HB_FUNC( WVT_DRAWCOLORRECT ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); RECT rc = { 0,0,0,0 }; HBRUSH hBrush; @@ -1705,9 +1705,9 @@ HB_FUNC( WVT_DRAWGRIDHORZ ) int iLeft, iRight; iLeft = ( hb_parni( 2 ) * _s->PTEXTSIZE.x ); - iLeft += hb_parni( 5,2 ); + iLeft += hb_parvni( 5,2 ); iRight = ( ( ( hb_parni( 3 ) + 1 ) * _s->PTEXTSIZE.x ) - 1 ); - iRight += hb_parni( 5,4 ); + iRight += hb_parvni( 5,4 ); SelectObject( _s->hdc, _s->currentPen ); @@ -1762,15 +1762,15 @@ HB_FUNC( WVT_DRAWGRIDVERT ) iCharHeight = _s->PTEXTSIZE.y; iTop = ( hb_parni( 1 ) * iCharHeight ); - iTop += hb_parni( 5,1 ); + iTop += hb_parvni( 5,1 ); iBottom = ( ( hb_parni( 2 ) + 1 ) * iCharHeight ) - 1; - iBottom += hb_parni( 5,3 ); + iBottom += hb_parvni( 5,3 ); SelectObject( _s->hdc, _s->currentPen ); for ( i = 1; i <= iTabs; i++ ) { - x = ( hb_parni( 3,i ) * iCharWidth ); + x = ( hb_parvni( 3,i ) * iCharWidth ); MoveToEx( _s->hdc, x, iTop, NULL ); LineTo( _s->hdc, x, iBottom ); @@ -1781,7 +1781,7 @@ HB_FUNC( WVT_DRAWGRIDVERT ) SelectObject( _s->hGuiDC, _s->currentPen ); for ( i = 1; i <= iTabs; i++ ) { - x = ( hb_parni( 3,i ) * iCharWidth ); + x = ( hb_parvni( 3,i ) * iCharWidth ); MoveToEx( _s->hGuiDC, x, iTop, NULL ); LineTo( _s->hGuiDC, x, iBottom ); @@ -1816,12 +1816,12 @@ HB_FUNC( WVT_DRAWBUTTON ) COLORREF bkColor = !HB_ISNUM( 9 ) ? _s->COLORS[ 7 ] : ( COLORREF ) hb_parnl( 9 ) ; /* int iImageAt = hb_parni( 10 ); */ - xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - iTop = xy.y + hb_parni( 11,1 ); - iLeft = xy.x + hb_parni( 11,2 ); + xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) ); + iTop = xy.y + hb_parvni( 11,1 ); + iLeft = xy.x + hb_parvni( 11,2 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y-1 + hb_parni( 11,3 ); - iRight = xy.x-1 + hb_parni( 11,4 ); + iBottom = xy.y-1 + hb_parvni( 11,3 ); + iRight = xy.x-1 + hb_parvni( 11,4 ); lb.lbStyle = BS_SOLID; lb.lbColor = bkColor; @@ -1974,11 +1974,11 @@ HB_FUNC( WVT_DRAWSTATUSBAR ) for ( i = 0; i < iPanels; i++ ) { - xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2, iNext+2 ), ( USHORT ) hb_parni( 2, iNext+1 ) ); + xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parvni( 2, iNext+2 ), ( USHORT ) hb_parvni( 2, iNext+1 ) ); iTop = xy.y; iLeft = xy.x + 1; - xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2, iNext+4 ), ( USHORT ) hb_parni( 2, iNext+3 )+1 ); + xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parvni( 2, iNext+4 ), ( USHORT ) hb_parvni( 2, iNext+3 )+1 ); iBottom = xy.y - 1; iRight = xy.x - 2; @@ -2001,7 +2001,7 @@ HB_FUNC( WVT_DRAWSTATUSBAR ) iNext = iNext + 4; } - xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2, 4 * iPanels ), ( USHORT ) hb_parni( 2, ( 4 * iPanels ) - 1 )+1 ); + xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parvni( 2, 4 * iPanels ), ( USHORT ) hb_parvni( 2, ( 4 * iPanels ) - 1 )+1 ); iTop = xy.y - 2; iLeft = xy.x - 2; iBottom = iTop; @@ -2045,12 +2045,12 @@ HB_FUNC( WVT_DRAWPICTURE ) if ( _s->pGUI->iPicture[ iSlot ] ) { xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - iTop = xy.y + hb_parni( 6,1 ); - iLeft = xy.x + hb_parni( 6,2 ); + iTop = xy.y + hb_parvni( 6,1 ); + iLeft = xy.x + hb_parvni( 6,2 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y-1 + hb_parni( 6,3 ); - iRight = xy.x-1 + hb_parni( 6,4 ); + iBottom = xy.y-1 + hb_parvni( 6,3 ); + iRight = xy.x-1 + hb_parvni( 6,4 ); hb_retl( hb_wvt_gtRenderPicture( iLeft, iTop, iRight - iLeft + 1, iBottom - iTop + 1, _s->pGUI->iPicture[ iSlot ] ) ); } @@ -2076,8 +2076,8 @@ HB_FUNC( WVT_DRAWLABELEX ) bgClr = hb_wvt_BgColorParam( 6 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - xy.x += hb_parni( 8,2 ); - xy.y += hb_parni( 8,1 ); + xy.x += hb_parvni( 8,2 ); + xy.y += hb_parvni( 8,1 ); SetBkColor( _s->hdc, bgClr ); SetTextColor( _s->hdc, fgClr ); @@ -2119,12 +2119,12 @@ HB_FUNC( WVT_DRAWLINEEX ) int iSlot = hb_parni( 8 ) - 1; xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - iTop = xy.y + hb_parni( 9,1 ); - iLeft = xy.x + hb_parni( 9,2 ); + iTop = xy.y + hb_parvni( 9,1 ); + iLeft = xy.x + hb_parvni( 9,2 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y-1 + hb_parni( 9,4 ); - iRight = xy.x-1 + hb_parni( 9,4 ); + iBottom = xy.y-1 + hb_parvni( 9,4 ); + iRight = xy.x-1 + hb_parvni( 9,4 ); /* Resolve Parameters */ iOrient = hb_parni( 5 ); @@ -2327,12 +2327,12 @@ HB_FUNC( WVT_DRAWOUTLINEEX ) int iTop, iLeft, iBottom, iRight; int iSlot = hb_parni( 5 ) - 1; - xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - iTop = xy.y - 1 + hb_parni( 6,1 ); - iLeft = xy.x - 1 + hb_parni( 6,2 ); + xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) ); + iTop = xy.y - 1 + hb_parvni( 6,1 ); + iLeft = xy.x - 1 + hb_parvni( 6,2 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y + hb_parni( 6,3 ); - iRight = xy.x + hb_parni( 6,4 ); + iBottom = xy.y + hb_parvni( 6,3 ); + iRight = xy.x + hb_parvni( 6,4 ); if ( _s->pGUI->hUserPens[ iSlot ] ) { @@ -2371,11 +2371,11 @@ HB_FUNC( WVT_DRAWLABELOBJ ) bgClr = hb_wvt_BgColorParam( 9 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; - iTop = xy.y + hb_parni( 11,1 ); - iLeft = xy.x + hb_parni( 11,2 ); + iTop = xy.y + hb_parvni( 11,1 ); + iLeft = xy.x + hb_parvni( 11,2 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 4 ) + 1, ( USHORT ) hb_parni( 3 ) + 1 ); - iBottom = xy.y - 1 + hb_parni( 11,3 ); - iRight = xy.x - 1 + hb_parni( 11,4 ); + iBottom = xy.y - 1 + hb_parvni( 11,3 ); + iRight = xy.x - 1 + hb_parvni( 11,4 ); iAlignHorz = hb_parni( 6 ); /* default is 0 */ iAlignVert = hb_parni( 7 ); /* default is 0 */ @@ -2456,10 +2456,10 @@ HB_FUNC( WVT_DRAWTOOLBUTTONSTATE ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); switch ( hb_parni( 6 ) ) { @@ -2510,10 +2510,10 @@ HB_FUNC( WVT_DRAWSCROLLBUTTON ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); POINT * Point; POINT xy = { 0,0 }; @@ -2621,10 +2621,10 @@ HB_FUNC( WVT_DRAWSCROLLTHUMBVERT ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iTabTop, iTabLft, iTabBtm, iTabRgt; /* Background */ @@ -2677,10 +2677,10 @@ HB_FUNC( WVT_DRAWSCROLLTHUMBHORZ ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iThumbLeft, iThumbRight; iThumbLeft = _s->PTEXTSIZE.x * hb_parni( 6 ); @@ -2739,26 +2739,26 @@ HB_FUNC( WVT_DRAWSHADEDRECT ) TRIVERTEX vert[ 2 ] ; GRADIENT_RECT gRect = { 0,0 }; - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iMode = !HB_ISNUM( 6 ) ? GRADIENT_FILL_RECT_H : hb_parni( 6 ) ; vert[ 0 ].x = iLeft; vert[ 0 ].y = iTop; - vert[ 0 ].Red = ( COLOR16 ) hb_parni( 7,1 ); - vert[ 0 ].Green = ( COLOR16 ) hb_parni( 7,2 ); - vert[ 0 ].Blue = ( COLOR16 ) hb_parni( 7,3 ); - vert[ 0 ].Alpha = ( COLOR16 ) hb_parni( 7,4 ); + vert[ 0 ].Red = ( COLOR16 ) hb_parvni( 7,1 ); + vert[ 0 ].Green = ( COLOR16 ) hb_parvni( 7,2 ); + vert[ 0 ].Blue = ( COLOR16 ) hb_parvni( 7,3 ); + vert[ 0 ].Alpha = ( COLOR16 ) hb_parvni( 7,4 ); vert[ 1 ].x = iRight; vert[ 1 ].y = iBottom; - vert[ 1 ].Red = ( COLOR16 ) hb_parni( 8,1 ); - vert[ 1 ].Green = ( COLOR16 ) hb_parni( 8,2 ); - vert[ 1 ].Blue = ( COLOR16 ) hb_parni( 8,3 ); - vert[ 1 ].Alpha = ( COLOR16 ) hb_parni( 8,4 ); + vert[ 1 ].Red = ( COLOR16 ) hb_parvni( 8,1 ); + vert[ 1 ].Green = ( COLOR16 ) hb_parvni( 8,2 ); + vert[ 1 ].Blue = ( COLOR16 ) hb_parvni( 8,3 ); + vert[ 1 ].Alpha = ( COLOR16 ) hb_parvni( 8,4 ); gRect.UpperLeft = 0; gRect.LowerRight= 1; @@ -2785,10 +2785,10 @@ HB_FUNC( WVT_DRAWTEXTBOX ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iAlignHorz = hb_parni( 7 ); /* default to 0 */ int iAlignH = 0; @@ -2849,10 +2849,10 @@ HB_FUNC( WVT_DRAWPROGRESSBAR ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parni( 5,1 ); - int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parni( 5,2 ); - int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); - int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); + int iTop = ( _s->PTEXTSIZE.y * hb_parni( 1 ) ) + hb_parvni( 5,1 ); + int iLeft = ( _s->PTEXTSIZE.x * hb_parni( 2 ) ) + hb_parvni( 5,2 ); + int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); + int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iPercent, iBarUpto, iDirection; BOOL bVertical, bImage; COLORREF crBarColor; @@ -2861,7 +2861,7 @@ HB_FUNC( WVT_DRAWPROGRESSBAR ) RECT rc = { 0,0,0,0 }; iPercent = hb_parni( 6 ); - bImage = HB_ISCHAR( 9 ); + bImage = HB_ISCHAR( 9 ); bVertical = hb_parl( 10 ) ; iDirection = hb_parni( 11 ); @@ -3111,7 +3111,7 @@ HB_FUNC( WVT_SAVESCREEN ) int iTop, iLeft, iBottom, iRight, iWidth, iHeight; PHB_ITEM info = hb_itemArrayNew( 3 ); - xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; + xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) ); iTop = xy.y; iLeft = xy.x; @@ -3165,10 +3165,10 @@ HB_FUNC( WVT_RESTSCREEN ) iHeight = iBottom - iTop + 1 ; hCompDC = CreateCompatibleDC( _s->hdc ); - hBmp = (HBITMAP) SelectObject( hCompDC, ( HBITMAP ) ( HB_PTRDIFF ) hb_parnint( 5,3 ) ); + hBmp = (HBITMAP) SelectObject( hCompDC, ( HBITMAP ) ( HB_PTRDIFF ) hb_parvnint( 5,3 ) ); if ( hBmp ) { - if ( ( iWidth == hb_parni( 5,1 ) ) && ( iHeight == hb_parni( 5,2 ) ) ) + if ( ( iWidth == hb_parvni( 5,1 ) ) && ( iHeight == hb_parvni( 5,2 ) ) ) { if ( BitBlt( _s->hdc, iLeft, iTop, iWidth, iHeight, @@ -3185,8 +3185,8 @@ HB_FUNC( WVT_RESTSCREEN ) iLeft, iTop, iWidth, iHeight, hCompDC, 0, 0, - hb_parni( 5,1 ), - hb_parni( 5,2 ), + hb_parvni( 5,1 ), + hb_parvni( 5,2 ), SRCCOPY ) ) { bResult = TRUE; @@ -3198,7 +3198,7 @@ HB_FUNC( WVT_RESTSCREEN ) if ( ! bDoNotDestroyBMP ) { SelectObject( hCompDC, hBmp ); - DeleteObject( ( HBITMAP ) ( HB_PTRDIFF ) hb_parnint( 5,3 ) ); + DeleteObject( ( HBITMAP ) ( HB_PTRDIFF ) hb_parvnint( 5,3 ) ); } hb_retl( bResult ); } diff --git a/harbour/contrib/gtwvg/wvgcuig.c b/harbour/contrib/gtwvg/wvgcuig.c index 769179cf7a..393e19a915 100644 --- a/harbour/contrib/gtwvg/wvgcuig.c +++ b/harbour/contrib/gtwvg/wvgcuig.c @@ -322,10 +322,10 @@ HB_FUNC( WVG_BOXRAISED ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->gObjNext = pWVT->gObjs; pWVT->gObjs = gObj; @@ -376,10 +376,10 @@ HB_FUNC( WVG_BOXRECESSED ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->gObjNext = pWVT->gObjs; pWVT->gObjs = gObj; @@ -473,10 +473,10 @@ HB_FUNC( WVG_BOXGROUP ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->gObjNext = pWVT->gObjs; pWVT->gObjs = gObj; @@ -532,10 +532,10 @@ HB_FUNC( WVG_BOXGROUPRAISED ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->gObjNext = pWVT->gObjs; pWVT->gObjs = gObj; @@ -615,10 +615,10 @@ HB_FUNC( WVG_LABEL ) gObj->iBottom = hb_parni( 1 ); gObj->iRight = hb_parni( 2 ); - gObj->aOffset.iTop = hb_parni( 3,1 ); - gObj->aOffset.iLeft = hb_parni( 3,2 ); - gObj->aOffset.iBottom = hb_parni( 3,3 ); - gObj->aOffset.iRight = hb_parni( 3,4 ); + gObj->aOffset.iTop = hb_parvni( 3,1 ); + gObj->aOffset.iLeft = hb_parvni( 3,2 ); + gObj->aOffset.iBottom = hb_parvni( 3,3 ); + gObj->aOffset.iRight = hb_parvni( 3,4 ); #if defined( UNICODE ) gObj->lpText = HB_TCHAR_CONVTO( hb_parc( 4 ) ); @@ -653,10 +653,10 @@ HB_FUNC( WVG_LABELEX ) gObj->iBottom = hb_parni( 1 ); gObj->iRight = hb_parni( 2 ); - gObj->aOffset.iTop = hb_parni( 3,1 ); - gObj->aOffset.iLeft = hb_parni( 3,2 ); - gObj->aOffset.iBottom = hb_parni( 3,3 ); - gObj->aOffset.iRight = hb_parni( 3,4 ); + gObj->aOffset.iTop = hb_parvni( 3,1 ); + gObj->aOffset.iLeft = hb_parvni( 3,2 ); + gObj->aOffset.iBottom = hb_parvni( 3,3 ); + gObj->aOffset.iRight = hb_parvni( 3,4 ); #if defined( UNICODE ) gObj->lpText = HB_TCHAR_CONVTO( hb_parc( 4 ) ); @@ -714,10 +714,10 @@ HB_FUNC( WVG_OUTLINE ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iWidth = hb_parni( 6 ); /* iThick */ gObj->iStyle = hb_parni( 7 ); /* iShape */ @@ -753,10 +753,10 @@ HB_FUNC( WVG_OUTLINEEX ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); if ( pWVT->pGUI->hUserPens[ hb_parni( 6 )-1 ] ) { @@ -807,10 +807,10 @@ HB_FUNC( WVG_LINE ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iOrient = hb_parni( 6 ); gObj->iFormat = hb_parni( 7 ); @@ -842,10 +842,10 @@ HB_FUNC( WVG_LINEEX ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iOrient = hb_parni( 6 ); gObj->iFormat = hb_parni( 7 ); @@ -990,10 +990,10 @@ HB_FUNC( WVG_ELLIPSE ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->hPen = pWVT->currentPen; gObj->bDestroyPen = FALSE; @@ -1030,10 +1030,10 @@ HB_FUNC( WVG_RECTANGLE ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->hPen = pWVT->currentPen; gObj->bDestroyPen = FALSE; @@ -1070,10 +1070,10 @@ HB_FUNC( WVG_ROUNDRECT ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iHeight = hb_parni( 6 ); gObj->iWidth = hb_parni( 7 ); @@ -1117,10 +1117,10 @@ HB_FUNC( WVG_COLORRECT ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->hBrush = hBrush; gObj->bDestroyBrush = TRUE; @@ -1155,26 +1155,26 @@ HB_FUNC( WVG_SHADEDRECT ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iData = !HB_ISNUM( 6 ) ? GRADIENT_FILL_RECT_H : hb_parni( 6 ) ; gObj->vert[ 0 ].x = 0; gObj->vert[ 0 ].y = 0; - gObj->vert[ 0 ].Red = ( COLOR16 ) hb_parni( 7,1 ); - gObj->vert[ 0 ].Green = ( COLOR16 ) hb_parni( 7,2 ); - gObj->vert[ 0 ].Blue = ( COLOR16 ) hb_parni( 7,3 ); - gObj->vert[ 0 ].Alpha = ( COLOR16 ) hb_parni( 7,4 ); + gObj->vert[ 0 ].Red = ( COLOR16 ) hb_parvni( 7,1 ); + gObj->vert[ 0 ].Green = ( COLOR16 ) hb_parvni( 7,2 ); + gObj->vert[ 0 ].Blue = ( COLOR16 ) hb_parvni( 7,3 ); + gObj->vert[ 0 ].Alpha = ( COLOR16 ) hb_parvni( 7,4 ); gObj->vert[ 1 ].x = 0; gObj->vert[ 1 ].y = 0; - gObj->vert[ 1 ].Red = ( COLOR16 ) hb_parni( 8,1 ); - gObj->vert[ 1 ].Green = ( COLOR16 ) hb_parni( 8,2 ); - gObj->vert[ 1 ].Blue = ( COLOR16 ) hb_parni( 8,3 ); - gObj->vert[ 1 ].Alpha = ( COLOR16 ) hb_parni( 8,4 ); + gObj->vert[ 1 ].Red = ( COLOR16 ) hb_parvni( 8,1 ); + gObj->vert[ 1 ].Green = ( COLOR16 ) hb_parvni( 8,2 ); + gObj->vert[ 1 ].Blue = ( COLOR16 ) hb_parvni( 8,3 ); + gObj->vert[ 1 ].Alpha = ( COLOR16 ) hb_parvni( 8,4 ); gObj->gObjNext = pWVT->gObjs; pWVT->gObjs = gObj; @@ -1217,10 +1217,10 @@ HB_FUNC( WVG_TEXTBOX ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->lpText = HB_TCHAR_CONVTO( hb_parc( 6 ) ); @@ -1288,10 +1288,10 @@ HB_FUNC( WVG_PICTURE ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iPicture = pWVT->pGUI->iPicture[ hb_parni( 6 )-1 ]; gObj->bDestroyPicture = FALSE; @@ -1351,10 +1351,10 @@ HB_FUNC( WVG_IMAGE ) gObj->iBottom = hb_parni( 3 ); gObj->iRight = hb_parni( 4 ); - gObj->aOffset.iTop = hb_parni( 5,1 ); - gObj->aOffset.iLeft = hb_parni( 5,2 ); - gObj->aOffset.iBottom = hb_parni( 5,3 ); - gObj->aOffset.iRight = hb_parni( 5,4 ); + gObj->aOffset.iTop = hb_parvni( 5,1 ); + gObj->aOffset.iLeft = hb_parvni( 5,2 ); + gObj->aOffset.iBottom = hb_parvni( 5,3 ); + gObj->aOffset.iRight = hb_parvni( 5,4 ); gObj->iPicture = iPicture; diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 5415c1161d..09ad9e9335 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -181,29 +181,28 @@ HB_FUNC( WVT_CHOOSEFONT ) PointSize = -MulDiv( lf.lfHeight, 72, GetDeviceCaps( _s->hdc, LOGPIXELSY ) ) ; hb_reta( 8 ); - hb_storc( szFaceName , -1, 1 ); - hb_stornl( ( LONG ) PointSize, -1, 2 ); - hb_storni( lf.lfWidth , -1, 3 ); - hb_storni( lf.lfWeight , -1, 4 ); - hb_storni( lf.lfQuality , -1, 5 ); - hb_storl( lf.lfItalic , -1, 6 ); - hb_storl( lf.lfUnderline , -1, 7 ); - hb_storl( lf.lfStrikeOut , -1, 8 ); + hb_storvc( szFaceName , -1, 1 ); + hb_storvnl( ( LONG ) PointSize, -1, 2 ); + hb_storvni( lf.lfWidth , -1, 3 ); + hb_storvni( lf.lfWeight , -1, 4 ); + hb_storvni( lf.lfQuality , -1, 5 ); + hb_storvl( lf.lfItalic , -1, 6 ); + hb_storvl( lf.lfUnderline , -1, 7 ); + hb_storvl( lf.lfStrikeOut , -1, 8 ); HB_TCHAR_FREE( szFaceName ); } else { hb_reta( 8 ); - - hb_storc( "" , -1, 1 ); - hb_stornl( ( LONG ) 0, -1, 2 ); - hb_storni( 0 , -1, 3 ); - hb_storni( 0 , -1, 4 ); - hb_storni( 0 , -1, 5 ); - hb_storl( 0 , -1, 6 ); - hb_storl( 0 , -1, 7 ); - hb_storl( 0 , -1, 8 ); + hb_storvc( "" , -1, 1 ); + hb_storvnl( ( LONG ) 0, -1, 2 ); + hb_storvni( 0 , -1, 3 ); + hb_storvni( 0 , -1, 4 ); + hb_storvni( 0 , -1, 5 ); + hb_storvl( 0 , -1, 6 ); + hb_storvl( 0 , -1, 7 ); + hb_storvl( 0 , -1, 8 ); } return ; @@ -224,7 +223,7 @@ HB_FUNC( WVT_CHOOSECOLOR ) for( i = 0 ; i < 16 ; i++ ) { - crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ) ; + crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parvnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ) ; } cc.lStructSize = sizeof( CHOOSECOLOR ) ; @@ -1148,7 +1147,7 @@ HB_FUNC( WVT_CREATEDIALOGMODAL ) HB_FUNC( WVT__MAKEDLGTEMPLATE ) { WORD *p, *pdlgtemplate ; - WORD nItems = ( WORD ) hb_parni( 1, 4 ) ; + WORD nItems = ( WORD ) hb_parvni( 1, 4 ) ; int i, nchar ; DWORD lStyle ; @@ -1160,32 +1159,32 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE ) /* */ pdlgtemplate = p = ( PWORD ) LocalAlloc( LPTR, 65534 ) ; - lStyle = hb_parnl(1,3) ; + lStyle = hb_parvnl(1,3) ; /* start to fill in the dlgtemplate information. addressing by WORDs */ - *p++ = 1 ; /* version */ - *p++ = 0xFFFF ; /* signature */ - *p++ = LOWORD ( hb_parnl(1,1) ) ; /* Help Id */ - *p++ = HIWORD ( hb_parnl(1,1) ) ; + *p++ = 1 ; /* version */ + *p++ = 0xFFFF ; /* signature */ + *p++ = LOWORD ( hb_parvnl(1,1) ) ; /* Help Id */ + *p++ = HIWORD ( hb_parvnl(1,1) ) ; - *p++ = LOWORD ( hb_parnl(1,2) ) ; /* ext. style */ - *p++ = HIWORD ( hb_parnl(1,2) ) ; + *p++ = LOWORD ( hb_parvnl(1,2) ) ; /* ext. style */ + *p++ = HIWORD ( hb_parvnl(1,2) ) ; - *p++ = LOWORD (lStyle) ; - *p++ = HIWORD (lStyle) ; + *p++ = LOWORD (lStyle) ; + *p++ = HIWORD (lStyle) ; - *p++ = (WORD) nItems ; /* NumberOfItems */ - *p++ = (short) hb_parni(1,5) ; /* x */ - *p++ = (short) hb_parni(1,6) ; /* y */ - *p++ = (short) hb_parni(1,7) ; /* cx */ - *p++ = (short) hb_parni(1,8) ; /* cy */ - *p++ = (short) 0 ; /* Menu (ignored for now.) */ - *p++ = (short) 0x00 ; /* Class also ignored */ + *p++ = (WORD) nItems ; /* NumberOfItems */ + *p++ = (short) hb_parvni(1,5) ; /* x */ + *p++ = (short) hb_parvni(1,6) ; /* y */ + *p++ = (short) hb_parvni(1,7) ; /* cx */ + *p++ = (short) hb_parvni(1,8) ; /* cy */ + *p++ = (short) 0 ; /* Menu (ignored for now.) */ + *p++ = (short) 0x00 ; /* Class also ignored */ if ( hb_parinfa( 1,11 ) == HB_IT_STRING ) { - nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parc( 1,11 ) ) ; + nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 1,11 ) ) ; p += nchar ; } else @@ -1196,11 +1195,11 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE ) if ( ( lStyle & DS_SETFONT ) ) { - *p++ = (short) hb_parni(1,12) ; - *p++ = (short) hb_parni(1,13) ; - *p++ = (short) hb_parni(1,14) ; + *p++ = (short) hb_parvni(1,12) ; + *p++ = (short) hb_parvni(1,13) ; + *p++ = (short) hb_parvni(1,14) ; - nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parc( 1,15 ) ) ; + nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 1,15 ) ) ; p += nchar ; } ; @@ -1208,43 +1207,43 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE ) /* make sure each item starts on a DWORD boundary */ p = lpwAlign (p) ; - *p++ = LOWORD ( hb_parnl(2,i) ) ; /* help id */ - *p++ = HIWORD ( hb_parnl(2,i) ) ; + *p++ = LOWORD ( hb_parvnl(2,i) ) ; /* help id */ + *p++ = HIWORD ( hb_parvnl(2,i) ) ; - *p++ = LOWORD ( hb_parnl(3,i) ) ; /* ext. style */ - *p++ = HIWORD ( hb_parnl(3,i) ) ; + *p++ = LOWORD ( hb_parvnl(3,i) ) ; /* ext. style */ + *p++ = HIWORD ( hb_parvnl(3,i) ) ; - *p++ = LOWORD ( hb_parnl(4,i) ) ; /* style */ - *p++ = HIWORD ( hb_parnl(4,i) ) ; + *p++ = LOWORD ( hb_parvnl(4,i) ) ; /* style */ + *p++ = HIWORD ( hb_parvnl(4,i) ) ; - *p++ = (short) hb_parni(5,i) ; /* x */ - *p++ = (short) hb_parni(6,i) ; /* y */ - *p++ = (short) hb_parni(7,i) ; /* cx */ - *p++ = (short) hb_parni(8,i) ; /* cy */ + *p++ = (short) hb_parvni(5,i) ; /* x */ + *p++ = (short) hb_parvni(6,i) ; /* y */ + *p++ = (short) hb_parvni(7,i) ; /* cx */ + *p++ = (short) hb_parvni(8,i) ; /* cy */ - *p++ = LOWORD ( hb_parnl(9,i) ) ; /* id */ - *p++ = HIWORD ( hb_parnl(9,i) ) ; /* id */ + *p++ = LOWORD ( hb_parvnl(9,i) ) ; /* id */ + *p++ = HIWORD ( hb_parvnl(9,i) ) ; /* id */ if ( hb_parinfa( 10,i ) == HB_IT_STRING ) { - nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parc( 10,i ) ) ; /* class */ + nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 10,i ) ) ; /* class */ p += nchar ; } else { *p++ = 0xFFFF ; - *p++ = (WORD) hb_parni(10,i) ; + *p++ = (WORD) hb_parvni(10,i) ; } if ( hb_parinfa( 11,i ) == HB_IT_STRING ) { - nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parc( 11,i ) ) ; /* text */ + nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 11,i ) ) ; /* text */ p += nchar ; } else { *p++ = 0xFFFF ; - *p++ = (WORD) hb_parni(11,i) ; + *p++ = (WORD) hb_parvni(11,i) ; } *p++ = 0x00 ; /* extras ( in array 12 ) */ diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 81cdcdf1f7..6a13711c5f 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -350,10 +350,10 @@ HB_FUNC( WVG_INVALIDATERECT ) { RECT rc = { 0, 0, 0, 0 }; - rc.left = hb_parni( 2, 1 ); - rc.top = hb_parni( 2, 2 ); - rc.right = hb_parni( 2, 3 ); - rc.bottom = hb_parni( 2, 4 ); + rc.left = hb_parvni( 2, 1 ); + rc.top = hb_parvni( 2, 2 ); + rc.right = hb_parvni( 2, 3 ); + rc.bottom = hb_parvni( 2, 4 ); hb_retl( InvalidateRect( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), &rc, TRUE ) ); } @@ -478,10 +478,10 @@ HB_FUNC( WVG_DRAWTEXT ) RECT rc = { 0,0,0,0 }; LPTSTR lpBuffer = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); - rc.left = hb_parni( 3,1 ); - rc.top = hb_parni( 3,2 ); - rc.right = hb_parni( 3,3 ); - rc.bottom = hb_parni( 3,4 ); + rc.left = hb_parvni( 3,1 ); + rc.top = hb_parvni( 3,2 ); + rc.right = hb_parvni( 3,3 ); + rc.bottom = hb_parvni( 3,4 ); hb_retl( DrawText( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), lpBuffer, lstrlen( lpBuffer ), &rc, hb_parni( 4 ) ) ); HB_TCHAR_FREE( lpBuffer ); @@ -675,7 +675,7 @@ HB_FUNC( WVG_CHOOSECOLOR ) int i; for( i = 0; i < ( int ) HB_SIZEOFARRAY( crCustClr ); i++ ) - crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); + crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parvnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); cc.lStructSize = sizeof( CHOOSECOLOR ); cc.hwndOwner = HB_ISNUM( 4 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 4 ) : NULL; diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index 658fa817c4..fc0a0e7b4a 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -954,20 +954,20 @@ HB_FUNC( WVG_FONTCREATE ) memset( &lf, 0, sizeof( LOGFONT ) ); - HB_TCHAR_CPTO( lf.lfFaceName, hb_parcx( 1, 1 ), sizeof( lf.lfFaceName ) - 1 ); - lf.lfHeight = ( LONG ) hb_parnl( 1, 2 ); - lf.lfWidth = ( LONG ) hb_parnl( 1, 3 ); - lf.lfWeight = ( LONG ) hb_parnl( 1, 4 ); - lf.lfItalic = ( BYTE ) hb_parl( 1, 5 ); - lf.lfUnderline = ( BYTE ) hb_parl( 1, 6 ); - lf.lfStrikeOut = ( BYTE ) hb_parl( 1, 7 ); - lf.lfCharSet = ( BYTE ) hb_parni( 1, 8 ); - lf.lfEscapement = ( BYTE ) hb_parni( 1, 9 ); - lf.lfOrientation = ( BYTE ) hb_parni( 1,10 ); - lf.lfOutPrecision = ( BYTE ) hb_parni( 1,11 ); - lf.lfClipPrecision = ( BYTE ) hb_parni( 1,12 ); - lf.lfQuality = ( BYTE ) hb_parni( 1,13 ); - lf.lfPitchAndFamily = ( BYTE ) hb_parni( 1,14 ); + HB_TCHAR_CPTO( lf.lfFaceName, hb_parvcx( 1, 1 ), sizeof( lf.lfFaceName ) - 1 ); + lf.lfHeight = ( LONG ) hb_parvnl( 1, 2 ); + lf.lfWidth = ( LONG ) hb_parvnl( 1, 3 ); + lf.lfWeight = ( LONG ) hb_parvnl( 1, 4 ); + lf.lfItalic = ( BYTE ) hb_parvl( 1, 5 ); + lf.lfUnderline = ( BYTE ) hb_parvl( 1, 6 ); + lf.lfStrikeOut = ( BYTE ) hb_parvl( 1, 7 ); + lf.lfCharSet = ( BYTE ) hb_parvni( 1, 8 ); + lf.lfEscapement = ( BYTE ) hb_parvni( 1, 9 ); + lf.lfOrientation = ( BYTE ) hb_parvni( 1,10 ); + lf.lfOutPrecision = ( BYTE ) hb_parvni( 1,11 ); + lf.lfClipPrecision = ( BYTE ) hb_parvni( 1,12 ); + lf.lfQuality = ( BYTE ) hb_parvni( 1,13 ); + lf.lfPitchAndFamily = ( BYTE ) hb_parvni( 1,14 ); hFont = CreateFontIndirect( &lf ); @@ -1133,10 +1133,10 @@ HB_FUNC( WVG_FILLRECT ) { RECT rc; - rc.left = hb_parni( 2,1 ); - rc.top = hb_parni( 2,2 ); - rc.right = hb_parni( 2,3 ); - rc.bottom = hb_parni( 2,4 ); + rc.left = hb_parvni( 2,1 ); + rc.top = hb_parvni( 2,2 ); + rc.right = hb_parvni( 2,3 ); + rc.bottom = hb_parvni( 2,4 ); FillRect( wapi_par_HDC( 1 ), &rc, wapi_par_HBRUSH( 3 ) ); } diff --git a/harbour/contrib/hbhpdf/harupdf.c b/harbour/contrib/hbhpdf/harupdf.c index ae5bdf5c91..b1d4cd9965 100644 --- a/harbour/contrib/hbhpdf/harupdf.c +++ b/harbour/contrib/hbhpdf/harupdf.c @@ -522,12 +522,12 @@ HB_FUNC( HPDF_SETINFODATEATTR ) memset( &date, 0, sizeof( date ) ); - date.year = hb_parni( 3, 1 ); - date.month = hb_parni( 3, 2 ); - date.day = hb_parni( 3, 3 ); - date.hour = hb_parni( 3, 4 ); - date.minutes = hb_parni( 3, 5 ); - date.seconds = hb_parni( 3, 6 ); + date.year = hb_parvni( 3, 1 ); + date.month = hb_parvni( 3, 2 ); + date.day = hb_parvni( 3, 3 ); + date.hour = hb_parvni( 3, 4 ); + date.minutes = hb_parvni( 3, 5 ); + date.seconds = hb_parvni( 3, 6 ); date.ind = ' '; hb_retnl( ( long ) HPDF_SetInfoDateAttr( HPDF_Doc_par( 1 ), ( HPDF_InfoType ) hb_parni( 2 ), date ) ); @@ -652,10 +652,10 @@ HB_FUNC( HPDF_PAGE_CREATETEXTANNOT ) { HPDF_Rect rc; - rc.left = ( HPDF_REAL ) hb_parnd( 2, 1 ); - rc.top = ( HPDF_REAL ) hb_parnd( 2, 2 ); - rc.right = ( HPDF_REAL ) hb_parnd( 2, 3 ); - rc.bottom = ( HPDF_REAL ) hb_parnd( 2, 4 ); + rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 ); + rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 ); + rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 ); + rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 ); hb_retptr( HPDF_Page_CreateTextAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) ); } @@ -666,10 +666,10 @@ HB_FUNC( HPDF_PAGE_CREATELINKANNOT ) { HPDF_Rect rc; - rc.left = ( HPDF_REAL ) hb_parnd( 2, 1 ); - rc.top = ( HPDF_REAL ) hb_parnd( 2, 2 ); - rc.right = ( HPDF_REAL ) hb_parnd( 2, 3 ); - rc.bottom = ( HPDF_REAL ) hb_parnd( 2, 4 ); + rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 ); + rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 ); + rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 ); + rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 ); hb_retptr( HPDF_Page_CreateLinkAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, ( HPDF_Destination ) hb_parptr( 3 ) ) ); } @@ -680,10 +680,10 @@ HB_FUNC( HPDF_PAGE_CREATEURILINKANNOT ) { HPDF_Rect rc; - rc.left = ( HPDF_REAL ) hb_parnd( 2, 1 ); - rc.top = ( HPDF_REAL ) hb_parnd( 2, 2 ); - rc.right = ( HPDF_REAL ) hb_parnd( 2, 3 ); - rc.bottom = ( HPDF_REAL ) hb_parnd( 2, 4 ); + rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 ); + rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 ); + rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 ); + rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 ); hb_retptr( HPDF_Page_CreateURILinkAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ) ) ); } @@ -1060,7 +1060,7 @@ HB_FUNC( HPDF_PAGE_SETDASH ) int i; for ( i = 0; i < nPtns; i++ ) - dash.ptn[ i ] = ( HPDF_UINT16 ) hb_parni( 2, i+1 ); + dash.ptn[ i ] = ( HPDF_UINT16 ) hb_parvni( 2, i+1 ); hb_retnl( ( long ) HPDF_Page_SetDash( ( HPDF_Page ) hb_parptr( 1 ), dash.ptn, nPtns, hb_parni( 4 ) ) ); } diff --git a/harbour/contrib/hbmisc/hb_f.c b/harbour/contrib/hbmisc/hb_f.c index 6dac06d071..a73e40d197 100644 --- a/harbour/contrib/hbmisc/hb_f.c +++ b/harbour/contrib/hbmisc/hb_f.c @@ -306,12 +306,12 @@ HB_FUNC( HB_FSELECT ) HB_FUNC( HB_FINFO ) /* used for debugging */ { hb_reta( 6 ); - hb_storni( area+1, -1, 1); - hb_storni( last_rec[area], -1, 2); - hb_storni( recno[area], -1, 3); - hb_storni( offset[area], -1, 4); - hb_storni( lastbyte[area], -1, 5); - hb_storl ( isEof[area], -1, 6); + hb_storvni( area+1, -1, 1); + hb_storvni( last_rec[area], -1, 2); + hb_storvni( recno[area], -1, 3); + hb_storvni( offset[area], -1, 4); + hb_storvni( lastbyte[area], -1, 5); + hb_storvl ( isEof[area], -1, 6); } HB_FUNC( HB_FREADANDSKIP ) diff --git a/harbour/contrib/hbnf/dispc.c b/harbour/contrib/hbnf/dispc.c index ce88584975..0539636d16 100644 --- a/harbour/contrib/hbnf/dispc.c +++ b/harbour/contrib/hbnf/dispc.c @@ -589,7 +589,7 @@ HB_FUNC( _FT_DFINIT ) if (kcount > 24) kcount = 24; for (i = 1; i <= kcount; i++) - keylist[i - 1] = hb_parni( 9, i ); /* get exit key list */ + keylist[i - 1] = hb_parvni( 9, i ); /* get exit key list */ } else { diff --git a/harbour/contrib/hbnf/getenvrn.c b/harbour/contrib/hbnf/getenvrn.c index fdebe9b0e8..7e9028d512 100644 --- a/harbour/contrib/hbnf/getenvrn.c +++ b/harbour/contrib/hbnf/getenvrn.c @@ -158,7 +158,7 @@ HB_FUNC( FT_GETE ) } else if( rettype == ARRAYTYPE ) /* store string to next array element */ - hb_storc( environ[x], 1, x + 1 ); + hb_storvc( environ[x], 1, x + 1 ); } if( rettype == CHARTYPE ) @@ -226,7 +226,7 @@ HB_FUNC( FT_GETE ) if( rettype == ARRAYTYPE ) /* store string to next array element */ - hb_storc( ( char * ) sCurEnv, 1, x + 1 ); + hb_storvc( ( char * ) sCurEnv, 1, x + 1 ); x++; while( *sCurEnv ) sCurEnv++; diff --git a/harbour/contrib/hbnf/mouse.c b/harbour/contrib/hbnf/mouse.c index cdf3e66f13..1ab7aab765 100644 --- a/harbour/contrib/hbnf/mouse.c +++ b/harbour/contrib/hbnf/mouse.c @@ -489,16 +489,16 @@ HB_FUNC( _M_MBUTREL ) HB_DOS_INT86( 0x33, ®s, ®s ); hb_reta( 4 ); - hb_storni( regs.HB_XREGS.bx, -1, 1 ); - hb_storni( regs.HB_XREGS.cx, -1, 2 ); - hb_storni( regs.HB_XREGS.dx, -1, 3 ); - hb_storni( regs.HB_XREGS.ax, -1, 4 ); + hb_storvni( regs.HB_XREGS.bx, -1, 1 ); + hb_storvni( regs.HB_XREGS.cx, -1, 2 ); + hb_storvni( regs.HB_XREGS.dx, -1, 3 ); + hb_storvni( regs.HB_XREGS.ax, -1, 4 ); #else hb_reta( 4 ); - hb_storni( 0, -1, 1 ); - hb_storni( 0, -1, 2 ); - hb_storni( 0, -1, 3 ); - hb_storni( 0, -1, 4 ); + hb_storvni( 0, -1, 1 ); + hb_storvni( 0, -1, 2 ); + hb_storvni( 0, -1, 3 ); + hb_storvni( 0, -1, 4 ); #endif } diff --git a/harbour/contrib/hbwin/wapi_commctrl.c b/harbour/contrib/hbwin/wapi_commctrl.c index 064e19a030..4567b7c945 100644 --- a/harbour/contrib/hbwin/wapi_commctrl.c +++ b/harbour/contrib/hbwin/wapi_commctrl.c @@ -616,17 +616,17 @@ HB_FUNC( WAPI_TABCTRL_ADJUSTRECT ) { RECT rc; - rc.left = hb_parnl( 3, 1 ); - rc.top = hb_parnl( 3, 2 ); - rc.right = hb_parnl( 3, 3 ); - rc.bottom = hb_parnl( 3, 4 ); + rc.left = hb_parvnl( 3, 1 ); + rc.top = hb_parvnl( 3, 2 ); + rc.right = hb_parvnl( 3, 3 ); + rc.bottom = hb_parvnl( 3, 4 ); ( void ) TabCtrl_AdjustRect( wapi_par_HWND( 1 ), wapi_par_BOOL( 2 ), &rc ); - hb_stornl( rc.left , 3, 1 ); - hb_stornl( rc.top , 3, 2 ); - hb_stornl( rc.right , 3, 3 ); - hb_stornl( rc.bottom, 3, 4 ); + hb_storvnl( rc.left , 3, 1 ); + hb_storvnl( rc.top , 3, 2 ); + hb_storvnl( rc.right , 3, 3 ); + hb_storvnl( rc.bottom, 3, 4 ); } } /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 192001931a..d22857ffb5 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -5103,7 +5103,7 @@ HB_FUNC( ADSCUSTOMIZEAOF ) if( HB_ISARRAY( 1 ) ) /* convert array of recnos to C array */ { for( ulRecord = 0; ulRecord < u32NumRecs; ulRecord++ ) - pu32Records[ ulRecord ] = hb_parnl( 1, ulRecord + 1 ); + pu32Records[ ulRecord ] = hb_parvnl( 1, ulRecord + 1 ); } else pu32Records[ 0 ] = ulRecord; diff --git a/harbour/contrib/rddads/adsfunc.c b/harbour/contrib/rddads/adsfunc.c index 1698877064..afb2cad85d 100644 --- a/harbour/contrib/rddads/adsfunc.c +++ b/harbour/contrib/rddads/adsfunc.c @@ -256,9 +256,9 @@ HB_FUNC( ADSGETSERVERTIME ) &pusTimeBufLen ) == AE_SUCCESS ) { hb_reta( 3 ); - hb_storc( ( char * ) pucDateBuf, -1, 1 ); - hb_storc( ( char * ) pucTimeBuf, -1, 2 ); - hb_stornl( plTime, -1, 3 ); + hb_storvc( ( char * ) pucDateBuf, -1, 1 ); + hb_storvc( ( char * ) pucTimeBuf, -1, 2 ); + hb_storvnl( plTime, -1, 3 ); } /* QUESTION: Returning NIL on error. Is this what we want? [vszakats] */ #if HB_TR_LEVEL >= HB_TR_DEBUG diff --git a/harbour/contrib/rddads/adsmgmnt.c b/harbour/contrib/rddads/adsmgmnt.c index f04d700216..4ed0e5d2ef 100644 --- a/harbour/contrib/rddads/adsmgmnt.c +++ b/harbour/contrib/rddads/adsmgmnt.c @@ -112,14 +112,14 @@ HB_FUNC( ADSMGGETINSTALLINFO ) &usStructSize ) == AE_SUCCESS ) { hb_reta( 8 ); - hb_stornl( stInstallInfo.ulUserOption , -1, 1 ); /* User option purchased */ - hb_storc( ( char * ) stInstallInfo.aucRegisteredOwner, -1, 2 ); /* Registered owner */ - hb_storc( ( char * ) stInstallInfo.aucVersionStr , -1, 3 ); /* Advantage version */ - hb_storc( ( char * ) stInstallInfo.aucInstallDate , -1, 4 ); /* Install date string */ - hb_storc( ( char * ) stInstallInfo.aucOemCharName , -1, 5 ); /* OEM char language */ - hb_storc( ( char * ) stInstallInfo.aucAnsiCharName , -1, 6 ); /* ANSI char language */ - hb_storc( ( char * ) stInstallInfo.aucEvalExpireDate , -1, 7 ); /* Eval expiration date */ - hb_storc( ( char * ) stInstallInfo.aucSerialNumber , -1, 8 ); /* Serial number string */ + hb_storvnl( stInstallInfo.ulUserOption , -1, 1 ); /* User option purchased */ + hb_storvc( ( char * ) stInstallInfo.aucRegisteredOwner, -1, 2 ); /* Registered owner */ + hb_storvc( ( char * ) stInstallInfo.aucVersionStr , -1, 3 ); /* Advantage version */ + hb_storvc( ( char * ) stInstallInfo.aucInstallDate , -1, 4 ); /* Install date string */ + hb_storvc( ( char * ) stInstallInfo.aucOemCharName , -1, 5 ); /* OEM char language */ + hb_storvc( ( char * ) stInstallInfo.aucAnsiCharName , -1, 6 ); /* ANSI char language */ + hb_storvc( ( char * ) stInstallInfo.aucEvalExpireDate , -1, 7 ); /* Eval expiration date */ + hb_storvc( ( char * ) stInstallInfo.aucSerialNumber , -1, 8 ); /* Serial number string */ } else hb_reta( 0 ); @@ -151,80 +151,80 @@ HB_FUNC( ADSMGGETACTIVITYINFO ) case 3: hb_reta( 4 ); /* Length of time ADS has been up */ - hb_stornl( stActivityInfo.stUpTime.usDays, -1, 1 ); - hb_stornl( stActivityInfo.stUpTime.usHours, -1, 2 ); - hb_stornl( stActivityInfo.stUpTime.usMinutes, -1, 3 ); - hb_stornl( stActivityInfo.stUpTime.usSeconds, -1, 4 ); + hb_storvnl( stActivityInfo.stUpTime.usDays, -1, 1 ); + hb_storvnl( stActivityInfo.stUpTime.usHours, -1, 2 ); + hb_storvnl( stActivityInfo.stUpTime.usMinutes, -1, 3 ); + hb_storvnl( stActivityInfo.stUpTime.usSeconds, -1, 4 ); break; case 4: hb_reta( 3 ); /* Users in use, max, rejected */ - hb_stornl( stActivityInfo.stUsers.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stUsers.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stUsers.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stUsers.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stUsers.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stUsers.ulRejected, -1, 3 ); break; case 5: hb_reta( 3 ); /* Conns in use, max, rejected */ - hb_stornl( stActivityInfo.stConnections.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stConnections.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stConnections.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stConnections.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stConnections.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stConnections.ulRejected, -1, 3 ); break; case 6: hb_reta( 3 ); /* WAs in use, max, rejected */ - hb_stornl( stActivityInfo.stWorkAreas.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stWorkAreas.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stWorkAreas.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stWorkAreas.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stWorkAreas.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stWorkAreas.ulRejected, -1, 3 ); break; case 7: hb_reta( 3 ); /* Tables in use, max, rejected */ - hb_stornl( stActivityInfo.stTables.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stTables.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stTables.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stTables.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stTables.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stTables.ulRejected, -1, 3 ); break; case 8: hb_reta( 3 ); /* Indexes in use, max, rejected */ - hb_stornl( stActivityInfo.stIndexes.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stIndexes.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stIndexes.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stIndexes.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stIndexes.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stIndexes.ulRejected, -1, 3 ); break; case 9: hb_reta( 3 ); /* Locks in use, max, rejected */ - hb_stornl( stActivityInfo.stLocks.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stLocks.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stLocks.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stLocks.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stLocks.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stLocks.ulRejected, -1, 3 ); break; case 10: hb_reta( 3 ); /* TPS header elems in use, max */ - hb_stornl( stActivityInfo.stTpsHeaderElems.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stTpsHeaderElems.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stTpsHeaderElems.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stTpsHeaderElems.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stTpsHeaderElems.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stTpsHeaderElems.ulRejected, -1, 3 ); break; case 11: hb_reta( 3 ); /* TPS vis elems in use, max */ - hb_stornl( stActivityInfo.stTpsVisElems.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stTpsVisElems.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stTpsVisElems.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stTpsVisElems.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stTpsVisElems.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stTpsVisElems.ulRejected, -1, 3 ); break; case 12: hb_reta( 3 ); /* TPS memo elems in use, max */ - hb_stornl( stActivityInfo.stTpsMemoElems.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stTpsMemoElems.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stTpsMemoElems.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stTpsMemoElems.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stTpsMemoElems.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stTpsMemoElems.ulRejected, -1, 3 ); break; case 13: hb_reta( 3 ); /* Worker threads in use, max */ - hb_stornl( stActivityInfo.stWorkerThreads.ulInUse, -1, 1 ); - hb_stornl( stActivityInfo.stWorkerThreads.ulMaxUsed, -1, 2 ); - hb_stornl( stActivityInfo.stWorkerThreads.ulRejected, -1, 3 ); + hb_storvnl( stActivityInfo.stWorkerThreads.ulInUse, -1, 1 ); + hb_storvnl( stActivityInfo.stWorkerThreads.ulMaxUsed, -1, 2 ); + hb_storvnl( stActivityInfo.stWorkerThreads.ulRejected, -1, 3 ); break; default: @@ -250,17 +250,17 @@ HB_FUNC( ADSMGGETCOMMSTATS ) &usStructSize ) == AE_SUCCESS ) { hb_reta( 11 ); - hb_stornd( stCommStats.dPercentCheckSums , -1, 1 ); /* % of pkts with checksum failures */ - hb_stornl( stCommStats.ulTotalPackets , -1, 2 ); /* Total packets received */ - hb_stornl( stCommStats.ulRcvPktOutOfSeq , -1, 3 ); /* Receive packets out of sequence */ - hb_stornl( stCommStats.ulNotLoggedIn , -1, 4 ); /* Packet owner not logged in */ - hb_stornl( stCommStats.ulRcvReqOutOfSeq , -1, 5 ); /* Receive requests out of sequence */ - hb_stornl( stCommStats.ulCheckSumFailures , -1, 6 ); /* Checksum failures */ - hb_stornl( stCommStats.ulDisconnectedUsers, -1, 7 ); /* Server initiated disconnects */ - hb_stornl( stCommStats.ulPartialConnects , -1, 8 ); /* Removed partial connections */ - hb_stornl( stCommStats.ulInvalidPackets , -1, 9 ); /* Rcvd invalid packets (NT only) */ - hb_stornl( stCommStats.ulRecvFromErrors , -1, 10 ); /* RecvFrom failed (NT only) */ - hb_stornl( stCommStats.ulSendToErrors , -1, 11 ); /* SendTo failed (NT only) */ + hb_storvnd( stCommStats.dPercentCheckSums , -1, 1 ); /* % of pkts with checksum failures */ + hb_storvnl( stCommStats.ulTotalPackets , -1, 2 ); /* Total packets received */ + hb_storvnl( stCommStats.ulRcvPktOutOfSeq , -1, 3 ); /* Receive packets out of sequence */ + hb_storvnl( stCommStats.ulNotLoggedIn , -1, 4 ); /* Packet owner not logged in */ + hb_storvnl( stCommStats.ulRcvReqOutOfSeq , -1, 5 ); /* Receive requests out of sequence */ + hb_storvnl( stCommStats.ulCheckSumFailures , -1, 6 ); /* Checksum failures */ + hb_storvnl( stCommStats.ulDisconnectedUsers, -1, 7 ); /* Server initiated disconnects */ + hb_storvnl( stCommStats.ulPartialConnects , -1, 8 ); /* Removed partial connections */ + hb_storvnl( stCommStats.ulInvalidPackets , -1, 9 ); /* Rcvd invalid packets (NT only) */ + hb_storvnl( stCommStats.ulRecvFromErrors , -1, 10 ); /* RecvFrom failed (NT only) */ + hb_storvnl( stCommStats.ulSendToErrors , -1, 11 ); /* SendTo failed (NT only) */ } else hb_reta( 0 ); @@ -293,59 +293,59 @@ HB_FUNC( ADSMGGETCONFIGINFO ) { case 0: hb_reta( 25 ); - hb_stornl( stConfigValues.ulNumConnections , -1, 1 ); /* number connections */ - hb_stornl( stConfigValues.ulNumWorkAreas , -1, 2 ); /* number work areas */ - hb_stornl( stConfigValues.ulNumTables , -1, 3 ); /* number tables */ - hb_stornl( stConfigValues.ulNumIndexes , -1, 4 ); /* number indexes */ - hb_stornl( stConfigValues.ulNumLocks , -1, 5 ); /* number locks */ - hb_stornl( stConfigValues.ulUserBufferSize , -1, 6 ); /* user buffer */ - hb_stornl( stConfigValues.ulStatDumpInterval , -1, 7 ); /* statistics dump interval */ - hb_stornl( stConfigValues.ulErrorLogMax , -1, 8 ); /* max size of error log */ - hb_stornl( stConfigValues.ulNumTPSHeaderElems , -1, 9 ); /* number TPS header elems */ - hb_stornl( stConfigValues.ulNumTPSVisibilityElems , -1, 10 ); /* number TPS vis elems */ - hb_stornl( stConfigValues.ulNumTPSMemoTransElems , -1, 11 ); /* number TPS memo elems */ - hb_stornl( stConfigValues.usNumReceiveECBs , -1, 12 ); /* number rcv ECBs (NLM only) */ - hb_stornl( stConfigValues.usNumSendECBs , -1, 13 ); /* number send ECBs (NLM only) */ - hb_stornd( stConfigValues.usNumBurstPackets , -1, 14 ); /* number packets per burst */ - hb_stornl( stConfigValues.usNumWorkerThreads , -1, 15 ); /* number worker threads */ + hb_storvnl( stConfigValues.ulNumConnections , -1, 1 ); /* number connections */ + hb_storvnl( stConfigValues.ulNumWorkAreas , -1, 2 ); /* number work areas */ + hb_storvnl( stConfigValues.ulNumTables , -1, 3 ); /* number tables */ + hb_storvnl( stConfigValues.ulNumIndexes , -1, 4 ); /* number indexes */ + hb_storvnl( stConfigValues.ulNumLocks , -1, 5 ); /* number locks */ + hb_storvnl( stConfigValues.ulUserBufferSize , -1, 6 ); /* user buffer */ + hb_storvnl( stConfigValues.ulStatDumpInterval , -1, 7 ); /* statistics dump interval */ + hb_storvnl( stConfigValues.ulErrorLogMax , -1, 8 ); /* max size of error log */ + hb_storvnl( stConfigValues.ulNumTPSHeaderElems , -1, 9 ); /* number TPS header elems */ + hb_storvnl( stConfigValues.ulNumTPSVisibilityElems , -1, 10 ); /* number TPS vis elems */ + hb_storvnl( stConfigValues.ulNumTPSMemoTransElems , -1, 11 ); /* number TPS memo elems */ + hb_storvnl( stConfigValues.usNumReceiveECBs , -1, 12 ); /* number rcv ECBs (NLM only) */ + hb_storvnl( stConfigValues.usNumSendECBs , -1, 13 ); /* number send ECBs (NLM only) */ + hb_storvnd( stConfigValues.usNumBurstPackets , -1, 14 ); /* number packets per burst */ + hb_storvnl( stConfigValues.usNumWorkerThreads , -1, 15 ); /* number worker threads */ #if ADS_LIB_VERSION >= 810 - hb_stornl( stConfigValues.ulSortBuffSize , -1, 16 ); /* index sort buffer size */ - hb_storni( 0 , -1, 17 ); /* reserved */ - hb_storni( 0 , -1, 18 ); /* reserved */ + hb_storvnl( stConfigValues.ulSortBuffSize , -1, 16 ); /* index sort buffer size */ + hb_storvni( 0 , -1, 17 ); /* reserved */ + hb_storvni( 0 , -1, 18 ); /* reserved */ #elif ADS_LIB_VERSION < 810 - hb_stornl( stConfigValues.usSortBuffSize , -1, 16 ); /* index sort buffer size */ - hb_storni( stConfigValues.ucReserved1 , -1, 17 ); /* reserved */ - hb_storni( stConfigValues.ucReserved2 , -1, 18 ); /* reserved */ + hb_storvnl( stConfigValues.usSortBuffSize , -1, 16 ); /* index sort buffer size */ + hb_storvni( stConfigValues.ucReserved1 , -1, 17 ); /* reserved */ + hb_storvni( stConfigValues.ucReserved2 , -1, 18 ); /* reserved */ #else /* not currently used */ - hb_stornl( 0 , -1, 16 ); /* index sort buffer size */ - hb_storni( 0 , -1, 17 ); /* reserved */ - hb_storni( 0 , -1, 18 ); /* reserved */ + hb_storvnl( 0 , -1, 16 ); /* index sort buffer size */ + hb_storvni( 0 , -1, 17 ); /* reserved */ + hb_storvni( 0 , -1, 18 ); /* reserved */ #endif - hb_storc( ( char * ) stConfigValues.aucErrorLog , -1, 19 ); /* error log path */ - hb_storc( ( char * ) stConfigValues.aucSemaphore , -1, 20 ); /* semaphore file path */ - hb_storc( ( char * ) stConfigValues.aucTransaction, -1, 21 ); /* TPS log file path */ - hb_storni( stConfigValues.ucReserved3 , -1, 22 ); /* reserved */ - hb_storni( stConfigValues.ucReserved4 , -1, 23 ); /* reserved */ - hb_stornl( stConfigValues.usSendIPPort , -1, 24 ); /* NT Service IP send port # */ - hb_stornl( stConfigValues.usReceiveIPPort , -1, 25 ); /* NT Service IP rcv port # */ - /* hb_stornl( stConfigValues.usReserved5 , -1, 26 ); reserved */ + hb_storvc( ( char * ) stConfigValues.aucErrorLog , -1, 19 ); /* error log path */ + hb_storvc( ( char * ) stConfigValues.aucSemaphore , -1, 20 ); /* semaphore file path */ + hb_storvc( ( char * ) stConfigValues.aucTransaction, -1, 21 ); /* TPS log file path */ + hb_storvni( stConfigValues.ucReserved3 , -1, 22 ); /* reserved */ + hb_storvni( stConfigValues.ucReserved4 , -1, 23 ); /* reserved */ + hb_storvnl( stConfigValues.usSendIPPort , -1, 24 ); /* NT Service IP send port # */ + hb_storvnl( stConfigValues.usReceiveIPPort , -1, 25 ); /* NT Service IP rcv port # */ + /* hb_storvnl( stConfigValues.usReserved5 , -1, 26 ); reserved */ break; case 1: hb_reta( 13 ); - hb_stornd( stConfigMemory.ulTotalConfigMem , -1, 1 ); /* Total mem taken by cfg params */ - hb_stornl( stConfigMemory.ulConnectionMem , -1, 2 ); /* memory taken by connections */ - hb_stornl( stConfigMemory.ulWorkAreaMem , -1, 3 ); /* memory taken by work areas */ - hb_stornl( stConfigMemory.ulTableMem , -1, 4 ); /* memory taken by tables */ - hb_stornl( stConfigMemory.ulIndexMem , -1, 5 ); /* memory taken by indexes */ - hb_stornl( stConfigMemory.ulLockMem , -1, 6 ); /* memory taken by locks */ - hb_stornl( stConfigMemory.ulUserBufferMem , -1, 7 ); /* memory taken by user buffer */ - hb_stornl( stConfigMemory.ulTPSHeaderElemMem , -1, 8 ); /* memory taken by TPS hdr elems */ - hb_stornl( stConfigMemory.ulTPSVisibilityElemMem , -1, 9 ); /* memory taken by TPS vis elems */ - hb_stornl( stConfigMemory.ulTPSMemoTransElemMem , -1, 10 ); /* mem taken by TPS memo elems */ - hb_stornl( stConfigMemory.ulReceiveEcbMem , -1, 11 ); /* mem taken by rcv ECBs (NLM) */ - hb_stornl( stConfigMemory.ulSendEcbMem , -1, 12 ); /* mem taken by send ECBs (NLM) */ - hb_stornl( stConfigMemory.ulWorkerThreadMem , -1, 13 ); /* mem taken by worker threads */ + hb_storvnd( stConfigMemory.ulTotalConfigMem , -1, 1 ); /* Total mem taken by cfg params */ + hb_storvnl( stConfigMemory.ulConnectionMem , -1, 2 ); /* memory taken by connections */ + hb_storvnl( stConfigMemory.ulWorkAreaMem , -1, 3 ); /* memory taken by work areas */ + hb_storvnl( stConfigMemory.ulTableMem , -1, 4 ); /* memory taken by tables */ + hb_storvnl( stConfigMemory.ulIndexMem , -1, 5 ); /* memory taken by indexes */ + hb_storvnl( stConfigMemory.ulLockMem , -1, 6 ); /* memory taken by locks */ + hb_storvnl( stConfigMemory.ulUserBufferMem , -1, 7 ); /* memory taken by user buffer */ + hb_storvnl( stConfigMemory.ulTPSHeaderElemMem , -1, 8 ); /* memory taken by TPS hdr elems */ + hb_storvnl( stConfigMemory.ulTPSVisibilityElemMem , -1, 9 ); /* memory taken by TPS vis elems */ + hb_storvnl( stConfigMemory.ulTPSMemoTransElemMem , -1, 10 ); /* mem taken by TPS memo elems */ + hb_storvnl( stConfigMemory.ulReceiveEcbMem , -1, 11 ); /* mem taken by rcv ECBs (NLM) */ + hb_storvnl( stConfigMemory.ulSendEcbMem , -1, 12 ); /* mem taken by send ECBs (NLM) */ + hb_storvnl( stConfigMemory.ulWorkerThreadMem , -1, 13 ); /* mem taken by worker threads */ break; default: @@ -448,16 +448,16 @@ HB_FUNC( ADSMGGETLOCKOWNER ) &pusLockType ) == AE_SUCCESS ) { hb_reta( 5 ); - hb_storc( ( char * ) pstUserInfo->aucUserName , -1, 1 ); /* Machine name under NT */ - hb_stornl( ( UNSIGNED16 ) pstUserInfo->usConnNumber, -1, 2 ); /* NetWare conn # (NLM only) */ + hb_storvc( ( char * ) pstUserInfo->aucUserName , -1, 1 ); /* Machine name under NT */ + hb_storvnl( ( UNSIGNED16 ) pstUserInfo->usConnNumber, -1, 2 ); /* NetWare conn # (NLM only) */ #if ADS_LIB_VERSION >= 600 - hb_storc( ( char * ) pstUserInfo->aucAuthUserName, -1, 3 ); /* logon name with Data Dictionary */ - hb_storc( ( char * ) pstUserInfo->aucAddress, -1, 4 ); /* IP adddress */ + hb_storvc( ( char * ) pstUserInfo->aucAuthUserName, -1, 3 ); /* logon name with Data Dictionary */ + hb_storvc( ( char * ) pstUserInfo->aucAddress, -1, 4 ); /* IP adddress */ #else - hb_storc( NULL, -1, 3 ); /* logon name with Data Dictionary */ - hb_storc( NULL, -1, 4 ); /* IP adddress */ + hb_storvc( NULL, -1, 3 ); /* logon name with Data Dictionary */ + hb_storvc( NULL, -1, 4 ); /* IP adddress */ #endif - hb_stornl( pusLockType, -1, 5 ); /* type of lock */ + hb_storvnl( pusLockType, -1, 5 ); /* type of lock */ } else hb_reta( 0 ); diff --git a/harbour/examples/httpsrv/socket.c b/harbour/examples/httpsrv/socket.c index 6db1aac9f7..4cea4b3488 100644 --- a/harbour/examples/httpsrv/socket.c +++ b/harbour/examples/httpsrv/socket.c @@ -235,7 +235,7 @@ HB_FUNC ( SOCKET_RECV ) HB_FUNC ( SOCKET_SEND ) { - hb_retni( send( hb_parsocket( 1 ), hb_parc( 2 ), hb_parclen( 2 ), hb_parni( 3, 0 ) ) ); + hb_retni( send( hb_parsocket( 1 ), hb_parc( 2 ), hb_parclen( 2 ), hb_parnidef( 3, 0 ) ) ); } diff --git a/harbour/examples/uhttpd2/socket.c b/harbour/examples/uhttpd2/socket.c index 2f78f1a440..efbb09f474 100644 --- a/harbour/examples/uhttpd2/socket.c +++ b/harbour/examples/uhttpd2/socket.c @@ -282,7 +282,7 @@ HB_FUNC( SOCKET_SEND ) SOCKET socket = hb_parsocket( 1 ); char* pBuf = hb_parc( 2 ); ULONG ulLen = hb_parclen( 2 ); - int iRet, iFlags = hb_parni( 3, 0 ); + int iRet, iFlags = hb_parnidef( 3, 0 ); hb_vmUnlock(); iRet = send( socket, pBuf, ulLen, iFlags ); diff --git a/harbour/include/extend.api b/harbour/include/extend.api index ddd939493a..449c75d638 100644 --- a/harbour/include/extend.api +++ b/harbour/include/extend.api @@ -103,16 +103,16 @@ typedef PHB_ITEM ITEM; /* Functions */ -#define _parc hb_parc -#define _parclen hb_parclen -#define _parcsiz hb_parcsiz -#define _pards hb_pards #define _parinfa hb_parinfa #define _parinfo hb_parinfo -#define _parl hb_parl -#define _parnd hb_parnd -#define _parni hb_parni -#define _parnl hb_parnl +#define _parc hb_parvc +#define _parclen hb_parvclen +#define _parcsiz hb_parvcsiz +#define _pards hb_parvds +#define _parl hb_parvl +#define _parnd hb_parvnd +#define _parni hb_parvni +#define _parnl hb_parvnl #define _ret hb_ret #define _retc hb_retc @@ -123,12 +123,12 @@ typedef PHB_ITEM ITEM; #define _retni hb_retni #define _retnl hb_retnl -#define _storc hb_storc -#define _storclen hb_storclen -#define _stords hb_stords -#define _storl hb_storl -#define _stornd hb_stornd -#define _storni hb_storni -#define _stornl hb_stornl +#define _storc hb_storvc +#define _storclen hb_storvclen +#define _stords hb_storvds +#define _storl hb_storvl +#define _stornd hb_storvnd +#define _storni hb_storvni +#define _stornl hb_storvnl #endif /* _EXTEND_API */ diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 8cc086fbbd..86595b8079 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -602,31 +602,51 @@ extern void hb_gcCollect( void ); /* checks if a single memory block can b extern void hb_gcCollectAll( BOOL fForce ); /* checks if all memory blocks can be released */ /* Extend API */ -extern HB_EXPORT char * hb_parc( int iParam, ... ); /* retrieve a string parameter */ -extern HB_EXPORT char * hb_parcx( int iParam, ... ); /* retrieve a string parameter */ -extern HB_EXPORT ULONG hb_parclen( int iParam, ... ); /* retrieve a string parameter length */ -extern HB_EXPORT ULONG hb_parcsiz( int iParam, ... ); /* retrieve a by-reference string parameter length, including terminator */ -extern HB_EXPORT char * hb_pards( int iParam, ... ); /* retrieve a date as a string yyyymmdd */ -extern HB_EXPORT char * hb_pardsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string yyyymmdd */ -extern HB_EXPORT LONG hb_pardl( int iParam, ... ); /* retrieve a date as a LONG NUMBER */ -extern HB_EXPORT double hb_partd( int iParam, ... ); /* retrieve a timestamp as a double number */ -extern HB_EXPORT BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */ -extern HB_EXPORT ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ); /* retrieve length or element type of an array parameter */ extern HB_EXPORT ULONG hb_parinfo( int iParam ); /* Determine the param count or data type */ -extern HB_EXPORT int hb_parl( int iParam, ... ); /* retrieve a logical parameter as an int */ -extern HB_EXPORT double hb_parnd( int iParam, ... ); /* retrieve a numeric parameter as a double */ -extern HB_EXPORT int hb_parni( int iParam, ... ); /* retrieve a numeric parameter as a integer */ -extern HB_EXPORT long hb_parnl( int iParam, ... ); /* retrieve a numeric parameter as a long */ -extern HB_EXPORT HB_LONG hb_parnint( int iParam, ... ); /* retrieve a numeric parameter as a HB_LONG */ -extern HB_EXPORT void * hb_parptr( int iParam, ... ); /* retrieve a parameter as a pointer */ -extern HB_EXPORT void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam, ... ); /* retrieve a parameter as a pointer if it's a pointer to GC allocated block */ +extern HB_EXPORT ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ); /* retrieve length or element type of an array parameter */ extern HB_EXPORT PHB_ITEM hb_param( int iParam, long lMask ); /* retrieve a generic parameter */ extern HB_EXPORT PHB_ITEM hb_paramError( int iParam ); /* Returns either the generic parameter or a NIL item if param not provided */ extern HB_EXPORT BOOL hb_extIsArray( int iParam ); extern HB_EXPORT BOOL hb_extIsObject( int iParam ); +extern HB_EXPORT char * hb_parc( int iParam ); /* retrieve a string parameter */ +extern HB_EXPORT char * hb_parcx( int iParam ); /* retrieve a string parameter */ +extern HB_EXPORT ULONG hb_parclen( int iParam ); /* retrieve a string parameter length */ +extern HB_EXPORT ULONG hb_parcsiz( int iParam ); /* retrieve a by-reference string parameter length, including terminator */ +extern HB_EXPORT char * hb_pards( int iParam ); /* retrieve a date as a string yyyymmdd */ +extern HB_EXPORT char * hb_pardsbuff( char * szDate, int iParam ); /* retrieve a date as a string yyyymmdd */ +extern HB_EXPORT LONG hb_pardl( int iParam ); /* retrieve a date as a LONG NUMBER */ +extern HB_EXPORT double hb_partd( int iParam ); /* retrieve a timestamp as a double number */ +extern HB_EXPORT BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam ); /* retrieve a timestamp as two long numbers */ +extern HB_EXPORT int hb_parl( int iParam ); /* retrieve a logical parameter as an int */ +extern HB_EXPORT double hb_parnd( int iParam ); /* retrieve a numeric parameter as a double */ +extern HB_EXPORT int hb_parni( int iParam ); /* retrieve a numeric parameter as a integer */ +extern HB_EXPORT long hb_parnl( int iParam ); /* retrieve a numeric parameter as a long */ +extern HB_EXPORT HB_LONG hb_parnint( int iParam ); /* retrieve a numeric parameter as a HB_LONG */ +extern HB_EXPORT void * hb_parptr( int iParam ); /* retrieve a parameter as a pointer */ +extern HB_EXPORT void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam ); /* retrieve a parameter as a pointer if it's a pointer to GC allocated block */ #ifndef HB_LONG_LONG_OFF -extern HB_EXPORT LONGLONG hb_parnll( int iParam, ... ); /* retrieve a numeric parameter as a long long */ +extern HB_EXPORT LONGLONG hb_parnll( int iParam ); /* retrieve a numeric parameter as a long long */ +#endif + +extern HB_EXPORT char * hb_parvc( int iParam, ... ); /* retrieve a string parameter */ +extern HB_EXPORT char * hb_parvcx( int iParam, ... ); /* retrieve a string parameter */ +extern HB_EXPORT ULONG hb_parvclen( int iParam, ... ); /* retrieve a string parameter length */ +extern HB_EXPORT ULONG hb_parvcsiz( int iParam, ... ); /* retrieve a by-reference string parameter length, including terminator */ +extern HB_EXPORT char * hb_parvds( int iParam, ... ); /* retrieve a date as a string yyyymmdd */ +extern HB_EXPORT char * hb_parvdsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string yyyymmdd */ +extern HB_EXPORT LONG hb_parvdl( int iParam, ... ); /* retrieve a date as a LONG NUMBER */ +extern HB_EXPORT double hb_parvtd( int iParam, ... ); /* retrieve a timestamp as a double number */ +extern HB_EXPORT BOOL hb_parvtdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */ +extern HB_EXPORT int hb_parvl( int iParam, ... ); /* retrieve a logical parameter as an int */ +extern HB_EXPORT double hb_parvnd( int iParam, ... ); /* retrieve a numeric parameter as a double */ +extern HB_EXPORT int hb_parvni( int iParam, ... ); /* retrieve a numeric parameter as a integer */ +extern HB_EXPORT long hb_parvnl( int iParam, ... ); /* retrieve a numeric parameter as a long */ +extern HB_EXPORT HB_LONG hb_parvnint( int iParam, ... ); /* retrieve a numeric parameter as a HB_LONG */ +extern HB_EXPORT void * hb_parvptr( int iParam, ... ); /* retrieve a parameter as a pointer */ +extern HB_EXPORT void * hb_parvptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam, ... ); /* retrieve a parameter as a pointer if it's a pointer to GC allocated block */ +#ifndef HB_LONG_LONG_OFF +extern HB_EXPORT LONGLONG hb_parvnll( int iParam, ... ); /* retrieve a numeric parameter as a long long */ #endif extern HB_EXPORT int hb_pcount( void ); /* returns the number of suplied parameters */ @@ -704,22 +724,40 @@ extern HB_EXPORT void hb_retnlllen( LONGLONG lNumber, int iWidth ); /* returns #endif /* HB_API_MACROS */ -extern HB_EXPORT int hb_storc( const char * szText, int iParam, ... ); /* stores a szString on a variable by reference */ -extern HB_EXPORT int hb_storclen( const char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */ -extern HB_EXPORT int hb_storclen_buffer( char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string buffer on a variable by reference */ -extern HB_EXPORT int hb_stords( const char * szDate, int iParam, ... ); /* szDate must have yyyymmdd format */ -extern HB_EXPORT int hb_stordl( long lJulian, int iParam, ... ); /* lJulian must be a date in Julian format */ -extern HB_EXPORT int hb_stortd( double dTimeStamp, int iParam, ... ); /* stores a double value as timestamp on a variable by reference */ -extern HB_EXPORT int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... ); /* stores two long values as timestamp on a variable by reference */ -extern HB_EXPORT int hb_storl( int iLogical, int iParam, ... ); /* stores a logical integer on a variable by reference */ -extern HB_EXPORT int hb_storni( int iValue, int iParam, ... ); /* stores an integer on a variable by reference */ -extern HB_EXPORT int hb_stornl( long lValue, int iParam, ... ); /* stores a long on a variable by reference */ -extern HB_EXPORT int hb_stornd( double dValue, int iParam, ... ); /* stores a double on a variable by reference */ -extern HB_EXPORT int hb_stornint( HB_LONG lValue, int iParam, ... ); /* stores a HB_LONG on a variable by reference */ -extern HB_EXPORT int hb_storptr( void * pointer, int iParam, ... ); /* stores a pointer on a variable by reference */ -extern HB_EXPORT int hb_storptrGC( void * pointer, int iParam, ... ); /* stores a pointer to GC block on a variable by reference */ +extern HB_EXPORT int hb_storc( const char * szText, int iParam ); /* stores a szString on a variable by reference */ +extern HB_EXPORT int hb_storclen( const char * szText, ULONG ulLength, int iParam ); /* stores a fixed length string on a variable by reference */ +extern HB_EXPORT int hb_storclen_buffer( char * szText, ULONG ulLength, int iParam ); /* stores a fixed length string buffer on a variable by reference */ +extern HB_EXPORT int hb_stords( const char * szDate, int iParam ); /* szDate must have yyyymmdd format */ +extern HB_EXPORT int hb_stordl( long lJulian, int iParam ); /* lJulian must be a date in Julian format */ +extern HB_EXPORT int hb_stortd( double dTimeStamp, int iParam ); /* stores a double value as timestamp on a variable by reference */ +extern HB_EXPORT int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam ); /* stores two long values as timestamp on a variable by reference */ +extern HB_EXPORT int hb_storl( int iLogical, int iParam ); /* stores a logical integer on a variable by reference */ +extern HB_EXPORT int hb_storni( int iValue, int iParam ); /* stores an integer on a variable by reference */ +extern HB_EXPORT int hb_stornl( long lValue, int iParam ); /* stores a long on a variable by reference */ +extern HB_EXPORT int hb_stornd( double dValue, int iParam ); /* stores a double on a variable by reference */ +extern HB_EXPORT int hb_stornint( HB_LONG lValue, int iParam ); /* stores a HB_LONG on a variable by reference */ +extern HB_EXPORT int hb_storptr( void * pointer, int iParam ); /* stores a pointer on a variable by reference */ +extern HB_EXPORT int hb_storptrGC( void * pointer, int iParam ); /* stores a pointer to GC block on a variable by reference */ #ifndef HB_LONG_LONG_OFF -extern HB_EXPORT int hb_stornll( LONGLONG lValue, int iParam, ... ); /* stores a long long on a variable by reference */ +extern HB_EXPORT int hb_stornll( LONGLONG lValue, int iParam ); /* stores a long long on a variable by reference */ +#endif + +extern HB_EXPORT int hb_storvc( const char * szText, int iParam, ... ); /* stores a szString on a variable by reference */ +extern HB_EXPORT int hb_storvclen( const char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */ +extern HB_EXPORT int hb_storvclen_buffer( char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string buffer on a variable by reference */ +extern HB_EXPORT int hb_storvds( const char * szDate, int iParam, ... ); /* szDate must have yyyymmdd format */ +extern HB_EXPORT int hb_storvdl( long lJulian, int iParam, ... ); /* lJulian must be a date in Julian format */ +extern HB_EXPORT int hb_storvtd( double dTimeStamp, int iParam, ... ); /* stores a double value as timestamp on a variable by reference */ +extern HB_EXPORT int hb_storvtdt( LONG lJulian, LONG lMilliSec, int iParam, ... ); /* stores two long values as timestamp on a variable by reference */ +extern HB_EXPORT int hb_storvl( int iLogical, int iParam, ... ); /* stores a logical integer on a variable by reference */ +extern HB_EXPORT int hb_storvni( int iValue, int iParam, ... ); /* stores an integer on a variable by reference */ +extern HB_EXPORT int hb_storvnl( long lValue, int iParam, ... ); /* stores a long on a variable by reference */ +extern HB_EXPORT int hb_storvnd( double dValue, int iParam, ... ); /* stores a double on a variable by reference */ +extern HB_EXPORT int hb_storvnint( HB_LONG lValue, int iParam, ... ); /* stores a HB_LONG on a variable by reference */ +extern HB_EXPORT int hb_storvptr( void * pointer, int iParam, ... ); /* stores a pointer on a variable by reference */ +extern HB_EXPORT int hb_storvptrGC( void * pointer, int iParam, ... ); /* stores a pointer to GC block on a variable by reference */ +#ifndef HB_LONG_LONG_OFF +extern HB_EXPORT int hb_storvnll( LONGLONG lValue, int iParam, ... ); /* stores a long long on a variable by reference */ #endif /* array management */ diff --git a/harbour/source/macro/macrolex.c b/harbour/source/macro/macrolex.c index 768325ce21..e8f2a9eb2e 100644 --- a/harbour/source/macro/macrolex.c +++ b/harbour/source/macro/macrolex.c @@ -57,16 +57,6 @@ #include "hbdate.h" #include "macroy.h" -#define HB_LEX_ISFIRSTIDCHAR(c) ( ( (c) >= 'A' && (c) <= 'Z' ) || \ - ( (c) >= 'a' && (c) <= 'z' ) || \ - (c) == '_' ) -#define HB_LEX_ISDIGIT(c) ( (c) >= '0' && (c) <= '9' ) -#define HB_LEX_ISHEXDIGIT(c) ( ( (c) >= '0' && (c) <= '9' ) || \ - ( (c) >= 'A' && (c) <= 'F' ) || \ - ( (c) >= 'a' && (c) <= 'f' ) ) -#define HB_LEX_ISNEXTIDCHAR(c) ( HB_LEX_ISFIRSTIDCHAR(c) || \ - HB_LEX_ISDIGIT(c) ) - typedef struct _HB_MACRO_LEX { char * pString; @@ -449,11 +439,11 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) case '.': pLex->quote = TRUE; if( pLex->ulSrc < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ pLex->ulSrc ] ) ) + HB_ISDIGIT( pLex->pString[ pLex->ulSrc ] ) ) { ULONG ul = pLex->ulSrc; while( ++ul < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ ul ] ) ) {}; + HB_ISDIGIT( pLex->pString[ ul ] ) ) {}; ul -= --pLex->ulSrc; return hb_lexNumConv( yylval_ptr, pLex, ul ); } @@ -526,7 +516,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) case '&': if( pLex->ulSrc < pLex->ulLen ) { - if( HB_LEX_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc ] ) ) + if( HB_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc ] ) ) { /* [&[.[]]]+ */ int iParts = 0; @@ -549,7 +539,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) } while( pLex->ulLen - pLex->ulSrc > 1 && pLex->pString[ pLex->ulSrc ] == '&' && - HB_LEX_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc + 1 ] ) ); + HB_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc + 1 ] ) ); if( iParts == 2 && *( pLex->pDst - 1 ) == '.' ) { pLex->pDst--; @@ -574,7 +564,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) return '&'; default: - if( HB_LEX_ISDIGIT( ch ) ) + if( HB_ISDIGIT( ch ) ) { ULONG ul = pLex->ulSrc; @@ -584,7 +574,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) if( pLex->pString[ ul ] == 'd' || pLex->pString[ ul ] == 'D' ) { while( ++ul < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ ul ] ) ) {}; + HB_ISDIGIT( pLex->pString[ ul ] ) ) {}; if( ul - pLex->ulSrc == 9 ) { int year, month, day; @@ -612,39 +602,39 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) pLex->pString[ ul ] == 'X' ) { while( ++ul < pLex->ulLen && - HB_LEX_ISHEXDIGIT( pLex->pString[ ul ] ) ) {}; + HB_ISXDIGIT( pLex->pString[ ul ] ) ) {}; if( ul == pLex->ulSrc + 1 ) --ul; } else { while( ul < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ ul ] ) ) + HB_ISDIGIT( pLex->pString[ ul ] ) ) ++ul; if( pLex->ulLen - ul > 1 && pLex->pString[ ul ] == '.' && - HB_LEX_ISDIGIT( pLex->pString[ ul + 1 ] ) ) + HB_ISDIGIT( pLex->pString[ ul + 1 ] ) ) { while( ++ul < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ ul ] ) ) {}; + HB_ISDIGIT( pLex->pString[ ul ] ) ) {}; } } } else { while( ul < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ ul ] ) ) + HB_ISDIGIT( pLex->pString[ ul ] ) ) ++ul; if( pLex->ulLen - ul > 1 && pLex->pString[ ul ] == '.' && - HB_LEX_ISDIGIT( pLex->pString[ ul + 1 ] ) ) + HB_ISDIGIT( pLex->pString[ ul + 1 ] ) ) { while( ++ul < pLex->ulLen && - HB_LEX_ISDIGIT( pLex->pString[ ul ] ) ) {}; + HB_ISDIGIT( pLex->pString[ ul ] ) ) {}; } } ul -= --pLex->ulSrc; return hb_lexNumConv( yylval_ptr, pLex, ul ); } - else if( HB_LEX_ISFIRSTIDCHAR( ch ) ) + else if( HB_ISFIRSTIDCHAR( ch ) ) { ULONG ulLen; pLex->quote = FALSE; @@ -653,7 +643,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) hb_lexIdentCopy( pLex ); if( pLex->ulLen - pLex->ulSrc > 1 && pLex->pString[ pLex->ulSrc ] == '&' && - HB_LEX_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc + 1 ] ) ) + HB_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc + 1 ] ) ) { /* [][&[.[]]]+ */ do @@ -670,7 +660,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) } while( pLex->ulLen - pLex->ulSrc > 1 && pLex->pString[ pLex->ulSrc ] == '&' && - HB_LEX_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc + 1 ] ) ); + HB_ISFIRSTIDCHAR( pLex->pString[ pLex->ulSrc + 1 ] ) ); *pLex->pDst++ = '\0'; return MACROTEXT; } diff --git a/harbour/source/rtl/cdpapi.c b/harbour/source/rtl/cdpapi.c index cbf679c810..075551ec4c 100644 --- a/harbour/source/rtl/cdpapi.c +++ b/harbour/source/rtl/cdpapi.c @@ -1241,7 +1241,7 @@ HB_FUNC( HB_CDPLIST ) hb_reta( iCount ); for( iPos = 0; iPos < iCount; ++iPos ) { - hb_storc( s_cdpList[iPos]->id, -1, iPos + 1 ); + hb_storvc( s_cdpList[iPos]->id, -1, iPos + 1 ); } } diff --git a/harbour/source/rtl/mlcfunc.c b/harbour/source/rtl/mlcfunc.c index 65bdc49fc4..99256fc106 100644 --- a/harbour/source/rtl/mlcfunc.c +++ b/harbour/source/rtl/mlcfunc.c @@ -453,6 +453,6 @@ HB_FUNC( MPOSTOLC ) hb_xfree( pEOLs ); } hb_reta( 2 ); - hb_stornl( ulLine, -1, 1 ); - hb_stornl( ulCol, -1, 2 ); + hb_storvnl( ulLine, -1, 1 ); + hb_storvnl( ulCol, -1, 2 ); } diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 83a3eed376..6aff8c16b7 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -4843,8 +4843,8 @@ HB_FUNC( __GETMSGPRF ) /* profiler: returns a method called and consumed times * if( pMethod ) { - hb_stornl( pMethod->ulCalls, -1, 1 ); - hb_stornl( pMethod->ulTime, -1, 2 ); + hb_storvnl( pMethod->ulCalls, -1, 1 ); + hb_storvnl( pMethod->ulTime, -1, 2 ); return; } } @@ -4852,8 +4852,8 @@ HB_FUNC( __GETMSGPRF ) /* profiler: returns a method called and consumed times * #else hb_reta( 2 ); #endif - hb_stornl( 0, -1, 1 ); - hb_stornl( 0, -1, 2 ); + hb_storvnl( 0, -1, 1 ); + hb_storvnl( 0, -1, 2 ); } /* __ClsGetProperties( nClassHandle, [ lAllExported ] ) --> aPropertiesNames diff --git a/harbour/source/vm/dynsym.c b/harbour/source/vm/dynsym.c index 87e34425fc..c157c74400 100644 --- a/harbour/source/vm/dynsym.c +++ b/harbour/source/vm/dynsym.c @@ -653,16 +653,16 @@ HB_FUNC( __DYNSGETPRF ) /* profiler: It returns an array with a function or proc #endif hb_reta( 2 ); - hb_stornl( 0, -1, 1 ); - hb_stornl( 0, -1, 2 ); + hb_storvnl( 0, -1, 1 ); + hb_storvnl( 0, -1, 2 ); #ifndef HB_NO_PROFILER if( pDynSym ) { if( hb_dynsymIsFunction( pDynSym ) ) /* it is a function or procedure */ { - hb_stornl( pDynSym->ulCalls, -1, 1 ); - hb_stornl( pDynSym->ulTime, -1, 2 ); + hb_storvnl( pDynSym->ulCalls, -1, 1 ); + hb_storvnl( pDynSym->ulTime, -1, 2 ); } } #endif diff --git a/harbour/source/vm/extend.c b/harbour/source/vm/extend.c index 32bf7a2d03..921c0390c5 100644 --- a/harbour/source/vm/extend.c +++ b/harbour/source/vm/extend.c @@ -117,6 +117,50 @@ PHB_ITEM hb_paramError( int iParam ) return pParam; } +ULONG hb_parinfo( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parinfo(%d)", iParam)); + + if( iParam == 0 ) + return ( ULONG ) hb_pcount(); + else + { + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + HB_TYPE uiType = HB_ITEM_TYPE( pItem ); + + if( uiType & HB_IT_BYREF ) + uiType |= HB_ITEM_TYPE( hb_itemUnRef( pItem ) ); + + return ( ULONG ) uiType; + } + else + return 0; + } +} + +ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) +{ + PHB_ITEM pArray; + + HB_TRACE(HB_TR_DEBUG, ("hb_parinfa(%d, %lu)", iParamNum, uiArrayIndex)); + + pArray = hb_param( iParamNum, HB_IT_ARRAY ); + + if( pArray ) + { + if( uiArrayIndex == 0 ) + return hb_arrayLen( pArray ); + else + return ( long ) hb_arrayGetType( pArray, uiArrayIndex ); + } + else + return 0; +} + /* function to be called from pcode DLLs to detect if the extend system * is going to use an array item */ @@ -162,11 +206,415 @@ BOOL hb_extIsObject( int iParam ) /* NOTE: Caller should not modify the buffer returned by this function. [vszakats] */ -char * hb_parc( int iParam, ... ) +char * hb_parc( int iParam ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parc(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parc(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_STRING( pItem ) ) + return pItem->item.asString.value; + } + + return ( char * ) NULL; +} + +char * hb_parcx( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parcx(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_STRING( pItem ) ) + return pItem->item.asString.value; + } + + return ( char * ) ""; +} + +ULONG hb_parclen( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parclen(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_STRING( pItem ) ) + return pItem->item.asString.length; + } + + return 0; +} + +/* NOTE: Similar to _parclen() but returns the length including the + terminating zero byte, and it only works for parameters passed by + reference. [vszakats] */ + +ULONG hb_parcsiz( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parcsiz(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + /* NOTE: hb_parcsiz() will only work for strings passed by reference. + CA-Cl*pper works like this. [vszakats] */ + + if( HB_IS_BYREF( pItem ) ) + { + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_STRING( pItem ) ) + return pItem->item.asString.length + 1; + } + } + + return 0; +} + +/* NOTE: Using hb_stackDateBuffer() a temporary date buffer guaranties + good behavior when multithreading. */ + +char * hb_pards( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_pards(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_DATETIME( pItem ) ) + return hb_dateDecStr( hb_stackDateBuffer(), pItem->item.asDateTime.julian ); + } + + return hb_dateDecStr( hb_stackDateBuffer(), 0 ); +} + +/* NOTE: szDate must be a 9 chars wide buffer. [vszakats] */ + +char * hb_pardsbuff( char * szDate, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_pardsbuff(%p, %d)", szDate, iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_DATETIME( pItem ) ) + return hb_dateDecStr( szDate, pItem->item.asDateTime.julian ); + } + + return hb_dateDecStr( szDate, 0 ); +} + +/* retrieve a date as long integer - number of days from Julian's day */ + +LONG hb_pardl( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_pardl(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_DATETIME( pItem ) ) + return pItem->item.asDateTime.julian; + } + + return hb_itemGetDL( NULL ); +} + +double hb_partd( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_partd(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_DATETIME( pItem ) ) + return hb_timeStampPackDT( pItem->item.asDateTime.julian, + pItem->item.asDateTime.time ); + } + + return 0; +} + +BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_partdt(%p,%p,%d)", plJulian, plMilliSec, iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_DATETIME( pItem ) ) + { + *plJulian = pItem->item.asDateTime.julian; + *plMilliSec = pItem->item.asDateTime.time; + return TRUE; + } + } + + return FALSE; +} + + +int hb_parl( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parl(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_LOGICAL( pItem ) ) + return pItem->item.asLogical.value ? 1 : 0; + } + + return 0; +} + +double hb_parnd( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parnd(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_DOUBLE( pItem ) ) + return pItem->item.asDouble.value; + else if( HB_IS_INTEGER( pItem ) ) + return ( double ) pItem->item.asInteger.value; + else if( HB_IS_LONG( pItem ) ) + return ( double ) pItem->item.asLong.value; + } + + return 0; +} + +int hb_parni( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parni(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_INTEGER( pItem ) ) + return pItem->item.asInteger.value; + else if( HB_IS_LONG( pItem ) ) + return ( int ) pItem->item.asLong.value; + else if( HB_IS_DOUBLE( pItem ) ) +#ifdef __GNUC__ + return ( int ) ( unsigned int ) pItem->item.asDouble.value; +#else + return ( int ) pItem->item.asDouble.value; +#endif + } + + return 0; +} + +long hb_parnl( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parnl(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_LONG( pItem ) ) + return ( long ) pItem->item.asLong.value; + else if( HB_IS_INTEGER( pItem ) ) + return ( long ) pItem->item.asInteger.value; + else if( HB_IS_DOUBLE( pItem ) ) +#ifdef __GNUC__ + return ( long ) ( unsigned long ) pItem->item.asDouble.value; +#else + return ( long ) pItem->item.asDouble.value; +#endif + } + + return 0; +} + +#ifndef HB_LONG_LONG_OFF +LONGLONG hb_parnll( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parnll(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_LONG( pItem ) ) + return ( LONGLONG ) pItem->item.asLong.value; + else if( HB_IS_INTEGER( pItem ) ) + return ( LONGLONG ) pItem->item.asInteger.value; + else if( HB_IS_DOUBLE( pItem ) ) +#ifdef __GNUC__ + return ( LONGLONG ) ( ULONGLONG ) pItem->item.asDouble.value; +#else + return ( LONGLONG ) pItem->item.asDouble.value; +#endif + } + + return 0; +} +#endif + +HB_LONG hb_parnint( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parnint(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_LONG( pItem ) ) + return ( HB_LONG ) pItem->item.asLong.value; + else if( HB_IS_INTEGER( pItem ) ) + return ( HB_LONG ) pItem->item.asInteger.value; + else if( HB_IS_DOUBLE( pItem ) ) +#ifdef __GNUC__ + return ( HB_LONG ) ( HB_ULONG ) pItem->item.asDouble.value; +#else + return ( HB_LONG ) pItem->item.asDouble.value; +#endif + } + + return 0; +} + +void * hb_parptr( int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parptr(%d)", iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_POINTER( pItem ) ) + return pItem->item.asPointer.value; + } + + return NULL; +} + +void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parptrGC(%p,%d)", pFunc, iParam)); + + if( iParam >= -1 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + pItem = hb_itemUnRef( pItem ); + + if( HB_IS_POINTER( pItem ) && pItem->item.asPointer.collect && + hb_gcFunc( pItem->item.asPointer.value ) == pFunc ) + return pItem->item.asPointer.value; + } + + return NULL; +} + +/* NOTE: Caller should not modify the buffer returned by this function. + [vszakats] */ + +char * hb_parvc( int iParam, ... ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_parvc(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -193,11 +641,11 @@ char * hb_parc( int iParam, ... ) return ( char * ) NULL; } -char * hb_parcx( int iParam, ... ) +char * hb_parvcx( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parcx(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvcx(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -224,11 +672,11 @@ char * hb_parcx( int iParam, ... ) return ( char * ) ""; } -ULONG hb_parclen( int iParam, ... ) +ULONG hb_parvclen( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parclen(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvclen(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -259,17 +707,17 @@ ULONG hb_parclen( int iParam, ... ) terminating zero byte, and it only works for parameters passed by reference. [vszakats] */ -ULONG hb_parcsiz( int iParam, ... ) +ULONG hb_parvcsiz( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parcsiz(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvcsiz(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - /* NOTE: hb_parcsiz() will only work for strings passed by reference. + /* NOTE: hb_parvcsiz() will only work for strings passed by reference. CA-Cl*pper works like this. [vszakats] */ if( HB_IS_BYREF( pItem ) ) @@ -298,11 +746,11 @@ ULONG hb_parcsiz( int iParam, ... ) /* NOTE: Using hb_stackDateBuffer() a temporary date buffer guaranties good behavior when multithreading. */ -char * hb_pards( int iParam, ... ) +char * hb_parvds( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_pards(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvds(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -331,11 +779,11 @@ char * hb_pards( int iParam, ... ) /* NOTE: szDate must be a 9 chars wide buffer. [vszakats] */ -char * hb_pardsbuff( char * szDate, int iParam, ... ) +char * hb_parvdsbuff( char * szDate, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_pardsbuff(%p, %d, ...)", szDate, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvdsbuff(%p, %d, ...)", szDate, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -364,11 +812,11 @@ char * hb_pardsbuff( char * szDate, int iParam, ... ) /* retrieve a date as long integer - number of days from Julian's day */ -LONG hb_pardl( int iParam, ... ) +LONG hb_parvdl( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_pardl(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvdl(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -399,11 +847,11 @@ LONG hb_pardl( int iParam, ... ) return hb_itemGetDL( NULL ); } -double hb_partd( int iParam, ... ) +double hb_parvtd( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_partd(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvtd(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -435,11 +883,11 @@ double hb_partd( int iParam, ... ) return 0; } -BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ) +BOOL hb_parvtdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_partdt(%p,%p,%d, ...)", plJulian, plMilliSec, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvtdt(%p,%p,%d, ...)", plJulian, plMilliSec, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -473,11 +921,11 @@ BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ) } -int hb_parl( int iParam, ... ) +int hb_parvl( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parl(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvl(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -510,11 +958,11 @@ int hb_parl( int iParam, ... ) return 0; } -double hb_parnd( int iParam, ... ) +double hb_parvnd( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parnd(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvnd(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -545,11 +993,11 @@ double hb_parnd( int iParam, ... ) return 0; } -int hb_parni( int iParam, ... ) +int hb_parvni( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parni(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvni(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -563,7 +1011,11 @@ int hb_parni( int iParam, ... ) else if( HB_IS_LONG( pItem ) ) return ( int ) pItem->item.asLong.value; else if( HB_IS_DOUBLE( pItem ) ) +#ifdef __GNUC__ + return ( int ) ( unsigned int ) pItem->item.asDouble.value; +#else return ( int ) pItem->item.asDouble.value; +#endif else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -580,11 +1032,11 @@ int hb_parni( int iParam, ... ) return 0; } -long hb_parnl( int iParam, ... ) +long hb_parvnl( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parnl(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvnl(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -603,7 +1055,7 @@ long hb_parnl( int iParam, ... ) #else return ( long ) pItem->item.asDouble.value; #endif - /* DATETIME TODO: remove it */ + /* CA-Cl*pper does it */ else if( HB_IS_DATETIME( pItem ) ) return ( long ) pItem->item.asDateTime.julian; else if( HB_IS_ARRAY( pItem ) ) @@ -623,11 +1075,11 @@ long hb_parnl( int iParam, ... ) } #ifndef HB_LONG_LONG_OFF -LONGLONG hb_parnll( int iParam, ... ) +LONGLONG hb_parvnll( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parnll(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvnll(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -646,9 +1098,6 @@ LONGLONG hb_parnll( int iParam, ... ) #else return ( LONGLONG ) pItem->item.asDouble.value; #endif - /* DATETIME TODO: remove it */ - else if( HB_IS_DATETIME( pItem ) ) - return ( LONGLONG ) pItem->item.asDateTime.julian; else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -666,11 +1115,11 @@ LONGLONG hb_parnll( int iParam, ... ) } #endif -HB_LONG hb_parnint( int iParam, ... ) +HB_LONG hb_parvnint( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parnint(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvnint(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -689,9 +1138,6 @@ HB_LONG hb_parnint( int iParam, ... ) #else return ( HB_LONG ) pItem->item.asDouble.value; #endif - /* DATETIME TODO: remove it */ - else if( HB_IS_DATETIME( pItem ) ) - return ( HB_LONG ) pItem->item.asDateTime.julian; else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -708,11 +1154,11 @@ HB_LONG hb_parnint( int iParam, ... ) return 0; } -void * hb_parptr( int iParam, ... ) +void * hb_parvptr( int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parptr(%d, ...)", iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvptr(%d, ...)", iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -739,11 +1185,11 @@ void * hb_parptr( int iParam, ... ) return NULL; } -void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam, ... ) +void * hb_parvptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_parptrGC(%p,%d, ...)", pFunc, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_parvptrGC(%p,%d, ...)", pFunc, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -778,50 +1224,6 @@ void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam, ... ) return NULL; } -ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) -{ - PHB_ITEM pArray; - - HB_TRACE(HB_TR_DEBUG, ("hb_parinfa(%d, %lu)", iParamNum, uiArrayIndex)); - - pArray = hb_param( iParamNum, HB_IT_ARRAY ); - - if( pArray ) - { - if( uiArrayIndex == 0 ) - return hb_arrayLen( pArray ); - else - return ( long ) hb_arrayGetType( pArray, uiArrayIndex ); - } - else - return 0; -} - -ULONG hb_parinfo( int iParam ) -{ - HB_STACK_TLS_PRELOAD - - HB_TRACE(HB_TR_DEBUG, ("hb_parinfo(%d)", iParam)); - - if( iParam == 0 ) - return ( ULONG ) hb_pcount(); - else - { - if( iParam >= -1 && iParam <= hb_pcount() ) - { - PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - HB_TYPE uiType = HB_ITEM_TYPE( pItem ); - - if( uiType & HB_IT_BYREF ) - uiType |= HB_ITEM_TYPE( hb_itemUnRef( pItem ) ); - - return ( ULONG ) uiType; - } - else - return 0; - } -} - #undef hb_ret void hb_ret( void ) { @@ -1099,11 +1501,394 @@ void hb_retptrGC( void * pointer ) } -int hb_storc( const char * szText, int iParam, ... ) +int hb_storc( const char * szText, int iParam ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storc(%s, %d, ...)", szText, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storc(%s, %d )", szText, iParam)); + + if( iParam == -1 ) + { + hb_itemPutC( hb_stackReturnItem(), szText ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutC( hb_itemUnRef( pItem ), szText ); + return 1; + } + } + + return 0; +} + +int hb_storclen( const char * szText, ULONG ulLen, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storclen(%s, %lu, %d)", szText, ulLen, iParam)); + + if( iParam == -1 ) + { + hb_itemPutCL( hb_stackReturnItem(), szText, ulLen ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutCL( hb_itemUnRef( pItem ), szText, ulLen ); + return 1; + } + } + + return 0; +} + +int hb_storclen_buffer( char * szText, ULONG ulLen, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storclen_buffer(%s, %lu, %d)", szText, ulLen, iParam)); + + if( iParam == -1 ) + { + hb_itemPutCLPtr( hb_stackReturnItem(), szText, ulLen ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutCLPtr( hb_itemUnRef( pItem ), szText, ulLen ); + return 1; + } + } + + return 0; +} + +/* szDate must have YYYYMMDD format */ + +int hb_stords( const char * szDate, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stords(%s, %d)", szDate, iParam)); + + if( iParam == -1 ) + { + hb_itemPutDS( hb_stackReturnItem(), szDate ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutDS( hb_itemUnRef( pItem ), szDate ); + return 1; + } + } + + return 0; +} + +int hb_stordl( long lJulian, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stordl(%ld, %d)", lJulian, iParam)); + + if( iParam == -1 ) + { + hb_itemPutDL( hb_stackReturnItem(), lJulian ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutDL( hb_itemUnRef( pItem ), lJulian ); + return 1; + } + } + + return 0; +} + +int hb_stortd( double dTimeStamp, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stortd(%lf, %d)", dTimeStamp, iParam)); + + if( iParam == -1 ) + { + hb_itemPutTD( hb_stackReturnItem(), dTimeStamp ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutTD( hb_itemUnRef( pItem ), dTimeStamp ); + return 1; + } + } + + return 0; +} + +int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stortd(%ld, %ld, %d)", lJulian, lMilliSec, iParam)); + + if( iParam == -1 ) + { + hb_itemPutTDT( hb_stackReturnItem(), lJulian, lMilliSec ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutTDT( hb_itemUnRef( pItem ), lJulian, lMilliSec ); + return 1; + } + } + + return 0; +} + +int hb_storl( int iLogical, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storl(%d, %d)", iLogical, iParam)); + + if( iParam == -1 ) + { + hb_itemPutL( hb_stackReturnItem(), iLogical ? TRUE : FALSE ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutL( hb_itemUnRef( pItem ), iLogical ? TRUE : FALSE ); + return 1; + } + } + + return 0; +} + +int hb_storni( int iValue, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storni(%d, %d)", iValue, iParam)); + + if( iParam == -1 ) + { + hb_itemPutNI( hb_stackReturnItem(), iValue ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutNI( hb_itemUnRef( pItem ), iValue ); + return 1; + } + } + + return 0; +} + +int hb_stornl( long lValue, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stornl(%ld, %d)", lValue, iParam)); + + if( iParam == -1 ) + { + hb_itemPutNL( hb_stackReturnItem(), lValue ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutNL( hb_itemUnRef( pItem ), lValue ); + return 1; + } + } + + return 0; +} + +#ifndef HB_LONG_LONG_OFF +int hb_stornll( LONGLONG llValue, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stornll(%" PFLL "d, %d)", llValue, iParam)); + + if( iParam == -1 ) + { + hb_itemPutNLL( hb_stackReturnItem(), llValue ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutNLL( hb_itemUnRef( pItem ), llValue ); + return 1; + } + } + + return 0; +} +#endif + +int hb_stornint( HB_LONG lValue, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stornint(%" PFHL "d, %d)", lValue, iParam)); + + if( iParam == -1 ) + { + hb_itemPutNInt( hb_stackReturnItem(), lValue ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutNInt( hb_itemUnRef( pItem ), lValue ); + return 1; + } + } + + return 0; +} + +int hb_stornd( double dNumber, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_stornd(%lf, %d)", dNumber, iParam)); + + if( iParam == -1 ) + { + hb_itemPutND( hb_stackReturnItem(), dNumber ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutND( hb_itemUnRef( pItem ), dNumber ); + return 1; + } + } + + return 0; +} + +int hb_storptr( void * pointer, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storptr(%p, %d)", pointer, iParam)); + + if( iParam == -1 ) + { + hb_itemPutPtr( hb_stackReturnItem(), pointer ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutPtr( hb_itemUnRef( pItem ), pointer ); + return 1; + } + } + + return 0; +} + +int hb_storptrGC( void * pointer, int iParam ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storptrGC(%p, %d)", pointer, iParam)); + + if( iParam == -1 ) + { + hb_itemPutPtrGC( hb_stackReturnItem(), pointer ); + return 1; + } + else if( iParam >= 0 && iParam <= hb_pcount() ) + { + PHB_ITEM pItem = hb_stackItemFromBase( iParam ); + + if( HB_IS_BYREF( pItem ) ) + { + hb_itemPutPtrGC( hb_itemUnRef( pItem ), pointer ); + return 1; + } + } + + return 0; +} + +/* hb_storv*() similar to hb_stor*() but they accepts optional array index + * just like Cl*pper's _stor*() functions + */ + +int hb_storvc( const char * szText, int iParam, ... ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_storvc(%s, %d, ...)", szText, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1132,11 +1917,11 @@ int hb_storc( const char * szText, int iParam, ... ) return 0; } -int hb_storclen( const char * szText, ULONG ulLen, int iParam, ... ) +int hb_storvclen( const char * szText, ULONG ulLen, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storclen(%s, %lu, %d, ...)", szText, ulLen, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvclen(%s, %lu, %d, ...)", szText, ulLen, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1165,11 +1950,11 @@ int hb_storclen( const char * szText, ULONG ulLen, int iParam, ... ) return 0; } -int hb_storclen_buffer( char * szText, ULONG ulLen, int iParam, ... ) +int hb_storvclen_buffer( char * szText, ULONG ulLen, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storclen_buffer(%s, %lu, %d, ...)", szText, ulLen, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvclen_buffer(%s, %lu, %d, ...)", szText, ulLen, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1200,11 +1985,11 @@ int hb_storclen_buffer( char * szText, ULONG ulLen, int iParam, ... ) /* szDate must have YYYYMMDD format */ -int hb_stords( const char * szDate, int iParam, ... ) +int hb_storvds( const char * szDate, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stords(%s, %d, ...)", szDate, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvds(%s, %d, ...)", szDate, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1233,11 +2018,11 @@ int hb_stords( const char * szDate, int iParam, ... ) return 0; } -int hb_stordl( long lJulian, int iParam, ... ) +int hb_storvdl( long lJulian, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stordl(%ld, %d, ...)", lJulian, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvdl(%ld, %d, ...)", lJulian, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1266,11 +2051,11 @@ int hb_stordl( long lJulian, int iParam, ... ) return 0; } -int hb_stortd( double dTimeStamp, int iParam, ... ) +int hb_storvtd( double dTimeStamp, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stortd(%lf, %d, ...)", dTimeStamp, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvtd(%lf, %d, ...)", dTimeStamp, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1299,11 +2084,11 @@ int hb_stortd( double dTimeStamp, int iParam, ... ) return 0; } -int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... ) +int hb_storvtdt( LONG lJulian, LONG lMilliSec, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stortd(%ld, %ld, %d, ...)", lJulian, lMilliSec, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvtd(%ld, %ld, %d, ...)", lJulian, lMilliSec, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1332,11 +2117,11 @@ int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... ) return 0; } -int hb_storl( int iLogical, int iParam, ... ) +int hb_storvl( int iLogical, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storl(%d, %d, ...)", iLogical, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvl(%d, %d, ...)", iLogical, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1365,11 +2150,11 @@ int hb_storl( int iLogical, int iParam, ... ) return 0; } -int hb_storni( int iValue, int iParam, ... ) +int hb_storvni( int iValue, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storni(%d, %d, ...)", iValue, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvni(%d, %d, ...)", iValue, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1398,11 +2183,11 @@ int hb_storni( int iValue, int iParam, ... ) return 0; } -int hb_stornl( long lValue, int iParam, ... ) +int hb_storvnl( long lValue, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stornl(%ld, %d, ...)", lValue, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvnl(%ld, %d, ...)", lValue, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1432,11 +2217,11 @@ int hb_stornl( long lValue, int iParam, ... ) } #ifndef HB_LONG_LONG_OFF -int hb_stornll( LONGLONG llValue, int iParam, ... ) +int hb_storvnll( LONGLONG llValue, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stornll(%" PFLL "d, %d, ...)", llValue, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvnll(%" PFLL "d, %d, ...)", llValue, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1466,11 +2251,11 @@ int hb_stornll( LONGLONG llValue, int iParam, ... ) } #endif -int hb_stornint( HB_LONG lValue, int iParam, ... ) +int hb_storvnint( HB_LONG lValue, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stornint(%" PFHL "d, %d, ...)", lValue, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvnint(%" PFHL "d, %d, ...)", lValue, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1499,11 +2284,11 @@ int hb_stornint( HB_LONG lValue, int iParam, ... ) return 0; } -int hb_stornd( double dNumber, int iParam, ... ) +int hb_storvnd( double dNumber, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_stornd(%lf, %d, ...)", dNumber, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvnd(%lf, %d, ...)", dNumber, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1532,11 +2317,11 @@ int hb_stornd( double dNumber, int iParam, ... ) return 0; } -int hb_storptr( void * pointer, int iParam, ... ) +int hb_storvptr( void * pointer, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storptr(%p, %d, ...)", pointer, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvptr(%p, %d, ...)", pointer, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { @@ -1565,11 +2350,11 @@ int hb_storptr( void * pointer, int iParam, ... ) return 0; } -int hb_storptrGC( void * pointer, int iParam, ... ) +int hb_storvptrGC( void * pointer, int iParam, ... ) { HB_STACK_TLS_PRELOAD - HB_TRACE(HB_TR_DEBUG, ("hb_storptrGC(%p, %d, ...)", pointer, iParam)); + HB_TRACE(HB_TR_DEBUG, ("hb_storvptrGC(%p, %d, ...)", pointer, iParam)); if( iParam >= -1 && iParam <= hb_pcount() ) { diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index ff85778a19..79487ca5fc 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -11359,16 +11359,16 @@ HB_FUNC( __OPGETPRF ) /* profiler: It returns an array with an opcode called and hb_reta( 2 ); if( ulOpcode < HB_P_LAST_PCODE ) { - hb_stornl( hb_ulOpcodesCalls[ ulOpcode ], -1, 1 ); - hb_stornl( hb_ulOpcodesTime[ ulOpcode ], -1, 2 ); + hb_storvnl( hb_ulOpcodesCalls[ ulOpcode ], -1, 1 ); + hb_storvnl( hb_ulOpcodesTime[ ulOpcode ], -1, 2 ); } else #else hb_reta( 2 ); #endif { - hb_stornl( 0, -1, 1 ); - hb_stornl( 0, -1, 2 ); + hb_storvnl( 0, -1, 1 ); + hb_storvnl( 0, -1, 2 ); } } diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 6051ff3623..276fb38483 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -629,7 +629,11 @@ int hb_itemGetNI( PHB_ITEM pItem ) return ( int ) pItem->item.asLong.value; else if( HB_IS_DOUBLE( pItem ) ) +#ifdef __GNUC__ + return ( int ) ( unsigned int ) pItem->item.asDouble.value; +#else return ( int ) pItem->item.asDouble.value; +#endif } return 0; @@ -680,10 +684,6 @@ HB_LONG hb_itemGetNInt( PHB_ITEM pItem ) #else return ( HB_LONG ) pItem->item.asDouble.value; #endif - - /* DATETIME TODO: remove it */ - else if( HB_IS_DATETIME( pItem ) ) - return ( LONG ) pItem->item.asDateTime.julian; } return 0; @@ -708,10 +708,6 @@ LONGLONG hb_itemGetNLL( PHB_ITEM pItem ) #else return ( LONGLONG ) pItem->item.asDouble.value; #endif - - /* DATETIME TODO: remove it */ - else if( HB_IS_DATETIME( pItem ) ) - return ( LONGLONG ) pItem->item.asDateTime.julian; } return 0; diff --git a/harbour/source/vm/maindllp.c b/harbour/source/vm/maindllp.c index aea8ce98d7..e994957f29 100644 --- a/harbour/source/vm/maindllp.c +++ b/harbour/source/vm/maindllp.c @@ -203,10 +203,10 @@ PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ) /* extend API implementation for pcode DLLs */ -char * hb_parc( int iParam, ... ) +char * hb_parvc( int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pParC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parc" ) ); + FARPROC pParC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvc" ) ); if( pExtIsArray && pParC ) { @@ -355,9 +355,9 @@ ULONG hb_parinfo( int iParam ) /* Determine the param count or data type */ return pParinfo ? ( ( HB_PARINFO ) pParinfo )( iParam ) : 0; } -ULONG hb_parclen( int iParam, ... ) /* retrieve a string parameter length */ +ULONG hb_parvclen( int iParam, ... ) /* retrieve a string parameter length */ { - FARPROC pParC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parclen" ) ); + FARPROC pParC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvclen" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParC ) { @@ -379,10 +379,10 @@ ULONG hb_parclen( int iParam, ... ) /* retrieve a string parameter length */ return 0; } -ULONG hb_parcsiz( int iParam, ... )/* retrieve a by-reference string parameter length, including terminator */ +ULONG hb_parvcsiz( int iParam, ... )/* retrieve a by-reference string parameter length, including terminator */ { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pParcSiz = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parcsiz" ) ); + FARPROC pParcSiz = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvcsiz" ) ); if( pExtIsArray && pParcSiz ) { @@ -404,9 +404,9 @@ ULONG hb_parcsiz( int iParam, ... )/* retrieve a by-reference string parameter l return 0; } -char * hb_pards( int iParam, ... ) /* retrieve a date as a string yyyymmdd */ +char * hb_parvds( int iParam, ... ) /* retrieve a date as a string yyyymmdd */ { - FARPROC pParDs = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_pards" ) ); + FARPROC pParDs = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvds" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParDs ) @@ -429,9 +429,9 @@ char * hb_pards( int iParam, ... ) /* retrieve a date as a string yyyymmdd */ return ""; } -char * hb_pardsbuff( char * szDate, int iParam, ... ) /* retrieve a date as a string yyyymmdd */ +char * hb_parvdsbuff( char * szDate, int iParam, ... ) /* retrieve a date as a string yyyymmdd */ { - FARPROC pParDsBuff = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_pardsbuff" ) ); + FARPROC pParDsBuff = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvdsbuff" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParDsBuff ) @@ -454,10 +454,10 @@ char * hb_pardsbuff( char * szDate, int iParam, ... ) /* retrieve a date as a st return ""; } -int hb_parl( int iParam, ... ) /* retrieve a logical parameter as an int */ +int hb_parvl( int iParam, ... ) /* retrieve a logical parameter as an int */ { /* int iReturn; */ - FARPROC pParL = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parl" ) ); + FARPROC pParL = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvl" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParL ) @@ -480,9 +480,9 @@ int hb_parl( int iParam, ... ) /* retrieve a logical parameter as an int */ return 0; } -double hb_parnd( int iParam, ... ) /* retrieve a numeric parameter as a double */ +double hb_parvnd( int iParam, ... ) /* retrieve a numeric parameter as a double */ { - FARPROC pParNd = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parnd" ) ); + FARPROC pParNd = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvnd" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParNd ) @@ -505,10 +505,10 @@ double hb_parnd( int iParam, ... ) /* retrieve a numeric parameter as a double * return 0; } -int hb_parni( int iParam, ... ) /* retrieve a numeric parameter as a integer */ +int hb_parvni( int iParam, ... ) /* retrieve a numeric parameter as a integer */ { /* int iReturn; */ - FARPROC pParNi = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parni" ) ); + FARPROC pParNi = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvni" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParNi ) @@ -531,9 +531,9 @@ int hb_parni( int iParam, ... ) /* retrieve a numeric parameter as a integer */ return 0; } -long hb_parnl( int iParam, ... ) /* retrieve a numeric parameter as a long */ +long hb_parvnl( int iParam, ... ) /* retrieve a numeric parameter as a long */ { - FARPROC pParNl = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parnl" ) ); + FARPROC pParNl = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvnl" ) ); FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); if( pExtIsArray && pParNl ) @@ -556,10 +556,10 @@ long hb_parnl( int iParam, ... ) /* retrieve a numeric parameter as a long */ return 0; } -int hb_storc( const char * szText, int iParam, ... ) +int hb_storvc( const char * szText, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storc" ) ); + FARPROC pStorC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvc" ) ); if( pExtIsArray && pStorC ) { @@ -585,10 +585,10 @@ int hb_storc( const char * szText, int iParam, ... ) return 0; } -int hb_storclen( const char * szText, ULONG ulLen, int iParam, ... ) +int hb_storvclen( const char * szText, ULONG ulLen, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storclen" ) ); + FARPROC pStorC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvclen" ) ); if( pExtIsArray && pStorC ) { @@ -614,10 +614,10 @@ int hb_storclen( const char * szText, ULONG ulLen, int iParam, ... ) return 0; } -int hb_stords( const char * szDate, int iParam, ... ) +int hb_storvds( const char * szDate, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorDs = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_stords" ) ); + FARPROC pStorDs = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvds" ) ); if( pExtIsArray && pStorDs ) { @@ -644,10 +644,10 @@ int hb_stords( const char * szDate, int iParam, ... ) return 0; } -int hb_storl( int iLogical, int iParam, ... ) +int hb_storvl( int iLogical, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorL = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storl" ) ); + FARPROC pStorL = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvl" ) ); if( pExtIsArray && pStorL ) { @@ -673,10 +673,10 @@ int hb_storl( int iLogical, int iParam, ... ) return 0; } -int hb_storni( int iValue, int iParam, ... ) +int hb_storvni( int iValue, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorNi = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storni" ) ); + FARPROC pStorNi = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvni" ) ); if( pExtIsArray && pStorNi ) { @@ -702,10 +702,10 @@ int hb_storni( int iValue, int iParam, ... ) return 0; } -int hb_stornl( long lValue, int iParam, ... ) +int hb_storvnl( long lValue, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorNl = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_stornl" ) ); + FARPROC pStorNl = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvnl" ) ); if( pExtIsArray && pStorNl ) { @@ -731,10 +731,10 @@ int hb_stornl( long lValue, int iParam, ... ) return 0; } -int hb_stornd( double dNumber, int iParam, ... ) +int hb_storvnd( double dNumber, int iParam, ... ) { FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) ); - FARPROC pStorNd = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_stornd" ) ); + FARPROC pStorNd = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_storvnd" ) ); if( pExtIsArray && pStorNd ) { diff --git a/harbour/source/vm/thread.c b/harbour/source/vm/thread.c index 0e02007df1..0e56308318 100644 --- a/harbour/source/vm/thread.c +++ b/harbour/source/vm/thread.c @@ -888,7 +888,7 @@ PHB_THREADSTATE hb_threadStateNew( void ) static PHB_THREADSTATE hb_thParam( int iParam, int iPos ) { PHB_THREADSTATE pThread = ( PHB_THREADSTATE ) - hb_parptrGC( hb_threadDestructor, iParam, iPos ); + hb_parvptrGC( hb_threadDestructor, iParam, iPos ); if( pThread ) return pThread;