From 6d2c565fc18ddf772279153718c4753f03116302 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Feb 2010 13:52:23 +0000 Subject: [PATCH] 2010-02-07 14:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/pp/ppcore.c * src/pp/hbpp.c * src/vm/macro.c * src/vm/evalhb.c * src/vm/runner.c * src/vm/estack.c * src/vm/codebloc.c * src/vm/dynsym.c * src/vm/garbage.c * src/vm/itemapi.c * src/vm/hvm.c * src/vm/pvalue.c * src/vm/maindllp.c * src/vm/arrays.c * src/vm/fm.c * src/vm/extrap.c * src/vm/proc.c * src/vm/thread.c * src/vm/memvars.c * src/vm/vm.c * src/vm/eval.c * src/vm/dynlibhb.c * src/vm/classes.c * src/common/hbffind.c * src/common/expropt1.c * src/common/expropt2.c * src/nortl/nortl.c * src/rtl/gtdos/gtdos.c * src/rtl/fscopy.c * src/rtl/gtwin/gtwin.c * src/rtl/gtxwc/gtxwc.h * src/rtl/gtxwc/gtxwc.c * src/rtl/gtcrs/gtcrs.c * src/rtl/philesx.c * src/rtl/do.c * src/rtl/gtstd/gtstd.c * src/rtl/gttrm/gttrm.c * src/rtl/xhelp.c * src/rtl/transfrm.c * src/rtl/fserr.c * src/rtl/gtcgi/gtcgi.c * src/rtl/errapi.c * src/rtl/copyfile.c * src/rtl/errintlo.c * src/rtl/gtapi.c * src/rtl/filesys.c * src/rtl/console.c * src/rtl/spfiles.c * src/rtl/gtos2/gtos2.c * src/rtl/philes.c * src/rtl/hbgtcore.c * src/rtl/itemseri.c * src/rtl/gtsln/mousesln.c * src/rtl/gtsln/gtsln.c * src/rtl/gtsln/kbsln.c * src/rtl/disksphb.c * src/rtl/gtpca/gtpca.c * src/rtl/trace.c * src/rtl/gt_tpl/gt_tpl.c * src/rtl/filebuf.c * src/rdd/dbfntx/dbfntx1.c * src/rdd/dbsql.c * src/rdd/hbdbsort.c * src/rdd/workarea.c * src/rdd/wacore.c * src/rdd/sdf1.c * src/rdd/dbfnsx/dbfnsx1.c * src/rdd/dbcmd.c * src/rdd/dbfcdx/dbfcdx1.c * src/rdd/delim1.c * src/rdd/dbf1.c * src/rdd/hsx/hsx.c * src/rdd/dbcmd53.c * src/rdd/usrrdd/usrrdd.c * src/rdd/wafunc.c * src/rdd/dbffpt/dbffpt1.c * src/rdd/hbsix/sxord.c * src/rdd/hbsix/sxtable.c * src/rdd/hbsix/sxcompr.c * src/compiler/hbmain.c * src/compiler/hbfix.c * src/compiler/hbdead.c * src/compiler/genobj32.c * src/compiler/genc.c * src/compiler/hbopt.c * src/compiler/gencc.c * src/compiler/harbour.yyc * src/compiler/harbour.y * include/hbpp.h * include/hbrdddbf.h * include/hbvmpub.h * include/hbrddnsx.h * include/hbstack.h * include/hbgtcore.h * include/hbapifs.h * include/hbxvm.h * include/hbdefs.h * include/hbinit.h * include/hbtypes.h * include/hbrddsdf.h * include/hbapi.h * include/hbapiitm.h * include/hbrddntx.h * include/hbvm.h * include/hbcomp.h * include/hbapirdd.h * include/hbcompdf.h * include/hbrdddel.h * include/hbexpra.c * include/hbexprop.h * include/hbdbsort.h * include/hbapigt.h * include/hbrddcdx.h * include/hbapicls.h * include/hbapierr.h * include/hbrddfpt.h * include/hbexprb.c * contrib/hbct/bitnum.c * contrib/hbct/screen2.c * contrib/hbct/strdiff.c * contrib/hbct/token2.c * contrib/hbct/charonly.c * contrib/hbct/atadjust.c * contrib/hbct/ctmath.c * contrib/hbct/ctwin.c * contrib/hbct/charsort.c * contrib/hbct/charmix.c * contrib/hbct/charevod.c * contrib/hbct/wordrepl.c * contrib/hbct/charrepl.c * contrib/hbct/strswap.c * contrib/hbct/trig.c * contrib/hbct/charswap.c * contrib/hbct/charop.c * contrib/hbct/charone.c * contrib/hbct/num1.c * contrib/hbct/pos1.c * contrib/hbct/ascpos.c * contrib/hbct/ctstr.c * contrib/hbct/screen1.c * contrib/hbct/token1.c * contrib/hbct/charmirr.c * contrib/hbct/ctc.c * contrib/hbct/ctwfunc.c * contrib/hbct/relation.c * contrib/hbct/atnum.c * contrib/hbct/count.c * contrib/hbct/ctcrypt.c * contrib/hbct/posdiff.c * contrib/hbct/finan.c * contrib/hbct/range.c * contrib/hbct/addascii.c * contrib/hbct/ctmath2.c * contrib/hbct/tab.c * contrib/hbct/replace.c * contrib/hbct/asciisum.c * contrib/hbct/pos2.c * contrib/hbct/numat.c * contrib/hbct/atrepl.c * contrib/hbct/wordtoch.c * contrib/hbct/ctpad.c * contrib/hbct/print.c * contrib/hbct/justify.c * contrib/hbct/remove.c * USHORT -> HB_USHORT (except where BYTE was used in OS-specific context) --- harbour/ChangeLog | 167 +++++++++++ harbour/contrib/hbct/addascii.c | 4 +- harbour/contrib/hbct/asciisum.c | 2 +- harbour/contrib/hbct/ascpos.c | 2 +- harbour/contrib/hbct/atadjust.c | 6 +- harbour/contrib/hbct/atnum.c | 10 +- harbour/contrib/hbct/atrepl.c | 4 +- harbour/contrib/hbct/bitnum.c | 6 +- harbour/contrib/hbct/charevod.c | 4 +- harbour/contrib/hbct/charmirr.c | 4 +- harbour/contrib/hbct/charmix.c | 6 +- harbour/contrib/hbct/charone.c | 2 +- harbour/contrib/hbct/charonly.c | 2 +- harbour/contrib/hbct/charop.c | 12 +- harbour/contrib/hbct/charrepl.c | 2 +- harbour/contrib/hbct/charsort.c | 4 +- harbour/contrib/hbct/charswap.c | 4 +- harbour/contrib/hbct/count.c | 2 +- harbour/contrib/hbct/ctc.c | 16 +- harbour/contrib/hbct/ctcrypt.c | 14 +- harbour/contrib/hbct/ctmath.c | 4 +- harbour/contrib/hbct/ctmath2.c | 10 +- harbour/contrib/hbct/ctpad.c | 4 +- harbour/contrib/hbct/ctstr.c | 8 +- harbour/contrib/hbct/ctwfunc.c | 6 +- harbour/contrib/hbct/ctwin.c | 10 +- harbour/contrib/hbct/finan.c | 10 +- harbour/contrib/hbct/justify.c | 2 +- harbour/contrib/hbct/num1.c | 4 +- harbour/contrib/hbct/numat.c | 4 +- harbour/contrib/hbct/pos1.c | 2 +- harbour/contrib/hbct/pos2.c | 16 +- harbour/contrib/hbct/posdiff.c | 10 +- harbour/contrib/hbct/print.c | 4 +- harbour/contrib/hbct/range.c | 4 +- harbour/contrib/hbct/relation.c | 4 +- harbour/contrib/hbct/remove.c | 2 +- harbour/contrib/hbct/replace.c | 2 +- harbour/contrib/hbct/screen1.c | 30 +- harbour/contrib/hbct/screen2.c | 4 +- harbour/contrib/hbct/strdiff.c | 4 +- harbour/contrib/hbct/strswap.c | 2 +- harbour/contrib/hbct/tab.c | 4 +- harbour/contrib/hbct/token1.c | 6 +- harbour/contrib/hbct/token2.c | 26 +- harbour/contrib/hbct/trig.c | 26 +- harbour/contrib/hbct/wordrepl.c | 2 +- harbour/contrib/hbct/wordtoch.c | 2 +- harbour/include/hbapi.h | 56 ++-- harbour/include/hbapicls.h | 26 +- harbour/include/hbapierr.h | 32 +- harbour/include/hbapifs.h | 30 +- harbour/include/hbapigt.h | 16 +- harbour/include/hbapiitm.h | 12 +- harbour/include/hbapirdd.h | 140 ++++----- harbour/include/hbcomp.h | 6 +- harbour/include/hbcompdf.h | 74 ++--- harbour/include/hbdbsort.h | 8 +- harbour/include/hbdefs.h | 4 +- harbour/include/hbexpra.c | 2 +- harbour/include/hbexprb.c | 26 +- harbour/include/hbexprop.h | 4 +- harbour/include/hbgtcore.h | 238 +++++++-------- harbour/include/hbinit.h | 16 +- harbour/include/hbpp.h | 150 +++++----- harbour/include/hbrddcdx.h | 238 +++++++-------- harbour/include/hbrdddbf.h | 146 ++++----- harbour/include/hbrdddel.h | 46 +-- harbour/include/hbrddfpt.h | 20 +- harbour/include/hbrddnsx.h | 94 +++--- harbour/include/hbrddntx.h | 86 +++--- harbour/include/hbrddsdf.h | 36 +-- harbour/include/hbstack.h | 30 +- harbour/include/hbtypes.h | 4 +- harbour/include/hbvm.h | 50 ++-- harbour/include/hbvmpub.h | 12 +- harbour/include/hbxvm.h | 34 +-- harbour/src/common/expropt1.c | 2 +- harbour/src/common/expropt2.c | 4 +- harbour/src/common/hbffind.c | 4 +- harbour/src/compiler/genc.c | 16 +- harbour/src/compiler/gencc.c | 24 +- harbour/src/compiler/genobj32.c | 64 ++-- harbour/src/compiler/harbour.y | 8 +- harbour/src/compiler/harbour.yyc | 8 +- harbour/src/compiler/hbdead.c | 2 +- harbour/src/compiler/hbfix.c | 8 +- harbour/src/compiler/hbmain.c | 48 +-- harbour/src/compiler/hbopt.c | 12 +- harbour/src/nortl/nortl.c | 2 +- harbour/src/pp/hbpp.c | 2 +- harbour/src/pp/ppcore.c | 84 +++--- harbour/src/rdd/dbcmd.c | 70 ++--- harbour/src/rdd/dbcmd53.c | 6 +- harbour/src/rdd/dbf1.c | 98 +++--- harbour/src/rdd/dbfcdx/dbfcdx1.c | 72 ++--- harbour/src/rdd/dbffpt/dbffpt1.c | 108 +++---- harbour/src/rdd/dbfnsx/dbfnsx1.c | 116 ++++---- harbour/src/rdd/dbfntx/dbfntx1.c | 102 +++---- harbour/src/rdd/dbsql.c | 2 +- harbour/src/rdd/delim1.c | 30 +- harbour/src/rdd/hbdbsort.c | 8 +- harbour/src/rdd/hbsix/sxcompr.c | 2 +- harbour/src/rdd/hbsix/sxord.c | 4 +- harbour/src/rdd/hbsix/sxtable.c | 8 +- harbour/src/rdd/hsx/hsx.c | 10 +- harbour/src/rdd/sdf1.c | 32 +- harbour/src/rdd/usrrdd/usrrdd.c | 68 ++--- harbour/src/rdd/wacore.c | 26 +- harbour/src/rdd/wafunc.c | 48 +-- harbour/src/rdd/workarea.c | 58 ++-- harbour/src/rtl/console.c | 10 +- harbour/src/rtl/copyfile.c | 2 +- harbour/src/rtl/disksphb.c | 20 +- harbour/src/rtl/do.c | 8 +- harbour/src/rtl/errapi.c | 80 ++--- harbour/src/rtl/errintlo.c | 2 +- harbour/src/rtl/filebuf.c | 8 +- harbour/src/rtl/filesys.c | 70 ++--- harbour/src/rtl/fscopy.c | 2 +- harbour/src/rtl/fserr.c | 2 +- harbour/src/rtl/gt_tpl/gt_tpl.c | 2 +- harbour/src/rtl/gtapi.c | 20 +- harbour/src/rtl/gtcgi/gtcgi.c | 4 +- harbour/src/rtl/gtcrs/gtcrs.c | 2 +- harbour/src/rtl/gtdos/gtdos.c | 6 +- harbour/src/rtl/gtos2/gtos2.c | 4 +- harbour/src/rtl/gtpca/gtpca.c | 2 +- harbour/src/rtl/gtsln/gtsln.c | 6 +- harbour/src/rtl/gtsln/kbsln.c | 2 +- harbour/src/rtl/gtsln/mousesln.c | 8 +- harbour/src/rtl/gtstd/gtstd.c | 6 +- harbour/src/rtl/gttrm/gttrm.c | 6 +- harbour/src/rtl/gtwin/gtwin.c | 4 +- harbour/src/rtl/gtxwc/gtxwc.c | 42 +-- harbour/src/rtl/gtxwc/gtxwc.h | 4 +- harbour/src/rtl/hbgtcore.c | 28 +- harbour/src/rtl/itemseri.c | 4 +- harbour/src/rtl/philes.c | 8 +- harbour/src/rtl/philesx.c | 6 +- harbour/src/rtl/spfiles.c | 4 +- harbour/src/rtl/trace.c | 4 +- harbour/src/rtl/transfrm.c | 2 +- harbour/src/rtl/xhelp.c | 2 +- harbour/src/vm/arrays.c | 10 +- harbour/src/vm/classes.c | 494 +++++++++++++++---------------- harbour/src/vm/codebloc.c | 8 +- harbour/src/vm/dynlibhb.c | 2 +- harbour/src/vm/dynsym.c | 8 +- harbour/src/vm/estack.c | 14 +- harbour/src/vm/eval.c | 22 +- harbour/src/vm/evalhb.c | 2 +- harbour/src/vm/extrap.c | 2 +- harbour/src/vm/fm.c | 4 +- harbour/src/vm/garbage.c | 8 +- harbour/src/vm/hvm.c | 210 ++++++------- harbour/src/vm/itemapi.c | 28 +- harbour/src/vm/macro.c | 4 +- harbour/src/vm/maindllp.c | 2 +- harbour/src/vm/memvars.c | 6 +- harbour/src/vm/proc.c | 2 +- harbour/src/vm/pvalue.c | 2 +- harbour/src/vm/runner.c | 24 +- harbour/src/vm/thread.c | 4 +- harbour/src/vm/vm.c | 4 +- 165 files changed, 2342 insertions(+), 2175 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 911cfe9900..0e98a67218 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,173 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-07 14:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/pp/ppcore.c + * src/pp/hbpp.c + * src/vm/macro.c + * src/vm/evalhb.c + * src/vm/runner.c + * src/vm/estack.c + * src/vm/codebloc.c + * src/vm/dynsym.c + * src/vm/garbage.c + * src/vm/itemapi.c + * src/vm/hvm.c + * src/vm/pvalue.c + * src/vm/maindllp.c + * src/vm/arrays.c + * src/vm/fm.c + * src/vm/extrap.c + * src/vm/proc.c + * src/vm/thread.c + * src/vm/memvars.c + * src/vm/vm.c + * src/vm/eval.c + * src/vm/dynlibhb.c + * src/vm/classes.c + * src/common/hbffind.c + * src/common/expropt1.c + * src/common/expropt2.c + * src/nortl/nortl.c + * src/rtl/gtdos/gtdos.c + * src/rtl/fscopy.c + * src/rtl/gtwin/gtwin.c + * src/rtl/gtxwc/gtxwc.h + * src/rtl/gtxwc/gtxwc.c + * src/rtl/gtcrs/gtcrs.c + * src/rtl/philesx.c + * src/rtl/do.c + * src/rtl/gtstd/gtstd.c + * src/rtl/gttrm/gttrm.c + * src/rtl/xhelp.c + * src/rtl/transfrm.c + * src/rtl/fserr.c + * src/rtl/gtcgi/gtcgi.c + * src/rtl/errapi.c + * src/rtl/copyfile.c + * src/rtl/errintlo.c + * src/rtl/gtapi.c + * src/rtl/filesys.c + * src/rtl/console.c + * src/rtl/spfiles.c + * src/rtl/gtos2/gtos2.c + * src/rtl/philes.c + * src/rtl/hbgtcore.c + * src/rtl/itemseri.c + * src/rtl/gtsln/mousesln.c + * src/rtl/gtsln/gtsln.c + * src/rtl/gtsln/kbsln.c + * src/rtl/disksphb.c + * src/rtl/gtpca/gtpca.c + * src/rtl/trace.c + * src/rtl/gt_tpl/gt_tpl.c + * src/rtl/filebuf.c + * src/rdd/dbfntx/dbfntx1.c + * src/rdd/dbsql.c + * src/rdd/hbdbsort.c + * src/rdd/workarea.c + * src/rdd/wacore.c + * src/rdd/sdf1.c + * src/rdd/dbfnsx/dbfnsx1.c + * src/rdd/dbcmd.c + * src/rdd/dbfcdx/dbfcdx1.c + * src/rdd/delim1.c + * src/rdd/dbf1.c + * src/rdd/hsx/hsx.c + * src/rdd/dbcmd53.c + * src/rdd/usrrdd/usrrdd.c + * src/rdd/wafunc.c + * src/rdd/dbffpt/dbffpt1.c + * src/rdd/hbsix/sxord.c + * src/rdd/hbsix/sxtable.c + * src/rdd/hbsix/sxcompr.c + * src/compiler/hbmain.c + * src/compiler/hbfix.c + * src/compiler/hbdead.c + * src/compiler/genobj32.c + * src/compiler/genc.c + * src/compiler/hbopt.c + * src/compiler/gencc.c + * src/compiler/harbour.yyc + * src/compiler/harbour.y + * include/hbpp.h + * include/hbrdddbf.h + * include/hbvmpub.h + * include/hbrddnsx.h + * include/hbstack.h + * include/hbgtcore.h + * include/hbapifs.h + * include/hbxvm.h + * include/hbdefs.h + * include/hbinit.h + * include/hbtypes.h + * include/hbrddsdf.h + * include/hbapi.h + * include/hbapiitm.h + * include/hbrddntx.h + * include/hbvm.h + * include/hbcomp.h + * include/hbapirdd.h + * include/hbcompdf.h + * include/hbrdddel.h + * include/hbexpra.c + * include/hbexprop.h + * include/hbdbsort.h + * include/hbapigt.h + * include/hbrddcdx.h + * include/hbapicls.h + * include/hbapierr.h + * include/hbrddfpt.h + * include/hbexprb.c + * contrib/hbct/bitnum.c + * contrib/hbct/screen2.c + * contrib/hbct/strdiff.c + * contrib/hbct/token2.c + * contrib/hbct/charonly.c + * contrib/hbct/atadjust.c + * contrib/hbct/ctmath.c + * contrib/hbct/ctwin.c + * contrib/hbct/charsort.c + * contrib/hbct/charmix.c + * contrib/hbct/charevod.c + * contrib/hbct/wordrepl.c + * contrib/hbct/charrepl.c + * contrib/hbct/strswap.c + * contrib/hbct/trig.c + * contrib/hbct/charswap.c + * contrib/hbct/charop.c + * contrib/hbct/charone.c + * contrib/hbct/num1.c + * contrib/hbct/pos1.c + * contrib/hbct/ascpos.c + * contrib/hbct/ctstr.c + * contrib/hbct/screen1.c + * contrib/hbct/token1.c + * contrib/hbct/charmirr.c + * contrib/hbct/ctc.c + * contrib/hbct/ctwfunc.c + * contrib/hbct/relation.c + * contrib/hbct/atnum.c + * contrib/hbct/count.c + * contrib/hbct/ctcrypt.c + * contrib/hbct/posdiff.c + * contrib/hbct/finan.c + * contrib/hbct/range.c + * contrib/hbct/addascii.c + * contrib/hbct/ctmath2.c + * contrib/hbct/tab.c + * contrib/hbct/replace.c + * contrib/hbct/asciisum.c + * contrib/hbct/pos2.c + * contrib/hbct/numat.c + * contrib/hbct/atrepl.c + * contrib/hbct/wordtoch.c + * contrib/hbct/ctpad.c + * contrib/hbct/print.c + * contrib/hbct/justify.c + * contrib/hbct/remove.c + * USHORT -> HB_USHORT (except where BYTE was used in OS-specific context) + 2010-02-07 12:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbbmcdx/bmdbfcdx.c * contrib/hbbmcdx/hbbmcdx.h diff --git a/harbour/contrib/hbct/addascii.c b/harbour/contrib/hbct/addascii.c index 952baa93b8..8ccf5bb2d2 100644 --- a/harbour/contrib/hbct/addascii.c +++ b/harbour/contrib/hbct/addascii.c @@ -147,7 +147,7 @@ HB_FUNC( ADDASCII ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ADDASCII, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ADDASCII, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } /* return string unchanged */ @@ -208,7 +208,7 @@ HB_FUNC( ADDASCII ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ADDASCII, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ADDASCII, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/asciisum.c b/harbour/contrib/hbct/asciisum.c index 7ce0129889..ac937da76f 100644 --- a/harbour/contrib/hbct/asciisum.c +++ b/harbour/contrib/hbct/asciisum.c @@ -115,7 +115,7 @@ HB_FUNC( ASCIISUM ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ASCIISUM, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/ascpos.c b/harbour/contrib/hbct/ascpos.c index fc8214f704..f41f8e19dd 100644 --- a/harbour/contrib/hbct/ascpos.c +++ b/harbour/contrib/hbct/ascpos.c @@ -102,7 +102,7 @@ static void do_ascpos( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_ASCPOS_VALPOS ? CT_ERROR_VALPOS : CT_ERROR_ASCPOS, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, diff --git a/harbour/contrib/hbct/atadjust.c b/harbour/contrib/hbct/atadjust.c index f863db9c82..4837701c3d 100644 --- a/harbour/contrib/hbct/atadjust.c +++ b/harbour/contrib/hbct/atadjust.c @@ -132,7 +132,7 @@ HB_FUNC( ATADJUST ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retclen( pcString, sStrLen ); @@ -151,7 +151,7 @@ HB_FUNC( ATADJUST ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retclen( pcString, sStrLen ); @@ -308,7 +308,7 @@ HB_FUNC( ATADJUST ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATADJUST, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/atnum.c b/harbour/contrib/hbct/atnum.c index 846c50f22b..12aa56d626 100644 --- a/harbour/contrib/hbct/atnum.c +++ b/harbour/contrib/hbct/atnum.c @@ -95,7 +95,7 @@ static void do_atnum( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_AFTERATNUM, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_AFTERATNUM, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retc_null(); @@ -108,7 +108,7 @@ static void do_atnum( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_BEFORATNUM, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_BEFORATNUM, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retc_null(); @@ -121,7 +121,7 @@ static void do_atnum( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -274,7 +274,7 @@ static void do_atnum( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_ATNUM_AFTERATNUM ? CT_ERROR_AFTERATNUM : CT_ERROR_BEFORATNUM, NULL, HB_ERR_FUNCNAME, 0, @@ -295,7 +295,7 @@ static void do_atnum( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATNUM, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/atrepl.c b/harbour/contrib/hbct/atrepl.c index a2755435a7..387e5268c8 100644 --- a/harbour/contrib/hbct/atrepl.c +++ b/harbour/contrib/hbct/atrepl.c @@ -154,7 +154,7 @@ HB_FUNC( ATREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATREPL, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retclen( pcString, sStrLen ); @@ -332,7 +332,7 @@ HB_FUNC( ATREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/bitnum.c b/harbour/contrib/hbct/bitnum.c index 7cc7774e74..98603dcb3a 100644 --- a/harbour/contrib/hbct/bitnum.c +++ b/harbour/contrib/hbct/bitnum.c @@ -180,7 +180,7 @@ HB_FUNC( NUMROL ) { if( hb_parl( 3 ) ) { - USHORT us = ( USHORT ) ( lValue & 0xff ) << ( lShift & 0x07 ); + HB_USHORT us = ( HB_USHORT ) ( lValue & 0xff ) << ( lShift & 0x07 ); lValue = ( lValue & 0xff00 ) | ( us & 0xff ) | ( us >> 8 ); } @@ -203,8 +203,8 @@ HB_FUNC( NUMMIRR ) if( __numParam( 1, &lValue ) && lValue == ( lValue & 0xffff ) ) { - USHORT usBits = hb_parl( 2 ) ? 8 : 16; - USHORT usResult = ( USHORT ) ( lValue >> usBits ); + HB_USHORT usBits = hb_parl( 2 ) ? 8 : 16; + HB_USHORT usResult = ( HB_USHORT ) ( lValue >> usBits ); do { diff --git a/harbour/contrib/hbct/charevod.c b/harbour/contrib/hbct/charevod.c index 5a378966be..e5ac5b887e 100644 --- a/harbour/contrib/hbct/charevod.c +++ b/harbour/contrib/hbct/charevod.c @@ -78,7 +78,7 @@ static void do_charevod( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_CHAREVOD_CHAREVEN ? CT_ERROR_CHAREVEN : CT_ERROR_CHARODD, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, @@ -113,7 +113,7 @@ static void do_charevod( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_CHAREVOD_CHAREVEN ? CT_ERROR_CHAREVEN : CT_ERROR_CHARODD, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, diff --git a/harbour/contrib/hbct/charmirr.c b/harbour/contrib/hbct/charmirr.c index 9495e891b7..eff77d36b5 100644 --- a/harbour/contrib/hbct/charmirr.c +++ b/harbour/contrib/hbct/charmirr.c @@ -128,7 +128,7 @@ HB_FUNC( CHARMIRR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIRR, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIRR, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } if( iNoRet ) @@ -178,7 +178,7 @@ HB_FUNC( CHARMIRR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIRR, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/charmix.c b/harbour/contrib/hbct/charmix.c index ecc983e507..2e1f9f6949 100644 --- a/harbour/contrib/hbct/charmix.c +++ b/harbour/contrib/hbct/charmix.c @@ -124,7 +124,7 @@ HB_FUNC( CHARMIX ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retc_null(); @@ -141,7 +141,7 @@ HB_FUNC( CHARMIX ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -174,7 +174,7 @@ HB_FUNC( CHARMIX ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARMIX, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/charone.c b/harbour/contrib/hbct/charone.c index ad636563e4..ceb50d2103 100644 --- a/harbour/contrib/hbct/charone.c +++ b/harbour/contrib/hbct/charone.c @@ -192,7 +192,7 @@ static void do_charone( int iSwitch ) int iArgErrorMode = ct_getargerrormode(); if( iArgErrorMode != CT_ARGERR_IGNORE ) - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_CHARONE_CHARONE ? CT_ERROR_CHARONE : CT_ERROR_WORDONE, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, diff --git a/harbour/contrib/hbct/charonly.c b/harbour/contrib/hbct/charonly.c index d04eda4d1d..9d732af13e 100644 --- a/harbour/contrib/hbct/charonly.c +++ b/harbour/contrib/hbct/charonly.c @@ -163,7 +163,7 @@ static void do_charonly( int iSwitch ) iError = CT_ERROR_WORDREM; break; } - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, iError, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iError, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/charop.c b/harbour/contrib/hbct/charop.c index 8f45c32805..cfdac3254f 100644 --- a/harbour/contrib/hbct/charop.c +++ b/harbour/contrib/hbct/charop.c @@ -210,7 +210,7 @@ static void do_charop( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARADD, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARADD, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -236,7 +236,7 @@ static void do_charop( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSUB, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSUB, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -262,7 +262,7 @@ static void do_charop( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARAND, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARAND, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_xmemcpy( pucResult, pucString, sStrLen ); @@ -287,7 +287,7 @@ static void do_charop( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHAROR, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHAROR, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_xmemcpy( pucResult, pucString, sStrLen ); @@ -312,7 +312,7 @@ static void do_charop( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARXOR, NULL, HB_ERR_FUNCNAME, 0, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARXOR, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_xmemcpy( pucResult, pucString, sStrLen ); @@ -378,7 +378,7 @@ static void do_charop( int iSwitch ) iError = CT_ERROR_CHARRLR; break; } - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, iError, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iError, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/charrepl.c b/harbour/contrib/hbct/charrepl.c index 90491a2940..b9440e9e69 100644 --- a/harbour/contrib/hbct/charrepl.c +++ b/harbour/contrib/hbct/charrepl.c @@ -229,7 +229,7 @@ HB_FUNC( CHARREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/charsort.c b/harbour/contrib/hbct/charsort.c index 7a127635e0..64a05e334e 100644 --- a/harbour/contrib/hbct/charsort.c +++ b/harbour/contrib/hbct/charsort.c @@ -230,7 +230,7 @@ HB_FUNC( CHARSORT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSORT, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSORT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -268,7 +268,7 @@ HB_FUNC( CHARSORT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSORT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/charswap.c b/harbour/contrib/hbct/charswap.c index 2d1197cd35..b638000041 100644 --- a/harbour/contrib/hbct/charswap.c +++ b/harbour/contrib/hbct/charswap.c @@ -162,14 +162,14 @@ static void do_charswap( int iSwitch ) { if( iSwitch == DO_CHARSWAP_CHARSWAP ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARSWAP, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } else { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_WORDSWAP, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/contrib/hbct/count.c b/harbour/contrib/hbct/count.c index 05ba870c59..05eff16938 100644 --- a/harbour/contrib/hbct/count.c +++ b/harbour/contrib/hbct/count.c @@ -109,7 +109,7 @@ static void do_count( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_COUNT_COUNTLEFT ? CT_ERROR_COUNTLEFT : CT_ERROR_COUNTRIGHT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, diff --git a/harbour/contrib/hbct/ctc.c b/harbour/contrib/hbct/ctc.c index 90c51617e5..1972a44799 100644 --- a/harbour/contrib/hbct/ctc.c +++ b/harbour/contrib/hbct/ctc.c @@ -60,11 +60,11 @@ /* throwing a CT-subsystem error without value substitution - function adapted from errorapi.c */ -USHORT ct_error( USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, - const char * szDescription, const char * szOperation, - HB_ERRCODE errOsCode, USHORT uiFlags, ULONG ulArgCount, ... ) +HB_USHORT ct_error( HB_USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, + const char * szDescription, const char * szOperation, + HB_ERRCODE errOsCode, HB_USHORT uiFlags, ULONG ulArgCount, ... ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; PHB_ITEM pArray; @@ -128,9 +128,9 @@ USHORT ct_error( USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode /* throwing a CT-subsystem error with value substitution - function adapted from errorapi.c */ -PHB_ITEM ct_error_subst( USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, +PHB_ITEM ct_error_subst( HB_USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, - HB_ERRCODE errOsCode, USHORT uiFlags, ULONG ulArgCount, ... ) + HB_ERRCODE errOsCode, HB_USHORT uiFlags, ULONG ulArgCount, ... ) { PHB_ITEM pRetVal; PHB_ITEM pError; @@ -269,7 +269,7 @@ HB_FUNC( CSETARGERR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETARGERR, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETARGERR, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } } @@ -280,7 +280,7 @@ HB_FUNC( CSETARGERR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETARGERR, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETARGERR, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } } diff --git a/harbour/contrib/hbct/ctcrypt.c b/harbour/contrib/hbct/ctcrypt.c index ad437cdfce..f751f108f3 100644 --- a/harbour/contrib/hbct/ctcrypt.c +++ b/harbour/contrib/hbct/ctcrypt.c @@ -67,17 +67,17 @@ HB_FUNC( CRYPT ) HB_BYTE * pbyResult = ( HB_BYTE * ) hb_xgrab( ulStringLen + 1 ); - USHORT uiCount2 = - ( ( ( USHORT ) ( pbyCrypt[ ulCryptPos ] + ( USHORT ) ( pbyCrypt[ ulCryptPos + 1 ] * 256 ) ) ) & - 0xFFFF ) ^ ( ( USHORT ) ulCryptLen & 0xFFFF ); - USHORT uiCount1 = 0xAAAA; + HB_USHORT uiCount2 = + ( ( ( HB_USHORT ) ( pbyCrypt[ ulCryptPos ] + ( HB_USHORT ) ( pbyCrypt[ ulCryptPos + 1 ] * 256 ) ) ) & + 0xFFFF ) ^ ( ( HB_USHORT ) ulCryptLen & 0xFFFF ); + HB_USHORT uiCount1 = 0xAAAA; for( ulStringPos = 0; ulStringPos < ulStringLen; ) { - USHORT uiTmpCount1 = uiCount1; - USHORT uiTmpCount2 = uiCount2; + HB_USHORT uiTmpCount1 = uiCount1; + HB_USHORT uiTmpCount2 = uiCount2; HB_BYTE byte = pbyString[ ulStringPos ] ^ pbyCrypt[ ulCryptPos++ ]; - USHORT tmp; + HB_USHORT tmp; uiTmpCount2 = HB_MKUSHORT( ( HB_LOBYTE( uiTmpCount2 ) ^ HB_HIBYTE( uiTmpCount2 ) ), diff --git a/harbour/contrib/hbct/ctmath.c b/harbour/contrib/hbct/ctmath.c index 305a2b365d..495da7c2b5 100644 --- a/harbour/contrib/hbct/ctmath.c +++ b/harbour/contrib/hbct/ctmath.c @@ -129,7 +129,7 @@ HB_FUNC( SETPREC ) int iArgErrorMode = ct_getargerrormode(); if( iArgErrorMode != CT_ARGERR_IGNORE ) - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETPREC, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETPREC, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retc_null(); @@ -173,7 +173,7 @@ HB_FUNC( GETPREC ) int iArgErrorMode = ct_getargerrormode(); if( iArgErrorMode != CT_ARGERR_IGNORE ) - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_GETPREC, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_GETPREC, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } } diff --git a/harbour/contrib/hbct/ctmath2.c b/harbour/contrib/hbct/ctmath2.c index 383aaf6297..d3c110c022 100644 --- a/harbour/contrib/hbct/ctmath2.c +++ b/harbour/contrib/hbct/ctmath2.c @@ -130,7 +130,7 @@ HB_FUNC( FLOOR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { pSubst = - ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FLOOR, NULL, HB_ERR_FUNCNAME, 0, + ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FLOOR, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } if( pSubst != NULL ) @@ -202,7 +202,7 @@ HB_FUNC( CEILING ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CEILING, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -277,7 +277,7 @@ HB_FUNC( SIGN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SIGN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -362,7 +362,7 @@ HB_FUNC( LOG10 ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_LOG10, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -436,7 +436,7 @@ HB_FUNC( FACT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FACT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/ctpad.c b/harbour/contrib/hbct/ctpad.c index bc3ef63e3e..134e2c17d5 100644 --- a/harbour/contrib/hbct/ctpad.c +++ b/harbour/contrib/hbct/ctpad.c @@ -77,7 +77,7 @@ static void do_pad( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_PAD_PADLEFT ? CT_ERROR_PADLEFT : CT_ERROR_PADRIGHT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, @@ -130,7 +130,7 @@ static void do_pad( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_PAD_PADLEFT ? CT_ERROR_PADLEFT : CT_ERROR_PADRIGHT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, diff --git a/harbour/contrib/hbct/ctstr.c b/harbour/contrib/hbct/ctstr.c index 345adc8943..e077dccf05 100644 --- a/harbour/contrib/hbct/ctstr.c +++ b/harbour/contrib/hbct/ctstr.c @@ -375,7 +375,7 @@ HB_FUNC( CSETREF ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETREF, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETREF, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } } @@ -459,7 +459,7 @@ HB_FUNC( CSETATMUPA ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETATMUPA, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CSETATMUPA, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } } @@ -581,7 +581,7 @@ HB_FUNC( SETATLIKE ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETATLIKE, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETATLIKE, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -613,7 +613,7 @@ HB_FUNC( SETATLIKE ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETATLIKE, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SETATLIKE, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } } diff --git a/harbour/contrib/hbct/ctwfunc.c b/harbour/contrib/hbct/ctwfunc.c index 1c4afa7f1c..1d841e9739 100644 --- a/harbour/contrib/hbct/ctwfunc.c +++ b/harbour/contrib/hbct/ctwfunc.c @@ -95,12 +95,12 @@ HB_FUNC( SETCLEARA ) HB_FUNC( SETCLEARB ) { - USHORT usNew; + HB_USHORT usNew; if( HB_ISNUM( 1 ) ) - usNew = ( USHORT ) hb_parni( 1 ); + usNew = ( HB_USHORT ) hb_parni( 1 ); else if( HB_ISCHAR( 1 ) ) - usNew = ( USHORT ) hb_parc( 1 )[0]; + usNew = ( HB_USHORT ) hb_parc( 1 )[0]; else usNew = 255; diff --git a/harbour/contrib/hbct/ctwin.c b/harbour/contrib/hbct/ctwin.c index 8ac94f43a9..d35de9db75 100644 --- a/harbour/contrib/hbct/ctwin.c +++ b/harbour/contrib/hbct/ctwin.c @@ -582,7 +582,7 @@ static int hb_ctw_CreateWindow( PHB_GTCTW pCTW, int iTop, int iLeft, int iBottom { PHB_CT_WND pWnd; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iRow, iCol, iHeight, iWidth, iTmp; long lIndex; @@ -1618,7 +1618,7 @@ static void hb_ctw_gt_GetScrCursor( PHB_GT pGT, int * piRow, int * piCol, int * } static HB_BOOL hb_ctw_gt_GetScrChar( PHB_GT pGT, int iRow, int iCol, - int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ) + int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ) { PHB_GTCTW pCTW; int iWindow, iShadow; @@ -1676,7 +1676,7 @@ static HB_BOOL hb_ctw_gt_GetScrChar( PHB_GT pGT, int iRow, int iCol, } static HB_BOOL hb_ctw_gt_GetChar( PHB_GT pGT, int iRow, int iCol, - int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ) + int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ) { PHB_GTCTW pCTW; PHB_CT_WND pWnd; @@ -1707,7 +1707,7 @@ static HB_BOOL hb_ctw_gt_GetChar( PHB_GT pGT, int iRow, int iCol, } static HB_BOOL hb_ctw_gt_PutChar( PHB_GT pGT, int iRow, int iCol, - int iColor, HB_BYTE bAttr, USHORT usChar ) + int iColor, HB_BYTE bAttr, HB_USHORT usChar ) { PHB_GTCTW pCTW; int iWindow, iCurrWindow; @@ -1741,7 +1741,7 @@ static HB_BOOL hb_ctw_gt_PutChar( PHB_GT pGT, int iRow, int iCol, { int iClr; HB_BYTE bAtr; - USHORT usCh; + HB_USHORT usCh; if( HB_GTSELF_GETSCRCHAR( pGT, iRow, iCol, &iClr, &bAtr, &usCh ) ) { if( usCh == usChar && iClr == iColor ) diff --git a/harbour/contrib/hbct/finan.c b/harbour/contrib/hbct/finan.c index cdfe805caf..cf5965115a 100644 --- a/harbour/contrib/hbct/finan.c +++ b/harbour/contrib/hbct/finan.c @@ -156,7 +156,7 @@ HB_FUNC( FV ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FV, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -257,7 +257,7 @@ HB_FUNC( PV ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_PV, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -356,7 +356,7 @@ HB_FUNC( PAYMENT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_PAYMENT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -477,7 +477,7 @@ HB_FUNC( PERIODS ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_PERIODS, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -593,7 +593,7 @@ HB_FUNC( RATE ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_RATE, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/justify.c b/harbour/contrib/hbct/justify.c index e6252ad422..3bae4760a2 100644 --- a/harbour/contrib/hbct/justify.c +++ b/harbour/contrib/hbct/justify.c @@ -147,7 +147,7 @@ static void do_justify( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_JUSTIFY_JUSTLEFT ? CT_ERROR_JUSTLEFT : CT_ERROR_JUSTRIGHT, NULL, HB_ERR_FUNCNAME, 0, diff --git a/harbour/contrib/hbct/num1.c b/harbour/contrib/hbct/num1.c index 13ddd8b77a..5bf5879bcb 100644 --- a/harbour/contrib/hbct/num1.c +++ b/harbour/contrib/hbct/num1.c @@ -120,7 +120,7 @@ HB_FUNC( CELSIUS ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CELSIUS, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -187,7 +187,7 @@ HB_FUNC( FAHRENHEIT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_FAHRENHEIT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/numat.c b/harbour/contrib/hbct/numat.c index 5d5ea76bfb..41ea82a803 100644 --- a/harbour/contrib/hbct/numat.c +++ b/harbour/contrib/hbct/numat.c @@ -110,7 +110,7 @@ HB_FUNC( NUMAT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_NUMAT, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_NUMAT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -162,7 +162,7 @@ HB_FUNC( NUMAT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_NUMAT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/pos1.c b/harbour/contrib/hbct/pos1.c index f86012a1ad..4e5a88b1f8 100644 --- a/harbour/contrib/hbct/pos1.c +++ b/harbour/contrib/hbct/pos1.c @@ -175,7 +175,7 @@ static void do_pos1( int iSwitch ) iError = CT_ERROR_POSUPPER; break; } - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, iError, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iError, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/pos2.c b/harbour/contrib/hbct/pos2.c index 054226eb93..05f0fae8e5 100644 --- a/harbour/contrib/hbct/pos2.c +++ b/harbour/contrib/hbct/pos2.c @@ -136,7 +136,7 @@ HB_FUNC( POSCHAR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSCHAR, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -156,7 +156,7 @@ HB_FUNC( POSCHAR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSCHAR, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -252,7 +252,7 @@ HB_FUNC( POSDEL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSDEL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -325,7 +325,7 @@ HB_FUNC( POSINS ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSINS, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSINS, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -361,7 +361,7 @@ HB_FUNC( POSINS ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSINS, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -450,7 +450,7 @@ HB_FUNC( POSREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSREPL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -502,7 +502,7 @@ HB_FUNC( POSREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -522,7 +522,7 @@ HB_FUNC( POSREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/posdiff.c b/harbour/contrib/hbct/posdiff.c index 3358d06119..47f5814a75 100644 --- a/harbour/contrib/hbct/posdiff.c +++ b/harbour/contrib/hbct/posdiff.c @@ -106,7 +106,7 @@ HB_FUNC( POSDIFF ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSDIFF, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSDIFF, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -139,7 +139,7 @@ HB_FUNC( POSDIFF ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSDIFF, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -209,7 +209,7 @@ HB_FUNC( POSEQUAL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -222,7 +222,7 @@ HB_FUNC( POSEQUAL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -265,7 +265,7 @@ HB_FUNC( POSEQUAL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_POSEQUAL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/print.c b/harbour/contrib/hbct/print.c index 67493982e1..0a6c1b1f68 100644 --- a/harbour/contrib/hbct/print.c +++ b/harbour/contrib/hbct/print.c @@ -91,7 +91,7 @@ HB_FUNC( PRINTSTAT ) { - USHORT uiPort = HB_ISNUM( 1 ) ? ( USHORT ) hb_parni( 1 ) : 1; + HB_USHORT uiPort = HB_ISNUM( 1 ) ? ( HB_USHORT ) hb_parni( 1 ) : 1; int Status = 0; #if defined( HB_OS_DOS ) @@ -142,7 +142,7 @@ HB_FUNC( PRINTSTAT ) HB_FUNC( PRINTREADY ) { - USHORT uiPort = HB_ISNUM( 1 ) ? ( USHORT ) hb_parni( 1 ) : 1; + HB_USHORT uiPort = HB_ISNUM( 1 ) ? ( HB_USHORT ) hb_parni( 1 ) : 1; int Status = 0; #if defined( HB_OS_DOS ) diff --git a/harbour/contrib/hbct/range.c b/harbour/contrib/hbct/range.c index 61d551a3de..1c779629c4 100644 --- a/harbour/contrib/hbct/range.c +++ b/harbour/contrib/hbct/range.c @@ -144,7 +144,7 @@ HB_FUNC( RANGEREM ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_RANGEREM, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -272,7 +272,7 @@ HB_FUNC( RANGEREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_RANGEREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/relation.c b/harbour/contrib/hbct/relation.c index a67a880ec0..b3b4842990 100644 --- a/harbour/contrib/hbct/relation.c +++ b/harbour/contrib/hbct/relation.c @@ -152,7 +152,7 @@ HB_FUNC( CHARRELA ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARRELA, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -312,7 +312,7 @@ HB_FUNC( CHARRELREP ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_CHARRELREP, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/remove.c b/harbour/contrib/hbct/remove.c index 00391199bc..c18053238f 100644 --- a/harbour/contrib/hbct/remove.c +++ b/harbour/contrib/hbct/remove.c @@ -121,7 +121,7 @@ static void do_remove( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, sulErrorSubcodes[ iSwitch ], NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/contrib/hbct/replace.c b/harbour/contrib/hbct/replace.c index e6a12b2a1f..8ebaf2f744 100644 --- a/harbour/contrib/hbct/replace.c +++ b/harbour/contrib/hbct/replace.c @@ -144,7 +144,7 @@ static void do_replace( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, sulErrorSubcodes[ iSwitch ], NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/contrib/hbct/screen1.c b/harbour/contrib/hbct/screen1.c index e33eb14251..d93e99d52d 100644 --- a/harbour/contrib/hbct/screen1.c +++ b/harbour/contrib/hbct/screen1.c @@ -104,7 +104,7 @@ HB_FUNC( SCREENATTR ) int iRow, iCol; int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetPos( &iRow, &iCol ); if( HB_ISNUM( 1 ) ) @@ -251,7 +251,7 @@ HB_FUNC( SAYSCREEN ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; if( hb_gtGetChar( iRow, i, &iColor, &bAttr, &usChar ) != HB_SUCCESS ) { if( ++iRow > hb_gtMaxRow() ) @@ -394,7 +394,7 @@ HB_FUNC( INVERTWIN ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); iColor = ( iColor & 0x88 ) | @@ -463,21 +463,21 @@ HB_FUNC( INVERTWIN ) HB_FUNC( UNTEXTWIN ) { int iTop, iLeft, iBottom, iRight; - USHORT usRepl, usInit, usEnd; + HB_USHORT usRepl, usInit, usEnd; if( hb_ctGetWinCord( &iTop, &iLeft, &iBottom, &iRight ) ) { - usRepl = ( USHORT ) hb_ctGetClearChar( 5 ); + usRepl = ( HB_USHORT ) hb_ctGetClearChar( 5 ); if( HB_ISNUM( 6 ) ) - usInit = ( USHORT ) hb_parni( 6 ); + usInit = ( HB_USHORT ) hb_parni( 6 ); else if( hb_parclen( 6 ) > 0 ) usInit = ( HB_UCHAR ) hb_parc( 6 )[0]; else usInit = 176; if( HB_ISNUM( 7 ) ) - usEnd = ( USHORT ) hb_parni( 7 ); + usEnd = ( HB_USHORT ) hb_parni( 7 ); else if( hb_parclen( 7 ) > 0 ) usEnd = ( HB_UCHAR ) hb_parc( 7 )[0]; else @@ -491,7 +491,7 @@ HB_FUNC( UNTEXTWIN ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); if( usInit <= usEnd ? ( usChar < usInit || usChar > usEnd ) : @@ -551,13 +551,13 @@ HB_FUNC( CHARWIN ) if( hb_ctGetWinCord( &iTop, &iLeft, &iBottom, &iRight ) ) { - USHORT usNewChar, usOldChar = 0; + HB_USHORT usNewChar, usOldChar = 0; HB_BOOL fAll = HB_FALSE; - usNewChar = ( USHORT ) hb_ctGetClearChar( 5 ); + usNewChar = ( HB_USHORT ) hb_ctGetClearChar( 5 ); if( HB_ISNUM( 6 ) ) - usOldChar = ( USHORT ) hb_parni( 6 ); + usOldChar = ( HB_USHORT ) hb_parni( 6 ); else if( hb_parclen( 6 ) > 0 ) usOldChar = ( HB_UCHAR ) hb_parc( 6 )[0]; else @@ -571,7 +571,7 @@ HB_FUNC( CHARWIN ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); if( fAll || usChar == usOldChar ) @@ -651,7 +651,7 @@ HB_FUNC( COLORWIN ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); if( fAll || iColor == iOldColor ) @@ -715,7 +715,7 @@ HB_FUNC( SCREENTEXT ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); *szText++ = ( char ) usChar; ++iCol; @@ -782,7 +782,7 @@ HB_FUNC( COLORREPL ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iRow, iCol, &iColor, &bAttr, &usChar ); if( fAll || iColor == iOldColor ) diff --git a/harbour/contrib/hbct/screen2.c b/harbour/contrib/hbct/screen2.c index e4aeb339ba..8b8d128eab 100644 --- a/harbour/contrib/hbct/screen2.c +++ b/harbour/contrib/hbct/screen2.c @@ -343,7 +343,7 @@ HB_FUNC( SCREENSTR ) { int iColor; BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iRow, iC, &iColor, &bAttr, &usChar ); *szText++ = ( char ) usChar; *szText++ = ( char ) iColor; @@ -386,7 +386,7 @@ HB_FUNC( STRSCREEN ) iC = iCol; do { - USHORT usChar = ( HB_UCHAR ) *szText++; + HB_USHORT usChar = ( HB_UCHAR ) *szText++; int iColor = ( HB_UCHAR ) *szText++; hb_gtPutChar( iRow, iC, iColor, 0, usChar ); ulLen -= 2; diff --git a/harbour/contrib/hbct/strdiff.c b/harbour/contrib/hbct/strdiff.c index d8fdaa36fb..e13bf5bb5b 100644 --- a/harbour/contrib/hbct/strdiff.c +++ b/harbour/contrib/hbct/strdiff.c @@ -180,7 +180,7 @@ HB_FUNC( STRDIFF ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_STRDIFF, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_STRDIFF, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( -1 ); @@ -244,7 +244,7 @@ HB_FUNC( STRDIFF ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_STRDIFF, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/strswap.c b/harbour/contrib/hbct/strswap.c index 5de1d17f5b..1e986c77b8 100644 --- a/harbour/contrib/hbct/strswap.c +++ b/harbour/contrib/hbct/strswap.c @@ -153,7 +153,7 @@ HB_FUNC( STRSWAP ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_STRSWAP, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/tab.c b/harbour/contrib/hbct/tab.c index 3edd4c5c37..94f90a7c03 100644 --- a/harbour/contrib/hbct/tab.c +++ b/harbour/contrib/hbct/tab.c @@ -252,7 +252,7 @@ HB_FUNC( TABEXPAND ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TABEXPAND, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -487,7 +487,7 @@ HB_FUNC( TABPACK ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TABPACK, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/token1.c b/harbour/contrib/hbct/token1.c index dd6955c25d..5b70e07e36 100644 --- a/harbour/contrib/hbct/token1.c +++ b/harbour/contrib/hbct/token1.c @@ -375,7 +375,7 @@ static void do_token1( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKEN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); @@ -397,7 +397,7 @@ static void do_token1( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_TOKEN1_TOKENLOWER ? CT_ERROR_TOKENLOWER : CT_ERROR_TOKENUPPER, NULL, HB_ERR_FUNCNAME, 0, @@ -420,7 +420,7 @@ static void do_token1( int iSwitch ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, iSwitch == DO_TOKEN1_NUMTOKEN ? CT_ERROR_NUMTOKEN : CT_ERROR_ATTOKEN, NULL, HB_ERR_FUNCNAME, 0, diff --git a/harbour/contrib/hbct/token2.c b/harbour/contrib/hbct/token2.c index b1b0b87292..c2c33e99c0 100644 --- a/harbour/contrib/hbct/token2.c +++ b/harbour/contrib/hbct/token2.c @@ -406,7 +406,7 @@ HB_FUNC( TOKENINIT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_TOKENINIT, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_TOKENINIT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -451,7 +451,7 @@ HB_FUNC( TOKENINIT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_TOKENINIT, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_TOKENINIT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -502,7 +502,7 @@ HB_FUNC( TOKENINIT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENINIT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -594,7 +594,7 @@ HB_FUNC( TOKENNEXT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -613,7 +613,7 @@ HB_FUNC( TOKENNEXT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -642,7 +642,7 @@ HB_FUNC( TOKENNEXT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } if( HB_ISCHAR( 3 ) && HB_ISBYREF( 3 ) ) @@ -676,7 +676,7 @@ HB_FUNC( TOKENNEXT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -742,7 +742,7 @@ HB_FUNC( TOKENNUM ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNUM, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -815,7 +815,7 @@ HB_FUNC( TOKENEND ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENEND, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -955,7 +955,7 @@ HB_FUNC( TOKENAT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENAT, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENAT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -974,7 +974,7 @@ HB_FUNC( TOKENAT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENAT, NULL, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENAT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } hb_retni( 0 ); @@ -1084,7 +1084,7 @@ HB_FUNC( RESTTOKEN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - ct_error( ( USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_RESTTOKEN, + ct_error( ( HB_USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_RESTTOKEN, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); } @@ -1113,7 +1113,7 @@ HB_FUNC( RESTTOKEN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_RESTTOKEN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/trig.c b/harbour/contrib/hbct/trig.c index 5f3b443d0b..c1d9e0a33a 100644 --- a/harbour/contrib/hbct/trig.c +++ b/harbour/contrib/hbct/trig.c @@ -182,7 +182,7 @@ HB_FUNC( SIN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SIN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -260,7 +260,7 @@ HB_FUNC( COS ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_COS, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -338,7 +338,7 @@ HB_FUNC( TAN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TAN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -411,7 +411,7 @@ HB_FUNC( COT ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_COT, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -490,7 +490,7 @@ HB_FUNC( ASIN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ASIN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -570,7 +570,7 @@ HB_FUNC( ACOS ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ACOS, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -654,7 +654,7 @@ HB_FUNC( ATAN ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATAN, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -751,7 +751,7 @@ HB_FUNC( ATN2 ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_ATN2, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -835,7 +835,7 @@ HB_FUNC( SINH ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_SINH, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -914,7 +914,7 @@ HB_FUNC( COSH ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_COSH, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -994,7 +994,7 @@ HB_FUNC( TANH ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TANH, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -1058,7 +1058,7 @@ HB_FUNC( RTOD ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_RTOD, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } @@ -1121,7 +1121,7 @@ HB_FUNC( DTOR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_DTOR, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/wordrepl.c b/harbour/contrib/hbct/wordrepl.c index b3cd43db1c..c77633ddad 100644 --- a/harbour/contrib/hbct/wordrepl.c +++ b/harbour/contrib/hbct/wordrepl.c @@ -222,7 +222,7 @@ HB_FUNC( WORDREPL ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_WORDREPL, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbct/wordtoch.c b/harbour/contrib/hbct/wordtoch.c index de6fa5079e..7b22efecab 100644 --- a/harbour/contrib/hbct/wordtoch.c +++ b/harbour/contrib/hbct/wordtoch.c @@ -158,7 +158,7 @@ HB_FUNC( WORDTOCHAR ) if( iArgErrorMode != CT_ARGERR_IGNORE ) { - pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG, + pSubst = ct_error_subst( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_WORDTOCHAR, NULL, HB_ERR_FUNCNAME, 0, EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 5e9fb5402f..a5fc61264e 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -270,13 +270,13 @@ struct _HB_EXTREF; typedef struct _HB_STACK_STATE { - LONG lBaseItem; /* stack base offset of previous func/proc */ - ULONG ulPrivateBase; /* memvars base offset of previous func/proc */ - void * pStatics; /* statics frame of previous func/proc */ - USHORT uiClass; /* class when message is sent */ - USHORT uiMethod; /* number of class method */ - USHORT uiLineNo; /* current line number */ - USHORT fDebugging; /* debugger active */ + LONG lBaseItem; /* stack base offset of previous func/proc */ + ULONG ulPrivateBase; /* memvars base offset of previous func/proc */ + void * pStatics; /* statics frame of previous func/proc */ + HB_USHORT uiClass; /* class when message is sent */ + HB_USHORT uiMethod; /* number of class method */ + HB_USHORT uiLineNo; /* current line number */ + HB_USHORT fDebugging; /* debugger active */ } HB_STACK_STATE, * PHB_STACK_STATE; /* used to save/restore stack state in hb_vmDo)_ */ @@ -294,10 +294,10 @@ struct hb_struHash struct hb_struBlock { struct _HB_CODEBLOCK * value; - USHORT paramcnt; - USHORT lineno; - USHORT hclass; - USHORT method; + HB_USHORT paramcnt; + HB_USHORT lineno; + HB_USHORT hclass; + HB_USHORT method; }; struct hb_struPointer @@ -316,20 +316,20 @@ struct hb_struDateTime struct hb_struDouble { double value; - USHORT length; - USHORT decimal; + HB_USHORT length; + HB_USHORT decimal; }; struct hb_struInteger { - int value; - USHORT length; + int value; + HB_USHORT length; }; struct hb_struLong { HB_MAXINT value; - USHORT length; + HB_USHORT length; }; struct hb_struLogical @@ -378,16 +378,16 @@ struct hb_struSymbol { PHB_SYMB value; PHB_STACK_STATE stackstate; /* function stack state */ - USHORT paramcnt; /* number of passed parameters in function call */ - USHORT paramdeclcnt; /* number of declared parameters in function definition */ + HB_USHORT paramcnt; /* number of passed parameters in function call */ + HB_USHORT paramdeclcnt; /* number of declared parameters in function definition */ }; struct hb_struRecover { const HB_BYTE * recover; /* address of recover code */ ULONG base; /* previous recover base */ - USHORT flags; /* previous recovery state and recover type */ - USHORT request; /* requested action */ + HB_USHORT flags; /* previous recovery state and recover type */ + HB_USHORT request; /* requested action */ }; /* items hold at the virtual machine stack */ @@ -421,8 +421,8 @@ typedef struct _HB_BASEARRAY PHB_ITEM pItems; /* pointer to the array items */ HB_SIZE ulLen; /* number of items in the array */ HB_SIZE ulAllocated; /* number of allocated items */ - USHORT uiClass; /* offset to the classes base if it is an object */ - USHORT uiPrevCls; /* for fixing after access super */ + HB_USHORT uiClass; /* offset to the classes base if it is an object */ + HB_USHORT uiPrevCls; /* for fixing after access super */ } HB_BASEARRAY, * PHB_BASEARRAY, * HB_BASEARRAY_PTR; #ifndef _HB_HASH_INTERNAL_ @@ -441,7 +441,7 @@ typedef struct _HB_CODEBLOCK PHB_SYMB pDefSymb; /* symbol where the codeblock was created */ PHB_ITEM pLocals; /* table with referenced local variables */ void * pStatics; /* STATICs base frame */ - USHORT uiLocals; /* number of referenced local variables */ + HB_USHORT uiLocals; /* number of referenced local variables */ HB_SHORT dynBuffer; /* is pcode buffer allocated dynamically, SHORT used instead of HB_BOOL intentionally to force optimal alignment */ } HB_CODEBLOCK, * PHB_CODEBLOCK, * HB_CODEBLOCK_PTR; @@ -550,9 +550,9 @@ extern HB_EXPORT void * hb_xmemset( void * pDestArg, int iFill, HB_SIZE ulLen ); /* virtual memory */ typedef unsigned long HB_VMHANDLE; -extern HB_EXPORT HB_VMHANDLE hb_xvalloc( HB_SIZE nSize, USHORT nFlags ); +extern HB_EXPORT HB_VMHANDLE hb_xvalloc( HB_SIZE nSize, HB_USHORT nFlags ); extern HB_EXPORT void hb_xvfree( HB_VMHANDLE h ); -extern HB_EXPORT HB_VMHANDLE hb_xvrealloc( HB_VMHANDLE h, HB_SIZE nSize, USHORT nFlags ); +extern HB_EXPORT HB_VMHANDLE hb_xvrealloc( HB_VMHANDLE h, HB_SIZE nSize, HB_USHORT nFlags ); extern HB_EXPORT void * hb_xvlock( HB_VMHANDLE h ); extern HB_EXPORT void hb_xvunlock( HB_VMHANDLE h ); extern HB_EXPORT void * hb_xvwire( HB_VMHANDLE h ); @@ -846,7 +846,7 @@ extern HB_EXPORT HB_BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArr extern HB_EXPORT PHB_ITEM hb_arrayClone( PHB_ITEM pArray ); /* returns a duplicate of an existing array, including all nested items */ extern HB_EXPORT PHB_ITEM hb_arrayCloneTo( PHB_ITEM pDest, PHB_ITEM pArray ); /* returns a duplicate of an existing array, including all nested items */ extern HB_EXPORT HB_BOOL hb_arraySort( PHB_ITEM pArray, HB_SIZE * pulStart, HB_SIZE * pulCount, PHB_ITEM pBlock ); /* sorts an array item */ -extern HB_EXPORT PHB_ITEM hb_arrayFromStack( USHORT uiLen ); /* Creates and returns an Array of n Elements from the Eval Stack - Does NOT pop the items. */ +extern HB_EXPORT PHB_ITEM hb_arrayFromStack( HB_USHORT uiLen ); /* Creates and returns an Array of n Elements from the Eval Stack - Does NOT pop the items. */ extern HB_EXPORT PHB_ITEM hb_arrayFromParams( int iLevel ); /* Creates and returns an Array of Generic Parameters for a given call level */ extern HB_EXPORT PHB_ITEM hb_arrayBaseParams( void ); /* Creates and returns an Array of Generic Parameters for current base symbol. */ extern HB_EXPORT PHB_ITEM hb_arraySelfParams( void ); /* Creates and returns an Array of Generic Parameters for current base symbol with self item */ @@ -1032,7 +1032,7 @@ extern HB_EXPORT HB_BOOL hb_winmainArgGet( HANDLE * phInstance, HANDLE * phPrevI /* Codeblock management */ extern HB_EXPORT void * hb_codeblockId( PHB_ITEM pItem ); /* retrieves the codeblock unique ID */ -extern HB_CODEBLOCK_PTR hb_codeblockNew( const HB_BYTE * pBuffer, USHORT uiLocals, const HB_BYTE * pLocalPosTable, PHB_SYMB pSymbols, HB_SIZE ulLen ); /* create a code-block */ +extern HB_CODEBLOCK_PTR hb_codeblockNew( const HB_BYTE * pBuffer, HB_USHORT uiLocals, const HB_BYTE * pLocalPosTable, PHB_SYMB pSymbols, HB_SIZE ulLen ); /* create a code-block */ extern HB_CODEBLOCK_PTR hb_codeblockMacroNew( const HB_BYTE * pBuffer, HB_SIZE ulLen ); extern PHB_ITEM hb_codeblockGetVar( PHB_ITEM pItem, LONG iItemPos ); /* get local variable referenced in a codeblock */ extern PHB_ITEM hb_codeblockGetRef( HB_CODEBLOCK_PTR pCBlock, LONG iItemPos ); /* get local variable passed by reference */ @@ -1082,7 +1082,7 @@ extern char * hb_compDecodeString( int iMethod, const char * szText, HB_SI /* misc */ extern char * hb_procname( int iLevel, char * szName, HB_BOOL bskipBlock ); /* retrieve a procedure name into a buffer */ -extern HB_BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ); +extern HB_BOOL hb_procinfo( int iLevel, char * szName, HB_USHORT * puiLine, char * szFile ); /* macro compiler */ #if defined( HB_MACRO_SUPPORT ) diff --git a/harbour/include/hbapicls.h b/harbour/include/hbapicls.h index 00a3dac8bc..9c9277e840 100644 --- a/harbour/include/hbapicls.h +++ b/harbour/include/hbapicls.h @@ -94,13 +94,13 @@ extern void hb_clsInit( void ); /* initialize Classy/OO system a extern void hb_clsDoInit( void ); /* initialize Classy/OO system .prg functions */ extern void hb_clsReleaseAll( void ); /* releases all defined classes */ extern void hb_clsIsClassRef( void ); /* classes.c - mark all class internals as used */ -extern HB_BOOL hb_clsHasDestructor( USHORT uiClass ); +extern HB_BOOL hb_clsHasDestructor( HB_USHORT uiClass ); extern PHB_SYMB hb_clsMethodSym( PHB_ITEM pBaseSymbol ); /* returns the real method symbol for given stack symbol */ extern PHB_SYMB hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pSymMsg, PHB_STACK_STATE pStack ); /* returns the method pointer of an object class */ extern HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, PHB_STACK_STATE pStack ); /* create object variable reference */ -extern HB_BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ); -extern HB_BOOL hb_objOperatorCall( USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObject, PHB_ITEM pMsgArg1, PHB_ITEM pMsgArg2 ); +extern HB_BOOL hb_objHasOperator( PHB_ITEM pObject, HB_USHORT uiOperator ); +extern HB_BOOL hb_objOperatorCall( HB_USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObject, PHB_ITEM pMsgArg1, PHB_ITEM pMsgArg2 ); extern void hb_objDestructorCall( PHB_ITEM pObject ); #ifndef HB_NO_PROFILER @@ -111,15 +111,15 @@ extern void hb_mthAddTime( ULONG ); /* profiler from classes.c */ #endif /* _HB_API_INTERNAL_ */ /* class management */ -HB_EXPORT extern const char * hb_clsName( USHORT uiClass ); -HB_EXPORT extern const char * hb_clsFuncName( USHORT uiClass ); -HB_EXPORT extern const char * hb_clsMethodName( USHORT uiClass, USHORT uiMethod ); -HB_EXPORT extern HB_BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ); /* is a class handle inherited from szParentName Class ? */ -HB_EXPORT extern USHORT hb_clsFindClass( const char * szClass, const char * szFunc ); +HB_EXPORT extern const char * hb_clsName( HB_USHORT uiClass ); +HB_EXPORT extern const char * hb_clsFuncName( HB_USHORT uiClass ); +HB_EXPORT extern const char * hb_clsMethodName( HB_USHORT uiClass, HB_USHORT uiMethod ); +HB_EXPORT extern HB_BOOL hb_clsIsParent( HB_USHORT uiClass, const char * szParentName ); /* is a class handle inherited from szParentName Class ? */ +HB_EXPORT extern HB_USHORT hb_clsFindClass( const char * szClass, const char * szFunc ); /* object management */ -HB_EXPORT extern USHORT hb_objGetClass( PHB_ITEM pItem ); /* get object class handle */ -HB_EXPORT extern USHORT hb_objSetClass( PHB_ITEM pItem, const char * szClass, const char * szFunc ); /* get object class handle using class name and class function name */ +HB_EXPORT extern HB_USHORT hb_objGetClass( PHB_ITEM pItem ); /* get object class handle */ +HB_EXPORT extern HB_USHORT hb_objSetClass( PHB_ITEM pItem, const char * szClass, const char * szFunc ); /* get object class handle using class name and class function name */ HB_EXPORT extern const char * hb_objGetClsName( PHB_ITEM pObject ); /* retrieves an object class name */ HB_EXPORT extern const char * hb_objGetRealClsName( PHB_ITEM pObject, const char * szString ); /* retrieves an object class name for a specific message */ @@ -132,11 +132,11 @@ HB_EXPORT extern PHB_ITEM hb_objSendMessage( PHB_ITEM pObj, PHB_DYNS pMessage, HB_EXPORT extern void hb_dbg_objSendMessage( int iProcLevel, PHB_ITEM pObject, PHB_ITEM pMessage, int iParamOffset ); /* Harbour equivalent for Clipper internal __mdCreate() */ -USHORT hb_clsCreate( USHORT usSize, const char * szClassName ); +HB_USHORT hb_clsCreate( HB_USHORT usSize, const char * szClassName ); /* Harbour equivalent for Clipper internal __mdAdd() */ -void hb_clsAdd( USHORT usClassH, const char * szMethodName, PHB_FUNC pFuncPtr ); +void hb_clsAdd( HB_USHORT usClassH, const char * szMethodName, PHB_FUNC pFuncPtr ); /* Harbour equivalent for Clipper internal __mdAssociate() */ -void hb_clsAssociate( USHORT usClassH ); +void hb_clsAssociate( HB_USHORT usClassH ); HB_EXTERN_END diff --git a/harbour/include/hbapierr.h b/harbour/include/hbapierr.h index e2e732f82a..5703dccac6 100644 --- a/harbour/include/hbapierr.h +++ b/harbour/include/hbapierr.h @@ -103,29 +103,29 @@ extern HB_EXPORT PHB_ITEM hb_errGetCargo ( PHB_ITEM pError ); extern HB_EXPORT PHB_ITEM hb_errGetArgs ( PHB_ITEM pError ); extern HB_EXPORT const char * hb_errGetDescription ( PHB_ITEM pError ); extern HB_EXPORT const char * hb_errGetFileName ( PHB_ITEM pError ); -extern HB_EXPORT USHORT hb_errGetFlags ( PHB_ITEM pError ); +extern HB_EXPORT HB_USHORT hb_errGetFlags ( PHB_ITEM pError ); extern HB_EXPORT HB_ERRCODE hb_errGetGenCode ( PHB_ITEM pError ); extern HB_EXPORT const char * hb_errGetOperation ( PHB_ITEM pError ); extern HB_EXPORT HB_ERRCODE hb_errGetOsCode ( PHB_ITEM pError ); -extern HB_EXPORT USHORT hb_errGetSeverity ( PHB_ITEM pError ); +extern HB_EXPORT HB_USHORT hb_errGetSeverity ( PHB_ITEM pError ); extern HB_EXPORT HB_ERRCODE hb_errGetSubCode ( PHB_ITEM pError ); extern HB_EXPORT const char * hb_errGetSubSystem ( PHB_ITEM pError ); -extern HB_EXPORT USHORT hb_errGetTries ( PHB_ITEM pError ); -extern HB_EXPORT USHORT hb_errLaunch ( PHB_ITEM pError ); +extern HB_EXPORT HB_USHORT hb_errGetTries ( PHB_ITEM pError ); +extern HB_EXPORT HB_USHORT hb_errLaunch ( PHB_ITEM pError ); extern HB_EXPORT PHB_ITEM hb_errNew ( void ); extern HB_EXPORT PHB_ITEM hb_errPutCargo ( PHB_ITEM pError, PHB_ITEM pCargo ); extern HB_EXPORT PHB_ITEM hb_errPutArgsArray ( PHB_ITEM pError, PHB_ITEM pArgs ); extern HB_EXPORT PHB_ITEM hb_errPutArgs ( PHB_ITEM pError, ULONG ulArgCount, ... ); extern HB_EXPORT PHB_ITEM hb_errPutDescription ( PHB_ITEM pError, const char * szDescription ); extern HB_EXPORT PHB_ITEM hb_errPutFileName ( PHB_ITEM pError, const char * szFileName ); -extern HB_EXPORT PHB_ITEM hb_errPutFlags ( PHB_ITEM pError, USHORT uiFlags ); +extern HB_EXPORT PHB_ITEM hb_errPutFlags ( PHB_ITEM pError, HB_USHORT uiFlags ); extern HB_EXPORT PHB_ITEM hb_errPutGenCode ( PHB_ITEM pError, HB_ERRCODE uiGenCode ); extern HB_EXPORT PHB_ITEM hb_errPutOperation ( PHB_ITEM pError, const char * szOperation ); extern HB_EXPORT PHB_ITEM hb_errPutOsCode ( PHB_ITEM pError, HB_ERRCODE uiOsCode ); -extern HB_EXPORT PHB_ITEM hb_errPutSeverity ( PHB_ITEM pError, USHORT uiSeverity ); +extern HB_EXPORT PHB_ITEM hb_errPutSeverity ( PHB_ITEM pError, HB_USHORT uiSeverity ); extern HB_EXPORT PHB_ITEM hb_errPutSubCode ( PHB_ITEM pError, HB_ERRCODE uiSubCode ); extern HB_EXPORT PHB_ITEM hb_errPutSubSystem ( PHB_ITEM pError, const char * szSubSystem ); -extern HB_EXPORT PHB_ITEM hb_errPutTries ( PHB_ITEM pError, USHORT uiTries ); +extern HB_EXPORT PHB_ITEM hb_errPutTries ( PHB_ITEM pError, HB_USHORT uiTries ); extern HB_EXPORT void hb_errRelease ( PHB_ITEM pError ); /* Harbour additions */ @@ -135,23 +135,23 @@ extern void hb_errExit ( void ); extern HB_EXPORT PHB_ITEM hb_errLaunchSubst( PHB_ITEM pError ); -extern HB_EXPORT PHB_ITEM hb_errRT_New( USHORT uiSeverity, +extern HB_EXPORT PHB_ITEM hb_errRT_New( HB_USHORT uiSeverity, const char * szSubSystem, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE uiOsCode, - USHORT uiFlags ); + HB_USHORT uiFlags ); -extern HB_EXPORT PHB_ITEM hb_errRT_New_Subst( USHORT uiSeverity, +extern HB_EXPORT PHB_ITEM hb_errRT_New_Subst( HB_USHORT uiSeverity, const char * szSubSystem, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE uiOsCode, - USHORT uiFlags ); + HB_USHORT uiFlags ); extern HB_EXPORT PHB_ITEM hb_errRT_SubstParams( const char * szSubSystem, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation ); @@ -159,13 +159,13 @@ extern HB_EXPORT PHB_ITEM hb_errRT_FileError( PHB_ITEM pError, const char * szSu HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szFileName ); -extern HB_EXPORT USHORT hb_errRT_BASE ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... ); -extern HB_EXPORT USHORT hb_errRT_BASE_Ext1 ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... ); +extern HB_EXPORT HB_USHORT hb_errRT_BASE ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... ); +extern HB_EXPORT HB_USHORT hb_errRT_BASE_Ext1 ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE uiOsCode, HB_USHORT uiFlags, ULONG ulArgCount, ... ); extern HB_EXPORT PHB_ITEM hb_errRT_BASE_Subst ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... ); extern HB_EXPORT void hb_errRT_BASE_SubstR ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... ); -extern HB_EXPORT USHORT hb_errRT_TERM ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE uiOSCode, USHORT uiFlags ); -extern HB_EXPORT USHORT hb_errRT_DBCMD ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation ); -extern HB_EXPORT USHORT hb_errRT_DBCMD_Ext ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, USHORT uiFlags ); +extern HB_EXPORT HB_USHORT hb_errRT_TERM ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE uiOSCode, HB_USHORT uiFlags ); +extern HB_EXPORT HB_USHORT hb_errRT_DBCMD ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation ); +extern HB_EXPORT HB_USHORT hb_errRT_DBCMD_Ext ( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_USHORT uiFlags ); extern HB_EXPORT void hb_errInternal ( HB_ERRCODE errCode, const char * szText, const char * szPar1, const char * szPar2 ) HB_NORETURN_ATTR; extern void hb_errInternalRaw ( HB_ERRCODE errCode, const char * szText, const char * szPar1, const char * szPar2 ); diff --git a/harbour/include/hbapifs.h b/harbour/include/hbapifs.h index 5b9b853925..ebc23f19b1 100644 --- a/harbour/include/hbapifs.h +++ b/harbour/include/hbapifs.h @@ -159,7 +159,7 @@ extern HB_EXPORT HB_ERRCODE hb_fsChDrv ( int iDrive ); /* change working d extern HB_EXPORT void hb_fsClose ( HB_FHANDLE hFileHandle ); /* close a file */ extern HB_EXPORT void hb_fsCommit ( HB_FHANDLE hFileHandle ); /* commit updates of a file */ extern HB_EXPORT HB_FHANDLE hb_fsCreate ( const char * pszFileName, HB_FATTR ulAttr ); /* create a file */ -extern HB_EXPORT HB_FHANDLE hb_fsCreateEx ( const char * pszFilename, HB_FATTR ulAttr, USHORT uiFlags ); /* create a file, with specific open mode */ +extern HB_EXPORT HB_FHANDLE hb_fsCreateEx ( const char * pszFilename, HB_FATTR ulAttr, HB_USHORT uiFlags ); /* create a file, with specific open mode */ extern HB_EXPORT HB_FHANDLE hb_fsCreateTemp ( const char * pszDir, const char * pszPrefix, HB_FATTR ulAttr, char * pszName ); /* create a temporary file from components */ extern HB_EXPORT HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir, const char * pszPrefix, const char * pszExt, HB_FATTR ulAttr ); /* create a temporary file from components */ extern HB_EXPORT HB_ERRCODE hb_fsTempDir ( char * pszDir ); /* full buffer with system temp directory (or empty on error) */ @@ -175,23 +175,23 @@ extern HB_EXPORT HB_BOOL hb_fsFile ( const char * pszFileName ); /* de extern HB_EXPORT HB_BOOL hb_fsIsDirectory ( const char * pszFilename ); extern HB_EXPORT HB_FOFFSET hb_fsFSize ( const char * pszFileName, HB_BOOL bUseDirEntry ); /* determine the size of a file */ extern HB_EXPORT HB_FHANDLE hb_fsExtOpen ( const char * pszFileName, const char * pDefExt, - USHORT uiFlags, const char * pPaths, PHB_ITEM pError ); /* open a file using default extension and a list of paths */ + HB_USHORT uiFlags, const char * pPaths, PHB_ITEM pError ); /* open a file using default extension and a list of paths */ extern HB_EXPORT char * hb_fsExtName ( const char * pFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths ); /* convert file name for hb_fsExtOpen, caller must free the returned buffer */ + HB_USHORT uiExFlags, const char * pPaths ); /* convert file name for hb_fsExtOpen, caller must free the returned buffer */ extern HB_EXPORT HB_ERRCODE hb_fsIsDrv ( int iDrive ); /* determine if a drive number is a valid drive */ extern HB_EXPORT HB_BOOL hb_fsIsDevice ( HB_FHANDLE hFileHandle ); /* determine if a file is attached to a device (console?) */ -extern HB_EXPORT HB_BOOL hb_fsLock ( HB_FHANDLE hFileHandle, HB_SIZE ulStart, HB_SIZE ulLength, USHORT uiMode ); /* request a lock on a portion of a file */ +extern HB_EXPORT HB_BOOL hb_fsLock ( HB_FHANDLE hFileHandle, HB_SIZE ulStart, HB_SIZE ulLength, HB_USHORT uiMode ); /* request a lock on a portion of a file */ extern HB_EXPORT HB_BOOL hb_fsLockLarge ( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, - HB_FOFFSET ulLength, USHORT uiMode ); /* request a lock on a portion of a file using 64bit API */ + HB_FOFFSET ulLength, HB_USHORT uiMode ); /* request a lock on a portion of a file using 64bit API */ extern HB_EXPORT HB_BOOL hb_fsMkDir ( const char * pszDirName ); /* create a directory */ -extern HB_EXPORT HB_FHANDLE hb_fsOpen ( const char * pszFileName, USHORT uiFlags ); /* open a file */ -extern HB_EXPORT USHORT hb_fsRead ( HB_FHANDLE hFileHandle, void * pBuff, USHORT ulCount ); /* read contents of a file into a buffer (<=64K) */ +extern HB_EXPORT HB_FHANDLE hb_fsOpen ( const char * pszFileName, HB_USHORT uiFlags ); /* open a file */ +extern HB_EXPORT HB_USHORT hb_fsRead ( HB_FHANDLE hFileHandle, void * pBuff, HB_USHORT ulCount ); /* read contents of a file into a buffer (<=64K) */ extern HB_EXPORT HB_SIZE hb_fsReadLarge ( HB_FHANDLE hFileHandle, void * pBuff, HB_SIZE ulCount ); /* read contents of a file into a buffer (>64K) */ extern HB_EXPORT HB_SIZE hb_fsReadAt ( HB_FHANDLE hFileHandle, void * pBuff, HB_SIZE ulCount, HB_FOFFSET llOffset ); /* read from given offset contents of a file into a buffer (>64K) */ extern HB_EXPORT HB_BOOL hb_fsRmDir ( const char * pszDirName ); /* remove a directory */ extern HB_EXPORT HB_BOOL hb_fsRename ( const char * pszOldName, const char * pszNewName ); /* rename a file */ -extern HB_EXPORT HB_SIZE hb_fsSeek ( HB_FHANDLE hFileHandle, HB_ISIZ lOffset, USHORT uiMode ); /* reposition an open file */ -extern HB_EXPORT HB_FOFFSET hb_fsSeekLarge ( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT uiFlags ); /* reposition an open file using 64bit API */ +extern HB_EXPORT HB_SIZE hb_fsSeek ( HB_FHANDLE hFileHandle, HB_ISIZ lOffset, HB_USHORT uiMode ); /* reposition an open file */ +extern HB_EXPORT HB_FOFFSET hb_fsSeekLarge ( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, HB_USHORT uiFlags ); /* reposition an open file using 64bit API */ extern HB_EXPORT HB_FOFFSET hb_fsTell ( HB_FHANDLE hFileHandle ); /* retrieve the current position of a file */ extern HB_EXPORT int hb_fsSetDevMode ( HB_FHANDLE hFileHandle, int iDevMode ); /* change the device mode of a file (text/binary) */ extern HB_EXPORT HB_BOOL hb_fsGetFileTime ( const char * pszFileName, long * plJulian, long * plMillisec ); @@ -199,9 +199,9 @@ extern HB_EXPORT HB_BOOL hb_fsSetFileTime ( const char * pszFileName, long lJ extern HB_EXPORT HB_BOOL hb_fsGetAttr ( const char * pszFileName, HB_FATTR * pulAttr ); extern HB_EXPORT HB_BOOL hb_fsSetAttr ( const char * pszFileName, HB_FATTR ulAttr ); extern HB_EXPORT void hb_fsSetError ( HB_ERRCODE uiError ); /* set the file system DOS error number */ -extern HB_EXPORT void hb_fsSetIOError ( HB_BOOL fResult, USHORT uiOperation ); /* set the file system error number after IO operation */ +extern HB_EXPORT void hb_fsSetIOError ( HB_BOOL fResult, HB_USHORT uiOperation ); /* set the file system error number after IO operation */ extern HB_EXPORT HB_BOOL hb_fsTruncAt ( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset ); /* truncate file to given size */ -extern HB_EXPORT USHORT hb_fsWrite ( HB_FHANDLE hFileHandle, const void * pBuff, USHORT ulCount ); /* write to an open file from a buffer (<=64K) */ +extern HB_EXPORT HB_USHORT hb_fsWrite ( HB_FHANDLE hFileHandle, const void * pBuff, HB_USHORT ulCount ); /* write to an open file from a buffer (<=64K) */ extern HB_EXPORT HB_SIZE hb_fsWriteLarge ( HB_FHANDLE hFileHandle, const void * pBuff, HB_SIZE ulCount ); /* write to an open file from a buffer (>64K) */ extern HB_EXPORT HB_SIZE hb_fsWriteAt ( HB_FHANDLE hFileHandle, const void * pBuff, HB_SIZE ulCount, HB_FOFFSET llOffset ); /* write to an open file at given offset from a buffer (>64K) */ extern HB_EXPORT HB_FHANDLE hb_fsPOpen ( const char * pFilename, const char * pMode ); @@ -264,9 +264,9 @@ extern HB_EXPORT void hb_fsFreeSearchPath( HB_PATHNAMES * pSearchList ); extern HB_EXPORT HB_BOOL hb_spFile( const char * pFilename, char * pRetPath ); extern HB_EXPORT HB_BOOL hb_spFileExists( const char * pFilename, char * pRetPath ); -extern HB_EXPORT HB_FHANDLE hb_spOpen( const char * pFilename, USHORT uiFlags ); +extern HB_EXPORT HB_FHANDLE hb_spOpen( const char * pFilename, HB_USHORT uiFlags ); extern HB_EXPORT HB_FHANDLE hb_spCreate( const char * pFilename, HB_FATTR ulAttr ); -extern HB_EXPORT HB_FHANDLE hb_spCreateEx( const char * pFilename, HB_FATTR ulAttr, USHORT uiFlags ); +extern HB_EXPORT HB_FHANDLE hb_spCreateEx( const char * pFilename, HB_FATTR ulAttr, HB_USHORT uiFlags ); /* File Find API structure */ typedef struct @@ -329,7 +329,7 @@ extern HB_EXPORT const char * hb_fsNameConv( const char * szFileName, char ** ps HB_BOOL (* Delete ) ( const char * pszFilename ); HB_BOOL (* Rename ) ( const char * pszFilename, const char * pszNewName ); PHB_FILE (* Open ) ( const char * pszFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths, + HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ); void (* Close ) ( PHB_FILE pFile ); HB_BOOL (* Lock ) ( PHB_FILE, HB_FOFFSET ulStart, HB_FOFFSET ulLen, int iType ); @@ -352,7 +352,7 @@ extern HB_EXPORT HB_BOOL hb_fileExists( const char * pFilename, char * pRet extern HB_EXPORT HB_BOOL hb_fileDelete( const char * pFilename ); extern HB_EXPORT HB_BOOL hb_fileRename( const char * pFilename, const char * pszNewName ); extern HB_EXPORT PHB_FILE hb_fileExtOpen( const char * pszFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths, + HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ); extern HB_EXPORT PHB_FILE hb_fileCreateTemp( const char * pszDir, const char * pszPrefix, HB_FATTR ulAttr, char * pszName ); diff --git a/harbour/include/hbapigt.h b/harbour/include/hbapigt.h index fe2e13aafe..e979348d43 100644 --- a/harbour/include/hbapigt.h +++ b/harbour/include/hbapigt.h @@ -198,11 +198,11 @@ extern HB_EXPORT HB_ERRCODE hb_gtSuspend( void ); /* prepare the reminal for she extern HB_EXPORT HB_ERRCODE hb_gtResume( void ); /* resume the terminal after the shell output */ extern HB_EXPORT int hb_gtReadKey( int iEventMask ); extern HB_EXPORT HB_ERRCODE hb_gtRectSize( int iTop, int iLeft, int iBottom, int iRight, HB_SIZE * pulBuffSize ); -extern HB_EXPORT HB_ERRCODE hb_gtRepChar( int iRow, int iCol, USHORT usChar, HB_SIZE ulCount ); +extern HB_EXPORT HB_ERRCODE hb_gtRepChar( int iRow, int iCol, HB_USHORT usChar, HB_SIZE ulCount ); extern HB_EXPORT HB_ERRCODE hb_gtSave( int iTop, int iLeft, int iBottom, int iRight, void * pScrBuff ); extern HB_EXPORT HB_ERRCODE hb_gtRest( int iTop, int iLeft, int iBottom, int iRight, const void * pScrBuff ); -extern HB_EXPORT HB_ERRCODE hb_gtGetChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ); -extern HB_EXPORT HB_ERRCODE hb_gtPutChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, USHORT usChar ); +extern HB_EXPORT HB_ERRCODE hb_gtGetChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ); +extern HB_EXPORT HB_ERRCODE hb_gtPutChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, HB_USHORT usChar ); extern HB_EXPORT HB_ERRCODE hb_gtBeginWrite( void ); extern HB_EXPORT HB_ERRCODE hb_gtEndWrite( void ); extern HB_EXPORT HB_ERRCODE hb_gtScrDim( int * piHeight, int * piWidth ); @@ -231,10 +231,10 @@ extern HB_EXPORT int hb_gtSetFlag( int iType, int iNewValue ); extern HB_EXPORT int hb_gtGetCurrColor( void ); extern HB_EXPORT int hb_gtGetClearColor( void ); extern HB_EXPORT HB_ERRCODE hb_gtSetClearColor( int iColor ); -extern HB_EXPORT USHORT hb_gtGetClearChar( void ); -extern HB_EXPORT HB_ERRCODE hb_gtSetClearChar( USHORT usChar ); -extern HB_EXPORT HB_ERRCODE hb_gtGetScrChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ); -extern HB_EXPORT HB_ERRCODE hb_gtPutScrChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, USHORT usChar ); +extern HB_EXPORT HB_USHORT hb_gtGetClearChar( void ); +extern HB_EXPORT HB_ERRCODE hb_gtSetClearChar( HB_USHORT usChar ); +extern HB_EXPORT HB_ERRCODE hb_gtGetScrChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ); +extern HB_EXPORT HB_ERRCODE hb_gtPutScrChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, HB_USHORT usChar ); extern HB_EXPORT HB_ERRCODE hb_gtFlush( void ); extern HB_EXPORT HB_ERRCODE hb_gtGetPosEx( int * piRow, int * piCol ); extern HB_EXPORT HB_ERRCODE hb_gtScrollEx( int iTop, int iLeft, int iBottom, int iRight, int iColor, int iChar, int iRows, int iCols ); @@ -290,7 +290,7 @@ extern HB_EXPORT HB_BOOL hb_gtWFlash( void ); extern HB_EXPORT void hb_gtWApp( HB_GT_WND ** wnd ); extern HB_EXPORT void hb_gtWCurrent( HB_GT_WND * wnd ); extern HB_EXPORT void hb_gtWPos( HB_GT_WND * wnd, HB_GT_RECT * rect ); -extern HB_EXPORT HB_BOOL hb_gtWVis( HB_GT_WND * wnd, USHORT uiStatus ); +extern HB_EXPORT HB_BOOL hb_gtWVis( HB_GT_WND * wnd, HB_USHORT uiStatus ); extern HB_EXPORT HB_ERRCODE hb_gtSLR( HB_GT_SLR * pSLR ); /* System Level Request */ extern HB_EXPORT HB_ERRCODE hb_gtModalRead( void * ); diff --git a/harbour/include/hbapiitm.h b/harbour/include/hbapiitm.h index 7c7089ec82..a95fb10dee 100644 --- a/harbour/include/hbapiitm.h +++ b/harbour/include/hbapiitm.h @@ -61,7 +61,7 @@ HB_EXTERN_BEGIN typedef struct { - USHORT paramCount; + HB_USHORT paramCount; PHB_ITEM pItems[ HB_EVAL_PARAM_MAX_ + 1 ]; } HB_EVALINFO, * PHB_EVALINFO; @@ -104,8 +104,8 @@ extern HB_EXPORT void * hb_itemGetPtrGC ( PHB_ITEM pItem, const HB_GC_FUN extern HB_EXPORT PHB_SYMB hb_itemGetSymbol ( PHB_ITEM pItem ); extern HB_EXPORT PHB_ITEM hb_itemNew ( PHB_ITEM pNull ); extern HB_EXPORT void hb_itemInit ( PHB_ITEM pItem ); -extern HB_EXPORT USHORT hb_itemPCount ( void ); -extern HB_EXPORT PHB_ITEM hb_itemParam ( USHORT uiParam ); +extern HB_EXPORT HB_USHORT hb_itemPCount ( void ); +extern HB_EXPORT PHB_ITEM hb_itemParam ( HB_USHORT uiParam ); extern HB_EXPORT PHB_ITEM hb_itemPutC ( PHB_ITEM pItem, const char * szText ); extern HB_EXPORT PHB_ITEM hb_itemPutCL ( PHB_ITEM pItem, const char * szText, HB_SIZE ulLen ); extern HB_EXPORT PHB_ITEM hb_itemPutCConst ( PHB_ITEM pItem, const char * szText ); @@ -149,9 +149,9 @@ extern HB_EXPORT PHB_ITEM hb_itemPutNLLLen ( PHB_ITEM pItem, HB_LONGLONG lNu /* Non Clipper compliant internal API */ -extern HB_EXPORT PHB_ITEM hb_itemParamPtr ( USHORT uiParam, long lMask ); -extern HB_EXPORT HB_BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ); -extern HB_EXPORT HB_BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ); +extern HB_EXPORT PHB_ITEM hb_itemParamPtr ( HB_USHORT uiParam, long lMask ); +extern HB_EXPORT HB_BOOL hb_itemParamStore( HB_USHORT uiParam, PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_itemParamStoreForward( HB_USHORT uiParam, PHB_ITEM pItem ); extern HB_EXPORT int hb_itemStrCmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, HB_BOOL bForceExact ); /* our string compare */ extern HB_EXPORT int hb_itemStrICmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, HB_BOOL bForceExact ); /* our string compare */ extern HB_EXPORT void hb_itemCopy ( PHB_ITEM pDest, PHB_ITEM pSource ); /* copies an item to one place to another respecting its containts */ diff --git a/harbour/include/hbapirdd.h b/harbour/include/hbapirdd.h index a86d558192..900cec934c 100644 --- a/harbour/include/hbapirdd.h +++ b/harbour/include/hbapirdd.h @@ -168,12 +168,12 @@ struct _RDDNODE; typedef struct { const char * atomName; /* FIELD (symbol) name */ - USHORT uiType; /* FIELD type */ - USHORT uiTypeExtended; /* FIELD type extended */ - USHORT uiLen; /* Overall FIELD length */ - USHORT uiDec; /* Decimal places of numeric FIELD */ - USHORT uiFlags; /* FIELD flags */ - USHORT unused; + HB_USHORT uiType; /* FIELD type */ + HB_USHORT uiTypeExtended; /* FIELD type extended */ + HB_USHORT uiLen; /* Overall FIELD length */ + HB_USHORT uiDec; /* Decimal places of numeric FIELD */ + HB_USHORT uiFlags; /* FIELD flags */ + HB_USHORT unused; } DBFIELDINFO; typedef DBFIELDINFO * LPDBFIELDINFO; @@ -188,8 +188,8 @@ typedef DBFIELDINFO * LPDBFIELDINFO; typedef struct { - USHORT uiArea; /* Work Area number of the data store */ - USHORT unused; + HB_USHORT uiArea; /* Work Area number of the data store */ + HB_USHORT unused; const char * abName; /* The qualified name of the data store */ const char * atomAlias; /* The logical name of the data store */ HB_BOOL fShared; /* Share mode of the data store */ @@ -327,9 +327,9 @@ typedef DBSCOPEINFO * LPDBSCOPEINFO; typedef struct { - USHORT nScope; /* scope operation: TOPSCOPE/ENDSCOPE */ - USHORT unused; - PHB_ITEM scopeValue; + HB_USHORT nScope; /* scope operation: TOPSCOPE/ENDSCOPE */ + HB_USHORT unused; + PHB_ITEM scopeValue; } DBORDSCOPEINFO; typedef DBORDSCOPEINFO * LPDBORDSCOPEINFO; @@ -410,8 +410,8 @@ typedef DBEVALINFO * LPDBEVALINFO; typedef struct { - USHORT uiSource; /* Field index number from the source */ - USHORT uiDest; /* Destination field index number */ + HB_USHORT uiSource; /* Field index number from the source */ + HB_USHORT uiDest; /* Destination field index number */ } DBTRANSITEM; typedef DBTRANSITEM * LPDBTRANSITEM; @@ -432,8 +432,8 @@ typedef struct struct _AREA * lpaSource; /* Pointer to source work area */ struct _AREA * lpaDest; /* Pointer to dest work area */ DBSCOPEINFO dbsci; /* Scope to limit transfer */ - USHORT uiFlags; /* Transfer attributes */ - USHORT uiItemCount; /* Number of items below */ + HB_USHORT uiFlags; /* Transfer attributes */ + HB_USHORT uiItemCount; /* Number of items below */ LPDBTRANSITEM lpTransItems; /* Array of items */ } DBTRANSINFO; @@ -453,8 +453,8 @@ typedef DBTRANSINFO * LPDBTRANSINFO; typedef struct { - USHORT uiField; /* Index into the workarea->fields structure */ - USHORT uiFlags; /* Sort flags */ + HB_USHORT uiField; /* Index into the workarea->fields structure */ + HB_USHORT uiFlags; /* Sort flags */ } DBSORTITEM; typedef DBSORTITEM * LPDBSORTITEM; @@ -482,8 +482,8 @@ typedef struct { DBTRANSINFO dbtri; /* Destination workarea transfer information */ LPDBSORTITEM lpdbsItem; /* Fields which compose the key values for the sort */ - USHORT uiItemCount; /* The number of fields above */ - USHORT unused; + HB_USHORT uiItemCount; /* The number of fields above */ + HB_USHORT unused; } DBSORTINFO; typedef DBSORTINFO * LPDBSORTINFO; @@ -500,9 +500,9 @@ typedef DBSORTINFO * LPDBSORTINFO; typedef struct { - PHB_ITEM itmRecID; - USHORT uiMethod; - USHORT fResult; + PHB_ITEM itmRecID; + HB_USHORT uiMethod; + HB_USHORT fResult; } DBLOCKINFO; typedef DBLOCKINFO * LPDBLOCKINFO; @@ -519,14 +519,14 @@ typedef DBLOCKINFO * LPDBLOCKINFO; typedef struct _FIELD { - USHORT uiType; /* Field type */ - USHORT uiTypeExtended; /* Field type - extended */ - USHORT uiLen; /* Field length */ - USHORT uiDec; /* Decimal length */ - USHORT uiFlags; /* FIELD flags */ - USHORT uiArea; /* Area this field resides in */ - void * sym; /* Symbol that represents the field */ - struct _FIELD * lpfNext; /* The next field in the list */ + HB_USHORT uiType; /* Field type */ + HB_USHORT uiTypeExtended; /* Field type - extended */ + HB_USHORT uiLen; /* Field length */ + HB_USHORT uiDec; /* Decimal length */ + HB_USHORT uiFlags; /* FIELD flags */ + HB_USHORT uiArea; /* Area this field resides in */ + void * sym; /* Symbol that represents the field */ + struct _FIELD * lpfNext; /* The next field in the list */ } FIELD; typedef FIELD * LPFIELD; @@ -555,11 +555,11 @@ typedef struct _AREA /* I'll add this soon, Druzus */ struct _RDDFUNCS * lprfsSuper;/* Virtual super method table for this workarea */ #endif - USHORT uiArea; /* The number assigned to this workarea */ - USHORT rddID; /* RDD id */ + HB_USHORT uiArea; /* The number assigned to this workarea */ + HB_USHORT rddID; /* RDD id */ void * atomAlias; /* Pointer to the alias symbol for this workarea */ - USHORT uiFieldExtent; /* Total number of fields allocated */ - USHORT uiFieldCount; /* Total number of fields used */ + HB_USHORT uiFieldExtent; /* Total number of fields allocated */ + HB_USHORT uiFieldCount; /* Total number of fields used */ LPFIELD lpFields; /* Pointer to an array of fields */ void * lpFieldExtents; /* Void ptr for additional field properties */ PHB_ITEM valResult; /* All purpose result holder */ @@ -572,10 +572,10 @@ typedef struct _AREA DBFILTERINFO dbfi; /* Filter in effect */ LPDBORDERCONDINFO lpdbOrdCondInfo; LPDBRELINFO lpdbRelations; /* Parent/Child relationships used */ - USHORT uiParents; /* Number of parents for this area */ - USHORT uiMaxFieldNameLength; - USHORT heap; - USHORT heapSize; + HB_USHORT uiParents; /* Number of parents for this area */ + HB_USHORT uiMaxFieldNameLength; + HB_USHORT heap; + HB_USHORT heapSize; PHB_CODEPAGE cdPage; /* Area's codepage pointer */ } AREA; @@ -594,7 +594,7 @@ typedef HB_ERRCODE ( * DBENTRYP_B )( AREAP area, HB_BOOL param ); typedef HB_ERRCODE ( * DBENTRYP_L )( AREAP area, LONG param ); typedef HB_ERRCODE ( * DBENTRYP_UL )( AREAP area, ULONG param ); typedef HB_ERRCODE ( * DBENTRYP_I )( AREAP area, PHB_ITEM param ); -typedef HB_ERRCODE ( * DBENTRYP_SI )( AREAP area, USHORT index, PHB_ITEM param ); +typedef HB_ERRCODE ( * DBENTRYP_SI )( AREAP area, HB_USHORT index, PHB_ITEM param ); typedef HB_ERRCODE ( * DBENTRYP_VO )( AREAP area, LPDBOPENINFO param ); typedef HB_ERRCODE ( * DBENTRYP_VT )( AREAP area, LPDBTRANSINFO param ); typedef HB_ERRCODE ( * DBENTRYP_VF )( AREAP area, LPDBFIELDINFO param ); @@ -608,23 +608,23 @@ typedef HB_ERRCODE ( * DBENTRYP_VOC )( AREAP area, LPDBORDERCREATEINFO param ) typedef HB_ERRCODE ( * DBENTRYP_VOO )( AREAP area, LPDBORDERCONDINFO param ); typedef HB_ERRCODE ( * DBENTRYP_VOS )( AREAP area, LPDBORDSCOPEINFO param ); typedef HB_ERRCODE ( * DBENTRYP_VOI )( AREAP area, LPDBORDERINFO param ); -typedef HB_ERRCODE ( * DBENTRYP_SVOI )( AREAP area, USHORT index, LPDBORDERINFO param ); -typedef HB_ERRCODE ( * DBENTRYP_SP )( AREAP area, USHORT * param ); +typedef HB_ERRCODE ( * DBENTRYP_SVOI )( AREAP area, HB_USHORT index, LPDBORDERINFO param ); +typedef HB_ERRCODE ( * DBENTRYP_SP )( AREAP area, HB_USHORT * param ); typedef HB_ERRCODE ( * DBENTRYP_P )( AREAP area, const HB_BYTE * param ); typedef HB_ERRCODE ( * DBENTRYP_CP )( AREAP area, char * param ); typedef HB_ERRCODE ( * DBENTRYP_CC )( AREAP area, const char * param ); typedef HB_ERRCODE ( * DBENTRYP_PP )( AREAP area, HB_BYTE ** param ); -typedef HB_ERRCODE ( * DBENTRYP_S )( AREAP area, USHORT param ); +typedef HB_ERRCODE ( * DBENTRYP_S )( AREAP area, HB_USHORT param ); typedef HB_ERRCODE ( * DBENTRYP_LP )( AREAP area, LONG * param ); typedef HB_ERRCODE ( * DBENTRYP_ULP )( AREAP area, ULONG * param ); -typedef HB_ERRCODE ( * DBENTRYP_SVP )( AREAP area, USHORT index, void * param ); -typedef HB_ERRCODE ( * DBENTRYP_SSP )( AREAP area, USHORT index, USHORT * param ); -typedef HB_ERRCODE ( * DBENTRYP_SCP )( AREAP area, USHORT index, char * param ); -typedef HB_ERRCODE ( * DBENTRYP_SCCS )( AREAP area, USHORT index, const char * param, USHORT p3 ); -typedef HB_ERRCODE ( * DBENTRYP_VSP )( AREAP area, USHORT action, ULONG lRecord ); -typedef HB_ERRCODE ( * DBENTRYP_SVL )( AREAP area, USHORT index, ULONG * param ); -typedef HB_ERRCODE ( * DBENTRYP_SSI )( AREAP area, USHORT p1, USHORT p2, PHB_ITEM p3 ); -typedef HB_ERRCODE ( * DBENTRYP_ISI )( AREAP area, PHB_ITEM p1, USHORT p2, PHB_ITEM p3 ); +typedef HB_ERRCODE ( * DBENTRYP_SVP )( AREAP area, HB_USHORT index, void * param ); +typedef HB_ERRCODE ( * DBENTRYP_SSP )( AREAP area, HB_USHORT index, HB_USHORT * param ); +typedef HB_ERRCODE ( * DBENTRYP_SCP )( AREAP area, HB_USHORT index, char * param ); +typedef HB_ERRCODE ( * DBENTRYP_SCCS )( AREAP area, HB_USHORT index, const char * param, HB_USHORT p3 ); +typedef HB_ERRCODE ( * DBENTRYP_VSP )( AREAP area, HB_USHORT action, ULONG lRecord ); +typedef HB_ERRCODE ( * DBENTRYP_SVL )( AREAP area, HB_USHORT index, ULONG * param ); +typedef HB_ERRCODE ( * DBENTRYP_SSI )( AREAP area, HB_USHORT p1, HB_USHORT p2, PHB_ITEM p3 ); +typedef HB_ERRCODE ( * DBENTRYP_ISI )( AREAP area, PHB_ITEM p1, HB_USHORT p2, PHB_ITEM p3 ); typedef HB_ERRCODE ( * DBENTRYP_BIB )( AREAP area, HB_BOOL p1, PHB_ITEM p2, HB_BOOL p3 ); typedef HB_ERRCODE ( * DBENTRYP_VPL )( AREAP area, void * p1, LONG p2 ); typedef HB_ERRCODE ( * DBENTRYP_VPLP )( AREAP area, void * p1, LONG * p2 ); @@ -635,7 +635,7 @@ typedef HB_ERRCODE ( * DBENTRYP_LSP )( AREAP area, ULONG p1, HB_BOOL * p2 ); typedef HB_ERRCODE ( * DBENTRYP_R )( struct _RDDNODE * pRDD ); typedef HB_ERRCODE ( * DBENTRYP_RVVL )( struct _RDDNODE * pRDD, PHB_ITEM p1, PHB_ITEM p2, ULONG p3 ); typedef HB_ERRCODE ( * DBENTRYP_RVVVL )( struct _RDDNODE * pRDD, PHB_ITEM p1, PHB_ITEM p2, PHB_ITEM p3, ULONG p4 ); -typedef HB_ERRCODE ( * DBENTRYP_RSLV )( struct _RDDNODE * pRDD, USHORT index, ULONG p1, PHB_ITEM p2 ); +typedef HB_ERRCODE ( * DBENTRYP_RSLV )( struct _RDDNODE * pRDD, HB_USHORT index, ULONG p1, PHB_ITEM p2 ); /*--------------------* Virtual Method Table *----------------------*/ typedef struct _RDDFUNCS @@ -797,14 +797,14 @@ typedef RDDFUNCS * PRDDFUNCS; typedef struct _RDDNODE { char szName[ HB_RDD_MAX_DRIVERNAME_LEN + 1 ]; /* Name of RDD */ - USHORT rddID; /* RDD id */ - USHORT uiType; /* Type of RDD */ - USHORT uiAreaSize; /* Size of the WorkArea */ - USHORT unused; /* filler */ - RDDFUNCS pTable; /* Table of functions */ - RDDFUNCS pSuperTable; /* Table of super functions */ - void *lpvCargo; /* RDD specific extended data, if used then - RDD should free it in EXIT() non WA method */ + HB_USHORT rddID; /* RDD id */ + HB_USHORT uiType; /* Type of RDD */ + HB_USHORT uiAreaSize; /* Size of the WorkArea */ + HB_USHORT unused; /* filler */ + RDDFUNCS pTable; /* Table of functions */ + RDDFUNCS pSuperTable; /* Table of super functions */ + void *lpvCargo; /* RDD specific extended data, if used then + RDD should free it in EXIT() non WA method */ } RDDNODE; typedef RDDNODE * LPRDDNODE; @@ -1171,20 +1171,20 @@ extern HB_EXPORT HB_ERRCODE hb_rddGetAliasNumber( const char * szAlias, int * extern HB_EXPORT void * hb_rddAllocWorkAreaAlias( const char * szAlias, int iArea ); extern HB_EXPORT void * hb_rddGetCurrentWorkAreaPointer( void ); extern HB_EXPORT void * hb_rddGetWorkAreaPointer( int iArea ); -extern HB_EXPORT USHORT hb_rddInsertAreaNode( const char *szDriver ); +extern HB_EXPORT HB_USHORT hb_rddInsertAreaNode( const char *szDriver ); extern HB_EXPORT void hb_rddReleaseCurrentArea( void ); -extern HB_EXPORT int hb_rddRegister( const char * szDriver, USHORT uiType ); +extern HB_EXPORT int hb_rddRegister( const char * szDriver, HB_USHORT uiType ); extern HB_EXPORT HB_ERRCODE hb_rddInherit( RDDFUNCS * pTable, const RDDFUNCS * pSubTable, RDDFUNCS * pSuperTable, const char * szDrvName ); -extern HB_EXPORT LPRDDNODE hb_rddGetNode( USHORT uiNode ); -extern HB_EXPORT LPRDDNODE hb_rddFindNode( const char * szDriver, USHORT * uiIndex ); -extern HB_EXPORT USHORT hb_rddFieldIndex( AREAP pArea, const char * szName ); -extern HB_EXPORT USHORT hb_rddFieldExpIndex( AREAP pArea, const char * szField ); +extern HB_EXPORT LPRDDNODE hb_rddGetNode( HB_USHORT uiNode ); +extern HB_EXPORT LPRDDNODE hb_rddFindNode( const char * szDriver, HB_USHORT * uiIndex ); +extern HB_EXPORT HB_USHORT hb_rddFieldIndex( AREAP pArea, const char * szName ); +extern HB_EXPORT HB_USHORT hb_rddFieldExpIndex( AREAP pArea, const char * szField ); extern HB_EXPORT const char * hb_rddDefaultDrv( const char * szDriver ); extern HB_EXPORT HB_ERRCODE hb_rddSelectFirstAvailable( void ); extern HB_EXPORT HB_ERRCODE hb_rddVerifyAliasName( const char * szAlias ); -extern HB_EXPORT void * hb_rddNewAreaNode( LPRDDNODE pRddNode, USHORT uiRddID ); -extern HB_EXPORT PHB_ITEM hb_rddList( USHORT uiType ); +extern HB_EXPORT void * hb_rddNewAreaNode( LPRDDNODE pRddNode, HB_USHORT uiRddID ); +extern HB_EXPORT PHB_ITEM hb_rddList( HB_USHORT uiType ); extern HB_EXPORT void hb_rddCloseAll( void ); extern HB_EXPORT void hb_rddFlushAll( void ); extern HB_EXPORT void hb_rddUnLockAll( void ); @@ -1193,13 +1193,13 @@ extern HB_EXPORT void hb_rddSetNetErr( HB_BOOL fNetErr ); extern HB_EXPORT HB_ERRCODE hb_rddOpenTable( const char * szFileName, const char * szDriver, - USHORT uiArea, const char *szAlias, + HB_USHORT uiArea, const char *szAlias, HB_BOOL fShared, HB_BOOL fReadonly, const char * szCpId, ULONG ulConnection, PHB_ITEM pStruct, PHB_ITEM pDelim ); extern HB_EXPORT HB_ERRCODE hb_rddCreateTable( const char * szFileName, const char * szDriver, - USHORT uiArea, const char *szAlias, + HB_USHORT uiArea, const char *szAlias, HB_BOOL fKeepOpen, const char * szCpId, ULONG ulConnection, PHB_ITEM pStruct, PHB_ITEM pDelim ); @@ -1223,7 +1223,7 @@ extern HB_EXPORT HB_ERRCODE hb_rddTransRecords( PHB_ITEM pRest, const char *szCpId, PHB_ITEM pDelim ); -extern HB_EXPORT void hb_tblStructure( AREAP pArea, PHB_ITEM pStruct, USHORT uiSize ); +extern HB_EXPORT void hb_tblStructure( AREAP pArea, PHB_ITEM pStruct, HB_USHORT uiSize ); extern HB_EXPORT HB_ERRCODE hb_rddCloseAllParentRelations( AREAP pArea ); extern HB_EXPORT HB_ERRCODE hb_rddEvalWA( PHB_ITEM pBlock ); diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index a7b2e711f9..513143c538 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -147,14 +147,14 @@ extern void hb_compFunctionMarkStatic( HB_COMP_DECL, const char * szFunName extern PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, char cVarType, const char * szFromClass ); extern void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarType ); /* add a new param, local, static variable to a function definition or a public or private */ extern PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope ); -extern const char * hb_compLocalVariableName( PFUNCTION pFunc, USHORT wVar ); /* returns the name of local variable */ -extern const char * hb_compStaticVariableName( HB_COMP_DECL, USHORT wVar ); /* returns the name of static variable */ +extern const char * hb_compLocalVariableName( PFUNCTION pFunc, HB_USHORT wVar ); /* returns the name of local variable */ +extern const char * hb_compStaticVariableName( HB_COMP_DECL, HB_USHORT wVar ); /* returns the name of static variable */ #define HB_SYM_MEMVAR HB_FALSE #define HB_SYM_ALIAS HB_FALSE #define HB_SYM_MSGNAME HB_FALSE #define HB_SYM_FUNCNAME HB_TRUE -extern const char * hb_compSymbolName( HB_COMP_DECL, USHORT ); /* returns a symbol name based on its index on the symbol table */ +extern const char * hb_compSymbolName( HB_COMP_DECL, HB_USHORT ); /* returns a symbol name based on its index on the symbol table */ extern PCOMDECLARED hb_compDeclaredAdd( HB_COMP_DECL, const char * ); diff --git a/harbour/include/hbcompdf.h b/harbour/include/hbcompdf.h index 465d56c9fb..e8c9ee75ed 100644 --- a/harbour/include/hbcompdf.h +++ b/harbour/include/hbcompdf.h @@ -85,7 +85,7 @@ typedef struct _COMDECLARED { const char * szName; /* the name of the symbol */ HB_BYTE cType; - USHORT iParamCount; + HB_USHORT iParamCount; HB_BYTE * cParamTypes; struct _COMCLASS * pClass; struct _COMCLASS * ( * pParamClasses ); @@ -108,7 +108,7 @@ typedef struct _VAR const char * szAlias; /* variable alias namespace */ int iUsed; /* number of times used */ int iDeclLine; /* declaration line number */ - USHORT uiFlags; /* optional falgs, f.e. THREAD STATIC */ + HB_USHORT uiFlags; /* optional falgs, f.e. THREAD STATIC */ HB_BYTE cType; /* optional strong typing */ PCOMCLASS pClass; struct _VAR * pNext; /* pointer to next defined variable */ @@ -247,7 +247,7 @@ typedef enum #define HB_EXPR_COUNT ( HB_EO_PREDEC + 1 ) -typedef USHORT HB_EXPRTYPE; +typedef HB_USHORT HB_EXPRTYPE; typedef struct HB_EXPR_ { @@ -284,7 +284,7 @@ typedef struct HB_EXPR_ { const char * szMacro; /* identifier after the macro operator */ struct HB_EXPR_ * pExprList; /* list elements if &(...) was used */ - USHORT SubType; /* context in which macro is used */ + HB_USHORT SubType; /* context in which macro is used */ unsigned char cMacroOp; /* macro operator */ } asMacro; struct @@ -297,8 +297,8 @@ typedef struct HB_EXPR_ { struct HB_EXPR_ * pExprList; /* list elements */ HB_CBVAR_PTR pLocals; /* list of local variables */ - char * string; /* source code of a codeblock */ - USHORT flags; /* HB_BLOCK_MACRO, HB_BLOCK_LATEEVAL, HB_BLOCK_VPARAMS */ + char * string; /* source code of a codeblock */ + HB_USHORT flags; /* HB_BLOCK_MACRO, HB_BLOCK_LATEEVAL, HB_BLOCK_VPARAMS */ } asCodeblock; struct { @@ -328,7 +328,7 @@ typedef struct HB_EXPR_ ULONG ulLength; ULONG Counter; HB_EXPRTYPE ExprType; /* internal expression type */ - USHORT ValType; /* language level value type */ + HB_USHORT ValType; /* language level value type */ struct HB_EXPR_ *pNext; /* next expression in the list of expressions */ } HB_EXPR, *HB_EXPR_PTR; @@ -350,11 +350,11 @@ typedef struct HB_ELSEIF_ /* support structure for EXIT and LOOP statements */ typedef struct HB_LOOPEXIT_ { - ULONG ulOffset; - HB_BOOL fCanLoop; - USHORT wSeqCounter; - USHORT wAlwaysCounter; - USHORT wWithObjectCnt; + ULONG ulOffset; + HB_BOOL fCanLoop; + HB_USHORT wSeqCounter; + HB_USHORT wAlwaysCounter; + HB_USHORT wWithObjectCnt; struct HB_LOOPEXIT_ * pLoopList; struct HB_LOOPEXIT_ * pExitList; struct HB_LOOPEXIT_ * pNext; @@ -392,9 +392,9 @@ typedef struct __FUNC { const char * szName; /* name of a defined Clipper function */ HB_SYMBOLSCOPE cScope; /* scope of a defined Clipper function */ - USHORT funFlags; /* some flags we may need */ - USHORT wParamCount; /* number of declared parameters */ - USHORT wParamNum; /* current parameter number */ + HB_USHORT funFlags; /* some flags we may need */ + HB_USHORT wParamCount; /* number of declared parameters */ + HB_USHORT wParamNum; /* current parameter number */ PVAR pLocals; /* pointer to local variables list */ PVAR pStatics; /* pointer to static variables list */ PVAR pFields; /* pointer to fields variables list */ @@ -421,14 +421,14 @@ typedef struct __FUNC HB_SWITCHCMD_PTR pSwitch; HB_ELSEIF_PTR elseif; HB_RTVAR_PTR rtvars; - USHORT wSeqCounter; - USHORT wAlwaysCounter; - USHORT wForCounter; - USHORT wIfCounter; - USHORT wWhileCounter; - USHORT wCaseCounter; - USHORT wSwitchCounter; - USHORT wWithObjectCnt; + HB_USHORT wSeqCounter; + HB_USHORT wAlwaysCounter; + HB_USHORT wForCounter; + HB_USHORT wIfCounter; + HB_USHORT wWhileCounter; + HB_USHORT wCaseCounter; + HB_USHORT wSwitchCounter; + HB_USHORT wWithObjectCnt; } _FUNC, * PFUNCTION; /* structure to hold an INLINE block of source */ @@ -554,26 +554,26 @@ typedef struct HB_PCODE_INFO_ /* compiled pcode container for macro compiler */ HB_CBVAR_PTR pLocals; } HB_PCODE_INFO, * HB_PCODE_INFO_PTR; -typedef struct HB_MACRO_ /* a macro compiled pcode container */ +typedef struct HB_MACRO_ /* a macro compiled pcode container */ { /* common to compiler members */ - int mode; /* HB_MODE_* */ - int supported; /* various flags for supported capabilities */ + int mode; /* HB_MODE_* */ + int supported; /* various flags for supported capabilities */ const struct _HB_COMP_FUNCS * funcs; /* macro compiler only members */ - char * string; /* compiled string */ - ULONG length; /* length of the string */ - int Flags; /* some flags we may need */ - int status; /* status of compilation */ - HB_ITEM_PTR pError; /* error object returned from the parser */ + char * string; /* compiled string */ + ULONG length; /* length of the string */ + int Flags; /* some flags we may need */ + int status; /* status of compilation */ + HB_ITEM_PTR pError; /* error object returned from the parser */ HB_PCODE_INFO_PTR pCodeInfo; /* pointer to pcode buffer and info */ - void * pLex; /* lexer buffer pointer */ - void * pExprLst; /* list with allocated expressions */ - void * pIdentLst; /* list with allocated identifiers */ - int exprType; /* type of successfully compiled expression */ - USHORT uiListElements; /* number of elements in macro list expression */ - USHORT uiNameLen; /* the maximum symbol name length */ + void * pLex; /* lexer buffer pointer */ + void * pExprLst; /* list with allocated expressions */ + void * pIdentLst; /* list with allocated identifiers */ + int exprType; /* type of successfully compiled expression */ + HB_USHORT uiListElements; /* number of elements in macro list expression */ + HB_USHORT uiNameLen; /* the maximum symbol name length */ } HB_MACRO; #else diff --git a/harbour/include/hbdbsort.h b/harbour/include/hbdbsort.h index 5d3ad4392a..589192a4f6 100644 --- a/harbour/include/hbdbsort.h +++ b/harbour/include/hbdbsort.h @@ -72,8 +72,8 @@ typedef struct _DBQUICKSORT HB_BYTE * pSwapBufferB; HB_BYTE * pCmpBufferA; HB_BYTE * pCmpBufferB; - USHORT uiRecordLen; - USHORT uiMaxRecords; + HB_USHORT uiRecordLen; + HB_USHORT uiMaxRecords; LPDBSORTINFO pSortInfo; } DBQUICKSORT; @@ -83,9 +83,9 @@ typedef DBQUICKSORT * LPDBQUICKSORT; * PROTOTYPES * ---------- */ -extern HB_BOOL hb_dbQSortInit( LPDBQUICKSORT pQuickSort, LPDBSORTINFO pSortInfo, USHORT uiRecordLen ); +extern HB_BOOL hb_dbQSortInit( LPDBQUICKSORT pQuickSort, LPDBSORTINFO pSortInfo, HB_USHORT uiRecordLen ); extern void hb_dbQSortExit( LPDBQUICKSORT pQuickSort ); -extern HB_BOOL hb_dbQSortAdvance( LPDBQUICKSORT pQuickSort, USHORT uiCount ); +extern HB_BOOL hb_dbQSortAdvance( LPDBQUICKSORT pQuickSort, HB_USHORT uiCount ); extern void hb_dbQSortComplete( LPDBQUICKSORT pQuickSort ); HB_EXTERN_END diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index d502fca66b..bb43cce52a 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -736,7 +736,7 @@ typedef HB_U32 HB_FATTR; #define HB_LOWORD( l ) ( ( HB_U16 ) ( l ) ) #define HB_HIWORD( l ) ( ( HB_U16 ) ( ( ( l ) >> 16 ) & 0xFFFF ) ) #define HB_MKSHORT( lo, hi ) ( ( HB_SHORT ) ( ( ( HB_I16 ) ( hi ) ) << 8 ) | ( lo ) ) -#define HB_MKUSHORT( lo, hi ) ( ( USHORT ) ( ( ( HB_U16 ) ( hi ) ) << 8 ) | ( lo ) ) +#define HB_MKUSHORT( lo, hi ) ( ( HB_USHORT ) ( ( ( HB_U16 ) ( hi ) ) << 8 ) | ( lo ) ) #define HB_MKLONG( b1, b2, b3, b4 ) ( ( LONG ) \ ( ( ( ( HB_I32 ) ( b4 ) ) << 24 ) | \ ( ( ( HB_I32 ) ( b3 ) ) << 16 ) | \ @@ -1447,7 +1447,7 @@ typedef HB_U32 HB_FATTR; #define HB_GET_LE_INT64( p ) (( HB_I64 ) HB_GET_LE_UINT64( p )) #define HB_PCODE_MKSHORT( p ) (( HB_SHORT ) HB_GET_LE_INT16( p )) -#define HB_PCODE_MKUSHORT( p ) (( USHORT ) HB_GET_LE_UINT16( p )) +#define HB_PCODE_MKUSHORT( p ) (( HB_USHORT ) HB_GET_LE_UINT16( p )) #define HB_PCODE_MKLONG( p ) (( LONG ) HB_GET_LE_INT32( p )) #define HB_PCODE_MKULONG( p ) (( ULONG ) HB_GET_LE_UINT32( p )) #define HB_PCODE_MKLONGLONG( p ) (( HB_LONGLONG ) HB_GET_LE_INT64( p )) diff --git a/harbour/include/hbexpra.c b/harbour/include/hbexpra.c index fe4babcd07..dfa434852a 100644 --- a/harbour/include/hbexpra.c +++ b/harbour/include/hbexpra.c @@ -216,7 +216,7 @@ HB_EXPR_PTR hb_compExprNewFunCall( HB_EXPR_PTR pName, HB_EXPR_PTR pParms, HB_COM /* Reserved Clipper function used to handle GET variables */ HB_EXPR_PTR pArg, pNext; - USHORT uiCount; + HB_USHORT uiCount; /* pArg has to be reduced to eliminate possible problems with * cloned expressions in SETGET block diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index d1dd8e41d0..44d5908b04 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -578,7 +578,7 @@ static HB_EXPR_FUNC( hb_compExprUseArray ) case HB_EA_PUSH_PCODE: { - USHORT usItems = ( USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf ); + HB_USHORT usItems = ( HB_USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf ); if( usItems == 0 ) { @@ -673,7 +673,7 @@ static HB_EXPR_FUNC( hb_compExprUseHash ) case HB_EA_PUSH_PCODE: { - USHORT usItems = ( USHORT ) ( pSelf->ulLength >> 1 ); + HB_USHORT usItems = ( HB_USHORT ) ( pSelf->ulLength >> 1 ); /* Note: direct type change */ pSelf->ExprType = HB_ET_ARGLIST; HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); @@ -1219,7 +1219,7 @@ static HB_EXPR_FUNC( hb_compExprUseMacroArgList ) case HB_EA_PUSH_PCODE: { HB_EXPR_PTR pExpr = pSelf->value.asList.pExprList; - USHORT usItems = 0; + HB_USHORT usItems = 0; while( pExpr ) { @@ -1718,7 +1718,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) { HB_EXPR_PTR pName = pSelf->value.asFunCall.pFunName; HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; - USHORT usCount = ( USHORT ) hb_compExprParamListLen( pParms ); + HB_USHORT usCount = ( HB_USHORT ) hb_compExprParamListLen( pParms ); #ifndef HB_MACRO_SUPPORT if( hb_compFunCallCheck( HB_COMP_PARAM, pName->value.asSymbol, usCount ) ) @@ -2086,7 +2086,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) case HB_EA_PUSH_PCODE: { HB_BOOL fArgsList = HB_FALSE; - USHORT usCount = 0; + HB_USHORT usCount = 0; if( pSelf->value.asFunCall.pFunName->ExprType == HB_ET_FUNNAME ) { @@ -2103,7 +2103,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) */ if( pSelf->value.asFunCall.pParms ) { - usCount = ( USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf->value.asFunCall.pParms ); + usCount = ( HB_USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf->value.asFunCall.pParms ); fArgsList = pSelf->value.asFunCall.pParms->ExprType == HB_ET_MACROARGLIST; if( usCount ) HB_EXPR_USE( pSelf->value.asFunCall.pParms, HB_EA_PUSH_PCODE ); @@ -2128,7 +2128,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) case HB_EA_STATEMENT: { HB_BOOL fArgsList = HB_FALSE; - USHORT usCount = 0; + HB_USHORT usCount = 0; if( pSelf->value.asFunCall.pFunName->ExprType == HB_ET_FUNNAME ) { @@ -2142,7 +2142,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) if( pSelf->value.asFunCall.pParms ) { - usCount = ( USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf->value.asFunCall.pParms ); + usCount = ( HB_USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf->value.asFunCall.pParms ); fArgsList = pSelf->value.asFunCall.pParms->ExprType == HB_ET_MACROARGLIST; if( usCount ) HB_EXPR_USE( pSelf->value.asFunCall.pParms, HB_EA_PUSH_PCODE ); @@ -4680,7 +4680,7 @@ static void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, HB_BYTE bOpEq, HB_COMP_DEC { if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_MACRO ) { - USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; + HB_USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; if( usType == HB_ET_MACRO_VAR ) { /* NOTE: direct type change */ @@ -4831,7 +4831,7 @@ static void hb_compExprUseOperEq( HB_EXPR_PTR pSelf, HB_BYTE bOpEq, HB_COMP_DECL { if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_MACRO ) { - USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; + HB_USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; if( usType == HB_ET_MACRO_VAR ) { /* NOTE: direct type change */ @@ -4947,7 +4947,7 @@ static void hb_compExprPushPreOp( HB_EXPR_PTR pSelf, HB_BYTE bOper, HB_COMP_DECL if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_MACRO && pSelf->value.asOperator.pLeft->value.asMacro.SubType == HB_ET_MACRO_VAR ) { - USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; + HB_USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; /* NOTE: direct type change */ pSelf->value.asOperator.pLeft->value.asMacro.SubType = HB_ET_MACRO_REFER; HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_PUSH_PCODE ); @@ -5054,7 +5054,7 @@ static void hb_compExprPushPostOp( HB_EXPR_PTR pSelf, HB_BYTE bOper, HB_COMP_DEC if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_MACRO && pSelf->value.asOperator.pLeft->value.asMacro.SubType == HB_ET_MACRO_VAR ) { - USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; + HB_USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; /* NOTE: direct type change */ pSelf->value.asOperator.pLeft->value.asMacro.SubType = HB_ET_MACRO_REFER; HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_PUSH_PCODE ); @@ -5163,7 +5163,7 @@ static void hb_compExprUsePreOp( HB_EXPR_PTR pSelf, HB_BYTE bOper, HB_COMP_DECL if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_MACRO && pSelf->value.asOperator.pLeft->value.asMacro.SubType == HB_ET_MACRO_VAR ) { - USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; + HB_USHORT usType = pSelf->value.asOperator.pLeft->value.asMacro.SubType; /* NOTE: direct type change */ pSelf->value.asOperator.pLeft->value.asMacro.SubType = HB_ET_MACRO_REFER; HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_PUSH_PCODE ); diff --git a/harbour/include/hbexprop.h b/harbour/include/hbexprop.h index 472785ffba..114ec20c9a 100644 --- a/harbour/include/hbexprop.h +++ b/harbour/include/hbexprop.h @@ -198,8 +198,8 @@ extern HB_BOOL hb_compExprReduceLEN( HB_EXPR_PTR, HB_COMP_DECL ); extern HB_BOOL hb_compExprReduceASC( HB_EXPR_PTR, HB_COMP_DECL ); extern HB_BOOL hb_compExprReduceINT( HB_EXPR_PTR, HB_COMP_DECL ); extern HB_BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR, HB_COMP_DECL ); -extern HB_BOOL hb_compExprReduceSTOT( HB_EXPR_PTR, USHORT usCount, HB_COMP_DECL ); -extern HB_BOOL hb_compExprReduceSTOD( HB_EXPR_PTR, USHORT usCount, HB_COMP_DECL ); +extern HB_BOOL hb_compExprReduceSTOT( HB_EXPR_PTR, HB_USHORT usCount, HB_COMP_DECL ); +extern HB_BOOL hb_compExprReduceSTOD( HB_EXPR_PTR, HB_USHORT usCount, HB_COMP_DECL ); extern HB_BOOL hb_compExprReduceDTOS( HB_EXPR_PTR, HB_COMP_DECL ); extern HB_BOOL hb_compExprReduceCTOD( HB_EXPR_PTR, HB_COMP_DECL ); extern HB_BOOL hb_compExprReduceUPPER( HB_EXPR_PTR, HB_COMP_DECL ); diff --git a/harbour/include/hbgtcore.h b/harbour/include/hbgtcore.h index 89962846c2..de17e5678c 100644 --- a/harbour/include/hbgtcore.h +++ b/harbour/include/hbgtcore.h @@ -110,135 +110,135 @@ struct _HB_GT_BASE; typedef struct { - HB_BOOL (* Lock) ( HB_GT_PTR ); - void (* Unlock) ( HB_GT_PTR ); - void (* Init) ( HB_GT_PTR, HB_FHANDLE, HB_FHANDLE, HB_FHANDLE ); - void (* Exit) ( HB_GT_PTR ); - void * (* New) ( HB_GT_PTR ); - void (* Free) ( HB_GT_PTR ); - void (* Mark) ( HB_GT_PTR ); - HB_BOOL (* Resize) ( HB_GT_PTR, int, int ); - HB_BOOL (* SetMode) ( HB_GT_PTR, int, int ); - void (* GetSize) ( HB_GT_PTR, int *, int * ); - void (* SemiCold) ( HB_GT_PTR ); - void (* ColdArea) ( HB_GT_PTR, int, int, int, int ); - void (* ExposeArea) ( HB_GT_PTR, int, int, int, int ); - void (* ScrollArea) ( HB_GT_PTR, int, int, int, int, int, USHORT, int, int ); - void (* TouchLine) ( HB_GT_PTR, int ); - void (* TouchCell) ( HB_GT_PTR, int, int ); - void (* Redraw) ( HB_GT_PTR, int, int, int ); - void (* RedrawDiff) ( HB_GT_PTR ); - void (* Refresh) ( HB_GT_PTR ); - void (* Flush) ( HB_GT_PTR ); - int (* MaxCol) ( HB_GT_PTR ); - int (* MaxRow) ( HB_GT_PTR ); - HB_BOOL (* CheckPos) ( HB_GT_PTR, int, int, long * ); - void (* SetPos) ( HB_GT_PTR, int, int ); - void (* GetPos) ( HB_GT_PTR, int *, int * ); - HB_BOOL (* IsColor) ( HB_GT_PTR ); - void (* GetColorStr) ( HB_GT_PTR, char * ); - void (* SetColorStr) ( HB_GT_PTR, const char * ); - void (* ColorSelect) ( HB_GT_PTR, int ); - int (* GetColor) ( HB_GT_PTR ); - int (* ColorNum) ( HB_GT_PTR, const char * ); - void (* ColorsToString) ( HB_GT_PTR, int *, int, char *, int ); - void (* StringToColors) ( HB_GT_PTR, const char *, int **, int * ); - void (* GetColorData) ( HB_GT_PTR, int **, int *, int * ); - int (* GetClearColor) ( HB_GT_PTR ); - void (* SetClearColor) ( HB_GT_PTR, int ); - USHORT (* GetClearChar) ( HB_GT_PTR ); - void (* SetClearChar) ( HB_GT_PTR, USHORT ); - int (* GetCursorStyle) ( HB_GT_PTR ); - void (* SetCursorStyle) ( HB_GT_PTR, int ); - void (* GetScrCursor) ( HB_GT_PTR, int *, int *, int * ); - HB_BOOL (* GetScrChar) ( HB_GT_PTR, int, int, int *, HB_BYTE *, USHORT * ); - HB_BOOL (* PutScrChar) ( HB_GT_PTR, int, int, int, HB_BYTE, USHORT ); - void (* DispBegin) ( HB_GT_PTR ); - void (* DispEnd) ( HB_GT_PTR ); - int (* DispCount) ( HB_GT_PTR ); - HB_BOOL (* GetChar) ( HB_GT_PTR, int, int, int *, HB_BYTE *, USHORT * ); - HB_BOOL (* PutChar) ( HB_GT_PTR, int, int, int, HB_BYTE, USHORT ); - long (* RectSize) ( HB_GT_PTR, int, int, int, int ); - void (* Save) ( HB_GT_PTR, int, int, int, int, void * ); - void (* Rest) ( HB_GT_PTR, int, int, int, int, const void * ); - void (* PutText) ( HB_GT_PTR, int, int, int, const char *, HB_SIZE ); - void (* Replicate) ( HB_GT_PTR, int, int, int, HB_BYTE, USHORT, HB_SIZE ); - void (* WriteAt) ( HB_GT_PTR, int, int, const char *, HB_SIZE ); - void (* Write) ( HB_GT_PTR, const char *, HB_SIZE ); - void (* WriteCon) ( HB_GT_PTR, const char *, HB_SIZE ); - void (* SetAttribute) ( HB_GT_PTR, int, int, int, int, int ); - void (* DrawShadow) ( HB_GT_PTR, int, int, int, int, int ); - void (* Scroll) ( HB_GT_PTR, int, int, int, int, int, USHORT, int, int ); - void (* ScrollUp) ( HB_GT_PTR, int, int, USHORT ); - void (* Box) ( HB_GT_PTR, int, int, int, int, const char *, int ); - void (* BoxD) ( HB_GT_PTR, int, int, int, int, const char *, int ); - void (* BoxS) ( HB_GT_PTR, int, int, int, int, const char *, int ); - void (* HorizLine) ( HB_GT_PTR, int, int, int, USHORT, int ); - void (* VertLine) ( HB_GT_PTR, int, int, int, USHORT, int ); - HB_BOOL (* GetBlink) ( HB_GT_PTR ); - void (* SetBlink) ( HB_GT_PTR, HB_BOOL ); - void (* SetSnowFlag) ( HB_GT_PTR, HB_BOOL ); + HB_BOOL (* Lock) ( HB_GT_PTR ); + void (* Unlock) ( HB_GT_PTR ); + void (* Init) ( HB_GT_PTR, HB_FHANDLE, HB_FHANDLE, HB_FHANDLE ); + void (* Exit) ( HB_GT_PTR ); + void * (* New) ( HB_GT_PTR ); + void (* Free) ( HB_GT_PTR ); + void (* Mark) ( HB_GT_PTR ); + HB_BOOL (* Resize) ( HB_GT_PTR, int, int ); + HB_BOOL (* SetMode) ( HB_GT_PTR, int, int ); + void (* GetSize) ( HB_GT_PTR, int *, int * ); + void (* SemiCold) ( HB_GT_PTR ); + void (* ColdArea) ( HB_GT_PTR, int, int, int, int ); + void (* ExposeArea) ( HB_GT_PTR, int, int, int, int ); + void (* ScrollArea) ( HB_GT_PTR, int, int, int, int, int, HB_USHORT, int, int ); + void (* TouchLine) ( HB_GT_PTR, int ); + void (* TouchCell) ( HB_GT_PTR, int, int ); + void (* Redraw) ( HB_GT_PTR, int, int, int ); + void (* RedrawDiff) ( HB_GT_PTR ); + void (* Refresh) ( HB_GT_PTR ); + void (* Flush) ( HB_GT_PTR ); + int (* MaxCol) ( HB_GT_PTR ); + int (* MaxRow) ( HB_GT_PTR ); + HB_BOOL (* CheckPos) ( HB_GT_PTR, int, int, long * ); + void (* SetPos) ( HB_GT_PTR, int, int ); + void (* GetPos) ( HB_GT_PTR, int *, int * ); + HB_BOOL (* IsColor) ( HB_GT_PTR ); + void (* GetColorStr) ( HB_GT_PTR, char * ); + void (* SetColorStr) ( HB_GT_PTR, const char * ); + void (* ColorSelect) ( HB_GT_PTR, int ); + int (* GetColor) ( HB_GT_PTR ); + int (* ColorNum) ( HB_GT_PTR, const char * ); + void (* ColorsToString) ( HB_GT_PTR, int *, int, char *, int ); + void (* StringToColors) ( HB_GT_PTR, const char *, int **, int * ); + void (* GetColorData) ( HB_GT_PTR, int **, int *, int * ); + int (* GetClearColor) ( HB_GT_PTR ); + void (* SetClearColor) ( HB_GT_PTR, int ); + HB_USHORT (* GetClearChar) ( HB_GT_PTR ); + void (* SetClearChar) ( HB_GT_PTR, HB_USHORT ); + int (* GetCursorStyle) ( HB_GT_PTR ); + void (* SetCursorStyle) ( HB_GT_PTR, int ); + void (* GetScrCursor) ( HB_GT_PTR, int *, int *, int * ); + HB_BOOL (* GetScrChar) ( HB_GT_PTR, int, int, int *, HB_BYTE *, HB_USHORT * ); + HB_BOOL (* PutScrChar) ( HB_GT_PTR, int, int, int, HB_BYTE, HB_USHORT ); + void (* DispBegin) ( HB_GT_PTR ); + void (* DispEnd) ( HB_GT_PTR ); + int (* DispCount) ( HB_GT_PTR ); + HB_BOOL (* GetChar) ( HB_GT_PTR, int, int, int *, HB_BYTE *, HB_USHORT * ); + HB_BOOL (* PutChar) ( HB_GT_PTR, int, int, int, HB_BYTE, HB_USHORT ); + long (* RectSize) ( HB_GT_PTR, int, int, int, int ); + void (* Save) ( HB_GT_PTR, int, int, int, int, void * ); + void (* Rest) ( HB_GT_PTR, int, int, int, int, const void * ); + void (* PutText) ( HB_GT_PTR, int, int, int, const char *, HB_SIZE ); + void (* Replicate) ( HB_GT_PTR, int, int, int, HB_BYTE, HB_USHORT, HB_SIZE ); + void (* WriteAt) ( HB_GT_PTR, int, int, const char *, HB_SIZE ); + void (* Write) ( HB_GT_PTR, const char *, HB_SIZE ); + void (* WriteCon) ( HB_GT_PTR, const char *, HB_SIZE ); + void (* SetAttribute) ( HB_GT_PTR, int, int, int, int, int ); + void (* DrawShadow) ( HB_GT_PTR, int, int, int, int, int ); + void (* Scroll) ( HB_GT_PTR, int, int, int, int, int, HB_USHORT, int, int ); + void (* ScrollUp) ( HB_GT_PTR, int, int, HB_USHORT ); + void (* Box) ( HB_GT_PTR, int, int, int, int, const char *, int ); + void (* BoxD) ( HB_GT_PTR, int, int, int, int, const char *, int ); + void (* BoxS) ( HB_GT_PTR, int, int, int, int, const char *, int ); + void (* HorizLine) ( HB_GT_PTR, int, int, int, HB_USHORT, int ); + void (* VertLine) ( HB_GT_PTR, int, int, int, HB_USHORT, int ); + HB_BOOL (* GetBlink) ( HB_GT_PTR ); + void (* SetBlink) ( HB_GT_PTR, HB_BOOL ); + void (* SetSnowFlag) ( HB_GT_PTR, HB_BOOL ); const char * (* Version) ( HB_GT_PTR, int ); - HB_BOOL (* Suspend) ( HB_GT_PTR ); - HB_BOOL (* Resume) ( HB_GT_PTR ); - HB_BOOL (* PreExt) ( HB_GT_PTR ); - HB_BOOL (* PostExt) ( HB_GT_PTR ); - void (* OutStd) ( HB_GT_PTR, const char *, HB_SIZE ); - void (* OutErr) ( HB_GT_PTR, const char *, HB_SIZE ); - void (* Tone) ( HB_GT_PTR, double, double ); - void (* Bell) ( HB_GT_PTR ); - HB_BOOL (* Info) ( HB_GT_PTR, int, PHB_GT_INFO ); - int (* Alert) ( HB_GT_PTR, PHB_ITEM, PHB_ITEM, int, int, double ); - int (* SetFlag) ( HB_GT_PTR, int, int ); + HB_BOOL (* Suspend) ( HB_GT_PTR ); + HB_BOOL (* Resume) ( HB_GT_PTR ); + HB_BOOL (* PreExt) ( HB_GT_PTR ); + HB_BOOL (* PostExt) ( HB_GT_PTR ); + void (* OutStd) ( HB_GT_PTR, const char *, HB_SIZE ); + void (* OutErr) ( HB_GT_PTR, const char *, HB_SIZE ); + void (* Tone) ( HB_GT_PTR, double, double ); + void (* Bell) ( HB_GT_PTR ); + HB_BOOL (* Info) ( HB_GT_PTR, int, PHB_GT_INFO ); + int (* Alert) ( HB_GT_PTR, PHB_ITEM, PHB_ITEM, int, int, double ); + int (* SetFlag) ( HB_GT_PTR, int, int ); /* internationalization */ - HB_BOOL (* SetDispCP) ( HB_GT_PTR, const char *, const char *, HB_BOOL ); - HB_BOOL (* SetKeyCP) ( HB_GT_PTR, const char *, const char * ); + HB_BOOL (* SetDispCP) ( HB_GT_PTR, const char *, const char *, HB_BOOL ); + HB_BOOL (* SetKeyCP) ( HB_GT_PTR, const char *, const char * ); /* keyboard */ - int (* ReadKey) ( HB_GT_PTR, int ); + int (* ReadKey) ( HB_GT_PTR, int ); - int (* InkeyGet) ( HB_GT_PTR, HB_BOOL fWait, double dSeconds, int iEventMask ); - void (* InkeyPut) ( HB_GT_PTR, int iKey ); - void (* InkeyIns) ( HB_GT_PTR, int iKey ); - int (* InkeyLast) ( HB_GT_PTR, int iEventMask ); - int (* InkeyNext) ( HB_GT_PTR, int iEventMask ); - void (* InkeyPoll) ( HB_GT_PTR ); - void (* InkeySetText) ( HB_GT_PTR, const char * szText, HB_SIZE ulLen ); - int (* InkeySetLast) ( HB_GT_PTR, int iKey ); - void (* InkeyReset) ( HB_GT_PTR ); - void (* InkeyExit) ( HB_GT_PTR ); + int (* InkeyGet) ( HB_GT_PTR, HB_BOOL fWait, double dSeconds, int iEventMask ); + void (* InkeyPut) ( HB_GT_PTR, int iKey ); + void (* InkeyIns) ( HB_GT_PTR, int iKey ); + int (* InkeyLast) ( HB_GT_PTR, int iEventMask ); + int (* InkeyNext) ( HB_GT_PTR, int iEventMask ); + void (* InkeyPoll) ( HB_GT_PTR ); + void (* InkeySetText) ( HB_GT_PTR, const char * szText, HB_SIZE ulLen ); + int (* InkeySetLast) ( HB_GT_PTR, int iKey ); + void (* InkeyReset) ( HB_GT_PTR ); + void (* InkeyExit) ( HB_GT_PTR ); /* mouse */ - void (* MouseInit) ( HB_GT_PTR ); - void (* MouseExit) ( HB_GT_PTR ); - HB_BOOL (* MouseIsPresent) ( HB_GT_PTR ); - void (* MouseShow) ( HB_GT_PTR ); - void (* MouseHide) ( HB_GT_PTR ); - HB_BOOL (* MouseGetCursor) ( HB_GT_PTR ); - void (* MouseSetCursor) ( HB_GT_PTR, HB_BOOL ); - int (* MouseCol) ( HB_GT_PTR ); - int (* MouseRow) ( HB_GT_PTR ); - void (* MouseGetPos) ( HB_GT_PTR, int *, int * ); - void (* MouseSetPos) ( HB_GT_PTR, int, int ); - void (* MouseSetBounds) ( HB_GT_PTR, int, int, int, int ); - void (* MouseGetBounds) ( HB_GT_PTR, int *, int *, int *, int * ); - int (* MouseStorageSize) ( HB_GT_PTR ); - void (* MouseSaveState) ( HB_GT_PTR, void * ); - void (* MouseRestoreState) ( HB_GT_PTR, const void * ); - int (* MouseGetDoubleClickSpeed) ( HB_GT_PTR ); - void (* MouseSetDoubleClickSpeed) ( HB_GT_PTR, int ); - int (* MouseCountButton) ( HB_GT_PTR ); - HB_BOOL (* MouseButtonState) ( HB_GT_PTR, int ); - HB_BOOL (* MouseButtonPressed) ( HB_GT_PTR, int, int *, int * ); - HB_BOOL (* MouseButtonReleased) ( HB_GT_PTR, int, int *, int * ); - int (* MouseReadKey) ( HB_GT_PTR, int ); + void (* MouseInit) ( HB_GT_PTR ); + void (* MouseExit) ( HB_GT_PTR ); + HB_BOOL (* MouseIsPresent) ( HB_GT_PTR ); + void (* MouseShow) ( HB_GT_PTR ); + void (* MouseHide) ( HB_GT_PTR ); + HB_BOOL (* MouseGetCursor) ( HB_GT_PTR ); + void (* MouseSetCursor) ( HB_GT_PTR, HB_BOOL ); + int (* MouseCol) ( HB_GT_PTR ); + int (* MouseRow) ( HB_GT_PTR ); + void (* MouseGetPos) ( HB_GT_PTR, int *, int * ); + void (* MouseSetPos) ( HB_GT_PTR, int, int ); + void (* MouseSetBounds) ( HB_GT_PTR, int, int, int, int ); + void (* MouseGetBounds) ( HB_GT_PTR, int *, int *, int *, int * ); + int (* MouseStorageSize) ( HB_GT_PTR ); + void (* MouseSaveState) ( HB_GT_PTR, void * ); + void (* MouseRestoreState) ( HB_GT_PTR, const void * ); + int (* MouseGetDoubleClickSpeed) ( HB_GT_PTR ); + void (* MouseSetDoubleClickSpeed) ( HB_GT_PTR, int ); + int (* MouseCountButton) ( HB_GT_PTR ); + HB_BOOL (* MouseButtonState) ( HB_GT_PTR, int ); + HB_BOOL (* MouseButtonPressed) ( HB_GT_PTR, int, int *, int * ); + HB_BOOL (* MouseButtonReleased) ( HB_GT_PTR, int, int *, int * ); + int (* MouseReadKey) ( HB_GT_PTR, int ); /* Graphics API */ - int (* GfxPrimitive) ( HB_GT_PTR, int, int, int, int, int, int ); - void (* GfxText) ( HB_GT_PTR, int, int, const char *, int, int, int ); + int (* GfxPrimitive) ( HB_GT_PTR, int, int, int, int, int, int ); + void (* GfxText) ( HB_GT_PTR, int, int, const char *, int, int, int ); - void (* WhoCares) ( HB_GT_PTR, void * ); + void (* WhoCares) ( HB_GT_PTR, void * ); } HB_GT_FUNCS, * PHB_GT_FUNCS; @@ -298,7 +298,7 @@ typedef struct _HB_GT_BASE int iCursorShape; int iDispCount; int iExtCount; - USHORT usClearChar; + HB_USHORT usClearChar; int iClearColor; HB_FHANDLE hStdIn; HB_FHANDLE hStdOut; diff --git a/harbour/include/hbinit.h b/harbour/include/hbinit.h index f6bafe6c93..bfdc36ea2c 100644 --- a/harbour/include/hbinit.h +++ b/harbour/include/hbinit.h @@ -57,7 +57,7 @@ HB_EXTERN_BEGIN -extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols, const char * szModuleName, ULONG ulID, USHORT uiPcodeVer ); /* module symbols initialization with extended information */ +extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_USHORT uiPcodeVer ); /* module symbols initialization with extended information */ #define HB_INIT_SYMBOLS_END( func ) HB_INIT_SYMBOLS_EX_END( func, __FILE__, 0L, 0x0000 ) @@ -78,7 +78,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo static PHB_SYMB symbols = symbols_table; \ void func( void ) \ { \ - symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ } #define HB_CALL_ON_STARTUP_BEGIN( func ) \ @@ -99,7 +99,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo #define HB_INIT_SYMBOLS_EX_END( func, module, id, vpcode ) \ }; \ - static PHB_SYMB symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + static PHB_SYMB symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ #define HB_CALL_ON_STARTUP_BEGIN( func ) \ static int func( void ) \ @@ -134,7 +134,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo }; \ static PHB_SYMB symbols = symbols_table; \ HB_CALL_ON_STARTUP_BEGIN( func ) \ - symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ HB_CALL_ON_STARTUP_END( func ) #define HB_CALL_ON_STARTUP_BEGIN( func ) \ @@ -175,7 +175,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo static PHB_SYMB symbols = symbols_table; \ static void __attribute__ ((constructor)) func( void ) \ { \ - symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ } #define HB_CALL_ON_STARTUP_BEGIN( func ) \ @@ -201,7 +201,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo static PHB_SYMB symbols = symbols_table; \ static void func( void ) \ { \ - symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ } #define HB_CALL_ON_STARTUP_BEGIN( func ) \ @@ -229,7 +229,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo static PHB_SYMB symbols = symbols_table; \ static int func( void ) \ { \ - symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ return 0; \ } @@ -265,7 +265,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo static PHB_SYMB symbols = symbols_table; \ static void func( void ) \ { \ - symbols = hb_vmProcessSymbols( symbols_table, ( USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ + symbols = hb_vmProcessSymbols( symbols_table, ( HB_USHORT ) ( sizeof( symbols_table ) / sizeof( HB_SYMB ) ), (module), (id), (vpcode) ); \ } #define HB_CALL_ON_STARTUP_BEGIN( func ) \ diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index 7a5cb97181..e795028e0e 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -390,10 +390,10 @@ typedef struct _HB_PP_TOKEN struct _HB_PP_TOKEN * pMTokens; /* restrict or optional marker token(s) */ const char * value; /* token value */ - USHORT len; /* token value length */ - USHORT spaces; /* leading spaces for stringify */ - USHORT type; /* token type, see HB_PP_TOKEN_* */ - USHORT index; /* index to match marker or 0 */ + HB_USHORT len; /* token value length */ + HB_USHORT spaces; /* leading spaces for stringify */ + HB_USHORT type; /* token type, see HB_PP_TOKEN_* */ + HB_USHORT index; /* index to match marker or 0 */ } HB_PP_TOKEN, * PHB_PP_TOKEN; @@ -473,7 +473,7 @@ typedef struct _HB_PP_MARKERPTR struct _HB_PP_MARKERPTR * pNext; PHB_PP_TOKEN pToken; PHB_PP_TOKEN pMTokens; - USHORT type; + HB_USHORT type; } HB_PP_MARKERPTR, * PHB_PP_MARKERPTR; @@ -481,16 +481,16 @@ typedef struct _HB_PP_MARKERLST { struct _HB_PP_MARKERLST * pNext; PHB_PP_MARKERPTR pMatchMarkers; - USHORT canrepeat; - USHORT index; + HB_USHORT canrepeat; + HB_USHORT index; } HB_PP_MARKERLST, * PHB_PP_MARKERLST; typedef struct { - USHORT canrepeat; + HB_USHORT canrepeat; /* filled when pattern matches for substitution, cleared after */ - USHORT matches; + HB_USHORT matches; PHB_PP_RESULT pResult; } HB_PP_MARKER, * PHB_PP_MARKER; @@ -500,8 +500,8 @@ typedef struct _HB_PP_RULE struct _HB_PP_RULE * pPrev; /* previous rule */ PHB_PP_TOKEN pMatch; /* match patern or NULL */ PHB_PP_TOKEN pResult; /* result patern or NULL */ - USHORT mode; /* comparison mode HB_PP_CMP_* */ - USHORT markers; /* number of markers in marker table */ + HB_USHORT mode; /* comparison mode HB_PP_CMP_* */ + HB_USHORT markers; /* number of markers in marker table */ /* filled when pattern matches for substitution, cleared after */ PHB_PP_MARKER pMarkers; /* marker table */ PHB_PP_TOKEN pNextExpr; /* next expression after match pattern */ @@ -512,8 +512,8 @@ typedef struct _HB_PP_DEFRULE { PHB_PP_TOKEN pMatch; PHB_PP_TOKEN pResult; - USHORT mode; - USHORT markers; + HB_USHORT mode; + HB_USHORT markers; ULONG repeatbits; } HB_PP_DEFRULE, * PHB_PP_DEFRULE; @@ -523,7 +523,7 @@ typedef struct const char * name; /* input name */ ULONG len; /* input name length */ const char * value; /* output name */ - USHORT type; /* HB_PP_TOKEN_* */ + HB_USHORT type; /* HB_PP_TOKEN_* */ } HB_PP_OPERATOR, * PHB_PP_OPERATOR; @@ -557,78 +557,78 @@ HB_PP_FILE, * PHB_PP_FILE; typedef struct { /* common for all included files */ - PHB_PP_OPERATOR pOperators; /* user defined operators */ - PHB_PP_RULE pDefinitions; /* #define table */ - PHB_PP_RULE pTranslations; /* #[x]translate table */ - PHB_PP_RULE pCommands; /* #[x]command table */ - int iOperators; /* number of user defined operators */ - int iDefinitions; /* number of rules in pDefinitions */ - int iTranslations; /* number of rules in pTranslations */ - int iCommands; /* number of rules in pCommands */ + PHB_PP_OPERATOR pOperators; /* user defined operators */ + PHB_PP_RULE pDefinitions; /* #define table */ + PHB_PP_RULE pTranslations; /* #[x]translate table */ + PHB_PP_RULE pCommands; /* #[x]command table */ + int iOperators; /* number of user defined operators */ + int iDefinitions; /* number of rules in pDefinitions */ + int iTranslations; /* number of rules in pTranslations */ + int iCommands; /* number of rules in pCommands */ HB_BYTE pMap[ HB_PP_HASHID_MAX ]; /* translation map */ - PHB_PP_TOKEN pTokenOut; /* preprocessed tokens */ - PHB_PP_TOKEN * pNextTokenPtr; /* pointer to the last NULL pointer in token list */ + PHB_PP_TOKEN pTokenOut; /* preprocessed tokens */ + PHB_PP_TOKEN * pNextTokenPtr; /* pointer to the last NULL pointer in token list */ - PHB_MEM_BUFFER pDumpBuffer; /* buffer for dump output */ - PHB_MEM_BUFFER pOutputBuffer; /* buffer for preprocessed line */ + PHB_MEM_BUFFER pDumpBuffer; /* buffer for dump output */ + PHB_MEM_BUFFER pOutputBuffer; /* buffer for preprocessed line */ - int iLineTot; /* total number of parsed lines */ - int iCycle; /* translation counter */ - int iMaxCycles; /* maximum number of translations */ - int iHideStrings; /* hidden string mode */ - HB_BOOL fTracePragmas; /* display information about set pragmas */ - HB_BOOL fWritePreprocesed; /* write preprocessed data to file (.ppo) */ - HB_BOOL fWriteTrace; /* write translation to file (.ppt) */ + int iLineTot; /* total number of parsed lines */ + int iCycle; /* translation counter */ + int iMaxCycles; /* maximum number of translations */ + int iHideStrings; /* hidden string mode */ + HB_BOOL fTracePragmas; /* display information about set pragmas */ + HB_BOOL fWritePreprocesed; /* write preprocessed data to file (.ppo) */ + HB_BOOL fWriteTrace; /* write translation to file (.ppt) */ - HB_PATHNAMES * pIncludePath; /* search path(s) for included files */ + HB_PATHNAMES * pIncludePath; /* search path(s) for included files */ - char * szOutFileName; /* output file name */ - FILE * file_out; /* output file handle */ - char * szTraceFileName; /* trace output file name */ - FILE * file_trace; /* trace output file handle */ + char * szOutFileName; /* output file name */ + FILE * file_out; /* output file handle */ + char * szTraceFileName; /* trace output file name */ + FILE * file_trace; /* trace output file handle */ - HB_BOOL fQuiet; /* do not show standard information */ - HB_BOOL fEscStr; /* use \ in strings as escape character */ - HB_BOOL fError; /* indicates error in last operation */ - int iErrors; /* number of error during preprocessing */ - int iCondCompile; /* current conditional compilation flag, when not 0 disable preprocessing and output */ - int iCondCount; /* number of nested #if[n]def directive */ - int iCondStackSize; /* size of conditional compilation stack */ - int * pCondStack; /* conditional compilation stack */ + HB_BOOL fQuiet; /* do not show standard information */ + HB_BOOL fEscStr; /* use \ in strings as escape character */ + HB_BOOL fError; /* indicates error in last operation */ + int iErrors; /* number of error during preprocessing */ + int iCondCompile; /* current conditional compilation flag, when not 0 disable preprocessing and output */ + int iCondCount; /* number of nested #if[n]def directive */ + int iCondStackSize; /* size of conditional compilation stack */ + int * pCondStack; /* conditional compilation stack */ /* used to divide line per tokens and tokens manipulations */ - PHB_MEM_BUFFER pBuffer; /* buffer for input and output line */ - int iSpaces; /* leading spaces for next token */ - int iSpacesNL; /* leading spaces ';' token (fCanNextLine) if it will not be line concatenator */ - int iSpacesMin; /* minimal number of leading spaces for next token */ - USHORT usLastType; /* last token type */ - HB_BOOL fCanNextLine; /* ';' token found and we do not know yet if it's command separator or line concatenator */ - HB_BOOL fDirective; /* # directives is parsed */ - HB_BOOL fNewStatement; /* set to HB_TRUE at line begining or after each ';' token */ - PHB_PP_TOKEN pFuncOut; /* function used for each line in HB_PP_STREAM_* dumping */ - PHB_PP_TOKEN pFuncEnd; /* end function for HB_PP_STREAM_* dumping */ - PHB_MEM_BUFFER pStreamBuffer; /* buffer for stream output */ - int iStreamDump; /* stream output, see HB_PP_STREAM_* */ - int iDumpLine; /* line where current dump output begins */ - int iInLineCount; /* number of hb_inLine() functions */ - int iInLineState; /* hb_inLine() state */ - int iInLineBraces; /* braces counter for hb_inLine() */ - int iNestedBlock; /* nested extended block counter */ - int iBlockState; /* state of extended block declaration */ + PHB_MEM_BUFFER pBuffer; /* buffer for input and output line */ + int iSpaces; /* leading spaces for next token */ + int iSpacesNL; /* leading spaces ';' token (fCanNextLine) if it will not be line concatenator */ + int iSpacesMin; /* minimal number of leading spaces for next token */ + HB_USHORT usLastType; /* last token type */ + HB_BOOL fCanNextLine; /* ';' token found and we do not know yet if it's command separator or line concatenator */ + HB_BOOL fDirective; /* # directives is parsed */ + HB_BOOL fNewStatement; /* set to HB_TRUE at line begining or after each ';' token */ + PHB_PP_TOKEN pFuncOut; /* function used for each line in HB_PP_STREAM_* dumping */ + PHB_PP_TOKEN pFuncEnd; /* end function for HB_PP_STREAM_* dumping */ + PHB_MEM_BUFFER pStreamBuffer; /* buffer for stream output */ + int iStreamDump; /* stream output, see HB_PP_STREAM_* */ + int iDumpLine; /* line where current dump output begins */ + int iInLineCount; /* number of hb_inLine() functions */ + int iInLineState; /* hb_inLine() state */ + int iInLineBraces; /* braces counter for hb_inLine() */ + int iNestedBlock; /* nested extended block counter */ + int iBlockState; /* state of extended block declaration */ - PHB_PP_FILE pFile; /* currently preprocessed file structure */ - int iFiles; /* number of open files */ + PHB_PP_FILE pFile; /* currently preprocessed file structure */ + int iFiles; /* number of open files */ - void * cargo; /* parameter passed to user functions */ - PHB_PP_OPEN_FUNC pOpenFunc; /* function to open files */ - PHB_PP_CLOSE_FUNC pCloseFunc; /* function to close files */ - PHB_PP_ERROR_FUNC pErrorFunc; /* function to generate errors */ - PHB_PP_DISP_FUNC pDispFunc; /* function to redirect stdout messages */ - PHB_PP_DUMP_FUNC pDumpFunc; /* function for catching #pragma dump data */ - PHB_PP_INC_FUNC pIncFunc; /* function to register included files */ - PHB_PP_INLINE_FUNC pInLineFunc; /* function for hb_inLine(...) {...} blocks */ - PHB_PP_SWITCH_FUNC pSwitchFunc; /* function for compiler switches with #pragma ... */ + void * cargo; /* parameter passed to user functions */ + PHB_PP_OPEN_FUNC pOpenFunc; /* function to open files */ + PHB_PP_CLOSE_FUNC pCloseFunc; /* function to close files */ + PHB_PP_ERROR_FUNC pErrorFunc; /* function to generate errors */ + PHB_PP_DISP_FUNC pDispFunc; /* function to redirect stdout messages */ + PHB_PP_DUMP_FUNC pDumpFunc; /* function for catching #pragma dump data */ + PHB_PP_INC_FUNC pIncFunc; /* function to register included files */ + PHB_PP_INLINE_FUNC pInLineFunc; /* function for hb_inLine(...) {...} blocks */ + PHB_PP_SWITCH_FUNC pSwitchFunc; /* function for compiler switches with #pragma ... */ } HB_PP_STATE, * PHB_PP_STATE; diff --git a/harbour/include/hbrddcdx.h b/harbour/include/hbrddcdx.h index 2125764349..757752518b 100644 --- a/harbour/include/hbrddcdx.h +++ b/harbour/include/hbrddcdx.h @@ -248,45 +248,45 @@ struct _CDXTAG; /* forward declaration */ typedef struct _CDXKEY { - HB_BYTE * val; - USHORT len; - USHORT mode; - ULONG rec; + HB_BYTE * val; + USHORT len; + USHORT mode; + ULONG rec; } CDXKEY; typedef CDXKEY * LPCDXKEY; typedef struct _CDXPAGE { - ULONG Page; - ULONG Left; - ULONG Right; + ULONG Page; + ULONG Left; + ULONG Right; - HB_BYTE PageType; - int iKeys; - int iCurKey; + HB_BYTE PageType; + int iKeys; + int iCurKey; - HB_BOOL fChanged; - HB_BYTE bUsed; + HB_BOOL fChanged; + HB_BYTE bUsed; - ULONG RNMask; - HB_BYTE ReqByte; - HB_BYTE RNBits; - HB_BYTE DCBits; - HB_BYTE TCBits; - HB_BYTE DCMask; - HB_BYTE TCMask; - HB_BOOL fBufChanged; + ULONG RNMask; + HB_BYTE ReqByte; + HB_BYTE RNBits; + HB_BYTE DCBits; + HB_BYTE TCBits; + HB_BYTE DCMask; + HB_BYTE TCMask; + HB_BOOL fBufChanged; union { CDXEXTNODE extNode; CDXINTNODE intNode; } node; - HB_BYTE bufKeyVal[ CDX_MAXKEY ]; /* buffer for leaf key val or added branch key */ - HB_SHORT bufKeyNum; /* do not change these vars' order */ - HB_SHORT bufKeyPos; /* they have to be just after the node */ - HB_SHORT bufKeyLen; /* and maybe temporary overwriten when adding */ - HB_SHORT iFree; /* new key to interior node record. */ - HB_BYTE * pKeyBuf; /* pointer to uncompressed leaf page key pool */ + HB_BYTE bufKeyVal[ CDX_MAXKEY ]; /* buffer for leaf key val or added branch key */ + HB_SHORT bufKeyNum; /* do not change these vars' order */ + HB_SHORT bufKeyPos; /* they have to be just after the node */ + HB_SHORT bufKeyLen; /* and maybe temporary overwriten when adding */ + HB_SHORT iFree; /* new key to interior node record. */ + HB_BYTE * pKeyBuf; /* pointer to uncompressed leaf page key pool */ /* HB_SHORT iKeyInBuf; */ struct _CDXPAGE * Owner; @@ -314,128 +314,128 @@ typedef CDXLIST * LPCDXLIST; typedef struct _CDXTAG { - char * szName; /* Name of tag */ - char * KeyExpr; /* a tag key expression as text */ - char * ForExpr; /* a tag for expression as text */ - PHB_ITEM pKeyItem; /* item with a macro pcode for a tag key expression */ - PHB_ITEM pForItem; /* item with a macro pcode for a tag for expression */ - USHORT uiType; /* a type of key expression value */ - USHORT uiLen; /* length of the key expression value */ - USHORT nField; /* Field number for simple (one field) key expersion */ - HB_BYTE bTrail; /* trailing character for shorter key value */ - HB_BYTE OptFlags; /* index options flag */ - HB_BOOL AscendKey; /* ascending/descending order flag */ - HB_BOOL UniqueKey; /* unique order flag */ - HB_BOOL Temporary; /* temporary order flag */ - HB_BOOL Custom; /* custom order flag */ - HB_BOOL Template; /* user keyadata in ordKeyAdd()/ordKeyDel() accepted */ - HB_BOOL MultiKey; /* repeated key values in custom indexes accepted */ - HB_BOOL Partial; /* order is updated only partially - missing keys possible */ - HB_BOOL ChgOnly; /* only existing key modifications are updated, no new key added */ - HB_BOOL UsrAscend; /* user settable ascending/descending order flag */ - HB_BOOL UsrUnique; /* user settable unique order flag */ - HB_BOOL IgnoreCase; /* ignore case (upper keys) */ + char * szName; /* Name of tag */ + char * KeyExpr; /* a tag key expression as text */ + char * ForExpr; /* a tag for expression as text */ + PHB_ITEM pKeyItem; /* item with a macro pcode for a tag key expression */ + PHB_ITEM pForItem; /* item with a macro pcode for a tag for expression */ + HB_USHORT uiType; /* a type of key expression value */ + HB_USHORT uiLen; /* length of the key expression value */ + HB_USHORT nField; /* Field number for simple (one field) key expersion */ + HB_BYTE bTrail; /* trailing character for shorter key value */ + HB_BYTE OptFlags; /* index options flag */ + HB_BOOL AscendKey; /* ascending/descending order flag */ + HB_BOOL UniqueKey; /* unique order flag */ + HB_BOOL Temporary; /* temporary order flag */ + HB_BOOL Custom; /* custom order flag */ + HB_BOOL Template; /* user keyadata in ordKeyAdd()/ordKeyDel() accepted */ + HB_BOOL MultiKey; /* repeated key values in custom indexes accepted */ + HB_BOOL Partial; /* order is updated only partially - missing keys possible */ + HB_BOOL ChgOnly; /* only existing key modifications are updated, no new key added */ + HB_BOOL UsrAscend; /* user settable ascending/descending order flag */ + HB_BOOL UsrUnique; /* user settable unique order flag */ + HB_BOOL IgnoreCase; /* ignore case (upper keys) */ - HB_BOOL TagChanged; - HB_BOOL TagBOF; - HB_BOOL TagEOF; + HB_BOOL TagChanged; + HB_BOOL TagBOF; + HB_BOOL TagEOF; - HB_BOOL fRePos; - int curKeyState; /* see: CDX_CURKEY_* */ - ULONG rawKeyCount; - ULONG rawKeyPos; - ULONG rawKeyRec; - ULONG logKeyCount; - ULONG logKeyPos; - ULONG logKeyRec; + HB_BOOL fRePos; + int curKeyState; /* see: CDX_CURKEY_* */ + ULONG rawKeyCount; + ULONG rawKeyPos; + ULONG rawKeyRec; + ULONG logKeyCount; + ULONG logKeyPos; + ULONG logKeyRec; - ULONG TagBlock; /* a page offset where a tag header is stored */ - ULONG RootBlock; /* a page offset with the root of keys tree */ - USHORT MaxKeys; /* maximum number of keys in Interior node */ + ULONG TagBlock; /* a page offset where a tag header is stored */ + ULONG RootBlock; /* a page offset with the root of keys tree */ + HB_USHORT MaxKeys; /* maximum number of keys in Interior node */ struct _CDXINDEX * pIndex; /* a parent index info */ struct _CDXTAG * pNext; /* pointer to next tag in index */ /* CDXSTACK PageStack[ CDX_STACKSIZE ]; */ /* stack with page path to current key */ - LPCDXPAGE RootPage; /* pointer to root of keys tree in memory */ - LPCDXKEY CurKey; /* current value of key expression */ - LPCDXKEY HotKey; /* value of hot key expression */ - HB_BOOL HotFor; /* index FOR condition for HotKey */ + LPCDXPAGE RootPage; /* pointer to root of keys tree in memory */ + LPCDXKEY CurKey; /* current value of key expression */ + LPCDXKEY HotKey; /* value of hot key expression */ + HB_BOOL HotFor; /* index FOR condition for HotKey */ - PHB_ITEM topScope; /* Top scope HB_ITEM */ - LPCDXKEY topScopeKey; /* Top scope index key */ - PHB_ITEM bottomScope; /* Bottom scope HB_ITEM */ - LPCDXKEY bottomScopeKey; /* Bottom index key */ + PHB_ITEM topScope; /* Top scope HB_ITEM */ + LPCDXKEY topScopeKey; /* Top scope index key */ + PHB_ITEM bottomScope; /* Bottom scope HB_ITEM */ + LPCDXKEY bottomScopeKey; /* Bottom index key */ - LPCDXPAGE pagePool; /* page buffer in memory */ + LPCDXPAGE pagePool; /* page buffer in memory */ } CDXTAG; typedef CDXTAG * LPCDXTAG; typedef struct _CDXINDEX { - char * szFileName; /* Name of index file */ - char * szRealName; /* Real name of index file */ - PHB_FILE pFile; /* Index file handle */ + char * szFileName; /* Name of index file */ + char * szRealName; /* Real name of index file */ + PHB_FILE pFile; /* Index file handle */ struct _CDXAREA * pArea; /* Parent WorkArea */ struct _CDXINDEX * pNext; /* The next index in the list */ - LPCDXTAG pCompound; /* Compound tag */ - LPCDXTAG TagList; /* List of tags in index file */ - HB_BOOL fShared; /* Shared file */ - HB_BOOL fReadonly; /* Read only file */ - HB_BOOL fDelete; /* delete on close flag */ - ULONG nextAvail; /* offset to next free page in the end of index file */ - ULONG freePage; /* offset to next free page inside index file */ - LPCDXLIST freeLst; /* list of free pages in index file */ - int lockWrite; /* number of write lock set */ - int lockRead; /* number of read lock set */ - HB_FOFFSET ulLockPos; /* readlock position for CL53 lock scheme */ + LPCDXTAG pCompound; /* Compound tag */ + LPCDXTAG TagList; /* List of tags in index file */ + HB_BOOL fShared; /* Shared file */ + HB_BOOL fReadonly; /* Read only file */ + HB_BOOL fDelete; /* delete on close flag */ + ULONG nextAvail; /* offset to next free page in the end of index file */ + ULONG freePage; /* offset to next free page inside index file */ + LPCDXLIST freeLst; /* list of free pages in index file */ + int lockWrite; /* number of write lock set */ + int lockRead; /* number of read lock set */ + HB_FOFFSET ulLockPos; /* readlock position for CL53 lock scheme */ #ifdef HB_CDX_DBGCODE - HB_BOOL RdLck; - HB_BOOL WrLck; + HB_BOOL RdLck; + HB_BOOL WrLck; #endif - HB_BOOL fChanged; /* changes written to index, need upadte ulVersion */ - ULONG ulVersion; /* network version/update flag */ - HB_BOOL fFlush; /* changes written to index, need upadte ulVersion */ + HB_BOOL fChanged; /* changes written to index, need upadte ulVersion */ + ULONG ulVersion; /* network version/update flag */ + HB_BOOL fFlush; /* changes written to index, need upadte ulVersion */ } CDXINDEX; typedef CDXINDEX * LPCDXINDEX; /* for index creation */ typedef struct { - HB_FOFFSET nOffset; /* offset in temporary file */ - ULONG ulKeys; /* number of keys in page */ - ULONG ulKeyBuf; /* number of keys in memory buffer */ - ULONG ulCurKey; /* current key in memory buffer */ - HB_BYTE * pKeyPool; /* memory buffer */ + HB_FOFFSET nOffset; /* offset in temporary file */ + ULONG ulKeys; /* number of keys in page */ + ULONG ulKeyBuf; /* number of keys in memory buffer */ + ULONG ulCurKey; /* current key in memory buffer */ + HB_BYTE * pKeyPool; /* memory buffer */ } CDXSWAPPAGE; typedef CDXSWAPPAGE * LPCDXSWAPPAGE; typedef struct { - LPCDXTAG pTag; /* current Tag */ - HB_FHANDLE hTempFile; /* handle to temporary file */ - char * szTempFileName; /* temporary file name */ - int keyLen; /* key length */ - HB_BYTE bTrl; /* filler char for shorter keys */ - HB_BOOL fUnique; /* HB_TRUE if index is unique */ - HB_BOOL fReindex; /* HB_TRUE if reindexing is in process */ - ULONG ulMaxRec; /* the highest record number */ - ULONG ulTotKeys; /* total number of keys indexed */ - ULONG ulKeys; /* keys in curently created page */ - ULONG ulPages; /* number of pages */ - ULONG ulCurPage; /* current page */ - ULONG ulPgKeys; /* maximum number of key in page memory buffer */ - ULONG ulMaxKey; /* maximum number of keys in single page */ - HB_BYTE * pKeyPool; /* memory buffer for current page then for pages */ - LPCDXSWAPPAGE pSwapPage; /* list of pages */ - LPCDXPAGE NodeList[ CDX_STACKSIZE ]; /* Stack of pages */ - ULONG ulFirst; - ULONG * pSortedPages; - HB_BYTE pLastKey[ CDX_MAXKEY ]; /* last key val */ - ULONG ulLastRec; - HB_BYTE * pRecBuff; + LPCDXTAG pTag; /* current Tag */ + HB_FHANDLE hTempFile; /* handle to temporary file */ + char * szTempFileName; /* temporary file name */ + int keyLen; /* key length */ + HB_BYTE bTrl; /* filler char for shorter keys */ + HB_BOOL fUnique; /* HB_TRUE if index is unique */ + HB_BOOL fReindex; /* HB_TRUE if reindexing is in process */ + ULONG ulMaxRec; /* the highest record number */ + ULONG ulTotKeys; /* total number of keys indexed */ + ULONG ulKeys; /* keys in curently created page */ + ULONG ulPages; /* number of pages */ + ULONG ulCurPage; /* current page */ + ULONG ulPgKeys; /* maximum number of key in page memory buffer */ + ULONG ulMaxKey; /* maximum number of keys in single page */ + HB_BYTE * pKeyPool; /* memory buffer for current page then for pages */ + LPCDXSWAPPAGE pSwapPage; /* list of pages */ + LPCDXPAGE NodeList[ CDX_STACKSIZE ]; /* Stack of pages */ + ULONG ulFirst; + ULONG * pSortedPages; + HB_BYTE pLastKey[ CDX_MAXKEY ]; /* last key val */ + ULONG ulLastRec; + HB_BYTE * pRecBuff; #ifndef HB_CDX_PACKTRAIL - int iLastTrl; /* last key trailing spaces */ + int iLastTrl; /* last key trailing spaces */ #endif } CDXSORTINFO; typedef CDXSORTINFO * LPCDXSORTINFO; @@ -463,10 +463,10 @@ typedef struct _CDXAREA LPCDXSORTINFO pSort; /* Index build structure */ LPCDXINDEX lpIndexes; /* Pointer to indexes array */ - HB_BYTE * bCdxSortTab; /* Table with sorted characters */ + HB_BYTE * bCdxSortTab; /* Table with sorted characters */ HB_BOOL fCdxAppend; /* Appended record changed */ HB_BOOL fSortCDP; /* Use CDP functions for sorting */ - USHORT uiTag; /* current tag focus */ + HB_USHORT uiTag; /* current tag focus */ } CDXAREA; diff --git a/harbour/include/hbrdddbf.h b/harbour/include/hbrdddbf.h index 685a3d4d1c..6eee023b1a 100644 --- a/harbour/include/hbrdddbf.h +++ b/harbour/include/hbrdddbf.h @@ -126,34 +126,34 @@ HB_EXTERN_BEGIN */ typedef struct _DBFDATA { - char szTableExt[ HB_MAX_FILE_EXT + 1 ]; - char szIndexExt[ HB_MAX_FILE_EXT + 1 ]; - char szMemoExt[ HB_MAX_FILE_EXT + 1 ]; + char szTableExt[ HB_MAX_FILE_EXT + 1 ]; + char szIndexExt[ HB_MAX_FILE_EXT + 1 ]; + char szMemoExt[ HB_MAX_FILE_EXT + 1 ]; - char * szPasswd; - char * szPendingPasswd; - char * szTrigger; - char * szPendingTrigger; + char * szPasswd; + char * szPendingPasswd; + char * szTrigger; + char * szPendingTrigger; - HB_BYTE bLockType; /* 0 */ - HB_BYTE bTableType; /* DB_DBF_STD */ - HB_BYTE bCryptType; /* DB_CRYPT_NONE */ - HB_BYTE bMemoType; /* DB_MEMO_FPT */ - HB_BYTE bMemoExtType; /* DB_MEMOVER_FLEX */ - USHORT uiDirtyRead; /* HB_IDXREAD_CLEANMASK */ - ULONG ulMemoBlockSize; /* 0 */ + HB_BYTE bLockType; /* 0 */ + HB_BYTE bTableType; /* DB_DBF_STD */ + HB_BYTE bCryptType; /* DB_CRYPT_NONE */ + HB_BYTE bMemoType; /* DB_MEMO_FPT */ + HB_BYTE bMemoExtType; /* DB_MEMOVER_FLEX */ + HB_USHORT uiDirtyRead; /* HB_IDXREAD_CLEANMASK */ + ULONG ulMemoBlockSize; /* 0 */ - HB_BOOL fSortRecNo; - HB_BOOL fMultiKey; - HB_BOOL fStruct; - HB_BOOL fStrictStruct; - HB_BOOL fMultiTag; + HB_BOOL fSortRecNo; + HB_BOOL fMultiKey; + HB_BOOL fStruct; + HB_BOOL fStrictStruct; + HB_BOOL fMultiTag; } DBFDATA, * LPDBFDATA; typedef struct _HB_DBFFIELDBITS { - USHORT uiNullBit; - USHORT uiLengthBit; + HB_USHORT uiNullBit; + HB_USHORT uiLengthBit; } HB_DBFFIELDBITS, * PHB_DBFFIELDBITS; @@ -176,56 +176,56 @@ typedef struct _DBFAREA * example. */ - PHB_FILE pDataFile; /* Data file handle */ - PHB_FILE pMemoFile; /* Memo file handle */ - PHB_FILE pMemoTmpFile; /* Memo temporary file handle */ - char * szDataFileName; /* Name of data file */ - char * szMemoFileName; /* Name of memo file */ - USHORT uiHeaderLen; /* Size of header */ - USHORT uiRecordLen; /* Size of record */ - ULONG ulMemoBlockSize; /* Size of memo block */ - ULONG ulNewBlockSize; /* Size of new memo block */ - USHORT uiMemoVersion; /* MEMO file version */ - USHORT uiDirtyRead; /* Index dirty read bit filed */ - USHORT uiNullOffset; /* Offset to _NullFlags filed */ - USHORT uiNullCount; /* Number of null flags */ - HB_BYTE bTableType; /* DBF type */ - HB_BYTE bMemoType; /* MEMO type used in DBF memo fields */ - HB_BYTE bLockType; /* Type of locking shemes */ - HB_BYTE bCryptType; /* Type of used encryption */ - DBFHEADER dbfHeader; /* DBF header buffer */ - USHORT * pFieldOffset; /* Pointer to field offset array */ + PHB_FILE pDataFile; /* Data file handle */ + PHB_FILE pMemoFile; /* Memo file handle */ + PHB_FILE pMemoTmpFile; /* Memo temporary file handle */ + char * szDataFileName; /* Name of data file */ + char * szMemoFileName; /* Name of memo file */ + HB_USHORT uiHeaderLen; /* Size of header */ + HB_USHORT uiRecordLen; /* Size of record */ + ULONG ulMemoBlockSize; /* Size of memo block */ + ULONG ulNewBlockSize; /* Size of new memo block */ + HB_USHORT uiMemoVersion; /* MEMO file version */ + HB_USHORT uiDirtyRead; /* Index dirty read bit filed */ + HB_USHORT uiNullOffset; /* Offset to _NullFlags filed */ + HB_USHORT uiNullCount; /* Number of null flags */ + HB_BYTE bTableType; /* DBF type */ + HB_BYTE bMemoType; /* MEMO type used in DBF memo fields */ + HB_BYTE bLockType; /* Type of locking shemes */ + HB_BYTE bCryptType; /* Type of used encryption */ + DBFHEADER dbfHeader; /* DBF header buffer */ + HB_USHORT * pFieldOffset; /* Pointer to field offset array */ PHB_DBFFIELDBITS pFieldBits; /* Pointer to extended DBF field info array */ - HB_BYTE * pRecord; /* Buffer of record data */ - ULONG ulRecCount; /* Total records */ - ULONG ulRecNo; /* Current record */ - HB_BOOL fAutoInc; /* WorkArea with auto increment fields */ - HB_BOOL fHasMemo; /* WorkArea with Memo fields */ - HB_BOOL fHasTags; /* WorkArea with MDX or CDX index */ - HB_BOOL fModStamp; /* WorkArea with modification autoupdate fields */ - HB_BOOL fDataFlush; /* data was written to DBF and not commited */ - HB_BOOL fMemoFlush; /* data was written to MEMO and not commited */ - HB_BOOL fShared; /* Shared file */ - HB_BOOL fReadonly; /* Read only file */ - HB_BOOL fTemporary; /* Temporary file */ - HB_BOOL fValidBuffer; /* State of buffer */ - HB_BOOL fPositioned; /* Positioned record */ - HB_BOOL fRecordChanged; /* Record changed */ - HB_BOOL fAppend; /* HB_TRUE if new record is added */ - HB_BOOL fDeleted; /* HB_TRUE if record is deleted */ - HB_BOOL fEncrypted; /* HB_TRUE if record is encrypted */ - HB_BOOL fTableEncrypted; /* HB_TRUE if table is encrypted */ - HB_BOOL fUpdateHeader; /* Update header of file */ - HB_BOOL fFLocked; /* HB_TRUE if file is locked */ - HB_BOOL fHeaderLocked; /* HB_TRUE if DBF header is locked */ - HB_BOOL fPackMemo; /* Pack memo file in pack operation */ - HB_BOOL fTrigger; /* Execute trigger function */ + HB_BYTE * pRecord; /* Buffer of record data */ + ULONG ulRecCount; /* Total records */ + ULONG ulRecNo; /* Current record */ + HB_BOOL fAutoInc; /* WorkArea with auto increment fields */ + HB_BOOL fHasMemo; /* WorkArea with Memo fields */ + HB_BOOL fHasTags; /* WorkArea with MDX or CDX index */ + HB_BOOL fModStamp; /* WorkArea with modification autoupdate fields */ + HB_BOOL fDataFlush; /* data was written to DBF and not commited */ + HB_BOOL fMemoFlush; /* data was written to MEMO and not commited */ + HB_BOOL fShared; /* Shared file */ + HB_BOOL fReadonly; /* Read only file */ + HB_BOOL fTemporary; /* Temporary file */ + HB_BOOL fValidBuffer; /* State of buffer */ + HB_BOOL fPositioned; /* Positioned record */ + HB_BOOL fRecordChanged; /* Record changed */ + HB_BOOL fAppend; /* HB_TRUE if new record is added */ + HB_BOOL fDeleted; /* HB_TRUE if record is deleted */ + HB_BOOL fEncrypted; /* HB_TRUE if record is encrypted */ + HB_BOOL fTableEncrypted; /* HB_TRUE if table is encrypted */ + HB_BOOL fUpdateHeader; /* Update header of file */ + HB_BOOL fFLocked; /* HB_TRUE if file is locked */ + HB_BOOL fHeaderLocked; /* HB_TRUE if DBF header is locked */ + HB_BOOL fPackMemo; /* Pack memo file in pack operation */ + HB_BOOL fTrigger; /* Execute trigger function */ LPDBOPENINFO lpdbOpenInfo; /* Pointer to current dbOpenInfo structure in OPEN/CREATE methods */ LPDBRELINFO lpdbPendingRel; /* Pointer to parent rel struct */ - ULONG * pLocksPos; /* List of records locked */ - ULONG ulNumLocksPos; /* Number of records locked */ - char * pCryptKey; /* Pointer to encryption key */ - PHB_DYNS pTriggerSym; /* DynSym pointer to trigger function */ + ULONG * pLocksPos; /* List of records locked */ + ULONG ulNumLocksPos; /* Number of records locked */ + char * pCryptKey; /* Pointer to encryption key */ + PHB_DYNS pTriggerSym; /* DynSym pointer to trigger function */ } DBFAREA; typedef DBFAREA * LPDBFAREA; @@ -236,17 +236,17 @@ typedef DBFAREA * LPDBFAREA; #define SUPERTABLE ( &dbfSuper ) -extern HB_EXPORT ULONG hb_dbfGetMemoBlock( DBFAREAP pArea, USHORT uiIndex ); -extern HB_EXPORT void hb_dbfPutMemoBlock( DBFAREAP pArea, USHORT uiIndex, +extern HB_EXPORT ULONG hb_dbfGetMemoBlock( DBFAREAP pArea, HB_USHORT uiIndex ); +extern HB_EXPORT void hb_dbfPutMemoBlock( DBFAREAP pArea, HB_USHORT uiIndex, ULONG ulBlock ); -extern HB_EXPORT HB_ERRCODE hb_dbfGetMemoData( DBFAREAP pArea, USHORT uiIndex, +extern HB_EXPORT HB_ERRCODE hb_dbfGetMemoData( DBFAREAP pArea, HB_USHORT uiIndex, ULONG * pulBlock, ULONG * pulSize, ULONG * pulType ); -extern HB_EXPORT HB_ERRCODE hb_dbfSetMemoData( DBFAREAP pArea, USHORT uiIndex, +extern HB_EXPORT HB_ERRCODE hb_dbfSetMemoData( DBFAREAP pArea, HB_USHORT uiIndex, ULONG ulBlock, ULONG ulSize, ULONG ulType ); extern HB_EXPORT HB_ERRCODE hb_dbfGetEGcode( HB_ERRCODE errCode ); -extern HB_EXPORT HB_BOOL hb_dbfLockIdxFile( PHB_FILE pFile, HB_BYTE bScheme, USHORT usMode, HB_FOFFSET *pPoolPos ); +extern HB_EXPORT HB_BOOL hb_dbfLockIdxFile( PHB_FILE pFile, HB_BYTE bScheme, HB_USHORT usMode, HB_FOFFSET *pPoolPos ); extern HB_EXPORT HB_BOOL hb_dbfLockIdxGetData( HB_BYTE bScheme, HB_FOFFSET *ulPos, HB_FOFFSET *ulPool ); extern HB_EXPORT void hb_dbfTranslateRec( DBFAREAP pArea, HB_BYTE * pBuffer, PHB_CODEPAGE cdp_src, PHB_CODEPAGE cdp_dest ); diff --git a/harbour/include/hbrdddel.h b/harbour/include/hbrdddel.h index 8d99d5233d..d46ffb96fb 100644 --- a/harbour/include/hbrdddel.h +++ b/harbour/include/hbrdddel.h @@ -80,31 +80,31 @@ typedef struct _DELIMAREA * example. */ - PHB_FILE pFile; /* Data file handle */ - char * szFileName; /* Name of data file */ - char * szEol; /* EOL marker */ - USHORT uiEolLen; /* Size of EOL marker */ - char cDelim; /* Character field delimiter */ - char cSeparator; /* Field separator */ - USHORT uiRecordLen; /* Size of record */ - USHORT * pFieldOffset; /* Pointer to field offset array */ + PHB_FILE pFile; /* Data file handle */ + char * szFileName; /* Name of data file */ + char * szEol; /* EOL marker */ + HB_USHORT uiEolLen; /* Size of EOL marker */ + char cDelim; /* Character field delimiter */ + char cSeparator; /* Field separator */ + HB_USHORT uiRecordLen; /* Size of record */ + HB_USHORT * pFieldOffset; /* Pointer to field offset array */ HB_BYTE * pRecord; /* Buffer of record data */ HB_BYTE * pBuffer; /* Read/Write */ - ULONG ulBufferSize; /* IO buffer size */ - ULONG ulBufferRead; /* Number of bytes in read buffer */ - ULONG ulBufferIndex; /* Index to read read buffer */ - HB_FOFFSET ulRecordOffset; /* Current record offest */ - HB_FOFFSET ulNextOffset; /* Next record offest */ - HB_FOFFSET ulFileSize; /* File table size in export mode */ - HB_FOFFSET ulBufferStart; /* Start offset of read buffer */ - ULONG ulRecNo; /* Current record */ - ULONG ulRecCount; /* Number of records (in export) */ - HB_BOOL fTransRec; /* Can put whole records */ - HB_BOOL fFlush; /* Data was written to table and not commited */ - HB_BOOL fShared; /* Shared file */ - HB_BOOL fReadonly; /* Read only file */ - HB_BOOL fPositioned; /* Positioned record */ - HB_BOOL fRecordChanged; /* Record changed */ + ULONG ulBufferSize; /* IO buffer size */ + ULONG ulBufferRead; /* Number of bytes in read buffer */ + ULONG ulBufferIndex; /* Index to read read buffer */ + HB_FOFFSET ulRecordOffset; /* Current record offest */ + HB_FOFFSET ulNextOffset; /* Next record offest */ + HB_FOFFSET ulFileSize; /* File table size in export mode */ + HB_FOFFSET ulBufferStart; /* Start offset of read buffer */ + ULONG ulRecNo; /* Current record */ + ULONG ulRecCount; /* Number of records (in export) */ + HB_BOOL fTransRec; /* Can put whole records */ + HB_BOOL fFlush; /* Data was written to table and not commited */ + HB_BOOL fShared; /* Shared file */ + HB_BOOL fReadonly; /* Read only file */ + HB_BOOL fPositioned; /* Positioned record */ + HB_BOOL fRecordChanged; /* Record changed */ } DELIMAREA; typedef DELIMAREA * LPDELIMAREA; diff --git a/harbour/include/hbrddfpt.h b/harbour/include/hbrddfpt.h index 1eba052710..29eb4f5966 100644 --- a/harbour/include/hbrddfpt.h +++ b/harbour/include/hbrddfpt.h @@ -214,16 +214,16 @@ typedef MEMOGCITEM * LPMEMOGCITEM; typedef struct _MEMOGCTABLE { - HB_BYTE bType; /* MEMO_FPT_SIX or MEMO_FPT_FLEX */ - HB_BYTE bChanged; /* Should we write GC data to disk */ - ULONG ulNextBlock; /* Next free block in the file */ - ULONG ulPrevBlock; /* Previous next free block in the file */ - ULONG ulRevPage; /* FLEX Rev GC page offset */ - ULONG ulDirPage; /* FLEX Dir GC page offset */ - ULONG ulCounter; /* FLEX cyclic counter */ - ULONG ulSize; /* FLEX GC page size in bytes */ - USHORT usMaxItem; /* max number of items in pGCitems */ - USHORT usItems; /* number of items in pGCitems */ + HB_BYTE bType; /* MEMO_FPT_SIX or MEMO_FPT_FLEX */ + HB_BYTE bChanged; /* Should we write GC data to disk */ + ULONG ulNextBlock; /* Next free block in the file */ + ULONG ulPrevBlock; /* Previous next free block in the file */ + ULONG ulRevPage; /* FLEX Rev GC page offset */ + ULONG ulDirPage; /* FLEX Dir GC page offset */ + ULONG ulCounter; /* FLEX cyclic counter */ + ULONG ulSize; /* FLEX GC page size in bytes */ + HB_USHORT usMaxItem; /* max number of items in pGCitems */ + HB_USHORT usItems; /* number of items in pGCitems */ LPMEMOGCITEM pGCitems; /* free block list */ FPTHEADER fptHeader; /* FPT file header */ } MEMOGCTABLE; diff --git a/harbour/include/hbrddnsx.h b/harbour/include/hbrddnsx.h index 9375fa8cc5..5796cf14cf 100644 --- a/harbour/include/hbrddnsx.h +++ b/harbour/include/hbrddnsx.h @@ -261,56 +261,56 @@ sx_thermometer() => if ( NSX_TAG_NOUPDATE | NSX_TAG_TEMPLATE ) -> 4 typedef struct _NSXTAGITEM { - HB_UCHAR TagName[NSX_TAGNAME + 1]; /* name of tag in ASCIIZ */ - HB_UCHAR TagOffset[4]; /* Tag header offset */ + HB_UCHAR TagName[ NSX_TAGNAME + 1 ]; /* name of tag in ASCIIZ */ + HB_UCHAR TagOffset[ 4 ]; /* Tag header offset */ } NSXTAGITEM; typedef NSXTAGITEM * LPNSXTAGITEM; typedef struct _NSXROOTHEADER { - HB_UCHAR Signature[1]; /* "i" = 0x69 */ - HB_UCHAR IndexFlags[1]; /* 0x00 */ - HB_UCHAR TagCount[2]; /* number of tags in index file */ - HB_UCHAR Version[2]; /* cyclic counter for concurrent access */ - HB_UCHAR FreePage[4]; /* offset of first free page in index file */ - HB_UCHAR FileSize[4]; /* the index file length */ - NSXTAGITEM TagList[NSX_MAXTAGS]; - HB_UCHAR Unused[NSX_PAGELEN - 14 - NSX_MAXTAGS * sizeof( NSXTAGITEM )]; + HB_UCHAR Signature[ 1 ]; /* "i" = 0x69 */ + HB_UCHAR IndexFlags[ 1 ]; /* 0x00 */ + HB_UCHAR TagCount[ 2 ]; /* number of tags in index file */ + HB_UCHAR Version[ 2 ]; /* cyclic counter for concurrent access */ + HB_UCHAR FreePage[ 4 ]; /* offset of first free page in index file */ + HB_UCHAR FileSize[ 4 ]; /* the index file length */ + NSXTAGITEM TagList[ NSX_MAXTAGS ]; + HB_UCHAR Unused[ NSX_PAGELEN - 14 - NSX_MAXTAGS * sizeof( NSXTAGITEM ) ]; } NSXROOTHEADER; typedef NSXROOTHEADER * LPNSXROOTHEADER; typedef struct _NSXTAGHEADER { - HB_UCHAR Signature[1]; /* "i" = 0x69 */ - HB_UCHAR TagFlags[1]; /* update flags: NSX_TAG_* */ - HB_UCHAR RootPage[4]; /* offset of tag root page */ - HB_UCHAR KeyType[2]; /* index key type: NSX_TYPE_* */ - HB_UCHAR KeySize[2]; /* index key size */ - HB_UCHAR Unique[2]; /* 0x0001 for UNIQUE indexes */ - HB_UCHAR Descend[2]; /* 0x0001 for descond indexes */ - HB_UCHAR KeyExpr[NSX_MAXEXPLEN]; /* index KEY expression ASCIIZ */ - HB_UCHAR ForExpr[NSX_MAXEXPLEN]; /* index FOR expression ASCIIZ */ - HB_UCHAR Unused[NSX_PAGELEN - 14 - NSX_MAXEXPLEN - NSX_MAXEXPLEN]; + HB_UCHAR Signature[ 1 ]; /* "i" = 0x69 */ + HB_UCHAR TagFlags[ 1 ]; /* update flags: NSX_TAG_* */ + HB_UCHAR RootPage[ 4 ]; /* offset of tag root page */ + HB_UCHAR KeyType[ 2 ]; /* index key type: NSX_TYPE_* */ + HB_UCHAR KeySize[ 2 ]; /* index key size */ + HB_UCHAR Unique[ 2 ]; /* 0x0001 for UNIQUE indexes */ + HB_UCHAR Descend[ 2 ]; /* 0x0001 for descond indexes */ + HB_UCHAR KeyExpr[ NSX_MAXEXPLEN ]; /* index KEY expression ASCIIZ */ + HB_UCHAR ForExpr[ NSX_MAXEXPLEN ]; /* index FOR expression ASCIIZ */ + HB_UCHAR Unused[ NSX_PAGELEN - 14 - NSX_MAXEXPLEN - NSX_MAXEXPLEN ]; } NSXTAGHEADER; typedef NSXTAGHEADER * LPNSXTAGHEADER; typedef struct _NSXBRANCHPAGE { - HB_UCHAR NodeID[1]; /* NSX_BRANCHPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ - HB_UCHAR RecNoLen[1]; /* number of bytes for recno in branch keys - seems to be unused */ - HB_UCHAR KeyCount[2]; /* number of key in page */ - HB_UCHAR LowerPage[4]; /* offset to the page with lower keys */ - HB_UCHAR KeyData[NSX_PAGELEN - 8]; /* with branch keys */ + HB_UCHAR NodeID[ 1 ]; /* NSX_BRANCHPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ + HB_UCHAR RecNoLen[ 1 ]; /* number of bytes for recno in branch keys - seems to be unused */ + HB_UCHAR KeyCount[ 2 ]; /* number of key in page */ + HB_UCHAR LowerPage[ 4 ]; /* offset to the page with lower keys */ + HB_UCHAR KeyData[ NSX_PAGELEN - 8 ]; /* with branch keys */ } NSXBRANCHPAGE; typedef NSXBRANCHPAGE * LPNSXBRANCHPAGE; typedef struct _NSXLEAFPAGE { - HB_UCHAR NodeID[1]; /* NSX_LEAFPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ - HB_UCHAR RecNoLen[1]; /* number of bytes for recno in leaf keys */ - HB_UCHAR KeyCount[2]; /* number of key in page */ - HB_UCHAR UsedArea[2]; /* arrea used in page -> offset to free area */ - HB_UCHAR KeyData[NSX_PAGELEN - NSX_LEAFKEYOFFSET]; /* with branch keys */ + HB_UCHAR NodeID[ 1 ]; /* NSX_LEAFPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ + HB_UCHAR RecNoLen[ 1 ]; /* number of bytes for recno in leaf keys */ + HB_UCHAR KeyCount[ 2 ]; /* number of key in page */ + HB_UCHAR UsedArea[ 2 ]; /* arrea used in page -> offset to free area */ + HB_UCHAR KeyData[ NSX_PAGELEN - NSX_LEAFKEYOFFSET ]; /* with branch keys */ } NSXLEAFPAGE; typedef NSXLEAFPAGE * LPNSXLEAFPAGE; @@ -375,17 +375,17 @@ typedef TREE_STACK * LPTREESTACK; typedef struct _HB_PAGEINFO { - ULONG Page; - HB_BOOL Changed; - int iUsed; - USHORT uiKeys; - USHORT uiOffset; - struct _HB_PAGEINFO * pNext; - struct _HB_PAGEINFO * pPrev; + ULONG Page; + HB_BOOL Changed; + int iUsed; + HB_USHORT uiKeys; + HB_USHORT uiOffset; + struct _HB_PAGEINFO * pNext; + struct _HB_PAGEINFO * pPrev; #ifdef HB_NSX_EXTERNAL_PAGEBUFFER HB_UCHAR * buffer; #else - HB_UCHAR buffer[ NSX_PAGELEN ]; + HB_UCHAR buffer[ NSX_PAGELEN ]; #endif } HB_PAGEINFO; typedef HB_PAGEINFO * LPPAGEINFO; @@ -394,7 +394,7 @@ typedef struct _HB_NSXSCOPE { PHB_ITEM scopeItem; LPKEYINFO scopeKey; - USHORT scopeKeyLen; + HB_USHORT scopeKeyLen; } HB_NSXSCOPE; typedef HB_NSXSCOPE * PHB_NSXSCOPE; @@ -430,16 +430,16 @@ typedef struct _TAGINFO HB_UCHAR TagFlags; HB_UCHAR KeyType; HB_UCHAR TrailChar; - USHORT KeyLength; - USHORT nField; - USHORT uiNumber; - USHORT MaxKeys; + HB_USHORT KeyLength; + HB_USHORT nField; + HB_USHORT uiNumber; + HB_USHORT MaxKeys; - USHORT CurKeyOffset; - USHORT CurKeyNo; + HB_USHORT CurKeyOffset; + HB_USHORT CurKeyNo; - USHORT stackSize; - USHORT stackLevel; + HB_USHORT stackSize; + HB_USHORT stackLevel; LPTREESTACK stack; ULONG keyCount; diff --git a/harbour/include/hbrddntx.h b/harbour/include/hbrddntx.h index 1bcbf7c0d6..0a9b9d4f19 100644 --- a/harbour/include/hbrddntx.h +++ b/harbour/include/hbrddntx.h @@ -180,16 +180,16 @@ typedef TREE_STACK * LPTREESTACK; typedef struct _HB_PAGEINFO { - ULONG Page; - HB_BOOL Changed; - int iUsed; - USHORT uiKeys; - struct _HB_PAGEINFO * pNext; - struct _HB_PAGEINFO * pPrev; + ULONG Page; + HB_BOOL Changed; + int iUsed; + HB_USHORT uiKeys; + struct _HB_PAGEINFO * pNext; + struct _HB_PAGEINFO * pPrev; #ifdef HB_NTX_EXTERNAL_PAGEBUFFER - char * buffer; + char * buffer; #else - char buffer[ NTXBLOCKSIZE ]; + char buffer[ NTXBLOCKSIZE ]; #endif } HB_PAGEINFO; typedef HB_PAGEINFO * LPPAGEINFO; @@ -198,7 +198,7 @@ typedef struct _HB_NTXSCOPE { PHB_ITEM scopeItem; LPKEYINFO scopeKey; - USHORT scopeKeyLen; + HB_USHORT scopeKeyLen; } HB_NTXSCOPE; typedef HB_NTXSCOPE * PHB_NTXSCOPE; @@ -212,7 +212,7 @@ typedef struct _TAGINFO HB_NTXSCOPE top; HB_NTXSCOPE bottom; - USHORT Signature; + HB_USHORT Signature; HB_BOOL fTagName; HB_BOOL fUsrDescend; @@ -231,15 +231,15 @@ typedef struct _TAGINFO HB_BOOL TagEOF; ULONG HeadBlock; ULONG RootBlock; - USHORT uiNumber; - HB_BYTE KeyType; - USHORT nField; - USHORT KeyLength; - USHORT KeyDec; - USHORT MaxKeys; + HB_USHORT uiNumber; + HB_BYTE KeyType; + HB_USHORT nField; + HB_USHORT KeyLength; + HB_USHORT KeyDec; + HB_USHORT MaxKeys; LPTREESTACK stack; - USHORT stackSize; - USHORT stackLevel; + HB_USHORT stackSize; + HB_USHORT stackLevel; ULONG keyCount; LPKEYINFO CurKeyInfo; LPKEYINFO HotKeyInfo; @@ -271,7 +271,7 @@ typedef struct _NTXINDEX int lockWrite; /* number of write lock set */ int lockRead; /* number of read lock set */ - HB_BYTE * HeaderBuff; /* TODO: make it member */ + HB_BYTE * HeaderBuff; /* TODO: make it member */ HB_BOOL fValidHeader; int iTags; LPTAGINFO * lpTags; @@ -295,39 +295,39 @@ typedef struct ULONG ulKeys; /* number of keys in page */ ULONG ulKeyBuf; /* number of keys in memory buffer */ ULONG ulCurKey; /* current key in memory buffer */ - HB_BYTE * pKeyPool; /* memory buffer */ + HB_BYTE * pKeyPool; /* memory buffer */ } NTXSWAPPAGE; typedef NTXSWAPPAGE * LPNTXSWAPPAGE; typedef struct { - LPTAGINFO pTag; /* current Tag */ + LPTAGINFO pTag; /* current Tag */ HB_FHANDLE hTempFile; /* handle to temporary file */ - char * szTempFileName; /* temporary file name */ - int keyLen; /* key length */ - HB_BOOL fUnique; /* HB_TRUE if index is unique */ - HB_BOOL fReindex; /* HB_TRUE if reindexing is in process */ - ULONG ulMaxRec; /* the highest record number */ - ULONG ulTotKeys; /* total number of keys indexed */ - ULONG ulKeys; /* keys in curently created page */ - ULONG ulPages; /* number of pages */ - ULONG ulCurPage; /* current page */ - ULONG ulPgKeys; /* maximum number of key in page memory buffer */ - ULONG ulMaxKey; /* maximum number of keys in single page */ - HB_BYTE * pKeyPool; /* memory buffer for current page then for pages */ - HB_BYTE * pStartKey; /* begining of key pool after sorting */ + char * szTempFileName; /* temporary file name */ + int keyLen; /* key length */ + HB_BOOL fUnique; /* HB_TRUE if index is unique */ + HB_BOOL fReindex; /* HB_TRUE if reindexing is in process */ + ULONG ulMaxRec; /* the highest record number */ + ULONG ulTotKeys; /* total number of keys indexed */ + ULONG ulKeys; /* keys in curently created page */ + ULONG ulPages; /* number of pages */ + ULONG ulCurPage; /* current page */ + ULONG ulPgKeys; /* maximum number of key in page memory buffer */ + ULONG ulMaxKey; /* maximum number of keys in single page */ + HB_BYTE * pKeyPool; /* memory buffer for current page then for pages */ + HB_BYTE * pStartKey; /* begining of key pool after sorting */ LPNTXSWAPPAGE pSwapPage; /* list of pages */ LPPAGEINFO NodeList[ NTX_STACKSIZE ]; /* Stack of pages */ - ULONG ulFirst; - ULONG * pSortedPages; - HB_BYTE pLastKey[ NTX_MAX_KEY ]; /* last key val */ - ULONG ulLastRec; + ULONG ulFirst; + ULONG * pSortedPages; + HB_BYTE pLastKey[ NTX_MAX_KEY ]; /* last key val */ + ULONG ulLastRec; - HB_BYTE * pBuffIO; /* index IO buffer */ - ULONG ulSizeIO; /* size of IO buffer in index pages */ - ULONG ulPagesIO; /* number of index pages in buffer */ - ULONG ulFirstIO; /* first page in buffer */ - ULONG ulLastIO; /* last page in buffer */ + HB_BYTE * pBuffIO; /* index IO buffer */ + ULONG ulSizeIO; /* size of IO buffer in index pages */ + ULONG ulPagesIO; /* number of index pages in buffer */ + ULONG ulFirstIO; /* first page in buffer */ + ULONG ulLastIO; /* last page in buffer */ } NTXSORTINFO; typedef NTXSORTINFO * LPNTXSORTINFO; diff --git a/harbour/include/hbrddsdf.h b/harbour/include/hbrddsdf.h index dabb1890e1..12151005c6 100644 --- a/harbour/include/hbrddsdf.h +++ b/harbour/include/hbrddsdf.h @@ -80,24 +80,24 @@ typedef struct _SDFAREA * example. */ - PHB_FILE pFile; /* Data file handle */ - char * szFileName; /* Name of data file */ - char * szEol; /* EOL marker */ - USHORT uiEolLen; /* Size of EOL marker */ - USHORT uiRecordLen; /* Size of record */ - USHORT * pFieldOffset; /* Pointer to field offset array */ - HB_BYTE * pRecord; /* Buffer of record data */ - HB_FOFFSET ulRecordOffset; /* Current record offest */ - HB_FOFFSET ulNextOffset; /* Next record offest */ - HB_FOFFSET ulFileSize; /* File table size in export mode */ - ULONG ulRecNo; /* Current record */ - ULONG ulRecCount; /* Number of records (in export) */ - HB_BOOL fTransRec; /* Can put whole records */ - HB_BOOL fFlush; /* Data was written to SDF and not commited */ - HB_BOOL fShared; /* Shared file */ - HB_BOOL fReadonly; /* Read only file */ - HB_BOOL fPositioned; /* Positioned record */ - HB_BOOL fRecordChanged; /* Record changed */ + PHB_FILE pFile; /* Data file handle */ + char * szFileName; /* Name of data file */ + char * szEol; /* EOL marker */ + HB_USHORT uiEolLen; /* Size of EOL marker */ + HB_USHORT uiRecordLen; /* Size of record */ + HB_USHORT * pFieldOffset; /* Pointer to field offset array */ + HB_BYTE * pRecord; /* Buffer of record data */ + HB_FOFFSET ulRecordOffset; /* Current record offest */ + HB_FOFFSET ulNextOffset; /* Next record offest */ + HB_FOFFSET ulFileSize; /* File table size in export mode */ + ULONG ulRecNo; /* Current record */ + ULONG ulRecCount; /* Number of records (in export) */ + HB_BOOL fTransRec; /* Can put whole records */ + HB_BOOL fFlush; /* Data was written to SDF and not commited */ + HB_BOOL fShared; /* Shared file */ + HB_BOOL fReadonly; /* Read only file */ + HB_BOOL fPositioned; /* Positioned record */ + HB_BOOL fRecordChanged; /* Record changed */ } SDFAREA; typedef SDFAREA * LPSDFAREA; diff --git a/harbour/include/hbstack.h b/harbour/include/hbstack.h index 065ddc4b85..fbf66f88bc 100644 --- a/harbour/include/hbstack.h +++ b/harbour/include/hbstack.h @@ -104,13 +104,13 @@ typedef struct HB_BOOL fNetError; /* current NETERR() flag */ void ** waList; /* Allocated WorkAreas */ - USHORT uiWaMax; /* Number of allocated WA */ - USHORT uiWaSpace; /* Number of allocated WA */ + HB_USHORT uiWaMax; /* Number of allocated WA */ + HB_USHORT uiWaSpace; /* Number of allocated WA */ - USHORT * waNums; /* Allocated WorkAreas */ - USHORT uiWaNumMax; /* Number of allocated WA */ + HB_USHORT * waNums; /* Allocated WorkAreas */ + HB_USHORT uiWaNumMax; /* Number of allocated WA */ - USHORT uiCurrArea; /* Current WokrArea number */ + HB_USHORT uiCurrArea; /* Current WokrArea number */ void * pCurrArea; /* Current WorkArea pointer */ } HB_STACKRDD, * PHB_STACKRDD; @@ -145,8 +145,8 @@ HB_PRIVATE_STACK, * PHB_PRIVATE_STACK; #if defined( HB_MT_VM ) typedef struct { - void * pMemvar; /* memvar pointer ( publics & privates ) */ - USHORT uiArea; /* Workarea number */ + void * pMemvar; /* memvar pointer ( publics & privates ) */ + HB_USHORT uiArea; /* Workarea number */ } HB_DYN_HANDLES, * PHB_DYN_HANDLES; #endif @@ -162,8 +162,8 @@ typedef struct LONG wItems; /* total items that may be holded on the stack */ LONG lWithObject; /* stack offset to base current WITH OBJECT item */ LONG lRecoverBase; /* current SEQUENCE envelope offset or 0 if no SEQUENCE is active */ - USHORT uiActionRequest;/* request for some action - stop processing of opcodes */ - USHORT uiQuitState; /* HVM is quiting */ + HB_USHORT uiActionRequest;/* request for some action - stop processing of opcodes */ + HB_USHORT uiQuitState; /* HVM is quiting */ HB_STACK_STATE state; /* first (default) stack state frame */ HB_STACKRDD rdd; /* RDD related data */ char szDate[ 9 ]; /* last returned date from hb_pards() YYYYMMDD format */ @@ -291,7 +291,7 @@ extern void hb_stackRemove( LONG lUntilPos ); /* stack management functions */ extern int hb_stackCallDepth( void ); extern LONG hb_stackBaseProcOffset( int iLevel ); -extern void hb_stackBaseProcInfo( char * szProcName, USHORT * puiProcLine ); /* get current .prg function name and line number */ +extern void hb_stackBaseProcInfo( char * szProcName, HB_USHORT * puiProcLine ); /* get current .prg function name and line number */ extern void hb_stackDispLocal( void ); /* show the types of the items on the stack for debugging purposes */ extern void hb_stackDispCall( void ); extern void hb_stackFree( void ); /* releases all memory used by the stack */ @@ -313,7 +313,7 @@ extern void ** hb_stackDebugInfo( void ); #ifdef _HB_API_INTERNAL_ extern void hb_stackDecrease( ULONG ulItems ); -extern HB_ITEM_PTR hb_stackNewFrame( PHB_STACK_STATE pFrame, USHORT uiParams ); +extern HB_ITEM_PTR hb_stackNewFrame( PHB_STACK_STATE pFrame, HB_USHORT uiParams ); extern void hb_stackOldFrame( PHB_STACK_STATE pFrame ); extern void hb_stackClearMemvarsBase( void ); @@ -322,8 +322,8 @@ extern PHB_ITEM ** hb_stackItemBasePtr( void ); extern LONG hb_stackGetRecoverBase( void ); extern void hb_stackSetRecoverBase( LONG lBase ); -extern USHORT hb_stackGetActionRequest( void ); -extern void hb_stackSetActionRequest( USHORT uiAction ); +extern HB_USHORT hb_stackGetActionRequest( void ); +extern void hb_stackSetActionRequest( HB_USHORT uiAction ); extern void hb_stackSetStaticsBase( void * pBase ); extern void * hb_stackGetStaticsBase( void ); @@ -351,12 +351,12 @@ extern void hb_stackUpdateAllocator( void *, PHB_ALLOCUPDT_FUNC, int ); #if defined( HB_MT_VM ) extern void * hb_stackList( void ); extern void hb_stackListSet( void * pStackLst ); - extern void hb_stackIdSetActionRequest( void * pStackID, USHORT uiAction ); + extern void hb_stackIdSetActionRequest( void * pStackID, HB_USHORT uiAction ); extern PHB_DYN_HANDLES hb_stackGetDynHandle( PHB_DYNS pDynSym ); extern int hb_stackDynHandlesCount( void ); extern void hb_stackClearMemvars( int ); extern HB_BOOL hb_stackQuitState( void ); - extern void hb_stackSetQuitState( USHORT uiState ); + extern void hb_stackSetQuitState( HB_USHORT uiState ); extern int hb_stackUnlock( void ); extern int hb_stackLock( void ); extern void * hb_stackAllocator( void ); diff --git a/harbour/include/hbtypes.h b/harbour/include/hbtypes.h index 1825fd579e..2ed14ee852 100644 --- a/harbour/include/hbtypes.h +++ b/harbour/include/hbtypes.h @@ -61,8 +61,8 @@ HB_EXTERN_BEGIN typedef PHB_SYMB ( * VM_PROCESS_SYMBOLS ) - ( PHB_SYMB pModuleSymbols, USHORT uiModuleSymbols, - const char * szModuleName, ULONG ulID, USHORT uiPcodeVer ); + ( PHB_SYMB pModuleSymbols, HB_USHORT uiModuleSymbols, + const char * szModuleName, ULONG ulID, HB_USHORT uiPcodeVer ); typedef void ( * VM_EXECUTE ) ( const HB_BYTE * pCode, PHB_SYMB pSymbols ); diff --git a/harbour/include/hbvm.h b/harbour/include/hbvm.h index ffb85d644b..283c076d2e 100644 --- a/harbour/include/hbvm.h +++ b/harbour/include/hbvm.h @@ -74,27 +74,27 @@ extern HB_EXPORT void hb_vmAtQuit( HB_INIT_FUNC pFunc, void * cargo ); /* Harbour virtual machine functions */ extern HB_EXPORT void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols ) HB_FLATTEN_ATTR; /* invokes the virtual machine */ -extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols, const char * szModuleName, ULONG ulID, USHORT uiPcodeVer ); /* module symbols initialization with extended information */ -extern HB_EXPORT PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, USHORT uiSymbols, const char * szModuleName, ULONG ulID, USHORT uiPcodeVer ); /* module symbols initialization with extended information */ +extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_USHORT uiPcodeVer ); /* module symbols initialization with extended information */ +extern HB_EXPORT PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_USHORT uiPcodeVer ); /* module symbols initialization with extended information */ #ifdef _HB_API_INTERNAL_ typedef struct _HB_SYMBOLS { - PHB_SYMB pModuleSymbols; /* pointer to module symbol table */ - USHORT uiModuleSymbols; /* number of symbols on that table */ - USHORT uiStaticsOffset; /* ofset of statics base symbol */ + PHB_SYMB pModuleSymbols; /* pointer to module symbol table */ + HB_USHORT uiModuleSymbols; /* number of symbols on that table */ + HB_USHORT uiStaticsOffset; /* ofset of statics base symbol */ struct _HB_SYMBOLS * pNext; /* pointer to the next SYMBOLS structure */ HB_SYMBOLSCOPE hScope; /* scope collected from all symbols in module used to speed initialization code */ - void * hDynLib; /* handler to dynamic library */ - HB_BOOL fAllocated; /* the symbol table is dynamically allocated and should be freed on HVM exit */ - HB_BOOL fActive; /* the symbol table is currently active */ - HB_BOOL fInitStatics; /* static initialization should be executed */ - char * szModuleName; /* module name */ - ULONG ulID; /* module unique identifier */ + void * hDynLib; /* handler to dynamic library */ + HB_BOOL fAllocated; /* the symbol table is dynamically allocated and should be freed on HVM exit */ + HB_BOOL fActive; /* the symbol table is currently active */ + HB_BOOL fInitStatics; /* static initialization should be executed */ + char * szModuleName; /* module name */ + ULONG ulID; /* module unique identifier */ } HB_SYMBOLS, * PHB_SYMBOLS; /* structure to keep track of all modules symbol tables */ - extern PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_BOOL fDynLib, HB_BOOL fClone ); + extern PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_BOOL fDynLib, HB_BOOL fClone ); extern HB_BOOL hb_vmLockModuleSymbols( void ); extern void hb_vmUnlockModuleSymbols( void ); extern void hb_vmFreeSymbols( PHB_SYMBOLS pSymbols ); @@ -102,7 +102,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, USHORT u extern void hb_vmInitSymbolGroup( void * hNewDynLib, int argc, const char * argv[] ); extern void hb_vmExitSymbolGroup( void * hDynLib ); extern const char * hb_vmFindModuleSymbolName( PHB_SYMB pSym ); - extern HB_BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, USHORT * puiSymbols ); + extern HB_BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, HB_USHORT * puiSymbols ); extern PHB_SYMB hb_vmGetRealFuncSym( PHB_SYMB pSym ); extern void hb_vmSetFunction( PHB_SYMB pOldSym, PHB_SYMB pNewSym ); @@ -119,14 +119,14 @@ extern void hb_vmUnsetExceptionHandler( void ); extern HB_EXPORT void hb_vmSymbolInit_RT( void ); /* initialization of runtime support symbols */ /* Harbour virtual machine escaping API */ -extern HB_EXPORT void hb_vmRequestDebug( void ); -extern HB_EXPORT void hb_vmRequestBreak( PHB_ITEM pItem ); -extern HB_EXPORT void hb_vmRequestCancel( void ); -extern HB_EXPORT void hb_vmRequestQuit( void ); -extern HB_EXPORT void hb_vmRequestEndProc( void ); -extern HB_EXPORT USHORT hb_vmRequestQuery( void ); -extern HB_EXPORT HB_BOOL hb_vmRequestReenter( void ); -extern HB_EXPORT void hb_vmRequestRestore( void ); +extern HB_EXPORT void hb_vmRequestDebug( void ); +extern HB_EXPORT void hb_vmRequestBreak( PHB_ITEM pItem ); +extern HB_EXPORT void hb_vmRequestCancel( void ); +extern HB_EXPORT void hb_vmRequestQuit( void ); +extern HB_EXPORT void hb_vmRequestEndProc( void ); +extern HB_EXPORT HB_USHORT hb_vmRequestQuery( void ); +extern HB_EXPORT HB_BOOL hb_vmRequestReenter( void ); +extern HB_EXPORT void hb_vmRequestRestore( void ); /* Return values of hb_vmRequestQuery() */ #define HB_QUIT_REQUESTED 1 /* immediately quit the application */ @@ -136,10 +136,10 @@ extern HB_EXPORT void hb_vmRequestRestore( void ); /* Public PCode functions */ /* Execution */ -extern HB_EXPORT void hb_vmDo( USHORT uiParams ); /* invoke the virtual machine */ -extern HB_EXPORT void hb_vmProc( USHORT uiParams ); /* executes a function or procedure */ -extern HB_EXPORT void hb_vmFunction( USHORT uiParams ); /* executes a function */ -extern HB_EXPORT void hb_vmSend( USHORT uiParams ); /* sends a message to an object */ +extern HB_EXPORT void hb_vmDo( HB_USHORT uiParams ); /* invoke the virtual machine */ +extern HB_EXPORT void hb_vmProc( HB_USHORT uiParams ); /* executes a function or procedure */ +extern HB_EXPORT void hb_vmFunction( HB_USHORT uiParams ); /* executes a function */ +extern HB_EXPORT void hb_vmSend( HB_USHORT uiParams ); /* sends a message to an object */ extern HB_EXPORT PHB_ITEM hb_vmEvalBlock( PHB_ITEM pBlockItem ); /* executes passed codeblock with no arguments */ /* executes passed codeblock with variable number of arguments */ extern HB_EXPORT PHB_ITEM hb_vmEvalBlockV( PHB_ITEM pBlockItem, ULONG ulArgCount, ... ); diff --git a/harbour/include/hbvmpub.h b/harbour/include/hbvmpub.h index ab13bc93b3..1bce0aa7ed 100644 --- a/harbour/include/hbvmpub.h +++ b/harbour/include/hbvmpub.h @@ -143,14 +143,14 @@ struct _HB_SYMB; { struct _HB_SYMB * pSymbol; /* pointer to its relative local symbol */ # if !defined( HB_MT_VM ) - void * pMemvar; /* memvar pointer ( publics & privates ) */ - USHORT uiArea; /* Workarea number */ + void * pMemvar; /* memvar pointer ( publics & privates ) */ + HB_USHORT uiArea; /* Workarea number */ # endif /* !HB_MT_VM */ - USHORT uiSymNum; /* dynamic symbol number */ + HB_USHORT uiSymNum; /* dynamic symbol number */ # if !defined( HB_NO_PROFILER ) - ULONG ulCalls; /* profiler support */ - ULONG ulTime; /* profiler support */ - ULONG ulRecurse; /* profiler support */ + ULONG ulCalls; /* profiler support */ + ULONG ulTime; /* profiler support */ + ULONG ulRecurse; /* profiler support */ # endif /* !HB_NO_PROFILER */ } HB_DYNS, * PHB_DYNS, * HB_DYNS_PTR; diff --git a/harbour/include/hbxvm.h b/harbour/include/hbxvm.h index 3a20fd953d..de81c71595 100644 --- a/harbour/include/hbxvm.h +++ b/harbour/include/hbxvm.h @@ -95,22 +95,22 @@ extern HB_EXPORT void hb_xvmWithObjectMessage( PHB_SYMB ); /* send WITH extern HB_EXPORT HB_BOOL hb_xvmSwitchGet( PHB_ITEM * ); -extern HB_EXPORT void hb_xvmSetLine( USHORT uiLine ); /* set .prg line number information */ +extern HB_EXPORT void hb_xvmSetLine( HB_USHORT uiLine ); /* set .prg line number information */ extern HB_EXPORT void hb_xvmFrame( int iLocals, int iParams ); /* increases the stack pointer for the amount of locals and params suplied */ extern HB_EXPORT void hb_xvmVFrame( int iLocals, int iParams ); /* increases the stack pointer for the amount of locals and variable params */ extern HB_EXPORT void hb_xvmSFrame( PHB_SYMB pSymbol ); -extern HB_EXPORT void hb_xvmStatics( PHB_SYMB pSymbol, USHORT uiStatics ); -extern HB_EXPORT void hb_xvmThreadStatics( USHORT uiStatics, const HB_BYTE * statics ); +extern HB_EXPORT void hb_xvmStatics( PHB_SYMB pSymbol, HB_USHORT uiStatics ); +extern HB_EXPORT void hb_xvmThreadStatics( HB_USHORT uiStatics, const HB_BYTE * statics ); extern HB_EXPORT void hb_xvmParameter( PHB_SYMB pSymbol, int iParams ); extern HB_EXPORT void hb_xvmRetValue( void ); /* pops the latest stack value into stack.Return */ -extern HB_EXPORT HB_BOOL hb_xvmDo( USHORT uiParams ); -extern HB_EXPORT HB_BOOL hb_xvmFunction( USHORT uiParams ); -extern HB_EXPORT HB_BOOL hb_xvmSend( USHORT uiParams ); +extern HB_EXPORT HB_BOOL hb_xvmDo( HB_USHORT uiParams ); +extern HB_EXPORT HB_BOOL hb_xvmFunction( HB_USHORT uiParams ); +extern HB_EXPORT HB_BOOL hb_xvmSend( HB_USHORT uiParams ); extern HB_EXPORT HB_BOOL hb_xvmPushObjectVarRef( void ); -extern HB_EXPORT void hb_xvmPushStatic( USHORT uiStatic ); -extern HB_EXPORT void hb_xvmPushStaticByRef( USHORT uiStatic ); -extern HB_EXPORT void hb_xvmPopStatic( USHORT uiStatic ); +extern HB_EXPORT void hb_xvmPushStatic( HB_USHORT uiStatic ); +extern HB_EXPORT void hb_xvmPushStaticByRef( HB_USHORT uiStatic ); +extern HB_EXPORT void hb_xvmPopStatic( HB_USHORT uiStatic ); extern HB_EXPORT HB_BOOL hb_xvmPushVariable( PHB_SYMB pSymbol ); extern HB_EXPORT HB_BOOL hb_xvmPopVariable( PHB_SYMB pSymbol ); extern HB_EXPORT void hb_xvmPushBlock( const HB_BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ @@ -182,21 +182,21 @@ extern HB_EXPORT HB_BOOL hb_xvmDec( void ); extern HB_EXPORT HB_BOOL hb_xvmDecEq( void ); extern HB_EXPORT HB_BOOL hb_xvmDecEqPop( void ); -extern HB_EXPORT void hb_xvmArrayDim( USHORT uiDimensions ); /* generates an uiDimensions Array and initialize those dimensions from the stack values */ +extern HB_EXPORT void hb_xvmArrayDim( HB_USHORT uiDimensions ); /* generates an uiDimensions Array and initialize those dimensions from the stack values */ extern HB_EXPORT void hb_xvmArrayGen( HB_SIZE ulElements ); /* generates an ulElements Array and fills it from the stack values */ extern HB_EXPORT HB_BOOL hb_xvmArrayPush( void ); /* pushes an array element to the stack, removing the array and the index from the stack */ extern HB_EXPORT HB_BOOL hb_xvmArrayPushRef( void ); /* pushes a reference to an array element to the stack, removing the array and the index from the stack */ extern HB_EXPORT HB_BOOL hb_xvmArrayPop( void ); /* pops a value from the stack */ extern HB_EXPORT void hb_xvmHashGen( HB_SIZE ulElements ); /* generates an ulElements Hash and fills it from the stack values */ -extern HB_EXPORT void hb_xvmLocalName( USHORT uiLocal, const char * szLocalName ); -extern HB_EXPORT void hb_xvmStaticName( HB_BYTE bIsGlobal, USHORT uiStatic, const char * szStaticName ); +extern HB_EXPORT void hb_xvmLocalName( HB_USHORT uiLocal, const char * szLocalName ); +extern HB_EXPORT void hb_xvmStaticName( HB_BYTE bIsGlobal, HB_USHORT uiStatic, const char * szStaticName ); extern HB_EXPORT void hb_xvmModuleName( const char * szModuleName ); -extern HB_EXPORT HB_BOOL hb_xvmMacroDo( USHORT uiArgSets ); -extern HB_EXPORT HB_BOOL hb_xvmMacroFunc( USHORT uiArgSets ); -extern HB_EXPORT HB_BOOL hb_xvmMacroSend( USHORT uiArgSets ); -extern HB_EXPORT HB_BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ); +extern HB_EXPORT HB_BOOL hb_xvmMacroDo( HB_USHORT uiArgSets ); +extern HB_EXPORT HB_BOOL hb_xvmMacroFunc( HB_USHORT uiArgSets ); +extern HB_EXPORT HB_BOOL hb_xvmMacroSend( HB_USHORT uiArgSets ); +extern HB_EXPORT HB_BOOL hb_xvmMacroArrayGen( HB_USHORT uiArgSets ); extern HB_EXPORT HB_BOOL hb_xvmMacroPush( int bFlags ); extern HB_EXPORT HB_BOOL hb_xvmMacroPushRef( void ); extern HB_EXPORT HB_BOOL hb_xvmMacroPushIndex( void ); @@ -253,7 +253,7 @@ extern HB_EXPORT HB_BOOL hb_xvmNotEqualInt( LONG lValue ); extern HB_EXPORT HB_BOOL hb_xvmNotEqualIntIs( LONG lValue, HB_BOOL * fValue ); extern HB_EXPORT HB_BOOL hb_xvmLocalAdd( int iLocal ); -extern HB_EXPORT HB_BOOL hb_xvmStaticAdd( USHORT uiStatic ); +extern HB_EXPORT HB_BOOL hb_xvmStaticAdd( HB_USHORT uiStatic ); extern HB_EXPORT HB_BOOL hb_xvmMemvarAdd( PHB_SYMB pSymbol ); extern HB_EXPORT void hb_xvmCopyLocals( int iDest, int iSource ); diff --git a/harbour/src/common/expropt1.c b/harbour/src/common/expropt1.c index 18d227ce9d..593cc334cd 100644 --- a/harbour/src/common/expropt1.c +++ b/harbour/src/common/expropt1.c @@ -473,7 +473,7 @@ HB_EXPR_PTR hb_compExprNewCodeBlock( char *string, ULONG ulLen, int iFlags, HB_C pExpr->value.asCodeblock.pExprList = NULL; pExpr->value.asCodeblock.pLocals = NULL; /* this will hold local variables declarations */ pExpr->ValType = HB_EV_CODEBLOCK; - pExpr->value.asCodeblock.flags = ( USHORT ) iFlags; + pExpr->value.asCodeblock.flags = ( HB_USHORT ) iFlags; pExpr->value.asCodeblock.string = string; pExpr->ulLength = ulLen; return pExpr; diff --git a/harbour/src/common/expropt2.c b/harbour/src/common/expropt2.c index c1225ca133..a489dacf36 100644 --- a/harbour/src/common/expropt2.c +++ b/harbour/src/common/expropt2.c @@ -2152,7 +2152,7 @@ HB_BOOL hb_compExprReduceINT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) return HB_FALSE; } -HB_BOOL hb_compExprReduceSTOT( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceSTOT( HB_EXPR_PTR pSelf, HB_USHORT usCount, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms ? pParms->value.asList.pExprList : NULL; @@ -2183,7 +2183,7 @@ HB_BOOL hb_compExprReduceSTOT( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) return HB_FALSE; } -HB_BOOL hb_compExprReduceSTOD( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceSTOD( HB_EXPR_PTR pSelf, HB_USHORT usCount, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms ? pParms->value.asList.pExprList : NULL; diff --git a/harbour/src/common/hbffind.c b/harbour/src/common/hbffind.c index 320cc6d77f..daa7af6d6d 100644 --- a/harbour/src/common/hbffind.c +++ b/harbour/src/common/hbffind.c @@ -422,9 +422,9 @@ static HB_BOOL hb_fsFindNextLow( PHB_FFIND ffind ) /* tzset(); */ #if defined( __WATCOMC__ ) - bFound = ( _dos_findfirst( ffind->pszFileMask, ( USHORT ) hb_fsAttrToRaw( ffind->attrmask ), &info->entry ) == 0 ); + bFound = ( _dos_findfirst( ffind->pszFileMask, ( HB_USHORT ) hb_fsAttrToRaw( ffind->attrmask ), &info->entry ) == 0 ); #else - bFound = ( findfirst( ffind->pszFileMask, &info->entry, ( USHORT ) hb_fsAttrToRaw( ffind->attrmask ) ) == 0 ); + bFound = ( findfirst( ffind->pszFileMask, &info->entry, ( HB_USHORT ) hb_fsAttrToRaw( ffind->attrmask ) ) == 0 ); #endif } else diff --git a/harbour/src/compiler/genc.c b/harbour/src/compiler/genc.c index b47bb264ed..1103eb3b65 100644 --- a/harbour/src/compiler/genc.c +++ b/harbour/src/compiler/genc.c @@ -520,7 +520,7 @@ static void hb_compGenCLocalName( PFUNCTION pFunc, int iLocal, ULONG lPCodePos, } else { - const char *szName = hb_compLocalVariableName( pFunc, ( USHORT ) iLocal ); + const char *szName = hb_compLocalVariableName( pFunc, ( HB_USHORT ) iLocal ); if( szName ) fprintf( cargo->yyc, "\t/* %s */", szName ); @@ -529,7 +529,7 @@ static void hb_compGenCLocalName( PFUNCTION pFunc, int iLocal, ULONG lPCodePos, } } -static void hb_compGenCStaticName( USHORT uiStatic, HB_GENC_INFO_PTR cargo ) +static void hb_compGenCStaticName( HB_USHORT uiStatic, HB_GENC_INFO_PTR cargo ) { const char *szName = hb_compStaticVariableName( cargo->HB_COMP_PARAM, uiStatic ); if( szName ) @@ -1400,7 +1400,7 @@ static HB_GENC_FUNC( hb_p_pushblockshort ) static HB_GENC_FUNC( hb_p_pushblock ) { - USHORT wVar, w; + HB_USHORT wVar, w; ULONG ulStart = lPCodePos; fprintf( cargo->yyc, "\tHB_P_PUSHBLOCK, %i, %i,", @@ -1455,7 +1455,7 @@ static HB_GENC_FUNC( hb_p_pushblock ) static HB_GENC_FUNC( hb_p_pushblocklarge ) { - USHORT wVar, w; + HB_USHORT wVar, w; ULONG ulStart = lPCodePos; fprintf( cargo->yyc, "\tHB_P_PUSHBLOCKLARGE, %i, %i, %i,", @@ -1703,7 +1703,7 @@ static HB_GENC_FUNC( hb_p_pushstaticref ) static HB_GENC_FUNC( hb_p_pushstrshort ) { - USHORT wLen = pFunc->pCode[ lPCodePos + 1 ]; + HB_USHORT wLen = pFunc->pCode[ lPCodePos + 1 ]; fprintf( cargo->yyc, "\tHB_P_PUSHSTRSHORT, %i,", pFunc->pCode[ lPCodePos + 1 ] ); @@ -1721,7 +1721,7 @@ static HB_GENC_FUNC( hb_p_pushstrshort ) static HB_GENC_FUNC( hb_p_pushstr ) { - USHORT wLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ); + HB_USHORT wLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ); fprintf( cargo->yyc, "\tHB_P_PUSHSTR, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], @@ -1762,7 +1762,7 @@ static HB_GENC_FUNC( hb_p_pushstrlarge ) static HB_GENC_FUNC( hb_p_pushstrhidden ) { - USHORT wLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] ); + HB_USHORT wLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] ); fprintf( cargo->yyc, "\tHB_P_PUSHSTRHIDDEN, %i, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], @@ -1999,7 +1999,7 @@ static HB_GENC_FUNC( hb_p_staticname ) static HB_GENC_FUNC( hb_p_threadstatics ) { - USHORT w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), u; + HB_USHORT w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), u; fprintf( cargo->yyc, "\tHB_P_THREADSTATICS, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], diff --git a/harbour/src/compiler/gencc.c b/harbour/src/compiler/gencc.c index 17760cf73c..e7631408ea 100644 --- a/harbour/src/compiler/gencc.c +++ b/harbour/src/compiler/gencc.c @@ -649,7 +649,7 @@ static HB_GENC_FUNC( hb_p_line ) static HB_GENC_FUNC( hb_p_localname ) { - USHORT usLen; + HB_USHORT usLen; HB_GENC_LABEL(); @@ -801,7 +801,7 @@ static HB_GENC_FUNC( hb_p_minus ) static HB_GENC_FUNC( hb_p_modulename ) { - USHORT usLen; + HB_USHORT usLen; HB_GENC_LABEL(); @@ -1027,7 +1027,7 @@ static HB_GENC_FUNC( hb_p_pushaliasedvar ) static HB_GENC_FUNC( hb_p_pushblockshort ) { - USHORT usSize, us; + HB_USHORT usSize, us; HB_GENC_LABEL(); @@ -1052,7 +1052,7 @@ static HB_GENC_FUNC( hb_p_pushblockshort ) static HB_GENC_FUNC( hb_p_pushblock ) { - USHORT usSize, us; + HB_USHORT usSize, us; HB_GENC_LABEL(); @@ -1325,7 +1325,7 @@ static HB_GENC_FUNC( hb_p_pushstaticref ) static HB_GENC_FUNC( hb_p_pushstrshort ) { - USHORT usLen = pFunc->pCode[ lPCodePos + 1 ] - 1; + HB_USHORT usLen = pFunc->pCode[ lPCodePos + 1 ] - 1; HB_GENC_LABEL(); @@ -1338,7 +1338,7 @@ static HB_GENC_FUNC( hb_p_pushstrshort ) static HB_GENC_FUNC( hb_p_pushstr ) { - USHORT usLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) - 1; + HB_USHORT usLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) - 1; HB_GENC_LABEL(); @@ -1364,7 +1364,7 @@ static HB_GENC_FUNC( hb_p_pushstrlarge ) static HB_GENC_FUNC( hb_p_pushstrhidden ) { - USHORT usLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] ); + HB_USHORT usLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] ); HB_GENC_LABEL(); @@ -1551,13 +1551,13 @@ static HB_GENC_FUNC( hb_p_statics ) static HB_GENC_FUNC( hb_p_staticname ) { - USHORT usLen; + HB_USHORT usLen; HB_GENC_LABEL(); usLen = strlen( ( char * ) &pFunc->pCode[ lPCodePos + 4 ] ); fprintf( cargo->yyc, "\thb_xvmStaticName( %hu, %hu, ", - ( USHORT ) pFunc->pCode[ lPCodePos + 1 ], + ( HB_USHORT ) pFunc->pCode[ lPCodePos + 1 ], HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] ) ); hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 4 ], usLen ); fprintf( cargo->yyc, " );\n" ); @@ -1566,7 +1566,7 @@ static HB_GENC_FUNC( hb_p_staticname ) static HB_GENC_FUNC( hb_p_threadstatics ) { - USHORT w; + HB_USHORT w; ULONG ulSize, ul; HB_GENC_LABEL(); @@ -1680,7 +1680,7 @@ static HB_GENC_FUNC( hb_p_enumend ) static HB_GENC_FUNC( hb_p_switch ) { - USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us; + HB_USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us; ULONG ulStart = lPCodePos, ulNewPos; HB_BOOL fNum = HB_FALSE, fStr = HB_FALSE, fDefault = HB_FALSE; @@ -2015,7 +2015,7 @@ static HB_GENC_FUNC( hb_p_withobjectend ) static HB_GENC_FUNC( hb_p_withobjectmessage ) { - USHORT usSym = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ); + HB_USHORT usSym = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ); HB_GENC_LABEL(); diff --git a/harbour/src/compiler/genobj32.c b/harbour/src/compiler/genobj32.c index 94dd1a2d47..89d881fc42 100644 --- a/harbour/src/compiler/genobj32.c +++ b/harbour/src/compiler/genobj32.c @@ -32,13 +32,13 @@ static HB_BYTE s_prgFunction[] = { 0x68, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x0 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x83, 0xC4, 0x08, 0xC3 }; static char * * s_externNames = NULL; -static USHORT s_wExternals = 1; /* _hb_vmExecute is always added */ +static HB_USHORT s_wExternals = 1; /* _hb_vmExecute is always added */ static const char * s_szPrefix = "_HB_FUN_"; -static USHORT hb_compFunctionGetPos( HB_COMP_DECL, char * szFunctionName ) /* return 0 if not found or order + 1 */ +static HB_USHORT hb_compFunctionGetPos( HB_COMP_DECL, char * szFunctionName ) /* return 0 if not found or order + 1 */ { PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst; - USHORT wFunction = HB_COMP_PARAM->fStartProc ? 1 : 0; + HB_USHORT wFunction = HB_COMP_PARAM->fStartProc ? 1 : 0; while( pFunc ) { @@ -112,9 +112,9 @@ static HB_BOOL IsExternal( HB_COMP_DECL, ULONG ulSymbol ) return ! hb_compFunctionFind( HB_COMP_PARAM, pSymbol->szName ); } -static USHORT GetExternalPos( char * szExternal ) +static HB_USHORT GetExternalPos( char * szExternal ) { - USHORT w = 0; + HB_USHORT w = 0; while( w < s_wExternals ) { @@ -169,7 +169,7 @@ static void GenerateSymbolsSegment( HB_COMP_DECL, FILE * hObjFile ) GroupDef( hObjFile, 12, groupSymGroup ); /* "SYMGROUP" localNames position - 1 */ GroupDef( hObjFile, 17, groupInitData ); /* "BORLAND" localNames position - 1 */ - * ( USHORT * ) symbolsData = ( USHORT ) GetSymbolsAmount( HB_COMP_PARAM ); + * ( HB_USHORT * ) symbolsData = ( HB_USHORT ) GetSymbolsAmount( HB_COMP_PARAM ); EnumeratedData( hObjFile, 6, symbolsData, sizeof( symbolsData ), 0 ); /* HB_SYMBOLS defined order segment */ @@ -200,7 +200,7 @@ static void GenerateDataSegment( HB_COMP_DECL, FILE * hObjFile ) 0 ); /* segment length */ DefineSegment( hObjFile, 5, /* "_DATA" position + 1 into localNames */ 6, /* "DATA" position + 1 into localNames */ - ( USHORT ) ulSize ); /* segment length */ + ( HB_USHORT ) ulSize ); /* segment length */ memset( &symbol, 0, sizeof( symbol ) ); DataSegment( HB_COMP_PARAM, hObjFile, ( HB_BYTE * ) &symbol, @@ -209,18 +209,18 @@ static void GenerateDataSegment( HB_COMP_DECL, FILE * hObjFile ) pSymbol = GetFirstSymbol( HB_COMP_PARAM ); for( ul = 0; ul < ulSymbols; ul++ ) { - Fixup( hObjFile, 0xE4, ( USHORT ) ( ul * sizeof( HB_SYMB ) ), 0x54, 4 ); /* 4 = Data symbol name location */ + Fixup( hObjFile, 0xE4, ( HB_USHORT ) ( ul * sizeof( HB_SYMB ) ), 0x54, 4 ); /* 4 = Data symbol name location */ if( IsExternal( HB_COMP_PARAM, ul ) ) { if( ! ( pSymbol->cScope & HB_FS_MESSAGE ) ) - Fixup( hObjFile, 0xE4, ( USHORT ) ( ul * sizeof( HB_SYMB ) ) + 8, 0x56, + Fixup( hObjFile, 0xE4, ( HB_USHORT ) ( ul * sizeof( HB_SYMB ) ) + 8, 0x56, GetExternalPos( GetSymbolName( HB_COMP_PARAM, ul ) ) + 1 ); } else { /* if( ! ( pSymbol->cScope & HB_FS_MESSAGE ) ) */ - Fixup( hObjFile, 0xE4, ( USHORT ) ( ul * sizeof( HB_SYMB ) ) + 8, 0x54, 1 ); /* function address location */ + Fixup( hObjFile, 0xE4, ( HB_USHORT ) ( ul * sizeof( HB_SYMB ) ) + 8, 0x54, 1 ); /* function address location */ } pSymbol = pSymbol->pNext; } @@ -228,14 +228,14 @@ static void GenerateDataSegment( HB_COMP_DECL, FILE * hObjFile ) static void GenerateCodeSegment( HB_COMP_DECL, FILE * hObjFile ) { - USHORT wFunctions = HB_COMP_PARAM->functions.iCount - ( HB_COMP_PARAM->fStartProc ? 0: 1 ); + HB_USHORT wFunctions = HB_COMP_PARAM->functions.iCount - ( HB_COMP_PARAM->fStartProc ? 0: 1 ); ULONG ulSize = wFunctions * sizeof( s_prgFunction ); PFUNCTION pFunc = ( HB_COMP_PARAM->fStartProc ? HB_COMP_PARAM->functions.pFirst: HB_COMP_PARAM->functions.pFirst->pNext ); - USHORT w = 0; + HB_USHORT w = 0; DefineSegment( hObjFile, 2, /* "_TEXT" position + 1 into localNames */ 3, /* "CODE" position + 1 into localNames */ - ( USHORT ) ulSize ); /* segment length */ + ( HB_USHORT ) ulSize ); /* segment length */ while( pFunc ) { @@ -263,7 +263,7 @@ static void GenerateCodeSegment( HB_COMP_DECL, FILE * hObjFile ) static void GenerateExternals( HB_COMP_DECL, FILE * hObjFile ) { - USHORT w; + HB_USHORT w; PFUNCALL pFunc; PFUNCTION pFTemp; @@ -300,7 +300,7 @@ static void putbyte( HB_BYTE b, FILE * hObjFile, HB_BYTE * pbChecksum ) * pbChecksum += b; } -static void putword( USHORT w, FILE * hObjFile, HB_BYTE * pbChecksum ) +static void putword( HB_USHORT w, FILE * hObjFile, HB_BYTE * pbChecksum ) { putbyte( HB_LOBYTE( w ), hObjFile, pbChecksum ); putbyte( HB_HIBYTE( w ), hObjFile, pbChecksum ); @@ -308,7 +308,7 @@ static void putword( USHORT w, FILE * hObjFile, HB_BYTE * pbChecksum ) static void CompiledFileName( FILE * hObjFile, char * szFileName ) { - USHORT wLen = strlen( szFileName ); + HB_USHORT wLen = strlen( szFileName ); HB_BYTE bChk = 0; /* this is a checksum the linker will check to asure OBJ integrity */ HB_BYTE bChar; @@ -325,7 +325,7 @@ static void CompiledFileName( FILE * hObjFile, char * szFileName ) static void CompilerVersion( FILE * hObjFile, char * szVersion ) { - USHORT wLen = strlen( szVersion ); + HB_USHORT wLen = strlen( szVersion ); HB_BYTE bChk = 0; /* this is a checksum the linker will check to asure OBJ integrity */ HB_BYTE bChar; @@ -342,7 +342,7 @@ static void CompilerVersion( FILE * hObjFile, char * szVersion ) static void LocalNames( FILE * hObjFile, char * szNames[] ) { HB_BYTE b = 0, c; - USHORT wTotalLen = 0; + HB_USHORT wTotalLen = 0; HB_BYTE bChk = 0; while( szNames[ b ] ) @@ -369,7 +369,7 @@ static void LocalNames( FILE * hObjFile, char * szNames[] ) static void ExternalNames( FILE * hObjFile, char * szNames[] ) { HB_BYTE b = 0, c; - USHORT wTotalLen = 0; + HB_USHORT wTotalLen = 0; HB_BYTE bChk = 0; while( szNames[ b ] ) @@ -409,11 +409,11 @@ static void ExternalNames( FILE * hObjFile, char * szNames[] ) putbyte( 256 - bChk, hObjFile, &bChk ); } -static void CodeSegment( HB_COMP_DECL, FILE * hObjFile, HB_BYTE * prgCode, ULONG ulPrgLen, USHORT wFunctions ) +static void CodeSegment( HB_COMP_DECL, FILE * hObjFile, HB_BYTE * prgCode, ULONG ulPrgLen, HB_USHORT wFunctions ) { HB_BYTE bChk = 0; - USHORT y; - USHORT wTotalLen = ( USHORT ) ( ulPrgLen * wFunctions ) + 4; + HB_USHORT y; + HB_USHORT wTotalLen = ( HB_USHORT ) ( ulPrgLen * wFunctions ) + 4; ULONG ul; PFUNCTION pFunction = HB_COMP_PARAM->functions.pFirst; ULONG ulPCodeOffset = HB_COMP_PARAM->symbols.iCount * sizeof( HB_SYMB ); @@ -443,7 +443,7 @@ static void DataSegment( HB_COMP_DECL, FILE * hObjFile, HB_BYTE * symbol, ULONG { HB_BYTE bChk = 0; ULONG w, y; - USHORT wTotalLen = 4 + ( USHORT ) ulSize; + HB_USHORT wTotalLen = 4 + ( HB_USHORT ) ulSize; PCOMSYMBOL pSymbol = GetFirstSymbol( HB_COMP_PARAM ); PFUNCTION pFunction = HB_COMP_PARAM->functions.pFirst; ULONG ulSymbolNameOffset = GetSymbolsSize( HB_COMP_PARAM ) + GetPCodesSize( HB_COMP_PARAM ); @@ -505,7 +505,7 @@ static void DataSegment( HB_COMP_DECL, FILE * hObjFile, HB_BYTE * symbol, ULONG putbyte( 256 - bChk, hObjFile, &bChk ); } -static void DefineSegment( FILE * hObjFile, HB_BYTE bName, HB_BYTE bClass, USHORT wLen ) +static void DefineSegment( FILE * hObjFile, HB_BYTE bName, HB_BYTE bClass, HB_USHORT wLen ) { HB_BYTE bChk = 0; @@ -522,11 +522,11 @@ static void DefineSegment( FILE * hObjFile, HB_BYTE bName, HB_BYTE bClass, USHOR putbyte( 256 - bChk, hObjFile, &bChk ); } -static void PubDef( FILE * hObjFile, char * szName, USHORT wSegment, USHORT wOffset ) +static void PubDef( FILE * hObjFile, char * szName, HB_USHORT wSegment, HB_USHORT wOffset ) { HB_BYTE bChk = 0; HB_BYTE bChar; - USHORT wLen = 2 + 2 + strlen( s_szPrefix ) + strlen( szName ) + 2 + 1; + HB_USHORT wLen = 2 + 2 + strlen( s_szPrefix ) + strlen( szName ) + 2 + 1; const char * szTemp; putbyte( 0x90, hObjFile, &bChk ); @@ -548,7 +548,7 @@ static void PubDef( FILE * hObjFile, char * szName, USHORT wSegment, USHORT wOff putbyte( 256 - bChk, hObjFile, &bChk ); } -static void Fixup( FILE * hObjFile, HB_BYTE bType, USHORT wOffset, HB_BYTE bFlags, HB_BYTE bSymbol ) +static void Fixup( FILE * hObjFile, HB_BYTE bType, HB_USHORT wOffset, HB_BYTE bFlags, HB_BYTE bSymbol ) { HB_BYTE bChk = 0; @@ -562,13 +562,13 @@ static void Fixup( FILE * hObjFile, HB_BYTE bType, USHORT wOffset, HB_BYTE bFlag putbyte( 256 - bChk, hObjFile, &bChk ); } -static void EnumeratedData( FILE * hObjFile, HB_BYTE bSegment, HB_BYTE * pData, USHORT wLen, USHORT wOffset ) +static void EnumeratedData( FILE * hObjFile, HB_BYTE bSegment, HB_BYTE * pData, HB_USHORT wLen, HB_USHORT wOffset ) { HB_BYTE bChk = 0; - USHORT w; + HB_USHORT w; putbyte( 0xA0, hObjFile, &bChk ); - putword( ( USHORT ) ( wLen + 4 ), hObjFile, &bChk ); + putword( ( HB_USHORT ) ( wLen + 4 ), hObjFile, &bChk ); putbyte( bSegment, hObjFile, &bChk ); putword( wOffset, hObjFile, &bChk ); @@ -592,8 +592,8 @@ static void End( FILE * hObjFile ) static void GroupDef( FILE * hObjFile, HB_BYTE bName, HB_BYTE * aSegs ) { HB_BYTE bChk = 0; - USHORT wRecLen = 2; - USHORT w = 0; + HB_USHORT wRecLen = 2; + HB_USHORT w = 0; while( aSegs[ w++ ] ) wRecLen += 2; diff --git a/harbour/src/compiler/harbour.y b/harbour/src/compiler/harbour.y index 9c279f821a..c875e0e3ab 100644 --- a/harbour/src/compiler/harbour.y +++ b/harbour/src/compiler/harbour.y @@ -2058,7 +2058,7 @@ static void hb_compLoopLoop( HB_COMP_DECL ) } else { - USHORT wWithObjectCnt = pLast->wWithObjectCnt; + HB_USHORT wWithObjectCnt = pLast->wWithObjectCnt; pLoop = ( HB_LOOPEXIT_PTR ) hb_xgrab( sizeof( HB_LOOPEXIT ) ); pLoop->pLoopList = NULL; @@ -2114,7 +2114,7 @@ static void hb_compLoopExit( HB_COMP_DECL ) } else { - USHORT wWithObjectCnt = pLast->wWithObjectCnt; + HB_USHORT wWithObjectCnt = pLast->wWithObjectCnt; pLoop = ( HB_LOOPEXIT_PTR ) hb_xgrab( sizeof( HB_LOOPEXIT ) ); pLoop->pExitList = NULL; @@ -2302,7 +2302,7 @@ static void hb_compRTVariableAdd( HB_COMP_DECL, HB_EXPR_PTR pVar, HB_BOOL bPopIn static void hb_compRTVariableGen( HB_COMP_DECL, const char * szCreateFun ) { - USHORT usCount = 0; + HB_USHORT usCount = 0; PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; HB_RTVAR_PTR pVar = pFunc->rtvars; HB_RTVAR_PTR pDel; @@ -2357,7 +2357,7 @@ void hb_compRTVariableKill( HB_COMP_DECL, PFUNCTION pFunc ) static HB_EXPR_PTR hb_compArrayDimPush( HB_EXPR_PTR pInitValue, HB_COMP_DECL ) { - USHORT uCount = ( USHORT ) hb_compExprListLen( pInitValue ); + HB_USHORT uCount = ( HB_USHORT ) hb_compExprListLen( pInitValue ); if( uCount == 1 && hb_compExprIsInteger( pInitValue->value.asList.pExprList ) && hb_compExprAsInteger( pInitValue->value.asList.pExprList ) == 0 ) diff --git a/harbour/src/compiler/harbour.yyc b/harbour/src/compiler/harbour.yyc index fa486197e0..b17a1b9e5a 100644 --- a/harbour/src/compiler/harbour.yyc +++ b/harbour/src/compiler/harbour.yyc @@ -7228,7 +7228,7 @@ static void hb_compLoopLoop( HB_COMP_DECL ) } else { - USHORT wWithObjectCnt = pLast->wWithObjectCnt; + HB_USHORT wWithObjectCnt = pLast->wWithObjectCnt; pLoop = ( HB_LOOPEXIT_PTR ) hb_xgrab( sizeof( HB_LOOPEXIT ) ); pLoop->pLoopList = NULL; @@ -7284,7 +7284,7 @@ static void hb_compLoopExit( HB_COMP_DECL ) } else { - USHORT wWithObjectCnt = pLast->wWithObjectCnt; + HB_USHORT wWithObjectCnt = pLast->wWithObjectCnt; pLoop = ( HB_LOOPEXIT_PTR ) hb_xgrab( sizeof( HB_LOOPEXIT ) ); pLoop->pExitList = NULL; @@ -7472,7 +7472,7 @@ static void hb_compRTVariableAdd( HB_COMP_DECL, HB_EXPR_PTR pVar, HB_BOOL bPopIn static void hb_compRTVariableGen( HB_COMP_DECL, const char * szCreateFun ) { - USHORT usCount = 0; + HB_USHORT usCount = 0; PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; HB_RTVAR_PTR pVar = pFunc->rtvars; HB_RTVAR_PTR pDel; @@ -7527,7 +7527,7 @@ void hb_compRTVariableKill( HB_COMP_DECL, PFUNCTION pFunc ) static HB_EXPR_PTR hb_compArrayDimPush( HB_EXPR_PTR pInitValue, HB_COMP_DECL ) { - USHORT uCount = ( USHORT ) hb_compExprListLen( pInitValue ); + HB_USHORT uCount = ( HB_USHORT ) hb_compExprListLen( pInitValue ); if( uCount == 1 && hb_compExprIsInteger( pInitValue->value.asList.pExprList ) && hb_compExprAsInteger( pInitValue->value.asList.pExprList ) == 0 ) diff --git a/harbour/src/compiler/hbdead.c b/harbour/src/compiler/hbdead.c index 3d21bdfbdc..5e098d2c11 100644 --- a/harbour/src/compiler/hbdead.c +++ b/harbour/src/compiler/hbdead.c @@ -277,7 +277,7 @@ static HB_CODETRACE_FUNC( hb_p_seqend ) static HB_CODETRACE_FUNC( hb_p_switch ) { - USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us; + HB_USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us; ULONG ulStart = lPCodePos, ulNewPos; lPCodePos += 3; diff --git a/harbour/src/compiler/hbfix.c b/harbour/src/compiler/hbfix.c index 9d047fd508..fc58080112 100644 --- a/harbour/src/compiler/hbfix.c +++ b/harbour/src/compiler/hbfix.c @@ -67,7 +67,7 @@ typedef HB_FIX_FUNC_ * HB_FIX_FUNC_PTR; static HB_FIX_FUNC( hb_p_pushblock ) { HB_BYTE * pLocal = &pFunc->pCode[ lPCodePos + 7 ]; - USHORT wVar; + HB_USHORT wVar; HB_SYMBOL_UNUSED( cargo ); @@ -77,7 +77,7 @@ static HB_FIX_FUNC( hb_p_pushblock ) /* fix local variable's reference */ while( wVar-- ) { - USHORT wLocal = HB_PCODE_MKUSHORT( pLocal ) + pFunc->wParamCount; + HB_USHORT wLocal = HB_PCODE_MKUSHORT( pLocal ) + pFunc->wParamCount; pLocal[ 0 ] = HB_LOBYTE( wLocal ); pLocal[ 1 ] = HB_HIBYTE( wLocal ); pLocal += 2; @@ -92,7 +92,7 @@ static HB_FIX_FUNC( hb_p_pushblock ) static HB_FIX_FUNC( hb_p_pushblocklarge ) { HB_BYTE * pLocal = &pFunc->pCode[ lPCodePos + 8 ]; - USHORT wVar; + HB_USHORT wVar; HB_SYMBOL_UNUSED( cargo ); @@ -102,7 +102,7 @@ static HB_FIX_FUNC( hb_p_pushblocklarge ) /* fix local variable's reference */ while( wVar-- ) { - USHORT wLocal = HB_PCODE_MKUSHORT( pLocal ) + pFunc->wParamCount; + HB_USHORT wLocal = HB_PCODE_MKUSHORT( pLocal ) + pFunc->wParamCount; pLocal[ 0 ] = HB_LOBYTE( wLocal ); pLocal[ 1 ] = HB_HIBYTE( wLocal ); pLocal += 2; diff --git a/harbour/src/compiler/hbmain.c b/harbour/src/compiler/hbmain.c index b5351da8cd..0cb986e256 100644 --- a/harbour/src/compiler/hbmain.c +++ b/harbour/src/compiler/hbmain.c @@ -263,7 +263,7 @@ static int hb_compReadClpFile( HB_COMP_DECL, const char * szClpFile ) /* ------------------------------------------------------------------------- */ -static PCOMSYMBOL hb_compSymbolAdd( HB_COMP_DECL, const char * szSymbolName, USHORT * pwPos, HB_BOOL bFunction ) +static PCOMSYMBOL hb_compSymbolAdd( HB_COMP_DECL, const char * szSymbolName, HB_USHORT * pwPos, HB_BOOL bFunction ) { PCOMSYMBOL pSym; @@ -293,10 +293,10 @@ static PCOMSYMBOL hb_compSymbolAdd( HB_COMP_DECL, const char * szSymbolName, USH return pSym; } -static PCOMSYMBOL hb_compSymbolFind( HB_COMP_DECL, const char * szSymbolName, USHORT * pwPos, HB_BOOL bFunction ) +static PCOMSYMBOL hb_compSymbolFind( HB_COMP_DECL, const char * szSymbolName, HB_USHORT * pwPos, HB_BOOL bFunction ) { PCOMSYMBOL pSym = HB_COMP_PARAM->symbols.pFirst; - USHORT wCnt = 0; + HB_USHORT wCnt = 0; int iFunc = bFunction ? HB_COMP_PARAM->iModulesCount : 0; while( pSym ) @@ -323,7 +323,7 @@ static PCOMSYMBOL hb_compSymbolFind( HB_COMP_DECL, const char * szSymbolName, US /* returns a symbol name based on its index on the symbol table * index starts from 0 */ -const char * hb_compSymbolName( HB_COMP_DECL, USHORT uiSymbol ) +const char * hb_compSymbolName( HB_COMP_DECL, HB_USHORT uiSymbol ) { PCOMSYMBOL pSym = HB_COMP_PARAM->symbols.pFirst; @@ -350,9 +350,9 @@ static void hb_compCheckDuplVars( HB_COMP_DECL, PVAR pVar, const char * szVarNam } } -static USHORT hb_compVarListAdd( PVAR * pVarLst, PVAR pVar ) +static HB_USHORT hb_compVarListAdd( PVAR * pVarLst, PVAR pVar ) { - USHORT uiVar = 1; + HB_USHORT uiVar = 1; while( *pVarLst ) { pVarLst = &( *pVarLst )->pNext; @@ -474,7 +474,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT if( HB_COMP_PARAM->iVarScope & VS_MEMVAR ) { PCOMSYMBOL pSym; - USHORT wPos; + HB_USHORT wPos; if( HB_COMP_PARAM->fAutoMemvarAssume || HB_COMP_PARAM->iVarScope == VS_MEMVAR ) { @@ -561,7 +561,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT case VS_LOCAL: case VS_PARAMETER: { - USHORT wLocal = hb_compVarListAdd( &pFunc->pLocals, pVar ); + HB_USHORT wLocal = hb_compVarListAdd( &pFunc->pLocals, pVar ); if( HB_COMP_PARAM->iVarScope == VS_PARAMETER ) { @@ -645,7 +645,7 @@ static PVAR hb_compVariableGet( PVAR pVars, const char * szVarName, int * piPos } /* returns variable pointer if defined or NULL */ -static PVAR hb_compVariableGetVar( PVAR pVars, USHORT wOrder ) +static PVAR hb_compVariableGetVar( PVAR pVars, HB_USHORT wOrder ) { while( pVars && --wOrder ) pVars = pVars->pNext; @@ -653,9 +653,9 @@ static PVAR hb_compVariableGetVar( PVAR pVars, USHORT wOrder ) } /* returns the order + 1 of a variable if defined or zero */ -static USHORT hb_compVariableGetPos( PVAR pVars, const char * szVarName ) +static HB_USHORT hb_compVariableGetPos( PVAR pVars, const char * szVarName ) { - USHORT wVar = 1; + HB_USHORT wVar = 1; while( pVars ) { @@ -851,7 +851,7 @@ PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int } /* return local variable name using its order after final fixing */ -const char * hb_compLocalVariableName( PFUNCTION pFunc, USHORT wVar ) +const char * hb_compLocalVariableName( PFUNCTION pFunc, HB_USHORT wVar ) { PVAR pVar; @@ -862,14 +862,14 @@ const char * hb_compLocalVariableName( PFUNCTION pFunc, USHORT wVar ) return pVar ? pVar->szName : NULL; } -const char * hb_compStaticVariableName( HB_COMP_DECL, USHORT wVar ) +const char * hb_compStaticVariableName( HB_COMP_DECL, HB_USHORT wVar ) { PVAR pVar; PFUNCTION pTmp = HB_COMP_PARAM->functions.pFirst; while( pTmp->pNext && pTmp->pNext->iStaticsBase < wVar ) pTmp = pTmp->pNext; - pVar = hb_compVariableGetVar( pTmp->pStatics, ( USHORT ) ( wVar - pTmp->iStaticsBase ) ); + pVar = hb_compVariableGetVar( pTmp->pStatics, ( HB_USHORT ) ( wVar - pTmp->iStaticsBase ) ); return pVar ? pVar->szName : NULL; } @@ -1566,7 +1566,7 @@ static void hb_compOptimizeJumps( HB_COMP_DECL ) static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) { - USHORT w; + HB_USHORT w; if( pFunc == NULL ) return; @@ -2424,7 +2424,7 @@ void hb_compGenStaticName( const char *szVarName, HB_COMP_DECL ) */ static void hb_compGenVarPCode( HB_BYTE bPCode, const char * szVarName, HB_COMP_DECL ) { - USHORT wVar; + HB_USHORT wVar; PCOMSYMBOL pSym; /* Check if this variable name is placed into the symbol table @@ -2502,7 +2502,7 @@ static void hb_compGenFieldPCode( HB_COMP_DECL, HB_BYTE bPCode, PVAR pField ) */ void hb_compGenMessage( const char * szMsgName, HB_BOOL bIsObject, HB_COMP_DECL ) { - USHORT wSym; + HB_USHORT wSym; PCOMSYMBOL pSym; if( szMsgName ) @@ -2892,7 +2892,7 @@ void hb_compGenPushDouble( double dNumber, HB_BYTE bWidth, HB_BYTE bDec, HB_COMP void hb_compGenPushFunCall( const char * szFunName, HB_COMP_DECL ) { const char * szFunction; - USHORT wSym; + HB_USHORT wSym; /* if abbreviated function name was used - change it for whole name */ szFunction = hb_compReservedName( szFunName ); @@ -2928,7 +2928,7 @@ void hb_compGenPushFunRef( const char * szFunName, HB_COMP_DECL ) /* generates the pcode to push a symbol on the virtual machine stack */ void hb_compGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COMP_DECL ) { - USHORT wSym; + HB_USHORT wSym; if( !hb_compSymbolFind( HB_COMP_PARAM, szSymbolName, &wSym, bFunction ) ) hb_compSymbolAdd( HB_COMP_PARAM, szSymbolName, &wSym, bFunction ); @@ -3332,7 +3332,7 @@ static void hb_compStaticDefThreadSet( HB_COMP_DECL ) { if( HB_COMP_PARAM->pInitFunc ) { - USHORT uiCount = 0, uiVar = 0; + HB_USHORT uiCount = 0, uiVar = 0; PFUNCTION pFunc; PVAR pVar; @@ -3444,9 +3444,9 @@ void hb_compCodeBlockEnd( HB_COMP_DECL ) PFUNCTION pFunc; /* pointer to a function that owns a codeblock */ const char * pFuncName; ULONG ulSize; - USHORT wLocals = 0; /* number of referenced local variables */ - USHORT wLocalsCnt, wLocalsLen; - USHORT wPos; + HB_USHORT wLocals = 0; /* number of referenced local variables */ + HB_USHORT wLocalsCnt, wLocalsLen; + HB_USHORT wPos; int iLocalPos; PVAR pVar; @@ -3525,7 +3525,7 @@ void hb_compCodeBlockEnd( HB_COMP_DECL ) } else { - /* NOTE: 8 = HB_P_PUSHBLOCK + USHORT( size ) + USHORT( wParams ) + USHORT( wLocals ) + _ENDBLOCK */ + /* NOTE: 8 = HB_P_PUSHBLOCK + HB_USHORT( size ) + HB_USHORT( wParams ) + HB_USHORT( wLocals ) + _ENDBLOCK */ ulSize += 5 + wLocals * 2; if( ulSize <= USHRT_MAX ) hb_compGenPCode3( HB_P_PUSHBLOCK, HB_LOBYTE( ulSize ), HB_HIBYTE( ulSize ), HB_COMP_PARAM ); diff --git a/harbour/src/compiler/hbopt.c b/harbour/src/compiler/hbopt.c index d7bd06923a..862478fe05 100644 --- a/harbour/src/compiler/hbopt.c +++ b/harbour/src/compiler/hbopt.c @@ -619,7 +619,7 @@ static HB_OPT_FUNC( hb_p_jumptruefar ) static HB_OPT_FUNC( hb_p_switch ) { - USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us; + HB_USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us; ULONG ulStart = lPCodePos; HB_SYMBOL_UNUSED( cargo ); @@ -1169,7 +1169,7 @@ static void hb_compPCodeEnumScanLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLocals ) case HB_P_PUSHBLOCKLARGE: { HB_BYTE * pCode = &pFunc->pCode[ ulPos + 5 ]; - USHORT usVarCount, usVar; + HB_USHORT usVarCount, usVar; if( pFunc->pCode[ ulPos ] == HB_P_PUSHBLOCKLARGE ) pCode++; @@ -1298,7 +1298,7 @@ static int hb_compPCodeTraceAssignedUnused( PFUNCTION pFunc, ULONG ulPos, HB_BYT } else if( pFunc->pCode[ ulPos ] == HB_P_SWITCH ) /* Switch is multiplace jump */ { - USHORT us, usCount = HB_PCODE_MKUSHORT( pFunc->pCode + ulPos + 1 ); + HB_USHORT us, usCount = HB_PCODE_MKUSHORT( pFunc->pCode + ulPos + 1 ); ulPos += 3; for( us = 0; us < usCount; us++ ) @@ -1326,7 +1326,7 @@ static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_O HB_BYTE * pMap; ULONG ulPos = 0, ulLastPos = 0; HB_SHORT isLocal; - USHORT usLine = 0; + HB_USHORT usLine = 0; pMap = ( HB_BYTE * ) hb_xgrab( pFunc->lPCodePos ); @@ -1506,7 +1506,7 @@ static void hb_compPCodeEnumRenumberLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLoca case HB_P_PUSHBLOCKLARGE: { HB_BYTE * pVar = &pFunc->pCode[ ulPos + 5 ]; - USHORT usVarCount, isVar; + HB_USHORT usVarCount, isVar; if( pFunc->pCode[ ulPos ] == HB_P_PUSHBLOCKLARGE ) pVar++; @@ -1540,7 +1540,7 @@ void hb_compPCodeTraceOptimizer( HB_COMP_DECL ) PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; PHB_OPT_LOCAL pLocals; PVAR pVar, * ppVar; - USHORT usLocalCount, usIndex; + HB_USHORT usLocalCount, usIndex; HB_BOOL fBool; /* Many (perhaps ALL) functions of pcode trace optimization dependes on pcodes. diff --git a/harbour/src/nortl/nortl.c b/harbour/src/nortl/nortl.c index df27eb5367..ed3935fc23 100644 --- a/harbour/src/nortl/nortl.c +++ b/harbour/src/nortl/nortl.c @@ -409,7 +409,7 @@ void hb_vmLock( void ) {} void hb_vmUnlock( void ) {} -void hb_fsSetIOError( HB_BOOL fResult, USHORT uiOperation ) +void hb_fsSetIOError( HB_BOOL fResult, HB_USHORT uiOperation ) { HB_SYMBOL_UNUSED( fResult ); HB_SYMBOL_UNUSED( uiOperation ); diff --git a/harbour/src/pp/hbpp.c b/harbour/src/pp/hbpp.c index 889b29340f..cc4dd96061 100644 --- a/harbour/src/pp/hbpp.c +++ b/harbour/src/pp/hbpp.c @@ -132,7 +132,7 @@ static int hb_pp_writeRules( FILE * fout, PHB_PP_RULE pFirst, const char * szNam ULONG ulRepeatBits, ulBit; PHB_PP_RULE pRule; int iRule; - USHORT u; + HB_USHORT u; iRule = 0; pRule = pFirst; diff --git a/harbour/src/pp/ppcore.c b/harbour/src/pp/ppcore.c index a2ff8f5b2a..e8edbafa35 100644 --- a/harbour/src/pp/ppcore.c +++ b/harbour/src/pp/ppcore.c @@ -459,7 +459,7 @@ static PHB_PP_TOKEN hb_pp_tokenResultEnd( PHB_PP_TOKEN * pTokenPtr, HB_BOOL fDir } static PHB_PP_TOKEN hb_pp_tokenNew( const char * value, ULONG ulLen, - int iSpaces, USHORT type ) + int iSpaces, HB_USHORT type ) { PHB_PP_TOKEN pToken = ( PHB_PP_TOKEN ) hb_xgrab( sizeof( HB_PP_TOKEN ) ); @@ -481,8 +481,8 @@ static PHB_PP_TOKEN hb_pp_tokenNew( const char * value, ULONG ulLen, else pToken->value = ( char * ) value; - pToken->len = ( USHORT ) ulLen; - pToken->spaces = ( USHORT ) iSpaces; + pToken->len = ( HB_USHORT ) ulLen; + pToken->spaces = ( HB_USHORT ) iSpaces; pToken->type = type; pToken->index = 0; pToken->pNext = NULL; @@ -507,7 +507,7 @@ static void hb_pp_tokenSetValue( PHB_PP_TOKEN pToken, pToken->value = ( char * ) memcpy( hb_xgrab( ulLen + 1 ), value, ulLen ); ( ( char * ) pToken->value )[ ulLen ] = '\0'; } - pToken->len = ( USHORT ) ulLen; + pToken->len = ( HB_USHORT ) ulLen; } static PHB_PP_TOKEN hb_pp_tokenClone( PHB_PP_TOKEN pSource ) @@ -528,7 +528,7 @@ static PHB_PP_TOKEN hb_pp_tokenClone( PHB_PP_TOKEN pSource ) static void hb_pp_tokenAdd( PHB_PP_TOKEN ** pTokenPtr, const char * value, ULONG ulLen, - int iSpaces, USHORT type ) + int iSpaces, HB_USHORT type ) { PHB_PP_TOKEN pToken = hb_pp_tokenNew( value, ulLen, iSpaces, type ); ** pTokenPtr = pToken; @@ -550,7 +550,7 @@ static void hb_pp_tokenAddCmdSep( PHB_PP_STATE pState ) } static void hb_pp_tokenAddNext( PHB_PP_STATE pState, const char * value, ULONG ulLen, - USHORT type ) + HB_USHORT type ) { if( pState->fCanNextLine ) hb_pp_tokenAddCmdSep( pState ); @@ -1505,7 +1505,7 @@ static void hb_pp_getLine( PHB_PP_STATE pState ) } static int hb_pp_tokenStr( PHB_PP_TOKEN pToken, PHB_MEM_BUFFER pBuffer, - HB_BOOL fSpaces, HB_BOOL fQuote, USHORT ltype ) + HB_BOOL fSpaces, HB_BOOL fQuote, HB_USHORT ltype ) { int iLines = 0, iSpace = fSpaces ? pToken->spaces : 0; @@ -1644,7 +1644,7 @@ static int hb_pp_tokenStr( PHB_PP_TOKEN pToken, PHB_MEM_BUFFER pBuffer, return iLines; } -static HB_BOOL hb_pp_tokenValueCmp( PHB_PP_TOKEN pToken, const char * szValue, USHORT mode ) +static HB_BOOL hb_pp_tokenValueCmp( PHB_PP_TOKEN pToken, const char * szValue, HB_USHORT mode ) { if( pToken->len ) { @@ -1662,7 +1662,7 @@ static HB_BOOL hb_pp_tokenValueCmp( PHB_PP_TOKEN pToken, const char * szValue, U } static HB_BOOL hb_pp_tokenEqual( PHB_PP_TOKEN pToken, PHB_PP_TOKEN pMatch, - USHORT mode ) + HB_USHORT mode ) { return pToken == pMatch || ( mode != HB_PP_CMP_ADDR && @@ -1692,7 +1692,7 @@ static void hb_pp_patternClearResults( PHB_PP_RULE pRule ) pRule->pNextExpr = NULL; } -static HB_BOOL hb_pp_patternAddResult( PHB_PP_RULE pRule, USHORT marker, +static HB_BOOL hb_pp_patternAddResult( PHB_PP_RULE pRule, HB_USHORT marker, PHB_PP_TOKEN pFirst, PHB_PP_TOKEN pNext ) { PHB_PP_MARKER pMarker = &pRule->pMarkers[ marker - 1 ]; @@ -1716,7 +1716,7 @@ static HB_BOOL hb_pp_patternAddResult( PHB_PP_RULE pRule, USHORT marker, } static PHB_PP_RULE hb_pp_ruleNew( PHB_PP_TOKEN pMatch, PHB_PP_TOKEN pResult, - USHORT mode, USHORT markers, + HB_USHORT mode, HB_USHORT markers, PHB_PP_MARKER pMarkers ) { PHB_PP_RULE pRule = ( PHB_PP_RULE ) hb_xgrab( sizeof( HB_PP_RULE ) ); @@ -1819,8 +1819,8 @@ static PHB_PP_RULE hb_pp_defineFind( PHB_PP_STATE pState, PHB_PP_TOKEN pToken ) return pRule; } -static void hb_pp_defineAdd( PHB_PP_STATE pState, USHORT mode, - USHORT markers, PHB_PP_MARKER pMarkers, +static void hb_pp_defineAdd( PHB_PP_STATE pState, HB_USHORT mode, + HB_USHORT markers, PHB_PP_MARKER pMarkers, PHB_PP_TOKEN pMatch, PHB_PP_TOKEN pResult ) { PHB_PP_RULE pRule = hb_pp_defineFind( pState, pMatch ); @@ -2670,13 +2670,13 @@ static void hb_pp_defineNew( PHB_PP_STATE pState, PHB_PP_TOKEN pToken, HB_BOOL f { PHB_PP_TOKEN pResult, pLast = pMatch->pNext, pParam; PHB_PP_MARKER pMarkers = NULL; - USHORT usPCount = 0, usParam; + HB_USHORT usPCount = 0, usParam; /* pseudo function? */ if( pLast && HB_PP_TOKEN_TYPE( pLast->type ) == HB_PP_TOKEN_LEFT_PB && pLast->spaces == 0 ) { - USHORT type = HB_PP_TOKEN_KEYWORD; + HB_USHORT type = HB_PP_TOKEN_KEYWORD; for( ;; ) { pLast = pLast->pNext; @@ -2790,7 +2790,7 @@ static HB_BOOL hb_pp_tokenUnQuotedGet( PHB_PP_TOKEN ** pTokenPtr, HB_BOOL * pfQu static HB_BOOL hb_pp_matchMarkerNew( PHB_PP_TOKEN * pTokenPtr, PHB_PP_MARKERLST * pMarkerListPtr ) { - USHORT type = HB_PP_TOKEN_NUL; + HB_USHORT type = HB_PP_TOKEN_NUL; PHB_PP_TOKEN pMarkerId = NULL, pMTokens = NULL; HB_BOOL fQuoted; @@ -3046,9 +3046,9 @@ static HB_BOOL hb_pp_resultMarkerNew( PHB_PP_STATE pState, PHB_PP_TOKEN * pTokenPtr, PHB_PP_MARKERLST * pMarkerListPtr, HB_BOOL fDump, HB_BOOL fOptional, - USHORT * pusPCount, USHORT spaces ) + HB_USHORT * pusPCount, HB_USHORT spaces ) { - USHORT type = HB_PP_TOKEN_NUL, rtype; + HB_USHORT type = HB_PP_TOKEN_NUL, rtype; PHB_PP_TOKEN pMarkerId = NULL, pToken; HB_BOOL fQuoted; @@ -3187,8 +3187,8 @@ static HB_BOOL hb_pp_patternCompare( PHB_PP_TOKEN pToken1, PHB_PP_TOKEN pToken2 } static void hb_pp_directiveDel( PHB_PP_STATE pState, PHB_PP_TOKEN pMatch, - USHORT markers, PHB_PP_MARKER pMarkers, - USHORT mode, HB_BOOL fCommand ) + HB_USHORT markers, PHB_PP_MARKER pMarkers, + HB_USHORT mode, HB_BOOL fCommand ) { PHB_PP_RULE pRule, * pRulePtr = fCommand ? &pState->pCommands : &pState->pTranslations; @@ -3197,7 +3197,7 @@ static void hb_pp_directiveDel( PHB_PP_STATE pState, PHB_PP_TOKEN pMatch, pRule = * pRulePtr; if( HB_PP_CMP_MODE( pRule->mode ) == mode && pRule->markers == markers ) { - USHORT u; + HB_USHORT u; for( u = 0; u < markers; ++u ) { if( pRule->pMarkers[ u ].canrepeat != pMarkers[ u ].canrepeat ) @@ -3219,7 +3219,7 @@ static void hb_pp_directiveDel( PHB_PP_STATE pState, PHB_PP_TOKEN pMatch, } static void hb_pp_directiveNew( PHB_PP_STATE pState, PHB_PP_TOKEN pToken, - USHORT mode, HB_BOOL fCommand, HB_BOOL fDirect, + HB_USHORT mode, HB_BOOL fCommand, HB_BOOL fDirect, HB_BOOL fDelete ) { PHB_PP_TOKEN pResult, pMatch, pStart, pLast; @@ -3275,7 +3275,7 @@ static void hb_pp_directiveNew( PHB_PP_STATE pState, PHB_PP_TOKEN pToken, PHB_PP_MARKERLST pMarkerList = NULL, pMrkLst; PHB_PP_MARKERPTR pMrkPtr; PHB_PP_MARKER pMarkers = NULL; - USHORT usPCount = 0; + HB_USHORT usPCount = 0; fValid = hb_pp_matchPatternNew( pState, &pMatch, &pMarkerList, NULL ); if( fValid ) @@ -3305,7 +3305,7 @@ static void hb_pp_directiveNew( PHB_PP_STATE pState, PHB_PP_TOKEN pToken, } else if( HB_PP_TOKEN_TYPE( ( * pTokenPtr )->type ) == HB_PP_TOKEN_LT ) { - USHORT spaces = ( * pTokenPtr )->spaces; + HB_USHORT spaces = ( * pTokenPtr )->spaces; /* Free the string dump token: '#'. Clipper PP always does it without checking type of next marker */ if( pDumpPtr ) @@ -3443,11 +3443,11 @@ static HB_BOOL hb_pp_tokenStartExtBlock( PHB_PP_TOKEN * pTokenPtr ) if( pToken && HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_TOKEN_LEFT_CB && pToken->pNext && HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_PIPE ) { - USHORT prevtype = HB_PP_TOKEN_COMMA; + HB_USHORT prevtype = HB_PP_TOKEN_COMMA; pToken = pToken->pNext->pNext; while( pToken ) { - USHORT type = HB_PP_TOKEN_TYPE( pToken->type ); + HB_USHORT type = HB_PP_TOKEN_TYPE( pToken->type ); if( ( ( type == HB_PP_TOKEN_KEYWORD || type == HB_PP_TOKEN_EPSILON ) && prevtype == HB_PP_TOKEN_COMMA ) || ( type == HB_PP_TOKEN_COMMA && prevtype == HB_PP_TOKEN_KEYWORD ) ) @@ -3482,9 +3482,9 @@ static HB_BOOL hb_pp_tokenStopExtBlock( PHB_PP_TOKEN * pTokenPtr ) } static HB_BOOL hb_pp_tokenSkipExp( PHB_PP_TOKEN * pTokenPtr, PHB_PP_TOKEN pStop, - USHORT mode, HB_BOOL * pfStop ) + HB_USHORT mode, HB_BOOL * pfStop ) { - USHORT curtype, prevtype = 0, lbrtype = 0, rbrtype = 0; + HB_USHORT curtype, prevtype = 0, lbrtype = 0, rbrtype = 0; PHB_PP_TOKEN pToken = * pTokenPtr, pPrev; int iBraces = 0; HB_BOOL fMatch; @@ -3614,10 +3614,10 @@ static HB_BOOL hb_pp_tokenCanStartExp( PHB_PP_TOKEN pToken ) } static HB_BOOL hb_pp_tokenMatch( PHB_PP_TOKEN pMatch, PHB_PP_TOKEN * pTokenPtr, - PHB_PP_TOKEN pStop, USHORT mode ) + PHB_PP_TOKEN pStop, HB_USHORT mode ) { HB_BOOL fMatch = HB_FALSE; - USHORT type; + HB_USHORT type; type = HB_PP_TOKEN_TYPE( pMatch->type ); if( type == HB_PP_MMARKER_REGULAR ) @@ -3777,7 +3777,7 @@ static HB_BOOL hb_pp_tokenMatch( PHB_PP_TOKEN pMatch, PHB_PP_TOKEN * pTokenPtr, static HB_BOOL hb_pp_patternMatch( PHB_PP_TOKEN pMatch, PHB_PP_TOKEN * pTokenPtr, PHB_PP_TOKEN pStop, - USHORT mode, PHB_PP_RULE pRule ) + HB_USHORT mode, PHB_PP_RULE pRule ) { PHB_PP_TOKEN pToken = * pTokenPtr; PHB_PP_TOKEN pFirst; @@ -3869,8 +3869,8 @@ static HB_BOOL hb_pp_patternCmp( PHB_PP_RULE pRule, PHB_PP_TOKEN pToken, return HB_FALSE; } -static PHB_PP_RESULT hb_pp_matchResultGet( PHB_PP_RULE pRule, USHORT usMatch, - USHORT usIndex ) +static PHB_PP_RESULT hb_pp_matchResultGet( PHB_PP_RULE pRule, HB_USHORT usMatch, + HB_USHORT usIndex ) { PHB_PP_MARKER pMarker = &pRule->pMarkers[ usIndex - 1]; PHB_PP_RESULT pMarkerResult; @@ -3892,7 +3892,7 @@ static PHB_PP_RESULT hb_pp_matchResultGet( PHB_PP_RULE pRule, USHORT usMatch, } static PHB_PP_TOKEN * hb_pp_matchResultLstAdd( PHB_PP_STATE pState, - USHORT spaces, USHORT type, + HB_USHORT spaces, HB_USHORT type, PHB_PP_TOKEN * pResultPtr, PHB_PP_TOKEN pToken, PHB_PP_TOKEN pStop ) @@ -4032,7 +4032,7 @@ static PHB_PP_TOKEN * hb_pp_matchResultLstAdd( PHB_PP_STATE pState, static PHB_PP_TOKEN * hb_pp_matchResultAdd( PHB_PP_STATE pState, PHB_PP_RULE pRule, PHB_PP_TOKEN * pResultPtr, - PHB_PP_TOKEN pMatch, USHORT usMatch ) + PHB_PP_TOKEN pMatch, HB_USHORT usMatch ) { PHB_PP_RESULT pMarkerResult = hb_pp_matchResultGet( pRule, usMatch, pMatch->index ); PHB_PP_TOKEN pToken, pStop; @@ -4121,7 +4121,7 @@ static PHB_PP_TOKEN * hb_pp_matchResultAdd( PHB_PP_STATE pState, } static PHB_PP_TOKEN * hb_pp_patternStuff( PHB_PP_STATE pState, - PHB_PP_RULE pRule, USHORT usMatch, + PHB_PP_RULE pRule, HB_USHORT usMatch, PHB_PP_TOKEN pResultPattern, PHB_PP_TOKEN * pResultPtr ) { @@ -4133,7 +4133,7 @@ static PHB_PP_TOKEN * hb_pp_patternStuff( PHB_PP_STATE pState, } else if( HB_PP_TOKEN_TYPE( pResultPattern->type ) == HB_PP_RMARKER_OPTIONAL ) { - USHORT usMaxMatch = 0, matches; + HB_USHORT usMaxMatch = 0, matches; PHB_PP_TOKEN pToken = pResultPattern->pMTokens; while( pToken ) { @@ -4187,7 +4187,7 @@ static char * hb_pp_tokenListStr( PHB_PP_TOKEN pToken, PHB_PP_TOKEN pStop, HB_BOOL fStop, PHB_MEM_BUFFER pBuffer, HB_BOOL fQuote, HB_BOOL fEol ) { - USHORT ltype = HB_PP_TOKEN_NUL; + HB_USHORT ltype = HB_PP_TOKEN_NUL; HB_BOOL fSpaces = HB_FALSE; hb_membufFlush( pBuffer ); @@ -5256,7 +5256,7 @@ void hb_pp_initRules( PHB_PP_RULE * pRulesPtr, int * piRules, pDefRule = ( PHB_PP_DEFRULE ) pDefRules + iDefRules; if( pDefRule->markers > 0 ) { - USHORT marker; + HB_USHORT marker; ULONG ulBit; pMarkers = ( PHB_PP_MARKER ) hb_xgrab( pDefRule->markers * sizeof( HB_PP_MARKER ) ); @@ -5844,7 +5844,7 @@ char * hb_pp_nextLine( PHB_PP_STATE pState, ULONG * pulLen ) { PHB_PP_TOKEN pToken; HB_BOOL fError = HB_FALSE; - USHORT ltype; + HB_USHORT ltype; if( !pState->pOutputBuffer ) pState->pOutputBuffer = hb_membufNew(); @@ -5886,7 +5886,7 @@ char * hb_pp_parseLine( PHB_PP_STATE pState, const char * pLine, ULONG * pulLen PHB_PP_TOKEN pToken; PHB_PP_FILE pFile; HB_BOOL fError = HB_FALSE; - USHORT ltype; + HB_USHORT ltype; ULONG ulLen; if( !pState->pOutputBuffer ) @@ -6127,7 +6127,7 @@ char * hb_pp_tokenBlockString( PHB_PP_STATE pState, PHB_PP_TOKEN pToken, hb_membufFlush( pState->pBuffer ); if( HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_TOKEN_LEFT_CB ) { - USHORT ltype = HB_PP_TOKEN_NUL; + HB_USHORT ltype = HB_PP_TOKEN_NUL; int iBraces = 0; do { diff --git a/harbour/src/rdd/dbcmd.c b/harbour/src/rdd/dbcmd.c index 230240cca7..59f2806cf8 100644 --- a/harbour/src/rdd/dbcmd.c +++ b/harbour/src/rdd/dbcmd.c @@ -71,7 +71,7 @@ /* The 5-th parameter is Harbour extensions */ HB_FUNC( AFIELDS ) { - USHORT uiFields, uiCount; + HB_USHORT uiFields, uiCount; AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); PHB_ITEM pName = hb_param( 1, HB_IT_ARRAY ); PHB_ITEM pType = hb_param( 2, HB_IT_ARRAY ); @@ -94,32 +94,32 @@ HB_FUNC( AFIELDS ) if( pName ) { - USHORT uiArrayLen = ( USHORT ) hb_arrayLen( pName ); + HB_USHORT uiArrayLen = ( HB_USHORT ) hb_arrayLen( pName ); if( uiArrayLen < uiFields ) uiFields = uiArrayLen; } if( pType ) { - USHORT uiArrayLen = ( USHORT ) hb_arrayLen( pType ); + HB_USHORT uiArrayLen = ( HB_USHORT ) hb_arrayLen( pType ); if( uiArrayLen < uiFields ) uiFields = uiArrayLen; } if( pLen ) { - USHORT uiArrayLen = ( USHORT ) hb_arrayLen( pLen ); + HB_USHORT uiArrayLen = ( HB_USHORT ) hb_arrayLen( pLen ); if( uiArrayLen < uiFields ) uiFields = uiArrayLen; } if( pDec ) { - USHORT uiArrayLen = ( USHORT ) hb_arrayLen( pDec ); + HB_USHORT uiArrayLen = ( HB_USHORT ) hb_arrayLen( pDec ); if( uiArrayLen < uiFields ) uiFields = uiArrayLen; } if( pFlags ) { - USHORT uiArrayLen = ( USHORT ) hb_arrayLen( pFlags ); + HB_USHORT uiArrayLen = ( HB_USHORT ) hb_arrayLen( pFlags ); if( uiArrayLen < uiFields ) uiFields = uiArrayLen; } @@ -335,7 +335,7 @@ HB_FUNC( DBCOMMITALL ) HB_FUNC( DBCREATE ) { const char * szFileName, * szAlias, * szDriver, * szCpId; - USHORT uiSize, uiLen; + HB_USHORT uiSize, uiLen; PHB_ITEM pStruct, pFieldDesc, pDelim; HB_BOOL fKeepOpen, fCurrArea; ULONG ulConnection; @@ -373,7 +373,7 @@ HB_FUNC( DBCREATE ) hb_errRT_DBCMD( EG_ARG, EDBCMD_DBCMDBADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } - uiLen = ( USHORT ) hb_arrayLen( pStruct ); + uiLen = ( HB_USHORT ) hb_arrayLen( pStruct ); for( uiSize = 1; uiSize <= uiLen; ++uiSize ) { @@ -404,7 +404,7 @@ HB_FUNC( DBCREATE ) HB_FUNC( HB_DBCREATETEMP ) { const char * szAlias, * szDriver, * szCpId; - USHORT uiSize, uiLen; + HB_USHORT uiSize, uiLen; PHB_ITEM pStruct, pFieldDesc; ULONG ulConnection; @@ -430,7 +430,7 @@ HB_FUNC( HB_DBCREATETEMP ) hb_errRT_DBCMD( EG_ARG, EDBCMD_DBCMDBADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } - uiLen = ( USHORT ) hb_arrayLen( pStruct ); + uiLen = ( HB_USHORT ) hb_arrayLen( pStruct ); for( uiSize = 1; uiSize <= uiLen; ++uiSize ) { @@ -462,7 +462,7 @@ HB_FUNC( HB_DBCREATETEMP ) HB_FUNC( __DBOPENSDF ) { const char * szFileName, * szAlias, * szDriver, * szCpId; - USHORT uiSize, uiLen; + HB_USHORT uiSize, uiLen; PHB_ITEM pStruct, pFieldDesc, pDelim; HB_BOOL fKeepOpen, fCurrArea; ULONG ulConnection; @@ -491,7 +491,7 @@ HB_FUNC( __DBOPENSDF ) hb_errRT_DBCMD( EG_ARG, EDBCMD_DBCMDBADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } - uiLen = ( USHORT ) hb_arrayLen( pStruct ); + uiLen = ( HB_USHORT ) hb_arrayLen( pStruct ); for( uiSize = 1; uiSize <= uiLen; ++uiSize ) { @@ -856,7 +856,7 @@ HB_FUNC( DBTABLEEXT ) if( !pArea ) { LPRDDNODE pRddNode; - USHORT uiRddID; + HB_USHORT uiRddID; pRddNode = hb_rddFindNode( hb_rddDefaultDrv( NULL ), &uiRddID ); if( pRddNode ) { @@ -932,7 +932,7 @@ HB_FUNC( EOF ) HB_FUNC( FCOUNT ) { - USHORT uiFields = 0; + HB_USHORT uiFields = 0; AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) @@ -944,7 +944,7 @@ HB_FUNC( FIELDGET ) { PHB_ITEM pItem = hb_itemNew( NULL ); AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); - USHORT uiField = hb_parni( 1 ); + HB_USHORT uiField = hb_parni( 1 ); if( pArea && uiField ) { @@ -958,7 +958,7 @@ HB_FUNC( FIELDNAME ) { char * szName; AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); - USHORT uiFields, uiIndex = hb_parni( 1 ); + HB_USHORT uiFields, uiIndex = hb_parni( 1 ); if( pArea && uiIndex ) { @@ -995,7 +995,7 @@ HB_FUNC( FIELDPUT ) if( pArea ) { - USHORT uiIndex = hb_parni( 1 ); + HB_USHORT uiIndex = hb_parni( 1 ); if( uiIndex > 0 ) { PHB_ITEM pItem = hb_param( 2, HB_IT_ANY ); @@ -1130,7 +1130,7 @@ HB_FUNC( ORDBAGEXT ) if( !pArea ) { LPRDDNODE pRddNode; - USHORT uiRddID; + HB_USHORT uiRddID; pRddNode = hb_rddFindNode( hb_rddDefaultDrv( NULL ), &uiRddID ); if( pRddNode ) { @@ -1561,10 +1561,10 @@ HB_FUNC( RDDNAME ) HB_FUNC( RDDREGISTER ) { - USHORT uiLen; + HB_USHORT uiLen; char szDriver[ HB_RDD_MAX_DRIVERNAME_LEN + 1 ]; - uiLen = ( USHORT ) hb_parclen( 1 ); + uiLen = ( HB_USHORT ) hb_parclen( 1 ); if( uiLen > 0 ) { if( uiLen > HB_RDD_MAX_DRIVERNAME_LEN ) @@ -1694,7 +1694,7 @@ HB_FUNC( ORDSCOPE ) if( pArea ) { DBORDERINFO pInfo; - USHORT uiAction; + HB_USHORT uiAction; int iScope = hb_parni( 1 ); memset( &pInfo, 0, sizeof( DBORDERINFO ) ); @@ -1734,7 +1734,7 @@ HB_FUNC( DBRELATION ) /* () --> cLinkExp */ if( pArea ) { PHB_ITEM pRelExpr = hb_itemPutC( NULL, NULL ); - USHORT uiRelNo = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiRelNo = ( HB_USHORT ) hb_parni( 1 ); SELF_RELTEXT( pArea, uiRelNo ? uiRelNo : 1, pRelExpr ); hb_itemReturnRelease( pRelExpr ); } @@ -1744,7 +1744,7 @@ HB_FUNC( DBRELATION ) /* () --> cLinkExp */ HB_FUNC( DBRSELECT ) /* () --> nWorkArea */ { - USHORT uiWorkArea = 0; + HB_USHORT uiWorkArea = 0; AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) @@ -1769,7 +1769,7 @@ HB_FUNC( DBSETRELATION ) { DBRELINFO dbRelations; AREAP pChildArea; - USHORT uiChildArea; + HB_USHORT uiChildArea; char * szAlias = NULL; if( hb_pcount() < 2 || ( !( hb_parinfo( 1 ) & HB_IT_NUMERIC ) && ( hb_parinfo( 1 ) != HB_IT_STRING ) ) || !( HB_ISNIL( 4 ) || HB_ISLOG( 4 ) ) ) @@ -1821,7 +1821,7 @@ HB_FUNC( __DBARRANGE ) if( pArea ) { - USHORT uiNewArea, uiCount, uiDest; + HB_USHORT uiNewArea, uiCount, uiDest; ULONG ulSize; char * szFieldLine, * szPos; PHB_ITEM pStruct, pFields; @@ -1835,7 +1835,7 @@ HB_FUNC( __DBARRANGE ) pStruct = hb_param( 2 , HB_IT_ARRAY ); if( pStruct ) { - dbSortInfo.dbtri.uiItemCount = ( USHORT ) hb_arrayLen( pStruct ); + dbSortInfo.dbtri.uiItemCount = ( HB_USHORT ) hb_arrayLen( pStruct ); if( dbSortInfo.dbtri.uiItemCount > 0 ) { dbSortInfo.dbtri.lpTransItems = ( LPDBTRANSITEM ) @@ -1882,7 +1882,7 @@ HB_FUNC( __DBARRANGE ) dbSortInfo.dbtri.dbsci.fIncludeDeleted = HB_TRUE; pFields = hb_param( 8, HB_IT_ARRAY ); - dbSortInfo.uiItemCount = pFields ? ( USHORT ) hb_arrayLen( pFields ) : 0; + dbSortInfo.uiItemCount = pFields ? ( HB_USHORT ) hb_arrayLen( pFields ) : 0; if( dbSortInfo.uiItemCount > 0 ) { dbSortInfo.lpdbsItem = ( LPDBSORTITEM ) hb_xgrab( dbSortInfo.uiItemCount * sizeof( DBSORTITEM ) ); @@ -1949,7 +1949,7 @@ HB_FUNC( __DBTRANS ) { if( HB_ISNUM( 1 ) ) { - USHORT uiSrcArea, uiDstArea; + HB_USHORT uiSrcArea, uiDstArea; AREAP pSrcArea, pDstArea; uiSrcArea = hb_rddGetCurrentWorkAreaNumber(); @@ -2069,7 +2069,7 @@ HB_FUNC( __RDDGETTEMPALIAS ) HB_FUNC( HB_RDDINFO ) { LPRDDNODE pRDDNode; - USHORT uiRddID; + HB_USHORT uiRddID; ULONG ulConnection; PHB_ITEM pIndex, pParam; const char * szDriver; @@ -2100,7 +2100,7 @@ HB_FUNC( HB_RDDINFO ) HB_FUNC( HB_DBDROP ) { LPRDDNODE pRDDNode; - USHORT uiRddID; + HB_USHORT uiRddID; ULONG ulConnection; const char * szDriver; PHB_ITEM pName; @@ -2125,7 +2125,7 @@ HB_FUNC( HB_DBDROP ) HB_FUNC( HB_DBEXISTS ) { LPRDDNODE pRDDNode; - USHORT uiRddID; + HB_USHORT uiRddID; ULONG ulConnection; const char * szDriver; PHB_ITEM pName; @@ -2150,7 +2150,7 @@ HB_FUNC( HB_DBEXISTS ) HB_FUNC( HB_DBRENAME ) { LPRDDNODE pRDDNode; - USHORT uiRddID; + HB_USHORT uiRddID; ULONG ulConnection; const char * szDriver; PHB_ITEM pTable, pIndex, pNewName; @@ -2185,7 +2185,7 @@ HB_FUNC( HB_FIELDLEN ) if( pArea ) { - USHORT uiIndex; + HB_USHORT uiIndex; if( ( uiIndex = hb_parni( 1 ) ) > 0 ) { @@ -2209,7 +2209,7 @@ HB_FUNC( HB_FIELDDEC ) if( pArea ) { - USHORT uiIndex; + HB_USHORT uiIndex; if( ( uiIndex = hb_parni( 1 ) ) > 0 ) { @@ -2233,7 +2233,7 @@ HB_FUNC( HB_FIELDTYPE ) if( pArea ) { - USHORT uiIndex; + HB_USHORT uiIndex; if( ( uiIndex = hb_parni( 1 ) ) > 0 ) { diff --git a/harbour/src/rdd/dbcmd53.c b/harbour/src/rdd/dbcmd53.c index b8f7ec2902..92f4a7610c 100644 --- a/harbour/src/rdd/dbcmd53.c +++ b/harbour/src/rdd/dbcmd53.c @@ -400,7 +400,7 @@ HB_FUNC( DBFIELDINFO ) if( pArea ) { - USHORT uiFields, uiIndex; + HB_USHORT uiFields, uiIndex; PHB_ITEM pType; pType = hb_param( 1 , HB_IT_NUMERIC ); @@ -453,7 +453,7 @@ HB_FUNC( DBFILEGET ) if( pArea ) { - USHORT uiFields, uiIndex; + HB_USHORT uiFields, uiIndex; PHB_ITEM pMode; const char * szField = hb_parc( 1 ); @@ -486,7 +486,7 @@ HB_FUNC( DBFILEPUT ) if( pArea ) { - USHORT uiFields, uiIndex; + HB_USHORT uiFields, uiIndex; const char * szField = hb_parc( 1 ); if( szField ) diff --git a/harbour/src/rdd/dbf1.c b/harbour/src/rdd/dbf1.c index 8c099977fb..b73174f3f3 100644 --- a/harbour/src/rdd/dbf1.c +++ b/harbour/src/rdd/dbf1.c @@ -69,7 +69,7 @@ #include "hbapicdp.h" -static USHORT s_uiRddId = ( USHORT ) -1; +static HB_USHORT s_uiRddId = ( HB_USHORT ) -1; static RDDFUNCS dbfSuper; @@ -91,7 +91,7 @@ static RDDFUNCS dbfSuper; static HB_ERRCODE hb_dbfErrorRT( DBFAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szFileName, HB_ERRCODE errOsCode, - USHORT uiFlags, PHB_ITEM * pErrorPtr ) + HB_USHORT uiFlags, PHB_ITEM * pErrorPtr ) { PHB_ITEM pError; HB_ERRCODE errCode = HB_FAILURE; @@ -121,7 +121,7 @@ static HB_ERRCODE hb_dbfErrorRT( DBFAREAP pArea, return errCode; } -static HB_MAXINT hb_dbfGetRowVer( DBFAREAP pArea, USHORT uiField, HB_MAXINT * pValue ) +static HB_MAXINT hb_dbfGetRowVer( DBFAREAP pArea, HB_USHORT uiField, HB_MAXINT * pValue ) { DBFFIELD dbField; HB_BOOL fLck = HB_FALSE; @@ -153,7 +153,7 @@ static HB_MAXINT hb_dbfGetRowVer( DBFAREAP pArea, USHORT uiField, HB_MAXINT * pV return HB_SUCCESS; } -static HB_MAXINT hb_dbfGetNextValue( DBFAREAP pArea, USHORT uiField ) +static HB_MAXINT hb_dbfGetNextValue( DBFAREAP pArea, HB_USHORT uiField ) { HB_MAXINT nValue = 0; DBFFIELD dbField; @@ -176,7 +176,7 @@ static void hb_dbfUpdateStampFields( DBFAREAP pArea ) long lJulian = 0, lMilliSec = 0; HB_MAXINT nRowVer = 0; LPFIELD pField; - USHORT uiCount; + HB_USHORT uiCount; for( uiCount = 0, pField = pArea->area.lpFields; uiCount < pArea->area.uiFieldCount; uiCount++, pField++ ) { @@ -208,12 +208,12 @@ static void hb_dbfSetBlankRecord( DBFAREAP pArea, int iType ) { HB_BYTE * pPtr = pArea->pRecord, bFill = ' ', bNext; ULONG ulSize = 1; /* 1 byte ' ' for DELETE flag */ - USHORT uiCount; + HB_USHORT uiCount; LPFIELD pField; for( uiCount = 0, pField = pArea->area.lpFields; uiCount < pArea->area.uiFieldCount; uiCount++, pField++ ) { - USHORT uiLen = pField->uiLen; + HB_USHORT uiLen = pField->uiLen; switch( pField->uiType ) { @@ -321,7 +321,7 @@ static void hb_dbfSetBlankRecord( DBFAREAP pArea, int iType ) } else { - USHORT ui = uiLen; + HB_USHORT ui = uiLen; do { pPtr[ --ui ] = ( HB_BYTE ) nValue % 10 + '0'; @@ -354,7 +354,7 @@ static void hb_dbfSetBlankRecord( DBFAREAP pArea, int iType ) } } -static void hb_dbfAllocNullFlag( DBFAREAP pArea, USHORT uiField, HB_BOOL fLength ) +static void hb_dbfAllocNullFlag( DBFAREAP pArea, HB_USHORT uiField, HB_BOOL fLength ) { if( !pArea->pFieldBits ) { @@ -367,18 +367,18 @@ static void hb_dbfAllocNullFlag( DBFAREAP pArea, USHORT uiField, HB_BOOL fLength pArea->pFieldBits[ uiField ].uiNullBit = pArea->uiNullCount++; } -static HB_BOOL hb_dbfGetNullFlag( DBFAREAP pArea, USHORT uiBit ) +static HB_BOOL hb_dbfGetNullFlag( DBFAREAP pArea, HB_USHORT uiBit ) { return ( pArea->pRecord[ pArea->uiNullOffset + ( uiBit >> 3 ) ] & ( 1 << ( uiBit & 0x07 ) ) ) != 0; } -static void hb_dbfSetNullFlag( HB_BYTE * pRecord, USHORT uiNullOffset, USHORT uiBit ) +static void hb_dbfSetNullFlag( HB_BYTE * pRecord, HB_USHORT uiNullOffset, HB_USHORT uiBit ) { pRecord[ uiNullOffset + ( uiBit >> 3 ) ] |= 1 << ( uiBit & 0x07 ); } -static void hb_dbfClearNullFlag( HB_BYTE * pRecord, USHORT uiNullOffset, USHORT uiBit ) +static void hb_dbfClearNullFlag( HB_BYTE * pRecord, HB_USHORT uiNullOffset, HB_USHORT uiBit ) { pRecord[ uiNullOffset + ( uiBit >> 3 ) ] &= ~( 1 << ( uiBit & 0x07 ) ); } @@ -722,7 +722,7 @@ static HB_ERRCODE hb_dbfUnlockRecord( DBFAREAP pArea, ULONG ulRecNo ) /* * Lock a record. */ -static HB_ERRCODE hb_dbfLockRecord( DBFAREAP pArea, ULONG ulRecNo, USHORT * pResult, +static HB_ERRCODE hb_dbfLockRecord( DBFAREAP pArea, ULONG ulRecNo, HB_USHORT * pResult, HB_BOOL bExclusive ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfLockRecord(%p, %lu, %p, %i)", pArea, ulRecNo, @@ -797,7 +797,7 @@ static HB_ERRCODE hb_dbfLockRecord( DBFAREAP pArea, ULONG ulRecNo, USHORT * pRes /* * Lock a file. */ -static HB_ERRCODE hb_dbfLockFile( DBFAREAP pArea, USHORT * pResult ) +static HB_ERRCODE hb_dbfLockFile( DBFAREAP pArea, HB_USHORT * pResult ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfLockFile(%p, %p)", pArea, pResult)); @@ -812,7 +812,7 @@ static HB_ERRCODE hb_dbfLockFile( DBFAREAP pArea, USHORT * pResult ) hb_dbfUnlockAllRecords( pArea ); SELF_RAWLOCK( ( AREAP ) pArea, FILE_LOCK, 0 ); - * pResult = ( USHORT ) pArea->fFLocked; + * pResult = ( HB_USHORT ) pArea->fFLocked; if( !pArea->fPositioned ) { @@ -947,7 +947,7 @@ HB_ERRCODE hb_dbfGetEGcode( HB_ERRCODE errCode ) * This function is common for different MEMO implementation * so I left it in DBF. */ -ULONG hb_dbfGetMemoBlock( DBFAREAP pArea, USHORT uiIndex ) +ULONG hb_dbfGetMemoBlock( DBFAREAP pArea, HB_USHORT uiIndex ) { ULONG ulBlock= 0; @@ -959,7 +959,7 @@ ULONG hb_dbfGetMemoBlock( DBFAREAP pArea, USHORT uiIndex ) } else { - USHORT uiCount; + HB_USHORT uiCount; HB_BYTE bByte; for( uiCount = 0; uiCount < 10; uiCount++ ) @@ -980,7 +980,7 @@ ULONG hb_dbfGetMemoBlock( DBFAREAP pArea, USHORT uiIndex ) * This function is common for different MEMO implementation * so I left it in DBF. */ -void hb_dbfPutMemoBlock( DBFAREAP pArea, USHORT uiIndex, ULONG ulBlock ) +void hb_dbfPutMemoBlock( DBFAREAP pArea, HB_USHORT uiIndex, ULONG ulBlock ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfPutMemoBlock(%p, %hu, %lu)", pArea, uiIndex, ulBlock)); @@ -1012,7 +1012,7 @@ void hb_dbfPutMemoBlock( DBFAREAP pArea, USHORT uiIndex, ULONG ulBlock ) * This function is common for different MEMO implementation * so I left it in DBF. */ -HB_ERRCODE hb_dbfGetMemoData( DBFAREAP pArea, USHORT uiIndex, +HB_ERRCODE hb_dbfGetMemoData( DBFAREAP pArea, HB_USHORT uiIndex, ULONG * pulBlock, ULONG * pulSize, ULONG * pulType ) { @@ -1054,7 +1054,7 @@ HB_ERRCODE hb_dbfGetMemoData( DBFAREAP pArea, USHORT uiIndex, */ else if( pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ] != 0 ) { - USHORT uiCount; + HB_USHORT uiCount; HB_BYTE bByte; ulValue = 0; @@ -1082,7 +1082,7 @@ HB_ERRCODE hb_dbfGetMemoData( DBFAREAP pArea, USHORT uiIndex, * This function is common for different MEMO implementation * so I left it in DBF. */ -HB_ERRCODE hb_dbfSetMemoData( DBFAREAP pArea, USHORT uiIndex, +HB_ERRCODE hb_dbfSetMemoData( DBFAREAP pArea, HB_USHORT uiIndex, ULONG ulBlock, ULONG ulSize, ULONG ulType ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfSetMemoData(%p, %hu, %lu, %lu, %lu)", pArea, uiIndex, ulBlock, ulSize, ulType)); @@ -1179,7 +1179,7 @@ HB_BOOL hb_dbfLockIdxGetData( HB_BYTE bScheme, HB_FOFFSET *ulPos, HB_FOFFSET *ul * This function is common for different MEMO implementation * so I left it in DBF. */ -HB_BOOL hb_dbfLockIdxFile( PHB_FILE pFile, HB_BYTE bScheme, USHORT usMode, HB_FOFFSET *pPoolPos ) +HB_BOOL hb_dbfLockIdxFile( PHB_FILE pFile, HB_BYTE bScheme, HB_USHORT usMode, HB_FOFFSET *pPoolPos ) { HB_FOFFSET ulPos, ulPool, ulSize = 1; HB_BOOL fRet = HB_FALSE; @@ -1570,7 +1570,7 @@ static HB_ERRCODE hb_dbfAddField( DBFAREAP pArea, LPDBFIELDINFO pFieldInfo ) static HB_ERRCODE hb_dbfAppend( DBFAREAP pArea, HB_BOOL bUnLockAll ) { ULONG ulNewRecord; - USHORT fLocked; + HB_USHORT fLocked; HB_ERRCODE errCode; HB_TRACE(HB_TR_DEBUG, ("hb_dbfAppend(%p, %d)", pArea, (int) bUnLockAll)); @@ -1782,7 +1782,7 @@ static HB_ERRCODE hb_dbfGetRec( DBFAREAP pArea, HB_BYTE ** pBuffer ) /* * Obtain the current value of a field. */ -static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; PHB_ITEM pError; @@ -2034,7 +2034,7 @@ static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem /* * Obtain the length of a field value. */ -static HB_ERRCODE hb_dbfGetVarLen( DBFAREAP pArea, USHORT uiIndex, ULONG * pLength ) +static HB_ERRCODE hb_dbfGetVarLen( DBFAREAP pArea, HB_USHORT uiIndex, ULONG * pLength ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfGetVarLen(%p, %hu, %p)", pArea, uiIndex, pLength)); @@ -2149,7 +2149,7 @@ static HB_ERRCODE hb_dbfPutRec( DBFAREAP pArea, const HB_BYTE * pBuffer ) else /* if( pArea->fRecordChanged ) */ { HB_BYTE * pRecord = pArea->pRecord; - USHORT uiWritten; + HB_USHORT uiWritten; if( pArea->pCryptKey ) { @@ -2188,7 +2188,7 @@ static HB_ERRCODE hb_dbfPutRec( DBFAREAP pArea, const HB_BYTE * pBuffer ) /* * Assign a value to a field. */ -static HB_ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_dbfPutValue( DBFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; /* this buffer is for varlength, date and number conversions, @@ -2593,7 +2593,7 @@ static HB_ERRCODE hb_dbfRecId( DBFAREAP pArea, PHB_ITEM pRecNo ) /* * Establish the extent of the array of fields for a WorkArea. */ -static HB_ERRCODE hb_dbfSetFieldExtent( DBFAREAP pArea, USHORT uiFieldExtent ) +static HB_ERRCODE hb_dbfSetFieldExtent( DBFAREAP pArea, HB_USHORT uiFieldExtent ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfSetFieldExtent(%p, %hu)", pArea, uiFieldExtent)); @@ -2603,8 +2603,8 @@ static HB_ERRCODE hb_dbfSetFieldExtent( DBFAREAP pArea, USHORT uiFieldExtent ) /* Alloc field offsets array */ if( uiFieldExtent ) { - pArea->pFieldOffset = ( USHORT * ) hb_xgrab( uiFieldExtent * sizeof( USHORT ) ); - memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( USHORT ) ); + pArea->pFieldOffset = ( HB_USHORT * ) hb_xgrab( uiFieldExtent * sizeof( HB_USHORT ) ); + memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( HB_USHORT ) ); } return HB_SUCCESS; @@ -2727,7 +2727,7 @@ static HB_ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo ) { HB_ERRCODE errCode = HB_SUCCESS; ULONG ulSize; - USHORT uiCount; + HB_USHORT uiCount; HB_BOOL fError, fRawBlob; DBFFIELD * pThisField; HB_BYTE * pBuffer; @@ -3076,7 +3076,7 @@ static HB_ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo ) pArea->fShared = HB_FALSE; /* pCreateInfo->fShared */ pArea->fReadonly = HB_FALSE; /* pCreateInfo->fReadonly */ pArea->ulRecCount = 0; - pArea->uiHeaderLen = ( USHORT ) ( sizeof( DBFHEADER ) + ulSize ); + pArea->uiHeaderLen = ( HB_USHORT ) ( sizeof( DBFHEADER ) + ulSize ); if( fRawBlob ) { pArea->fHasMemo = HB_TRUE; @@ -3188,7 +3188,7 @@ static HB_ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo ) /* * Retrieve information about the current driver. */ -static HB_ERRCODE hb_dbfInfo( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_dbfInfo( DBFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_ERRCODE errCode = HB_SUCCESS; @@ -3412,7 +3412,7 @@ static HB_ERRCODE hb_dbfInfo( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) return errCode; } -static HB_ERRCODE hb_dbfFieldInfo( DBFAREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ITEM pItem ) +static HB_ERRCODE hb_dbfFieldInfo( DBFAREAP pArea, HB_USHORT uiIndex, HB_USHORT uiType, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfFieldInfo(%p, %hu, %hu, %p)", pArea, uiIndex, uiType, pItem)); @@ -3438,7 +3438,7 @@ static HB_ERRCODE hb_dbfFieldInfo( DBFAREAP pArea, USHORT uiIndex, USHORT uiType /* * Retrieve information about a raw */ -static HB_ERRCODE hb_dbfRecInfo( DBFAREAP pArea, PHB_ITEM pRecID, USHORT uiInfoType, PHB_ITEM pInfo ) +static HB_ERRCODE hb_dbfRecInfo( DBFAREAP pArea, PHB_ITEM pRecID, HB_USHORT uiInfoType, PHB_ITEM pInfo ) { ULONG ulRecNo = hb_itemGetNL( pRecID ), ulPrevRec = 0; HB_ERRCODE errResult = HB_SUCCESS; @@ -3516,7 +3516,7 @@ static HB_ERRCODE hb_dbfRecInfo( DBFAREAP pArea, PHB_ITEM pRecID, USHORT uiInfoT case DBRI_RAWMEMOS: case DBRI_RAWDATA: { - USHORT uiFields; + HB_USHORT uiFields; HB_BYTE * pResult; ULONG ulLength, ulLen; @@ -3603,7 +3603,7 @@ static HB_ERRCODE hb_dbfNewArea( DBFAREAP pArea ) static HB_ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) { HB_ERRCODE errCode, errOsCode; - USHORT uiFlags, uiFields, uiCount, uiSkip; + HB_USHORT uiFlags, uiFields, uiCount, uiSkip; ULONG ulSize; HB_BOOL fRawBlob; PHB_ITEM pError, pItem; @@ -4127,7 +4127,7 @@ static HB_ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_dbfStructSize( DBFAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_dbfStructSize( DBFAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_dbfStrucSize(%p, %p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -4291,7 +4291,7 @@ void hb_dbfTranslateRec( DBFAREAP pArea, HB_BYTE * pBuffer, PHB_CODEPAGE cdp_src char * pTmpBuf = NULL; ULONG ulLen; LPFIELD pField; - USHORT uiIndex; + HB_USHORT uiIndex; for( uiIndex = 0, pField = pArea->area.lpFields; uiIndex < pArea->area.uiFieldCount; uiIndex++, pField++ ) { @@ -4332,7 +4332,7 @@ void hb_dbfTranslateRec( DBFAREAP pArea, HB_BYTE * pBuffer, PHB_CODEPAGE cdp_src static HB_ERRCODE hb_dbfSort( DBFAREAP pArea, LPDBSORTINFO pSortInfo ) { ULONG ulRecNo; - USHORT uiCount; + HB_USHORT uiCount; HB_BOOL bMoreRecords, bLimited, bValidRecord; HB_ERRCODE errCode; DBQUICKSORT dbQuickSort; @@ -4679,7 +4679,7 @@ static HB_ERRCODE hb_dbfSetFilter( DBFAREAP pArea, LPDBFILTERINFO pFilterInfo ) /* * Perform a network lowlevel lock in the specified WorkArea. */ -static HB_ERRCODE hb_dbfRawLock( DBFAREAP pArea, USHORT uiAction, ULONG ulRecNo ) +static HB_ERRCODE hb_dbfRawLock( DBFAREAP pArea, HB_USHORT uiAction, ULONG ulRecNo ) { HB_ERRCODE errCode = HB_SUCCESS; HB_FOFFSET ulPos, ulFlSize, ulRlSize; @@ -4865,7 +4865,7 @@ static HB_ERRCODE hb_dbfCreateMemFile( DBFAREAP pArea, LPDBOPENINFO pCreateInfo /* * BLOB2FILE - retrieve memo contents into file */ -static HB_ERRCODE hb_dbfGetValueFile( DBFAREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE hb_dbfGetValueFile( DBFAREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { HB_ERRCODE errCode = HB_SUCCESS; LPFIELD pField; @@ -4941,10 +4941,10 @@ static HB_ERRCODE hb_dbfOpenMemFile( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) /* * FILE2BLOB - store file contents in MEMO */ -static HB_ERRCODE hb_dbfPutValueFile( DBFAREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE hb_dbfPutValueFile( DBFAREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { HB_ERRCODE errCode = HB_SUCCESS; - USHORT uiRead; + HB_USHORT uiRead; LPFIELD pField; HB_TRACE(HB_TR_DEBUG, ("hb_dbfPutValueFile(%p, %hu, %s, %hu)", pArea, uiIndex, szFile, uiMode)); @@ -4986,7 +4986,7 @@ static HB_ERRCODE hb_dbfPutValueFile( DBFAREAP pArea, USHORT uiIndex, const char { uiRead = hb_fileReadAt( pFile, pArea->pRecord + pArea->pFieldOffset[ uiIndex ], pField->uiLen, 0 ); - if( uiRead != ( USHORT ) FS_ERROR && uiRead < pField->uiLen ) + if( uiRead != ( HB_USHORT ) FS_ERROR && uiRead < pField->uiLen ) memset( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] + uiRead, ' ', pField->uiLen - uiRead ); hb_fileClose( pFile ); @@ -5485,7 +5485,7 @@ static HB_ERRCODE hb_dbfExit( LPRDDNODE pRDD ) hb_xfree( pRDD->lpvCargo ); pRDD->lpvCargo = NULL; } - s_uiRddId = ( USHORT ) -1; + s_uiRddId = ( HB_USHORT ) -1; if( ISSUPER_EXIT( pRDD ) ) return SUPER_EXIT( pRDD ); @@ -5493,7 +5493,7 @@ static HB_ERRCODE hb_dbfExit( LPRDDNODE pRDD ) return HB_SUCCESS; } -static HB_ERRCODE hb_dbfRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_dbfRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { LPDBFDATA pData; @@ -5767,9 +5767,9 @@ HB_FUNC( _DBF ) { ; } HB_FUNC( DBF_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); uiRddId = hb_parni( 4 ); diff --git a/harbour/src/rdd/dbfcdx/dbfcdx1.c b/harbour/src/rdd/dbfcdx/dbfcdx1.c index a06a16719f..f7abb28ae3 100644 --- a/harbour/src/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/src/rdd/dbfcdx/dbfcdx1.c @@ -118,7 +118,7 @@ static int hb_cdxPageRootSplit( LPCDXPAGE pPage ); /* free create index structur */ static void hb_cdxSortFree( LPCDXSORTINFO pSort ); -static USHORT s_uiRddId = ( USHORT ) -1; +static HB_USHORT s_uiRddId = ( HB_USHORT ) -1; static RDDFUNCS cdxSuper; @@ -190,7 +190,7 @@ static void hb_cdxErrInternal( const char * szMsg ) static HB_ERRCODE hb_cdxErrorRT( CDXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * filename, HB_ERRCODE errOsCode, - USHORT uiFlags, PHB_ITEM * pErrorPtr ) + HB_USHORT uiFlags, PHB_ITEM * pErrorPtr ) { PHB_ITEM pError; HB_ERRCODE iRet = HB_FAILURE; @@ -326,7 +326,7 @@ static LPCDXKEY hb_cdxKeyCopy( LPCDXKEY pKeyDest, LPCDXKEY pKey ) /* * store bytes value in inkdex key */ -static LPCDXKEY hb_cdxKeyPut( LPCDXKEY pKey, HB_BYTE * pbVal, USHORT uiLen, ULONG ulRec ) +static LPCDXKEY hb_cdxKeyPut( LPCDXKEY pKey, HB_BYTE * pbVal, HB_USHORT uiLen, ULONG ulRec ) { if( !pKey ) pKey = hb_cdxKeyNew(); @@ -355,9 +355,9 @@ static LPCDXKEY hb_cdxKeyPut( LPCDXKEY pKey, HB_BYTE * pbVal, USHORT uiLen, ULON /* * store string0 value in index key */ -static LPCDXKEY hb_cdxKeyPutC( LPCDXKEY pKey, const char * szText, USHORT uiRealLen, ULONG ulRec ) +static LPCDXKEY hb_cdxKeyPutC( LPCDXKEY pKey, const char * szText, HB_USHORT uiRealLen, ULONG ulRec ) { - USHORT uiLen; + HB_USHORT uiLen; if( !pKey ) pKey = hb_cdxKeyNew(); @@ -370,7 +370,7 @@ static LPCDXKEY hb_cdxKeyPutC( LPCDXKEY pKey, const char * szText, USHORT uiReal pKey->len = 0; } } - uiLen = ( USHORT ) ( szText ? strlen( szText ) : 0 ); + uiLen = ( HB_USHORT ) ( szText ? strlen( szText ) : 0 ); if( uiLen > uiRealLen ) uiLen = uiRealLen; pKey->len = ( HB_BYTE ) uiRealLen; @@ -594,8 +594,8 @@ static LPCDXKEY hb_cdxKeyPutItem( LPCDXKEY pKey, PHB_ITEM pItem, ULONG ulRec, LP break; } - pKey = hb_cdxKeyPut( pKey, ptr, ( USHORT ) ulLen, ulRec ); - pKey->mode = ( USHORT ) iMode; + pKey = hb_cdxKeyPut( pKey, ptr, ( HB_USHORT ) ulLen, ulRec ); + pKey->mode = ( HB_USHORT ) iMode; return pKey; } @@ -799,7 +799,7 @@ static HB_BOOL hb_cdxBottomScope( LPCDXTAG pTag ) /* * clear top or bottom scope */ -static void hb_cdxTagClearScope( LPCDXTAG pTag, USHORT nScope ) +static void hb_cdxTagClearScope( LPCDXTAG pTag, HB_USHORT nScope ) { CDXAREAP pArea = pTag->pIndex->pArea; LPCDXKEY *pScopeKey; @@ -839,7 +839,7 @@ static void hb_cdxTagClearScope( LPCDXTAG pTag, USHORT nScope ) /* * set top or bottom scope */ -static void hb_cdxTagSetScope( LPCDXTAG pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_cdxTagSetScope( LPCDXTAG pTag, HB_USHORT nScope, PHB_ITEM pItem ) { CDXAREAP pArea = pTag->pIndex->pArea; PHB_ITEM pScopeVal; @@ -887,7 +887,7 @@ static void hb_cdxTagSetScope( LPCDXTAG pTag, USHORT nScope, PHB_ITEM pItem ) } } -static void hb_cdxTagGetScope( LPCDXTAG pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_cdxTagGetScope( LPCDXTAG pTag, HB_USHORT nScope, PHB_ITEM pItem ) { CDXAREAP pArea = pTag->pIndex->pArea; PHB_ITEM *pScope; @@ -1146,7 +1146,7 @@ static void hb_cdxIndexDropAvailPage( LPCDXINDEX pIndex ) * write index page */ static void hb_cdxIndexPageWrite( LPCDXINDEX pIndex, ULONG ulPos, HB_BYTE * pBuffer, - USHORT uiSize ) + HB_USHORT uiSize ) { if( pIndex->fReadonly ) hb_errInternal( 9101, "hb_cdxIndexPageWrite on readonly database.", NULL, NULL ); @@ -1165,7 +1165,7 @@ static void hb_cdxIndexPageWrite( LPCDXINDEX pIndex, ULONG ulPos, HB_BYTE * pBuf * read index page */ static void hb_cdxIndexPageRead( LPCDXINDEX pIndex, ULONG ulPos, HB_BYTE * pBuffer, - USHORT uiSize ) + HB_USHORT uiSize ) { if( pIndex->fShared && !( pIndex->lockRead || pIndex->lockWrite ) ) hb_errInternal( 9103, "hb_cdxIndexPageRead on not locked index file.", NULL, NULL ); @@ -1734,7 +1734,7 @@ static void hb_cdxSetLeafRecord( HB_BYTE *pDst, ULONG ulRec, int iDup, int iTrl, int iReq, int iDCbits, int iTCbits ) { int i; - USHORT usBit; + HB_USHORT usBit; usBit = ( ( iTrl << iDCbits ) | iDup ) << ( 16 - iTCbits - iDCbits ); for( i = 0; i < iReq; i++, ulRec >>= 8 ) @@ -3368,7 +3368,7 @@ static int hb_cdxPageKeyInsert( LPCDXPAGE pPage, LPCDXKEY pKey ) */ static void hb_cdxTagHeaderStore( LPCDXTAG pTag ) { - USHORT uiKeyLen, uiForLen; + HB_USHORT uiKeyLen, uiForLen; CDXTAGHEADER tagHeader; if( !pTag->TagChanged ) @@ -3455,7 +3455,7 @@ static HB_BOOL hb_cdxIsTemplateFunc( const char * szKeyExpr ) static void hb_cdxTagLoad( LPCDXTAG pTag ) { CDXTAGHEADER tagHeader; - USHORT uiForPos, uiForLen, uiKeyPos, uiKeyLen; + HB_USHORT uiForPos, uiForLen, uiKeyPos, uiKeyLen; ULONG ulRecNo; /* read the page from a file */ @@ -4539,7 +4539,7 @@ static void hb_cdxReorderTagList( LPCDXTAG * TagListPtr ) static LPCDXTAG hb_cdxIndexCreateTag( HB_BOOL fStruct, LPCDXINDEX pIndex, const char * szTagName, const char * szKeyExp, PHB_ITEM pKeyItem, - HB_BYTE bType, USHORT uiLen, + HB_BYTE bType, HB_USHORT uiLen, const char * szForExp, PHB_ITEM pForItem, HB_BOOL fAscnd, HB_BOOL fUniq, HB_BOOL fNoCase, HB_BOOL fCustom, HB_BOOL fReindex ) @@ -4668,7 +4668,7 @@ static void hb_cdxIndexDelTag( LPCDXINDEX pIndex, const char * szTagName ) */ static LPCDXTAG hb_cdxIndexAddTag( LPCDXINDEX pIndex, const char * szTagName, const char * szKeyExp, PHB_ITEM pKeyItem, - HB_BYTE bType, USHORT uiLen, + HB_BYTE bType, HB_USHORT uiLen, const char * szForExp, PHB_ITEM pForItem, HB_BOOL fAscend, HB_BOOL fUnique, HB_BOOL fNoCase, HB_BOOL fCustom, HB_BOOL fReindex ) @@ -5018,7 +5018,7 @@ static LPCDXINDEX hb_cdxFindBag( CDXAREAP pArea, const char * szBagName ) /* * get Tag by number */ -static LPCDXTAG hb_cdxGetTagByNumber( CDXAREAP pArea, USHORT uiTag ) +static LPCDXTAG hb_cdxGetTagByNumber( CDXAREAP pArea, HB_USHORT uiTag ) { LPCDXTAG pTag = NULL; LPCDXINDEX pIndex = pArea->lpIndexes; @@ -5039,9 +5039,9 @@ static LPCDXTAG hb_cdxGetTagByNumber( CDXAREAP pArea, USHORT uiTag ) /* * get Tag number */ -static USHORT hb_cdxGetTagNumber( CDXAREAP pArea, LPCDXTAG pFindTag ) +static HB_USHORT hb_cdxGetTagNumber( CDXAREAP pArea, LPCDXTAG pFindTag ) { - USHORT uiTag = 0; + HB_USHORT uiTag = 0; LPCDXTAG pTag = NULL; LPCDXINDEX pIndex = pArea->lpIndexes; @@ -5069,7 +5069,7 @@ static USHORT hb_cdxGetTagNumber( CDXAREAP pArea, LPCDXTAG pFindTag ) * find Tag in tag list */ static LPCDXTAG hb_cdxFindTag( CDXAREAP pArea, PHB_ITEM pTagItem, - PHB_ITEM pBagItem, USHORT *puiTag ) + PHB_ITEM pBagItem, HB_USHORT *puiTag ) { LPCDXTAG pTag = NULL; int iTag = 0, iFind = 0; @@ -7110,7 +7110,7 @@ static HB_ERRCODE hb_cdxOpen( CDXAREAP pArea, LPDBOPENINFO pOpenInfo ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_cdxStructSize( CDXAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_cdxStructSize( CDXAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_cdxStrucSize(%p, %p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -7174,7 +7174,7 @@ static HB_ERRCODE hb_cdxZap ( CDXAREAP pArea ) /* ( DBENTRYP_VOI ) hb_cdxOrderListAdd */ static HB_ERRCODE hb_cdxOrderListAdd( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) { - USHORT uiFlags; + HB_USHORT uiFlags; PHB_FILE pFile; char szBaseName[ CDX_MAXTAGNAMELEN + 1 ]; char szFileName[ HB_PATH_MAX ]; @@ -7366,7 +7366,7 @@ static HB_ERRCODE hb_cdxOrderListFocus( CDXAREAP pArea, LPDBORDERINFO pOrderInfo static HB_ERRCODE hb_cdxOrderListRebuild( CDXAREAP pArea ) { LPCDXINDEX pIndex, * pIndexPtr; - USHORT uiPrevTag; + HB_USHORT uiPrevTag; HB_TRACE(HB_TR_DEBUG, ("hb_cdxPack(%p)", pArea )); @@ -7426,7 +7426,7 @@ static HB_ERRCODE hb_cdxOrderCreate( CDXAREAP pArea, LPDBORDERCREATEINFO pOrderI char *szFor = NULL; LPCDXINDEX pIndex; LPCDXTAG pTag; - USHORT uiLen; + HB_USHORT uiLen; HB_BYTE bType; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderCreate(%p, %p)", pArea, pOrderInfo)); @@ -7494,7 +7494,7 @@ static HB_ERRCODE hb_cdxOrderCreate( CDXAREAP pArea, LPDBORDERCREATEINFO pOrderI uiLen = 1; break; case 'C': - uiLen = ( USHORT ) hb_itemGetCLen( pResult ); + uiLen = ( HB_USHORT ) hb_itemGetCLen( pResult ); #if !( defined( HB_COMPAT_C53 ) && defined( HB_CLP_STRICT ) ) if( uiLen > CDX_MAXKEY ) uiLen = CDX_MAXKEY; @@ -7781,7 +7781,7 @@ static HB_ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) { LPCDXINDEX pIndex, pIndexTmp; LPCDXTAG pTag; - USHORT uiTag; + HB_USHORT uiTag; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderDestroy(%p, %p)", pArea, pOrderInfo)); @@ -7849,10 +7849,10 @@ static HB_ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) /* * Provides information about order management. */ -static HB_ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) +static HB_ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pInfo ) { LPCDXTAG pTag; - USHORT uiTag = 0; + HB_USHORT uiTag = 0; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderInfo(%p, %hu, %p)", pArea, uiIndex, pInfo)); @@ -8661,7 +8661,7 @@ static HB_ERRCODE hb_cdxSetFilter( CDXAREAP pArea, LPDBFILTERINFO pFilterInfo ) * Retrieve (set) information about RDD * ( DBENTRYP_RSLV ) hb_fptFieldInfo */ -static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { LPDBFDATA pData; @@ -9408,7 +9408,7 @@ static void hb_cdxTagDoIndex( LPCDXTAG pTag, HB_BOOL fReindex ) } else { - USHORT uiSaveTag = pArea->uiTag; + HB_USHORT uiSaveTag = pArea->uiTag; ULONG ulStartRec = 0, ulNextCount = 0; HB_BOOL fDirectRead, fUseFilter = HB_FALSE; HB_BYTE * pSaveRecBuff = pArea->dbfarea.pRecord, cTemp[8]; @@ -9815,9 +9815,9 @@ HB_FUNC( SIXCDX ) {;} HB_FUNC( SIXCDX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); uiRddId = hb_parni( 4 ); @@ -9890,9 +9890,9 @@ HB_FUNC( DBFCDX ) {;} HB_FUNC( DBFCDX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); uiRddId = hb_parni( 4 ); diff --git a/harbour/src/rdd/dbffpt/dbffpt1.c b/harbour/src/rdd/dbffpt/dbffpt1.c index 5592a13bea..4c45bbf083 100644 --- a/harbour/src/rdd/dbffpt/dbffpt1.c +++ b/harbour/src/rdd/dbffpt/dbffpt1.c @@ -85,8 +85,8 @@ #define FPT_BLOCK_OFFSET( b ) ( ( HB_FOFFSET ) ( b ) * \ ( HB_FOFFSET ) pArea->ulMemoBlockSize ) -static USHORT s_uiRddIdBLOB = ( USHORT ) -1; -static USHORT s_uiRddIdFPT = ( USHORT ) -1; +static HB_USHORT s_uiRddIdBLOB = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdFPT = ( HB_USHORT ) -1; static RDDFUNCS fptSuper; @@ -94,7 +94,7 @@ static RDDFUNCS fptSuper; * generate Run-Time error */ static HB_ERRCODE hb_memoErrorRT( FPTAREAP pArea, HB_ERRCODE uiGenCode, HB_ERRCODE uiSubCode, - char * szFileName, HB_ERRCODE uiOsCode, USHORT uiFlags ) + char * szFileName, HB_ERRCODE uiOsCode, HB_USHORT uiFlags ) { HB_ERRCODE errCode = HB_FAILURE; @@ -123,7 +123,7 @@ static HB_ERRCODE hb_memoErrorRT( FPTAREAP pArea, HB_ERRCODE uiGenCode, HB_ERRCO } -static const char * hb_memoDefaultFileExt( int iType, USHORT uiRdd ) +static const char * hb_memoDefaultFileExt( int iType, HB_USHORT uiRdd ) { if( uiRdd == s_uiRddIdBLOB ) return DBV_MEMOEXT; @@ -467,7 +467,7 @@ static void hb_fptPackGCitems( LPMEMOGCTABLE pGCtable ) /* * Write proper header into modified GC free memo blocks. */ -static HB_ERRCODE hb_fptWriteGCitems( FPTAREAP pArea, LPMEMOGCTABLE pGCtable, USHORT usItem ) +static HB_ERRCODE hb_fptWriteGCitems( FPTAREAP pArea, LPMEMOGCTABLE pGCtable, HB_USHORT usItem ) { FPTBLOCK fptBlock; HB_ERRCODE errCode = HB_SUCCESS; @@ -788,7 +788,7 @@ static HB_ERRCODE hb_fptReadGCdata( FPTAREAP pArea, LPMEMOGCTABLE pGCtable ) hb_xfree( bPageBuf ); return EDBF_CORRUPT; } - pGCtable->usMaxItem = ( USHORT ) ( ( pGCtable->ulSize - 2 ) >> 3 ); + pGCtable->usMaxItem = ( HB_USHORT ) ( ( pGCtable->ulSize - 2 ) >> 3 ); pGCtable->usItems = ( HB_GET_LE_UINT16( bPageBuf ) - 3 ) >> 2; pGCtable->pGCitems = ( LPMEMOGCITEM ) hb_xgrab( sizeof( MEMOGCITEM ) * @@ -829,14 +829,14 @@ static HB_ERRCODE hb_fptWriteGCdata( FPTAREAP pArea, LPMEMOGCTABLE pGCtable ) { if( pGCtable->bType == DB_MEMOVER_SIX ) { - USHORT usItems = HB_MIN( pGCtable->usItems, pGCtable->usMaxItem ); + HB_USHORT usItems = HB_MIN( pGCtable->usItems, pGCtable->usMaxItem ); HB_PUT_LE_UINT16( pGCtable->fptHeader.nGCitems, usItems ); memset( pGCtable->fptHeader.reserved2, 0, sizeof( pGCtable->fptHeader.reserved2 ) ); j = pGCtable->usItems - usItems; for( i = j; i < pGCtable->usItems; i++ ) { HB_PUT_LE_UINT16( &pGCtable->fptHeader.reserved2[ ( i - j ) * 6 ], - ( ( USHORT ) pGCtable->pGCitems[i].ulSize ) ); + ( ( HB_USHORT ) pGCtable->pGCitems[i].ulSize ) ); HB_PUT_LE_UINT32( &pGCtable->fptHeader.reserved2[ ( i - j ) * 6 + 2 ], pGCtable->pGCitems[i].ulOffset ); } @@ -883,13 +883,13 @@ static HB_ERRCODE hb_fptWriteGCdata( FPTAREAP pArea, LPMEMOGCTABLE pGCtable ) { FPTBLOCK fptBlock; HB_BYTE *bPageBuf; - USHORT usItems = HB_MIN( pGCtable->usItems, pGCtable->usMaxItem ); + HB_USHORT usItems = HB_MIN( pGCtable->usItems, pGCtable->usMaxItem ); HB_PUT_BE_UINT32( fptBlock.type, FPTIT_FLEX_GC ); HB_PUT_BE_UINT32( fptBlock.size, pGCtable->ulSize ); bPageBuf = ( HB_BYTE * ) hb_xgrab( pGCtable->ulSize ); memset( bPageBuf, 0xAD, pGCtable->ulSize ); - HB_PUT_LE_UINT16( bPageBuf, ( ( USHORT ) usItems << 2 ) + 3 ); + HB_PUT_LE_UINT16( bPageBuf, ( ( HB_USHORT ) usItems << 2 ) + 3 ); j = pGCtable->usItems - usItems; for( i = j; i < pGCtable->usItems; i++ ) { @@ -912,7 +912,7 @@ static HB_ERRCODE hb_fptWriteGCdata( FPTAREAP pArea, LPMEMOGCTABLE pGCtable ) for( i = j; i < pGCtable->usItems; i++ ) { HB_PUT_LE_UINT32( &bPageBuf[ ( i - j ) * 8 + 2 ], - ( ( USHORT ) pGCtable->pGCitems[i].ulSize * pArea->ulMemoBlockSize ) ); + ( ( HB_USHORT ) pGCtable->pGCitems[i].ulSize * pArea->ulMemoBlockSize ) ); HB_PUT_LE_UINT32( &bPageBuf[ ( i - j ) * 8 + 6 ], pGCtable->pGCitems[i].ulOffset * pArea->ulMemoBlockSize ); } @@ -963,7 +963,7 @@ static HB_ERRCODE hb_fptWriteGCdata( FPTAREAP pArea, LPMEMOGCTABLE pGCtable ) /* * Return the size of memo. */ -static ULONG hb_fptGetMemoLen( FPTAREAP pArea, USHORT uiIndex ) +static ULONG hb_fptGetMemoLen( FPTAREAP pArea, HB_USHORT uiIndex ) { ULONG ulBlock, ulSize, ulType; FPTBLOCK fptBlock; @@ -1010,7 +1010,7 @@ static ULONG hb_fptGetMemoLen( FPTAREAP pArea, USHORT uiIndex ) /* * Return the type of memo. */ -static const char * hb_fptGetMemoType( FPTAREAP pArea, USHORT uiIndex ) +static const char * hb_fptGetMemoType( FPTAREAP pArea, HB_USHORT uiIndex ) { ULONG ulBlock, ulSize, ulType; FPTBLOCK fptBlock; @@ -1180,7 +1180,7 @@ static ULONG hb_fptCountSMTItemLength( FPTAREAP pArea, PHB_ITEM pItem, */ static HB_ERRCODE hb_fptCountSMTDataLength( FPTAREAP pArea, HB_FOFFSET * pfOffset ) { - USHORT u, uiSize; + HB_USHORT u, uiSize; HB_BYTE buffer[ 2 ]; if( hb_fileReadAt( pArea->pMemoFile, buffer, 1, *pfOffset ) != 1 ) @@ -1716,7 +1716,7 @@ static ULONG hb_fptStoreSixItem( FPTAREAP pArea, PHB_ITEM pItem, HB_BYTE ** bBuf */ static HB_ERRCODE hb_fptReadSixItem( FPTAREAP pArea, HB_BYTE ** pbMemoBuf, HB_BYTE * bBufEnd, PHB_ITEM pItem, HB_BOOL fTrans ) { - USHORT usType; + HB_USHORT usType; ULONG ulLen, u; HB_ERRCODE errCode = HB_SUCCESS; @@ -1882,7 +1882,7 @@ static void hb_fptStoreFlexItem( FPTAREAP pArea, PHB_ITEM pItem, HB_BYTE ** bBuf case HB_IT_ARRAY: ulLen = hb_arrayLen( pItem ) & 0xFFFF; *(*bBufPtr)++ = FPTIT_FLEXAR_ARAY; - HB_PUT_LE_UINT16( *bBufPtr, ( USHORT ) ulLen ); + HB_PUT_LE_UINT16( *bBufPtr, ( HB_USHORT ) ulLen ); *bBufPtr += 2; for( u = 1; u <= ulLen; u++ ) { @@ -1913,7 +1913,7 @@ static void hb_fptStoreFlexItem( FPTAREAP pArea, PHB_ITEM pItem, HB_BYTE ** bBuf ulLen = u; memcpy( *bBufPtr + 2, hb_itemGetCPtr( pItem ), ulLen ); } - HB_PUT_LE_UINT16( *bBufPtr, ( USHORT ) ulLen ); + HB_PUT_LE_UINT16( *bBufPtr, ( HB_USHORT ) ulLen ); *bBufPtr += ulLen + 2; } break; @@ -2160,7 +2160,7 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, HB_BYTE ** pbMemoBuf, HB_B case FPTIT_FLEXAR_USHORT: if( bBufEnd - (*pbMemoBuf) >= 2 ) { - hb_itemPutNInt( pItem, ( USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ) ); + hb_itemPutNInt( pItem, ( HB_USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ) ); *pbMemoBuf += 2; } else @@ -2171,7 +2171,7 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, HB_BYTE ** pbMemoBuf, HB_B case FPTIT_FLEXAR_USHORT1: if( bBufEnd - (*pbMemoBuf) >= 3 ) { - hb_itemPutNIntLen( pItem, ( USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), + hb_itemPutNIntLen( pItem, ( HB_USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), (*pbMemoBuf)[2] ); *pbMemoBuf += 3; } @@ -2187,11 +2187,11 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, HB_BYTE ** pbMemoBuf, HB_B if( iDec ) { iLen -= iDec + 1; - hb_itemPutNDLen( pItem, ( USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen, iDec ); + hb_itemPutNDLen( pItem, ( HB_USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen, iDec ); } else { - hb_itemPutNIntLen( pItem, ( USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen ); + hb_itemPutNIntLen( pItem, ( HB_USHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen ); } *pbMemoBuf += 4; } @@ -2463,8 +2463,8 @@ static HB_ERRCODE hb_fptReadRawBlock( FPTAREAP pArea, HB_BYTE * bBuffer, HB_FHAN } static HB_ERRCODE hb_fptReadBlobBlock( FPTAREAP pArea, PHB_ITEM pItem, - HB_FHANDLE hFile, ULONG ulBlock, - USHORT uiMode ) + HB_FHANDLE hFile, ULONG ulBlock, + HB_USHORT uiMode ) { ULONG ulSize; HB_BYTE buffer[ 4 ]; @@ -2545,7 +2545,7 @@ static HB_ERRCODE hb_fptReadSMTBlock( FPTAREAP pArea, PHB_ITEM pItem, /* * Read fpt vartype memos. */ -static HB_ERRCODE hb_fptGetMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem, +static HB_ERRCODE hb_fptGetMemo( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem, HB_FHANDLE hFile, ULONG ulBlock, ULONG ulStart, ULONG ulCount, HB_BOOL fTrans ) { @@ -2918,7 +2918,7 @@ static HB_ERRCODE hb_fptWriteMemo( FPTAREAP pArea, ULONG ulBlock, ULONG ulSize, /* * Assign a value to the specified memo field. */ -static HB_ERRCODE hb_fptPutMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem, +static HB_ERRCODE hb_fptPutMemo( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem, ULONG * pulBlock, HB_BOOL fTrans ) { ULONG ulBlock = 0, ulSize, ulType, ulOldSize = 0, ulOldType = 0, ulArrayCount = 0; @@ -3102,7 +3102,7 @@ static HB_ERRCODE hb_fptPutMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem, /* * Check if memo field has any data */ -static HB_BOOL hb_fptHasMemoData( FPTAREAP pArea, USHORT uiIndex ) +static HB_BOOL hb_fptHasMemoData( FPTAREAP pArea, HB_USHORT uiIndex ) { if( --uiIndex < pArea->area.uiFieldCount ) { @@ -3113,7 +3113,7 @@ static HB_BOOL hb_fptHasMemoData( FPTAREAP pArea, USHORT uiIndex ) if( pField->uiLen >= 6 ) { HB_BYTE * pFieldBuf = pArea->pRecord + pArea->pFieldOffset[ uiIndex ]; - USHORT uiType = HB_GET_LE_UINT16( pFieldBuf + pField->uiLen - 2 ); + HB_USHORT uiType = HB_GET_LE_UINT16( pFieldBuf + pField->uiLen - 2 ); switch( uiType ) { @@ -3135,7 +3135,7 @@ static HB_BOOL hb_fptHasMemoData( FPTAREAP pArea, USHORT uiIndex ) pField->uiType == HB_FT_OLE ) { HB_BYTE * pFieldBuf = pArea->pRecord + pArea->pFieldOffset[ uiIndex ]; - USHORT uiLen = pField->uiLen; + HB_USHORT uiLen = pField->uiLen; if( uiLen == 4 ) return HB_GET_LE_UINT32( pFieldBuf ) != 0; @@ -3157,7 +3157,7 @@ static HB_BOOL hb_fptHasMemoData( FPTAREAP pArea, USHORT uiIndex ) } #endif -static HB_ERRCODE hb_fptLockForRead( FPTAREAP pArea, USHORT uiIndex, HB_BOOL *fUnLock ) +static HB_ERRCODE hb_fptLockForRead( FPTAREAP pArea, HB_USHORT uiIndex, HB_BOOL *fUnLock ) { HB_ERRCODE errCode; HB_BOOL fLocked; @@ -3211,7 +3211,7 @@ static HB_ERRCODE hb_fptLockForRead( FPTAREAP pArea, USHORT uiIndex, HB_BOOL *fU return errCode; } -static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem, HB_FHANDLE hFile ) +static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem, HB_FHANDLE hFile ) { LPFIELD pField; HB_ERRCODE errCode; @@ -3224,7 +3224,7 @@ static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI if( pField->uiType == HB_FT_ANY ) { - USHORT uiType; + HB_USHORT uiType; errCode = hb_fptLockForRead( pArea, uiIndex, &fUnLock ); if( errCode != HB_SUCCESS ) @@ -3272,7 +3272,7 @@ static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI if( pField->uiLen > 6 ) { - USHORT uiVLen = pField->uiLen - 6; + HB_USHORT uiVLen = pField->uiLen - 6; memcpy( pPtr, pFieldBuf, uiVLen ); ulSize -= uiVLen; pPtr += uiVLen; @@ -3392,7 +3392,7 @@ static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI return errCode; } -static HB_ERRCODE hb_fptGetVarFile( FPTAREAP pArea, ULONG ulBlock, const char * szFile, USHORT uiMode, HB_BOOL fTrans ) +static HB_ERRCODE hb_fptGetVarFile( FPTAREAP pArea, ULONG ulBlock, const char * szFile, HB_USHORT uiMode, HB_BOOL fTrans ) { HB_ERRCODE errCode; HB_FHANDLE hFile; @@ -3478,7 +3478,7 @@ static ULONG hb_fptPutVarFile( FPTAREAP pArea, ULONG ulBlock, const char * szFil return ulBlock; } -static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; @@ -3559,7 +3559,7 @@ static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI { HB_BYTE buffer[ 11 ], *pBlock = NULL, *pAlloc = NULL; ULONG ulOldBlock = 0, ulOldSize = 0, ulNewSize = 0; - USHORT uiType = HB_GET_LE_UINT16( pFieldBuf + pField->uiLen - 2 ); + HB_USHORT uiType = HB_GET_LE_UINT16( pFieldBuf + pField->uiLen - 2 ); if( ( uiType <= HB_VF_CHAR && uiType > pField->uiLen - 2 ) || ( uiType == HB_VF_DNUM && pField->uiLen <= 12 ) || @@ -3646,7 +3646,7 @@ static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI if( ulLen > HB_VF_CHAR ) ulLen = HB_VF_CHAR; } - uiType = ( USHORT ) ulLen; + uiType = ( HB_USHORT ) ulLen; if( uiType <= pField->uiLen - 2 ) { memcpy( pFieldBuf, pBlock, uiType ); @@ -3725,7 +3725,7 @@ static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI * Retrieve the size of the WorkArea structure. * ( DBENTRYP_SP ) hb_fptStructSize */ -static HB_ERRCODE hb_fptStructSize( FPTAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_fptStructSize( FPTAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_fptStrucSize(%p, %p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -3738,7 +3738,7 @@ static HB_ERRCODE hb_fptStructSize( FPTAREAP pArea, USHORT * uiSize ) * Obtain the length of a field value. * ( DBENTRYP_SVL ) hb_fptGetVarLen */ -static HB_ERRCODE hb_fptGetVarLen( FPTAREAP pArea, USHORT uiIndex, ULONG * pLength ) +static HB_ERRCODE hb_fptGetVarLen( FPTAREAP pArea, HB_USHORT uiIndex, ULONG * pLength ) { HB_TRACE(HB_TR_DEBUG, ("hb_fptGetVarLen(%p, %hu, %p)", pArea, uiIndex, pLength)); @@ -3771,7 +3771,7 @@ static HB_ERRCODE hb_fptGetVarLen( FPTAREAP pArea, USHORT uiIndex, ULONG * pLeng * Obtain the current value of a field. * ( DBENTRYP_SI ) hb_fptGetValue */ -static HB_ERRCODE hb_fptGetValue( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_fptGetValue( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_ERRCODE errCode; @@ -3795,7 +3795,7 @@ static HB_ERRCODE hb_fptGetValue( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem * Assign a value to a field. * ( DBENTRYP_SI ) hb_fptPutValue */ -static HB_ERRCODE hb_fptPutValue( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_fptPutValue( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_ERRCODE errCode; @@ -4008,7 +4008,7 @@ static HB_ERRCODE hb_fptCreateMemFile( FPTAREAP pArea, LPDBOPENINFO pCreateInfo * BLOB2FILE - retrieve memo contents into file * ( DBENTRYP_SCCS ) hb_fptGetValueFile */ -static HB_ERRCODE hb_fptGetValueFile( FPTAREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE hb_fptGetValueFile( FPTAREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { HB_TRACE(HB_TR_DEBUG, ("hb_fptGetValueFile(%p, %hu, %s, %hu)", pArea, uiIndex, szFile, uiMode)); @@ -4068,7 +4068,7 @@ static HB_ERRCODE hb_fptOpenMemFile( FPTAREAP pArea, LPDBOPENINFO pOpenInfo ) char szFileName[ HB_PATH_MAX ]; PHB_FNAME pFileName; PHB_ITEM pError; - USHORT uiFlags; + HB_USHORT uiFlags; HB_BOOL bRetry; HB_TRACE(HB_TR_DEBUG, ("hb_fptOpenMemFile(%p, %p)", pArea, pOpenInfo)); @@ -4177,7 +4177,7 @@ static HB_ERRCODE hb_fptOpenMemFile( FPTAREAP pArea, LPDBOPENINFO pOpenInfo ) if( pArea->uiMemoVersion != DB_MEMOVER_SIX && memcmp( fptHeader.signature2, "FlexFile3\003", 10) == 0 ) { - USHORT usSize = HB_GET_LE_UINT16( fptHeader.flexSize ); + HB_USHORT usSize = HB_GET_LE_UINT16( fptHeader.flexSize ); pArea->uiMemoVersion = DB_MEMOVER_FLEX; if( usSize != 0 && ( pArea->ulMemoBlockSize == 0 || pArea->area.rddID == s_uiRddIdBLOB ) ) @@ -4204,7 +4204,7 @@ static HB_ERRCODE hb_fptOpenMemFile( FPTAREAP pArea, LPDBOPENINFO pOpenInfo ) * FILE2BLOB - store file contents in MEMO * ( DBENTRYP_SCCS ) hb_fptPutValueFile */ -static HB_ERRCODE hb_fptPutValueFile( FPTAREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE hb_fptPutValueFile( FPTAREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { LPFIELD pField; @@ -4253,7 +4253,7 @@ static HB_ERRCODE hb_fptPutValueFile( FPTAREAP pArea, USHORT uiIndex, const char ulSize = ( ULONG ) HB_MIN( size, HB_VF_CHAR ); pAlloc = ( HB_BYTE * ) hb_xgrab( ulSize + 1 ); hb_fsSeek( hFile, 0, FS_SET ); - if( hb_fsRead( hFile, pAlloc, ( USHORT ) ulSize ) != ( USHORT ) ulSize ) + if( hb_fsRead( hFile, pAlloc, ( HB_USHORT ) ulSize ) != ( HB_USHORT ) ulSize ) { errCode = EDBF_READ; hb_xfree( pAlloc ); @@ -4331,7 +4331,7 @@ static HB_ERRCODE hb_fptDoPackRec( FPTAREAP pArea ) { HB_ERRCODE errCode = HB_SUCCESS; ULONG ulBlock, ulSize, ulType; - USHORT uiField; + HB_USHORT uiField; HB_FOFFSET pos, from; HB_TRACE(HB_TR_DEBUG, ("hb_fptDoPackRec(%p)", pArea)); @@ -4448,7 +4448,7 @@ static HB_ERRCODE hb_fptDoPackRec( FPTAREAP pArea ) return errCode; } -static HB_ERRCODE hb_fptDoPack( FPTAREAP pArea, USHORT uiBlockSize, +static HB_ERRCODE hb_fptDoPack( FPTAREAP pArea, HB_USHORT uiBlockSize, PHB_ITEM pEvalBlock, LONG lEvalStep ) { HB_ERRCODE errCode = HB_SUCCESS; @@ -4478,7 +4478,7 @@ static HB_ERRCODE hb_fptDoPack( FPTAREAP pArea, USHORT uiBlockSize, pArea->pMemoTmpFile = hb_fileCreateTemp( NULL, NULL, FC_NORMAL, szFile ); if( pArea->pMemoTmpFile ) { - USHORT ulMemoBlockSize = pArea->ulMemoBlockSize; + HB_USHORT ulMemoBlockSize = pArea->ulMemoBlockSize; PHB_FILE pFile = pArea->pMemoFile; pArea->ulMemoBlockSize = pArea->ulNewBlockSize; @@ -4670,7 +4670,7 @@ static HB_ERRCODE hb_fptPack( FPTAREAP pArea ) * Retrieve information about the current driver. * ( DBENTRYP_SI ) hb_fptInfo */ -static HB_ERRCODE hb_fptInfo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_fptInfo( FPTAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_fptInfo(%p, %hu, %p)", pArea, uiIndex, pItem)); @@ -4907,7 +4907,7 @@ static HB_ERRCODE hb_fptInfo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) * Retrieve information about a field. * ( DBENTRYP_SSI ) hb_fptFieldInfo */ -static HB_ERRCODE hb_fptFieldInfo( FPTAREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ITEM pItem ) +static HB_ERRCODE hb_fptFieldInfo( FPTAREAP pArea, HB_USHORT uiIndex, HB_USHORT uiType, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_fptFieldInfo(%p, %hu, %hu, %p)", pArea, uiIndex, uiType, pItem)); @@ -4986,7 +4986,7 @@ static HB_ERRCODE hb_fptFieldInfo( FPTAREAP pArea, USHORT uiIndex, USHORT uiType * Retrieve (set) information about RDD * ( DBENTRYP_RSLV ) hb_fptRddInfo */ -static HB_ERRCODE hb_fptRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_fptRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { LPDBFDATA pData; @@ -5257,12 +5257,12 @@ HB_FUNC( DBFSMT ) {;} HB_FUNC( DBFFPT ) {;} HB_FUNC( DBFBLOB ) {;} -static void hb_dbffptRegisterRDD( USHORT * pusRddId ) +static void hb_dbffptRegisterRDD( HB_USHORT * pusRddId ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); uiRddId = hb_parni( 4 ); diff --git a/harbour/src/rdd/dbfnsx/dbfnsx1.c b/harbour/src/rdd/dbfnsx/dbfnsx1.c index da484e1da4..f808644c78 100644 --- a/harbour/src/rdd/dbfnsx/dbfnsx1.c +++ b/harbour/src/rdd/dbfnsx/dbfnsx1.c @@ -73,7 +73,7 @@ #include "hbregex.h" static RDDFUNCS nsxSuper; -static USHORT s_uiRddId; +static HB_USHORT s_uiRddId; #define hb_nsxKeyFree(K) hb_xfree(K) @@ -124,13 +124,13 @@ static USHORT s_uiRddId; #else -static USHORT hb_nsxGetKeyCount( LPPAGEINFO pPage ) +static HB_USHORT hb_nsxGetKeyCount( LPPAGEINFO pPage ) { HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 2; return HB_GET_LE_UINT16( ptr ); } -static void hb_nsxSetKeyCount( LPPAGEINFO pPage, USHORT uiKeys ) +static void hb_nsxSetKeyCount( LPPAGEINFO pPage, HB_USHORT uiKeys ) { HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 2; HB_PUT_LE_UINT16( ptr, uiKeys ); @@ -148,31 +148,31 @@ static void hb_nsxSetLowerPage( LPPAGEINFO pPage, ULONG ulPage ) HB_PUT_LE_UINT32( ptr, ulPage ); } -static ULONG hb_nsxGetKeyPage( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) +static ULONG hb_nsxGetKeyPage( LPPAGEINFO pPage, HB_USHORT uiLen, HB_USHORT uiKey ) { HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ); return HB_GET_LE_UINT32( ptr ); } -static void hb_nsxSetKeyPage( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey, ULONG ulPage ) +static void hb_nsxSetKeyPage( LPPAGEINFO pPage, HB_USHORT uiLen, HB_USHORT uiKey, ULONG ulPage ) { HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ); HB_PUT_LE_UINT32( ptr, ulPage ); } -static ULONG hb_nsxGetKeyRec( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) +static ULONG hb_nsxGetKeyRec( LPPAGEINFO pPage, HB_USHORT uiLen, HB_USHORT uiKey ) { HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 4; return HB_GET_LE_UINT32( ptr ); } -static void hb_nsxSetKeyRec( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey, ULONG ulRec ) +static void hb_nsxSetKeyRec( LPPAGEINFO pPage, HB_USHORT uiLen, HB_USHORT uiKey, ULONG ulRec ) { HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 4; HB_PUT_LE_UINT32( ptr, ulRec ); } -static HB_UCHAR * hb_nsxGetKeyVal( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) +static HB_UCHAR * hb_nsxGetKeyVal( LPPAGEINFO pPage, HB_USHORT uiLen, HB_USHORT uiKey ) { return hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 8; } @@ -199,13 +199,13 @@ static ULONG hb_nsxBranchKeyRec( HB_UCHAR * ptr ) return HB_GET_LE_UINT32( ptr ); } -static USHORT hb_nsxLeafGetFreeOffset( LPPAGEINFO pPage ) +static HB_USHORT hb_nsxLeafGetFreeOffset( LPPAGEINFO pPage ) { HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; return HB_GET_LE_UINT16( ptr ); } -static void hb_nsxLeafSetFreeOffset( LPPAGEINFO pPage, USHORT uiOffset ) +static void hb_nsxLeafSetFreeOffset( LPPAGEINFO pPage, HB_USHORT uiOffset ) { HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; HB_PUT_LE_UINT16( ptr, uiOffset ); @@ -215,8 +215,8 @@ static void hb_nsxLeafSetFreeOffset( LPPAGEINFO pPage, USHORT uiOffset ) /* #define HB_NSX_NO_CORRUPT_PROTECT */ -static USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffset, - HB_UCHAR * bPrevValue, ULONG * pulRecNo ) +static HB_USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiOffset, + HB_UCHAR * bPrevValue, ULONG * pulRecNo ) { HB_UCHAR * ptr = ( HB_UCHAR * ) hb_nsxPageBuffer( pPage ); HB_UCHAR ucRecLen = hb_nsxGetKeyRecSizePtr( ptr ), ucSize, ucDupCount; @@ -328,8 +328,8 @@ static USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse return uiOffset; } -static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffset, - HB_UCHAR * bPrevValue, HB_UCHAR *pKeyValue, ULONG ulRecNo ) +static HB_USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiOffset, + HB_UCHAR * bPrevValue, HB_UCHAR *pKeyValue, ULONG ulRecNo ) { HB_UCHAR *ptr = ( HB_UCHAR * ) hb_nsxPageBuffer( pPage ) + uiOffset, *pDst, *pSrc, *pEnd; @@ -471,7 +471,7 @@ static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse static HB_ERRCODE hb_nsxErrorRT( NSXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szFileName, HB_ERRCODE errOsCode, - USHORT uiFlags, PHB_ITEM * pErrorPtr ) + HB_USHORT uiFlags, PHB_ITEM * pErrorPtr ) { PHB_ITEM pError; HB_ERRCODE iRet = HB_FAILURE; @@ -567,7 +567,7 @@ static HB_BYTE hb_nsxItemType( PHB_ITEM pItem ) /* * convert NSX (Clipper) type of key expression to internal one */ -static HB_UCHAR hb_nsxKeyType( USHORT uiType, HB_BYTE * pbTrail ) +static HB_UCHAR hb_nsxKeyType( HB_USHORT uiType, HB_BYTE * pbTrail ) { switch( uiType ) { @@ -609,7 +609,7 @@ static HB_UCHAR hb_nsxKeyTypeCmp( HB_UCHAR ucType ) /* * convert internal type of key expression to NSX (Clipper) one */ -static USHORT hb_nsxKeyTypeRaw( HB_UCHAR ucType ) +static HB_USHORT hb_nsxKeyTypeRaw( HB_UCHAR ucType ) { switch( ucType ) { @@ -640,7 +640,7 @@ static USHORT hb_nsxKeyTypeRaw( HB_UCHAR ucType ) * for scope key evaluation */ static LPKEYINFO hb_nsxKeyPutItem( LPKEYINFO pKey, PHB_ITEM pItem, ULONG ulRecNo, - LPTAGINFO pTag, HB_BOOL fTrans, USHORT *puiLen ) + LPTAGINFO pTag, HB_BOOL fTrans, HB_USHORT *puiLen ) { double d; ULONG len; @@ -677,7 +677,7 @@ static LPKEYINFO hb_nsxKeyPutItem( LPKEYINFO pKey, PHB_ITEM pItem, ULONG ulRecNo { memset( pKey->val + len, pTag->TrailChar, pTag->KeyLength - len ); if( puiLen ) - *puiLen = ( USHORT ) len; + *puiLen = ( HB_USHORT ) len; } break; case 'N': @@ -947,7 +947,7 @@ static HB_BOOL hb_nsxKeyInScope( LPTAGINFO pTag, LPKEYINFO pKey ) /* * clear top or bottom scope */ -static void hb_nsxTagClearScope( LPTAGINFO pTag, USHORT nScope ) +static void hb_nsxTagClearScope( LPTAGINFO pTag, HB_USHORT nScope ) { NSXAREAP pArea = pTag->pIndex->pArea; PHB_NSXSCOPE pScope; @@ -979,7 +979,7 @@ static void hb_nsxTagClearScope( LPTAGINFO pTag, USHORT nScope ) /* * set top or bottom scope */ -static void hb_nsxTagSetScope( LPTAGINFO pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_nsxTagSetScope( LPTAGINFO pTag, HB_USHORT nScope, PHB_ITEM pItem ) { NSXAREAP pArea = pTag->pIndex->pArea; PHB_ITEM pScopeVal; @@ -1020,7 +1020,7 @@ static void hb_nsxTagSetScope( LPTAGINFO pTag, USHORT nScope, PHB_ITEM pItem ) /* * get top or bottom scope item */ -static void hb_nsxTagGetScope( LPTAGINFO pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_nsxTagGetScope( LPTAGINFO pTag, HB_USHORT nScope, PHB_ITEM pItem ) { NSXAREAP pArea = pTag->pIndex->pArea; PHB_NSXSCOPE pScope; @@ -1103,7 +1103,7 @@ static void hb_nsxPageCheckKeys( LPPAGEINFO pPage, LPTAGINFO pTag, int iPos, int { HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ], pKeyPrev[ NSX_MAXKEYLEN ]; ULONG ulRecNo = 0, ulPrevRec; - USHORT uiOffset = NSX_LEAFKEYOFFSET, u; + HB_USHORT uiOffset = NSX_LEAFKEYOFFSET, u; int i; if( hb_nsxIsLeaf( pPage ) && pPage->uiKeys ) @@ -1655,7 +1655,7 @@ static ULONG hb_nsxPageGetFree( LPTAGINFO pTag ) */ static LPTAGINFO hb_nsxTagNew( LPNSXINDEX pIndex, const char * szTagName, const char *szKeyExpr, PHB_ITEM pKeyExpr, - HB_UCHAR ucKeyType, USHORT uiKeyLen, HB_BYTE bTrail, + HB_UCHAR ucKeyType, HB_USHORT uiKeyLen, HB_BYTE bTrail, const char *szForExpr, PHB_ITEM pForExpr, HB_BOOL fAscendKey, HB_BOOL fUnique, HB_BOOL fCustom ) { @@ -1776,7 +1776,7 @@ static LPTAGINFO hb_nsxTagLoad( LPNSXINDEX pIndex, ULONG ulBlock, { LPTAGINFO pTag; PHB_ITEM pKeyExp, pForExp = NULL; - USHORT uiUnique, uiDescend, uiKeySize; + HB_USHORT uiUnique, uiDescend, uiKeySize; HB_UCHAR ucType, ucTrail; uiUnique = HB_GET_LE_UINT16( lpNSX->Unique ); @@ -1907,7 +1907,7 @@ static HB_ERRCODE hb_nsxTagHeaderSave( LPTAGINFO pTag ) if( pIndex->Update ) { - USHORT type = hb_nsxKeyTypeRaw( pTag->KeyType ); + HB_USHORT type = hb_nsxKeyTypeRaw( pTag->KeyType ); int iLen; memset( ( HB_BYTE * ) &Header + NSX_TAGHEAD_HEADSIZE, 0, @@ -2363,10 +2363,10 @@ static HB_BOOL hb_nsxTagGetPrevKey( LPTAGINFO pTag, HB_UCHAR * pKeyVal, int iLev /* * decode key from leaf page into given buffer */ -static HB_BOOL hb_nsxPageGetLeafKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKey, +static HB_BOOL hb_nsxPageGetLeafKey( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiKey, HB_UCHAR * pKeyVal, ULONG * pulRecNo ) { - USHORT uiOffset = NSX_LEAFKEYOFFSET; + HB_USHORT uiOffset = NSX_LEAFKEYOFFSET; hb_nsxTagGetPrevKey( pTag, pKeyVal, pTag->stackLevel - 1 ); do @@ -2388,7 +2388,7 @@ static HB_BOOL hb_nsxPageGetLeafKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT ui /* * retrieve key from page */ -static HB_BOOL hb_nsxTagGetCurKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKey ) +static HB_BOOL hb_nsxTagGetCurKey( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiKey ) { if( hb_nsxIsLeaf( pPage ) ) { @@ -2403,7 +2403,7 @@ static HB_BOOL hb_nsxTagGetCurKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKe uiKey < pTag->CurKeyNo || pTag->CurKeyOffset == 0 ) { pTag->CurKeyOffset = NSX_LEAFKEYOFFSET; - pTag->CurKeyNo = ( USHORT ) -1; + pTag->CurKeyNo = ( HB_USHORT ) -1; hb_nsxTagGetPrevKey( pTag, pTag->CurKeyInfo->val, pTag->stackLevel - 1 ); } pTag->CurKeyInfo->page = pPage->Page; @@ -2441,7 +2441,7 @@ static HB_BOOL hb_nsxTagGetCurKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKe /* * set next page and key in page path */ -static void hb_nsxTagSetPageStack( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKey ) +static void hb_nsxTagSetPageStack( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiKey ) { if( pTag->stackLevel == pTag->stackSize ) @@ -2708,7 +2708,7 @@ static int hb_nsxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage, return 0; else if( hb_nsxIsLeaf( pPage ) ) { - USHORT uiOffset = NSX_LEAFKEYOFFSET, u; + HB_USHORT uiOffset = NSX_LEAFKEYOFFSET, u; HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ]; hb_nsxTagGetPrevKey( pTag, pKeyVal, pTag->stackLevel ); @@ -2795,7 +2795,7 @@ static int hb_nsxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage, /* * set page path to given key in tag */ -static HB_BOOL hb_nsxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, USHORT uiLen ) +static HB_BOOL hb_nsxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, HB_USHORT uiLen ) { LPPAGEINFO pPage; ULONG ulPage, ulRecNo = 0; @@ -2884,7 +2884,7 @@ static HB_BOOL hb_nsxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, USHORT uiLen ) /* * add key to branch page */ -static void hb_nsxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, +static void hb_nsxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiPos, LPKEYINFO pKey ) { HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, pTag->KeyLength, uiPos ); @@ -2907,10 +2907,10 @@ static void hb_nsxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, * split single branch page into two and return key to the new one */ static LPKEYINFO hb_nsxPageSplit( LPTAGINFO pTag, LPPAGEINFO pPage, - LPKEYINFO pKey, USHORT uiPos ) + LPKEYINFO pKey, HB_USHORT uiPos ) { LPPAGEINFO pNewPage; - USHORT n, uiKeys, uiHalf, uiLen; + HB_USHORT n, uiKeys, uiHalf, uiLen; pNewPage = hb_nsxPageNew( pTag, HB_FALSE ); if( ! pNewPage ) @@ -2983,11 +2983,11 @@ static LPKEYINFO hb_nsxPageSplit( LPTAGINFO pTag, LPPAGEINFO pPage, * insert key into current stack page */ static HB_BOOL hb_nsxTagInsertKey( LPTAGINFO pTag, LPPAGEINFO pPage, - LPKEYINFO pKey, HB_UCHAR * pKeyPrev ) + LPKEYINFO pKey, HB_UCHAR * pKeyPrev ) { - USHORT uiOffset = NSX_LEAFKEYOFFSET, uiKeyOffset = 0, - uiKey = pTag->stack[ pTag->stackLevel - 1 ].ikey, - uiKeys = pPage->uiKeys, uiHalfOffset = 0, uiHalfKeys = 0, u; + HB_USHORT uiOffset = NSX_LEAFKEYOFFSET, uiKeyOffset = 0, + uiKey = pTag->stack[ pTag->stackLevel - 1 ].ikey, + uiKeys = pPage->uiKeys, uiHalfOffset = 0, uiHalfKeys = 0, u; int iLen = pTag->KeyLength; ULONG ulRecNo; HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ], * pKeyBuff, * ptr, ucRecSize; @@ -3227,11 +3227,11 @@ static HB_BOOL hb_nsxTagKeyAdd( LPTAGINFO pTag, LPKEYINFO pKey ) /* * del key from the leaf page */ -static void hb_nsxPageLeafKeyDel( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKey ) +static void hb_nsxPageLeafKeyDel( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiKey ) { HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ], pKeyVal2[ NSX_MAXKEYLEN ], * pPrevVal = NULL; ULONG ulRecNo; - USHORT uiOffset = NSX_LEAFKEYOFFSET, u; + HB_USHORT uiOffset = NSX_LEAFKEYOFFSET, u; HB_BOOL fPrev; fPrev = hb_nsxTagGetPrevKey( pTag, pKeyVal, pTag->stackLevel - 1 ); @@ -3607,7 +3607,7 @@ static ULONG hb_nsxPageCountKeys( LPTAGINFO pTag, ULONG ulPage ) ulKeys = pPage->uiKeys; if( !hb_nsxIsLeaf( pPage ) ) { - USHORT u; + HB_USHORT u; ulKeys += hb_nsxPageCountKeys( pTag, hb_nsxGetLowerPage( pPage ) ); for( u = 0; u < pPage->uiKeys; u++ ) { @@ -3721,7 +3721,7 @@ static HB_BOOL hb_nsxTagPagesFree( LPTAGINFO pTag, ULONG ulPage ) { if( !hb_nsxIsLeaf( pPage ) ) { - USHORT u; + HB_USHORT u; fOK = hb_nsxTagPagesFree( pTag, hb_nsxGetLowerPage( pPage ) ); for( u = 0; fOK && u < pPage->uiKeys; u++ ) { @@ -3974,7 +3974,7 @@ static int hb_nsxFindTagNum( NSXAREAP pArea, LPTAGINFO pTag ) if( pArea->fSetTagNumbers ) { LPNSXINDEX pIndex = pArea->lpIndexes; - USHORT uiNum = 0, i; + HB_USHORT uiNum = 0, i; pTag->uiNumber = 0; while( pIndex ) @@ -5138,9 +5138,9 @@ static void hb_nsxSortAddNodeKey( LPNSXSORTINFO pSort, HB_UCHAR *pKeyVal, ULONG } else if( iLevel == 0 ) { - USHORT uiOffset = hb_nsxLeafPutKey( pSort->pTag, pPage, - pPage->uiOffset, pSort->pLastKey, - pKeyVal, ulRec ); + HB_USHORT uiOffset = hb_nsxLeafPutKey( pSort->pTag, pPage, + pPage->uiOffset, pSort->pLastKey, + pKeyVal, ulRec ); if( uiOffset != 0 ) { pPage->uiOffset = uiOffset; @@ -5689,7 +5689,7 @@ static void hb_nsxSortOut( LPNSXSORTINFO pSort ) if( pLastPage ) { HB_UCHAR * pBuffer; - USHORT uiKey, uiRecSize; + HB_USHORT uiKey, uiRecSize; /* remove the key before last from the last nonempty leaf page */ pBuffer = ( HB_UCHAR * ) hb_nsxPageBuffer( pLastLeaf ); @@ -6129,7 +6129,7 @@ static HB_ERRCODE hb_nsxSeek( NSXAREAP pArea, HB_BOOL fSoftSeek, PHB_ITEM pItem, LPKEYINFO pKey; HB_ERRCODE retval = HB_SUCCESS; HB_BOOL fEOF = HB_FALSE, fLast; - USHORT uiLen; + HB_USHORT uiLen; ULONG ulRec; if( pArea->dbfarea.lpdbPendingRel && pArea->dbfarea.lpdbPendingRel->isScoped ) @@ -6511,7 +6511,7 @@ static HB_ERRCODE hb_nsxClose( NSXAREAP pArea ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_nsxStructSize( NSXAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_nsxStructSize( NSXAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_nsxStructSize(%p, %p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -6790,7 +6790,7 @@ static HB_ERRCODE hb_nsxOrderCreate( NSXAREAP pArea, LPDBORDERCREATEINFO pOrderI { PHB_FILE pFile; HB_BOOL bRetry, fShared = pArea->dbfarea.fShared && !fTemporary && !fExclusive; - USHORT uiFlags = FO_READWRITE | ( fShared ? FO_DENYNONE : FO_EXCLUSIVE ); + HB_USHORT uiFlags = FO_READWRITE | ( fShared ? FO_DENYNONE : FO_EXCLUSIVE ); PHB_ITEM pError = NULL; do @@ -6897,7 +6897,7 @@ static HB_ERRCODE hb_nsxOrderCreate( NSXAREAP pArea, LPDBORDERCREATEINFO pOrderI if( errCode == HB_SUCCESS ) { pTag = hb_nsxTagNew( pIndex, szTagName, - szKey, pKeyExp, bType, ( USHORT ) iLen, bTrail, + szKey, pKeyExp, bType, ( HB_USHORT ) iLen, bTrail, szFor, pForExp, fAscend, pOrderInfo->fUnique, fCustom ); pTag->Partial = ( pArea->dbfarea.area.lpdbOrdCondInfo && !pArea->dbfarea.area.lpdbOrdCondInfo->fAll ); @@ -7049,7 +7049,7 @@ static HB_ERRCODE hb_nsxOrderDestroy( NSXAREAP pArea, LPDBORDERINFO pOrderInfo ) return errCode; } -static HB_ERRCODE hb_nsxOrderInfo( NSXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) +static HB_ERRCODE hb_nsxOrderInfo( NSXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pInfo ) { LPTAGINFO pTag; HB_TRACE(HB_TR_DEBUG, ("hb_nsxOrderInfo(%p, %hu, %p)", pArea, uiIndex, pInfo)); @@ -7735,7 +7735,7 @@ static HB_ERRCODE hb_nsxCountScope( NSXAREAP pArea, void * pPtr, LONG * plRecNo static HB_ERRCODE hb_nsxOrderListAdd( NSXAREAP pArea, LPDBORDERINFO pOrderInfo ) { - USHORT uiFlags; + HB_USHORT uiFlags; PHB_FILE pFile; char szFileName[ HB_PATH_MAX ]; LPNSXINDEX pIndex, *pIndexPtr; @@ -7962,7 +7962,7 @@ static HB_ERRCODE hb_nsxOrderListRebuild( NSXAREAP pArea ) return errCode; } -static HB_ERRCODE hb_nsxRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_nsxRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { LPDBFDATA pData; @@ -8144,9 +8144,9 @@ HB_FUNC( DBFNSX ) {;} HB_FUNC( DBFNSX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); uiRddId = hb_parni( 4 ); diff --git a/harbour/src/rdd/dbfntx/dbfntx1.c b/harbour/src/rdd/dbfntx/dbfntx1.c index 74d827a0bf..d0680f338f 100644 --- a/harbour/src/rdd/dbfntx/dbfntx1.c +++ b/harbour/src/rdd/dbfntx/dbfntx1.c @@ -153,7 +153,7 @@ #endif static RDDFUNCS ntxSuper; -static USHORT s_uiRddId; +static HB_USHORT s_uiRddId; #define hb_ntxKeyFree(K) hb_xfree(K) @@ -185,25 +185,25 @@ static USHORT s_uiRddId; #else -static USHORT hb_ntxGetKeyCount( LPPAGEINFO pPage ) +static HB_USHORT hb_ntxGetKeyCount( LPPAGEINFO pPage ) { char * ptr = hb_ntxPageBuffer( pPage ); return HB_GET_LE_UINT16( ptr ); } -static void hb_ntxSetKeyCount( LPPAGEINFO pPage, USHORT uiKeys ) +static void hb_ntxSetKeyCount( LPPAGEINFO pPage, HB_USHORT uiKeys ) { char * ptr = hb_ntxPageBuffer( pPage ); HB_PUT_LE_UINT16( ptr, uiKeys ); } -static USHORT hb_ntxGetKeyOffset( LPPAGEINFO pPage, HB_SHORT iKey ) +static HB_USHORT hb_ntxGetKeyOffset( LPPAGEINFO pPage, HB_SHORT iKey ) { char * ptr = hb_ntxPageBuffer( pPage ) + 2 + ( iKey << 1 ); return HB_GET_LE_UINT16( ptr ); } -static void hb_ntxSetKeyOffset( LPPAGEINFO pPage, HB_SHORT iKey, USHORT uiOffset ) +static void hb_ntxSetKeyOffset( LPPAGEINFO pPage, HB_SHORT iKey, HB_USHORT uiOffset ) { char * ptr = hb_ntxPageBuffer( pPage ) + 2 + ( iKey << 1 ); HB_PUT_LE_UINT16( ptr, uiOffset ); @@ -251,7 +251,7 @@ static ULONG hb_ntxGetKeyRec( LPPAGEINFO pPage, HB_SHORT iKey ) static HB_ERRCODE hb_ntxErrorRT( NTXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szFileName, HB_ERRCODE errOsCode, - USHORT uiFlags, PHB_ITEM * pErrorPtr ) + HB_USHORT uiFlags, PHB_ITEM * pErrorPtr ) { PHB_ITEM pError; HB_ERRCODE iRet = HB_FAILURE; @@ -284,7 +284,7 @@ static HB_ERRCODE hb_ntxErrorRT( NTXAREAP pArea, /* * convert numeric item into NTX key value */ -static char * hb_ntxNumToStr( PHB_ITEM pItem, char* szBuffer, USHORT length, USHORT dec ) +static char * hb_ntxNumToStr( PHB_ITEM pItem, char* szBuffer, HB_USHORT length, HB_USHORT dec ) { char *ptr = szBuffer; @@ -314,7 +314,7 @@ static char * hb_ntxNumToStr( PHB_ITEM pItem, char* szBuffer, USHORT length, USH /* * convert numeric NTX key value into item */ -static PHB_ITEM hb_ntxStrToNum( PHB_ITEM pItem, char* szKeyVal, USHORT length, USHORT dec ) +static PHB_ITEM hb_ntxStrToNum( PHB_ITEM pItem, char* szKeyVal, HB_USHORT length, HB_USHORT dec ) { char szBuffer[ NTX_MAX_KEY + 1 ]; char *ptr = szKeyVal, *ptr2, c; @@ -425,7 +425,7 @@ static HB_BYTE hb_ntxItemTypeCmp( HB_BYTE bType ) * for scope key evaluation */ static LPKEYINFO hb_ntxKeyPutItem( LPKEYINFO pKey, PHB_ITEM pItem, ULONG ulRecNo, - LPTAGINFO pTag, HB_BOOL fTrans, USHORT *puiLen ) + LPTAGINFO pTag, HB_BOOL fTrans, HB_USHORT *puiLen ) { ULONG len; @@ -456,7 +456,7 @@ static LPKEYINFO hb_ntxKeyPutItem( LPKEYINFO pKey, PHB_ITEM pItem, ULONG ulRecNo { memset( pKey->key + len, ' ', pTag->KeyLength - len ); if( puiLen ) - *puiLen = ( USHORT ) len; + *puiLen = ( HB_USHORT ) len; } pKey->key[ pTag->KeyLength ] = '\0'; break; @@ -752,7 +752,7 @@ static HB_BOOL hb_ntxKeyInScope( LPTAGINFO pTag, LPKEYINFO pKey ) /* * clear top or bottom scope */ -static void hb_ntxTagClearScope( LPTAGINFO pTag, USHORT nScope ) +static void hb_ntxTagClearScope( LPTAGINFO pTag, HB_USHORT nScope ) { NTXAREAP pArea = pTag->Owner->Owner; PHB_NTXSCOPE pScope; @@ -784,7 +784,7 @@ static void hb_ntxTagClearScope( LPTAGINFO pTag, USHORT nScope ) /* * set top or bottom scope */ -static void hb_ntxTagSetScope( LPTAGINFO pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_ntxTagSetScope( LPTAGINFO pTag, HB_USHORT nScope, PHB_ITEM pItem ) { NTXAREAP pArea = pTag->Owner->Owner; PHB_ITEM pScopeVal; @@ -825,7 +825,7 @@ static void hb_ntxTagSetScope( LPTAGINFO pTag, USHORT nScope, PHB_ITEM pItem ) /* * get top or bottom scope item */ -static void hb_ntxTagGetScope( LPTAGINFO pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_ntxTagGetScope( LPTAGINFO pTag, HB_USHORT nScope, PHB_ITEM pItem ) { NTXAREAP pArea = pTag->Owner->Owner; PHB_NTXSCOPE pScope; @@ -906,7 +906,7 @@ static void hb_ntxTagCheckBuffers( LPTAGINFO pTag ) static void hb_ntxPageCheckKeys( LPPAGEINFO pPage, LPTAGINFO pTag, int iPos, int iType ) { - USHORT u; + HB_USHORT u; int i; for( u = 1; u < pPage->uiKeys; u++ ) @@ -1020,7 +1020,7 @@ static void hb_ntxDiscardBuffers( LPNTXINDEX pIndex ) */ static void hb_ntxTagUpdateFlags( LPTAGINFO pTag ) { - USHORT uiSignature = pTag->Signature; + HB_USHORT uiSignature = pTag->Signature; pTag->Custom = ( uiSignature & NTX_FLAG_CUSTOM ) != 0; pTag->ChgOnly = ( uiSignature & NTX_FLAG_CHGONLY ) != 0; @@ -1301,7 +1301,7 @@ static LPPAGEINFO hb_ntxPageLoad( LPTAGINFO pTag, ULONG ulPage ) */ static void hb_ntxPageInit( LPTAGINFO pTag, LPPAGEINFO pPage ) { - USHORT u, o = ( pTag->MaxKeys + 2 ) << 1; + HB_USHORT u, o = ( pTag->MaxKeys + 2 ) << 1; for( u = 0; u <= pTag->MaxKeys; u++, o += pTag->KeyLength + 8 ) hb_ntxSetKeyOffset( pPage, u, o ); @@ -1416,7 +1416,7 @@ static ULONG hb_ntxPageGetFree( LPTAGINFO pTag ) static LPTAGINFO hb_ntxTagNew( LPNTXINDEX pIndex, const char * szTagName, HB_BOOL fTagName, const char *szKeyExpr, PHB_ITEM pKeyExpr, - HB_BYTE bKeyType, USHORT uiKeyLen, USHORT uiKeyDec, + HB_BYTE bKeyType, HB_USHORT uiKeyLen, HB_USHORT uiKeyDec, const char *szForExpr, PHB_ITEM pForExpr, HB_BOOL fAscendKey, HB_BOOL fUnique, HB_BOOL fCustom, HB_BOOL fSortRec ) @@ -1545,7 +1545,7 @@ static LPTAGINFO hb_ntxTagLoad( LPNTXINDEX pIndex, ULONG ulBlock, LPNTXHEADER lpNTX = ( LPNTXHEADER ) buffer; LPTAGINFO pTag; PHB_ITEM pKeyExp, pForExp = NULL; - USHORT usType; + HB_USHORT usType; HB_BOOL fName; usType = HB_GET_LE_UINT16( lpNTX->type ); @@ -1830,7 +1830,7 @@ static HB_ERRCODE hb_ntxIndexHeaderSave( LPNTXINDEX pIndex ) { LPCTXHEADER lpCTX = ( LPCTXHEADER ) pIndex->HeaderBuff; int iSize = pIndex->Update ? NTXBLOCKSIZE : 16; - USHORT type; + HB_USHORT type; type = NTX_FLAG_COMPOUND | ( pIndex->LargeFile ? NTX_FLAG_LARGEFILE : 0 ); @@ -1854,7 +1854,7 @@ static HB_ERRCODE hb_ntxIndexHeaderSave( LPNTXINDEX pIndex ) static HB_ERRCODE hb_ntxIndexLoad( LPNTXINDEX pIndex, char * szTagName ) { LPTAGINFO pTag; - USHORT type; + HB_USHORT type; if( !pIndex->fValidHeader ) { @@ -1914,7 +1914,7 @@ static HB_ERRCODE hb_ntxIndexLoad( LPNTXINDEX pIndex, char * szTagName ) */ static HB_ERRCODE hb_ntxIndexHeaderRead( LPNTXINDEX pIndex ) { - USHORT type; + HB_USHORT type; if( !pIndex->HeaderBuff ) pIndex->HeaderBuff = ( HB_BYTE * ) hb_xgrab( NTXBLOCKSIZE ); @@ -1932,7 +1932,7 @@ static HB_ERRCODE hb_ntxIndexHeaderRead( LPNTXINDEX pIndex ) #else LPCTXHEADER lpCTX = ( LPCTXHEADER ) pIndex->HeaderBuff; ULONG ulVersion, ulNext; - /* USHORT usTags = HB_GET_LE_UINT16( lpCTX->ntags ); */ + /* HB_USHORT usTags = HB_GET_LE_UINT16( lpCTX->ntags ); */ ulVersion = HB_GET_LE_UINT32( lpCTX->version ); ulNext = HB_GET_LE_UINT32( lpCTX->freepage ); @@ -2240,7 +2240,7 @@ static HB_BOOL hb_ntxTagUnLockWrite( LPTAGINFO pTag ) /* * retrive key from page */ -static void hb_ntxPageGetKey( LPPAGEINFO pPage, USHORT uiKey, LPKEYINFO pKey, USHORT uiLen ) +static void hb_ntxPageGetKey( LPPAGEINFO pPage, HB_USHORT uiKey, LPKEYINFO pKey, HB_USHORT uiLen ) { if( uiKey < pPage->uiKeys ) { @@ -2257,7 +2257,7 @@ static void hb_ntxPageGetKey( LPPAGEINFO pPage, USHORT uiKey, LPKEYINFO pKey, US /* * set next page and key in page path */ -static void hb_ntxTagSetPageStack( LPTAGINFO pTag, ULONG ulPage, USHORT uiKey ) +static void hb_ntxTagSetPageStack( LPTAGINFO pTag, ULONG ulPage, HB_USHORT uiKey ) { if( pTag->stackLevel == pTag->stackSize ) { @@ -2542,7 +2542,7 @@ static HB_BOOL hb_ntxPageFindRecNo( LPPAGEINFO pPage, int * iStart, ULONG ulRecn /* * set page path to given key in tag */ -static HB_BOOL hb_ntxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, USHORT uiLen ) +static HB_BOOL hb_ntxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, HB_USHORT uiLen ) { LPPAGEINFO pPage = NULL; ULONG ulPage = 0, ulRecNo = 0; @@ -2643,7 +2643,7 @@ static HB_BOOL hb_ntxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, USHORT uiLen ) /* * set key in the given tag page */ -static void hb_ntxPageKeySet( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, +static void hb_ntxPageKeySet( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiPos, ULONG ulPage, ULONG ulRec, char * keyVal ) { hb_ntxSetKeyPage( pPage, uiPos, ulPage ); @@ -2655,10 +2655,10 @@ static void hb_ntxPageKeySet( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, /* * add key to tag page */ -static void hb_ntxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, +static void hb_ntxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, HB_USHORT uiPos, ULONG ulPage, ULONG ulRec, char * keyVal ) { - USHORT u, ntmp = hb_ntxGetKeyOffset( pPage, pPage->uiKeys + 1 ); + HB_USHORT u, ntmp = hb_ntxGetKeyOffset( pPage, pPage->uiKeys + 1 ); /* TODO?: update to keep last key pointer fixed */ for( u = pPage->uiKeys + 1; u > uiPos; u-- ) @@ -2677,9 +2677,9 @@ static void hb_ntxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, /* * del key from the page */ -static void hb_ntxPageKeyDel( LPPAGEINFO pPage, USHORT uiPos ) +static void hb_ntxPageKeyDel( LPPAGEINFO pPage, HB_USHORT uiPos ) { - USHORT u, ntmp = hb_ntxGetKeyOffset( pPage, uiPos ); + HB_USHORT u, ntmp = hb_ntxGetKeyOffset( pPage, uiPos ); /* TODO?: update to keep last key pointer fixed */ for( u = uiPos; u < pPage->uiKeys; u++ ) @@ -2694,11 +2694,11 @@ static void hb_ntxPageKeyDel( LPPAGEINFO pPage, USHORT uiPos ) * split single page into two and return key to the new one */ static LPKEYINFO hb_ntxPageSplit( LPTAGINFO pTag, LPPAGEINFO pPage, - LPKEYINFO pKey, USHORT uiPos ) + LPKEYINFO pKey, HB_USHORT uiPos ) { LPPAGEINFO pNewPage = hb_ntxPageNew( pTag, HB_FALSE ); LPKEYINFO pKeyNew; - USHORT uiKeys = pPage->uiKeys + 1, uiLen = pTag->KeyLength + 8, + HB_USHORT uiKeys = pPage->uiKeys + 1, uiLen = pTag->KeyLength + 8, i, j, u, uiHalf; ULONG ulPage; @@ -2777,10 +2777,10 @@ static LPKEYINFO hb_ntxPageSplit( LPTAGINFO pTag, LPPAGEINFO pPage, /* * join two neighbour pages and update the parent page key */ -static void hb_ntxPageJoin( LPTAGINFO pTag, LPPAGEINFO pBasePage, USHORT uiPos, +static void hb_ntxPageJoin( LPTAGINFO pTag, LPPAGEINFO pBasePage, HB_USHORT uiPos, LPPAGEINFO pFirst, LPPAGEINFO pLast ) { - USHORT uiLen = pTag->KeyLength + 8, i; + HB_USHORT uiLen = pTag->KeyLength + 8, i; hb_ntxSetKeyRec( pFirst, pFirst->uiKeys, hb_ntxGetKeyRec( pBasePage, uiPos ) ); memcpy( hb_ntxGetKeyVal( pFirst, pFirst->uiKeys ), @@ -2807,10 +2807,10 @@ static void hb_ntxPageJoin( LPTAGINFO pTag, LPPAGEINFO pBasePage, USHORT uiPos, /* * balance keys in two neighbour pages and update the parent page key */ -static void hb_ntxBalancePages( LPTAGINFO pTag, LPPAGEINFO pBasePage, USHORT uiPos, +static void hb_ntxBalancePages( LPTAGINFO pTag, LPPAGEINFO pBasePage, HB_USHORT uiPos, LPPAGEINFO pFirst, LPPAGEINFO pLast ) { - USHORT uiLen = pTag->KeyLength + 8, n; + HB_USHORT uiLen = pTag->KeyLength + 8, n; int i, j, iMove = ( ( pFirst->uiKeys + pLast->uiKeys + 1 ) >> 1 ) - pFirst->uiKeys; /* @@ -2971,7 +2971,7 @@ static HB_BOOL hb_ntxTagKeyAdd( LPTAGINFO pTag, LPKEYINFO pKey ) if( iLevel > 0 ) { LPPAGEINFO pBasePage; - USHORT uiFirst, uiLast, uiBaseKey; + HB_USHORT uiFirst, uiLast, uiBaseKey; pBasePage = hb_ntxPageLoad( pTag, pTag->stack[ iLevel - 1 ].page ); if( !pBasePage ) { @@ -3114,7 +3114,7 @@ static HB_BOOL hb_ntxTagKeyDel( LPTAGINFO pTag, LPKEYINFO pKey ) { if( pPage->uiKeys < ( pTag->MaxKeys >> 1 ) ) { - USHORT uiFirst, uiLast, uiBaseKey; + HB_USHORT uiFirst, uiLast, uiBaseKey; pBasePage = hb_ntxPageLoad( pTag, pTag->stack[ iLevel -1 ].page ); if( ! pBasePage ) @@ -3381,7 +3381,7 @@ static ULONG hb_ntxPageCountKeys( LPTAGINFO pTag, ULONG ulPage ) { LPPAGEINFO pPage = hb_ntxPageLoad( pTag, ulPage ); ULONG ulKeys; - USHORT u; + HB_USHORT u; if( ! pPage ) return 0; @@ -3481,7 +3481,7 @@ static HB_BOOL hb_ntxTagPagesFree( LPTAGINFO pTag, ULONG ulPage ) { LPPAGEINFO pPage = hb_ntxPageLoad( pTag, ulPage ); HB_BOOL fOK = pPage != NULL; - USHORT u; + HB_USHORT u; for( u = 0; fOK && u <= pPage->uiKeys; u++ ) { @@ -3734,7 +3734,7 @@ static int hb_ntxFindTagNum( NTXAREAP pArea, LPTAGINFO pTag ) if( pArea->fSetTagNumbers ) { LPNTXINDEX pIndex = pArea->lpIndexes; - USHORT uiNum = 0, i; + HB_USHORT uiNum = 0, i; pTag->uiNumber = 0; while( pIndex ) @@ -5099,7 +5099,7 @@ static void hb_ntxSortOut( LPNTXSORTINFO pSort ) HB_BOOL fUnique = pSort->fUnique, fBalance, fNext; LPTAGINFO pTag = pSort->pTag; ULONG ulPage, ulRec, ulKey; - USHORT uiHalf; + HB_USHORT uiHalf; HB_BYTE * pKeyVal; int iLen = pSort->keyLen, iLevel; @@ -5657,7 +5657,7 @@ static HB_ERRCODE hb_ntxSeek( NTXAREAP pArea, HB_BOOL fSoftSeek, PHB_ITEM pItem, LPKEYINFO pKey; HB_ERRCODE retval = HB_SUCCESS; HB_BOOL fEOF = HB_FALSE, fLast; - USHORT uiLen; + HB_USHORT uiLen; ULONG ulRec; if( pArea->dbfarea.lpdbPendingRel && pArea->dbfarea.lpdbPendingRel->isScoped ) @@ -6076,7 +6076,7 @@ static HB_ERRCODE hb_ntxClose( NTXAREAP pArea ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_ntxStructSize( NTXAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_ntxStructSize( NTXAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_ntxStructSize(%p, %p)", pArea, uiSize)); @@ -6395,7 +6395,7 @@ static HB_ERRCODE hb_ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderI { PHB_FILE pFile; HB_BOOL bRetry, fOld, fShared = pArea->dbfarea.fShared && !fTemporary && !fExclusive; - USHORT uiFlags = FO_READWRITE | ( fShared ? FO_DENYNONE : FO_EXCLUSIVE ); + HB_USHORT uiFlags = FO_READWRITE | ( fShared ? FO_DENYNONE : FO_EXCLUSIVE ); PHB_ITEM pError = NULL; fOld = fCompound; @@ -6523,7 +6523,7 @@ static HB_ERRCODE hb_ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderI } } pTag = hb_ntxTagNew( pIndex, szTagName, fTagName, - szKey, pKeyExp, bType, ( USHORT ) iLen, ( USHORT ) iDec, + szKey, pKeyExp, bType, ( HB_USHORT ) iLen, ( HB_USHORT ) iDec, szFor, pForExp, fAscend, pOrderInfo->fUnique, fCustom, pData->fSortRecNo ); pTag->Partial = ( pArea->dbfarea.area.lpdbOrdCondInfo && !pArea->dbfarea.area.lpdbOrdCondInfo->fAll ); @@ -6676,7 +6676,7 @@ static HB_ERRCODE hb_ntxOrderDestroy( NTXAREAP pArea, LPDBORDERINFO pOrderInfo ) return errCode; } -static HB_ERRCODE hb_ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) +static HB_ERRCODE hb_ntxOrderInfo( NTXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pInfo ) { LPTAGINFO pTag; HB_TRACE(HB_TR_DEBUG, ("hb_ntxOrderInfo(%p, %hu, %p)", pArea, uiIndex, pInfo)); @@ -7353,7 +7353,7 @@ static HB_ERRCODE hb_ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO static HB_ERRCODE hb_ntxOrderListAdd( NTXAREAP pArea, LPDBORDERINFO pOrderInfo ) { - USHORT uiFlags; + HB_USHORT uiFlags; PHB_FILE pFile; char szFileName[ HB_PATH_MAX ], szTagName[ NTX_MAX_TAGNAME + 1 ]; LPNTXINDEX pIndex, *pIndexPtr; @@ -7646,7 +7646,7 @@ static HB_ERRCODE hb_ntxInit( LPRDDNODE pRDD ) #define hb_ntxExists NULL #define hb_ntxRename NULL -static HB_ERRCODE hb_ntxRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_ntxRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { LPDBFDATA pData; @@ -7841,9 +7841,9 @@ HB_FUNC( DBFNTX ) {;} HB_FUNC( DBFNTX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); uiRddId = hb_parni( 4 ); diff --git a/harbour/src/rdd/dbsql.c b/harbour/src/rdd/dbsql.c index fc015fd45a..332042950d 100644 --- a/harbour/src/rdd/dbsql.c +++ b/harbour/src/rdd/dbsql.c @@ -243,7 +243,7 @@ static ULONG hb_db2Sql( AREAP pArea, PHB_ITEM pFields, HB_MAXINT llNext, { PHB_FILEBUF pFileBuf; ULONG ulRecords = 0; - USHORT uiFields = 0, ui; + HB_USHORT uiFields = 0, ui; PHB_ITEM pTmp; HB_BOOL fWriteSep = HB_FALSE; const char * szNewLine = hb_conNewLine(); diff --git a/harbour/src/rdd/delim1.c b/harbour/src/rdd/delim1.c index a28beb8d95..203675d154 100644 --- a/harbour/src/rdd/delim1.c +++ b/harbour/src/rdd/delim1.c @@ -66,7 +66,7 @@ #define SUPERTABLE (&delimSuper) static RDDFUNCS delimSuper; -static const USHORT s_uiNumLength[ 9 ] = { 0, 4, 6, 8, 11, 13, 16, 18, 20 }; +static const HB_USHORT s_uiNumLength[ 9 ] = { 0, 4, 6, 8, 11, 13, 16, 18, 20 }; static void hb_delimInitArea( DELIMAREAP pArea, char * szFileName ) { @@ -104,7 +104,7 @@ static void hb_delimClearRecordBuffer( DELIMAREAP pArea ) static ULONG hb_delimEncodeBuffer( DELIMAREAP pArea ) { ULONG ulSize; - USHORT uiField, uiLen; + HB_USHORT uiField, uiLen; LPFIELD pField; HB_BYTE * pBuffer, * pFieldBuf; @@ -238,7 +238,7 @@ static int hb_delimNextChar( DELIMAREAP pArea ) */ static HB_ERRCODE hb_delimReadRecord( DELIMAREAP pArea ) { - USHORT uiField, uiLen, uiSize; + HB_USHORT uiField, uiLen, uiSize; HB_TYPE uiType; LPFIELD pField; HB_BYTE * pFieldBuf, buffer[ 256 ]; @@ -544,7 +544,7 @@ static HB_ERRCODE hb_delimDeleteRec( DELIMAREAP pArea ) /* * Obtain the current value of a field. */ -static HB_ERRCODE hb_delimGetValue( DELIMAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_delimGetValue( DELIMAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; @@ -636,7 +636,7 @@ static HB_ERRCODE hb_delimGetValue( DELIMAREAP pArea, USHORT uiIndex, PHB_ITEM p /* * Assign a value to a field. */ -static HB_ERRCODE hb_delimPutValue( DELIMAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_delimPutValue( DELIMAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { char szBuffer[ 256 ]; HB_ERRCODE errCode; @@ -896,7 +896,7 @@ static HB_ERRCODE hb_delimFlush( DELIMAREAP pArea ) /* * Retrieve information about the current table/driver. */ -static HB_ERRCODE hb_delimInfo( DELIMAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_delimInfo( DELIMAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_delimInfo(%p,%hu,%p)", pArea, uiIndex, pItem)); @@ -1027,7 +1027,7 @@ static HB_ERRCODE hb_delimInfo( DELIMAREAP pArea, USHORT uiIndex, PHB_ITEM pItem */ static HB_ERRCODE hb_delimAddField( DELIMAREAP pArea, LPDBFIELDINFO pFieldInfo ) { - USHORT uiDelim = 0; + HB_USHORT uiDelim = 0; HB_TRACE(HB_TR_DEBUG, ("hb_delimAddField(%p, %p)", pArea, pFieldInfo)); @@ -1143,7 +1143,7 @@ static HB_ERRCODE hb_delimAddField( DELIMAREAP pArea, LPDBFIELDINFO pFieldInfo ) /* * Establish the extent of the array of fields for a WorkArea. */ -static HB_ERRCODE hb_delimSetFieldExtent( DELIMAREAP pArea, USHORT uiFieldExtent ) +static HB_ERRCODE hb_delimSetFieldExtent( DELIMAREAP pArea, HB_USHORT uiFieldExtent ) { HB_TRACE(HB_TR_DEBUG, ("hb_delimSetFieldExtent(%p,%hu)", pArea, uiFieldExtent)); @@ -1153,8 +1153,8 @@ static HB_ERRCODE hb_delimSetFieldExtent( DELIMAREAP pArea, USHORT uiFieldExtent /* Alloc field offsets array */ if( uiFieldExtent ) { - pArea->pFieldOffset = ( USHORT * ) hb_xgrab( uiFieldExtent * sizeof( USHORT ) ); - memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( USHORT ) ); + pArea->pFieldOffset = ( HB_USHORT * ) hb_xgrab( uiFieldExtent * sizeof( HB_USHORT ) ); + memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( HB_USHORT ) ); } return HB_SUCCESS; @@ -1187,7 +1187,7 @@ static HB_ERRCODE hb_delimNewArea( DELIMAREAP pArea ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_delimStructSize( DELIMAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_delimStructSize( DELIMAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_delimStrucSize(%p,%p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -1335,7 +1335,7 @@ static HB_ERRCODE hb_delimOpen( DELIMAREAP pArea, LPDBOPENINFO pOpenInfo ) PHB_ITEM pError = NULL; PHB_FNAME pFileName; HB_ERRCODE errCode; - USHORT uiFlags; + HB_USHORT uiFlags; HB_BOOL fRetry; char szFileName[ HB_PATH_MAX ]; char szAlias[ HB_RDD_MAX_ALIAS_LEN + 1 ]; @@ -1432,7 +1432,7 @@ static HB_ERRCODE hb_delimOpen( DELIMAREAP pArea, LPDBOPENINFO pOpenInfo ) /* * Retrieve information about the current driver. */ -static HB_ERRCODE hb_delimRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_delimRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_delimRddInfo(%p,%hu,%lu,%p)", pRDD, uiIndex, ulConnect, pItem)); @@ -1569,9 +1569,9 @@ HB_FUNC( DELIM ) { ; } HB_FUNC( DELIM_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount; + HB_USHORT * uiCount; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); HB_TRACE(HB_TR_DEBUG, ("DELIM_GETFUNCTABLE(%p, %p)", uiCount, pTable)); diff --git a/harbour/src/rdd/hbdbsort.c b/harbour/src/rdd/hbdbsort.c index 95b846137f..5537a9a0c3 100644 --- a/harbour/src/rdd/hbdbsort.c +++ b/harbour/src/rdd/hbdbsort.c @@ -52,7 +52,7 @@ #include "hbdbsort.h" -HB_BOOL hb_dbQSortInit( LPDBQUICKSORT pQuickSort, LPDBSORTINFO pSortInfo, USHORT uiRecordLen ) +HB_BOOL hb_dbQSortInit( LPDBQUICKSORT pQuickSort, LPDBSORTINFO pSortInfo, HB_USHORT uiRecordLen ) { /* Create temp file */ pQuickSort->hFile = hb_fsCreateTemp( NULL, NULL, FC_NORMAL, pQuickSort->szTempName ); @@ -87,9 +87,9 @@ void hb_dbQSortExit( LPDBQUICKSORT pQuickSort ) hb_xfree( pQuickSort->pCmpBufferB ); } -HB_BOOL hb_dbQSortAdvance( LPDBQUICKSORT pQuickSort, USHORT uiCount ) +HB_BOOL hb_dbQSortAdvance( LPDBQUICKSORT pQuickSort, HB_USHORT uiCount ) { - USHORT uiSize; + HB_USHORT uiSize; /* Write chunk */ uiSize = uiCount * pQuickSort->uiRecordLen; @@ -98,7 +98,7 @@ HB_BOOL hb_dbQSortAdvance( LPDBQUICKSORT pQuickSort, USHORT uiCount ) static HB_BOOL hb_dbQSortIsLess( LPDBQUICKSORT pQuickSort, ULONG ulRecNo1, ULONG ulRecNo2 ) { - USHORT uiCount, uiField; + HB_USHORT uiCount, uiField; DBFAREAP pArea; LPFIELD pField; HB_BOOL bAscending, bIgnoreCase; diff --git a/harbour/src/rdd/hbsix/sxcompr.c b/harbour/src/rdd/hbsix/sxcompr.c index f0f30dca41..e90063547a 100644 --- a/harbour/src/rdd/hbsix/sxcompr.c +++ b/harbour/src/rdd/hbsix/sxcompr.c @@ -303,7 +303,7 @@ static int hb_LZSSxRead( PHB_LZSSX_COMPR pCompr ) static HB_BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) { HB_BOOL fResult = HB_TRUE; - USHORT itemMask; + HB_USHORT itemMask; int offset, length, index, c, h; index = RBUFLENGTH - MAXLENGTH; diff --git a/harbour/src/rdd/hbsix/sxord.c b/harbour/src/rdd/hbsix/sxord.c index 95d91367c6..43a245b994 100644 --- a/harbour/src/rdd/hbsix/sxord.c +++ b/harbour/src/rdd/hbsix/sxord.c @@ -267,7 +267,7 @@ HB_FUNC( SX_THERMOMETER ) i = hb_itemGetNI( Info.itmResult ); if( i ) { - static const USHORT s_iStates[] = + static const HB_USHORT s_iStates[] = { DBOI_CUSTOM, DBOI_CHGONLY, DBOI_PARTIAL }; iTemperature = 4; for( i = 0; i < 3; ++i, --iTemperature ) @@ -321,7 +321,7 @@ HB_FUNC( SX_SETSCOPE ) Info.itmResult = hb_itemNew( NULL ); if( ! HB_ISNIL( 2 ) ) Info.itmNewVal = hb_param( 2, HB_IT_ANY ); - SELF_ORDINFO( pArea, ( USHORT ) ( iScope ? DBOI_SCOPEBOTTOM : DBOI_SCOPETOP ), &Info ); + SELF_ORDINFO( pArea, ( HB_USHORT ) ( iScope ? DBOI_SCOPEBOTTOM : DBOI_SCOPETOP ), &Info ); hb_itemReturnRelease( Info.itmResult ); } } diff --git a/harbour/src/rdd/hbsix/sxtable.c b/harbour/src/rdd/hbsix/sxtable.c index ec5767f5b5..8fbc17f20b 100644 --- a/harbour/src/rdd/hbsix/sxtable.c +++ b/harbour/src/rdd/hbsix/sxtable.c @@ -310,8 +310,8 @@ HB_FUNC( SX_SETPASS ) * 3-rd and 4-th parameters are optional Harbour extensions * with RDD name and connection number. */ - LPRDDNODE pRDDNode; - USHORT uiRddID; + LPRDDNODE pRDDNode; + HB_USHORT uiRddID; const char * szDriver; if( iPCount == 2 ) /* no RDD parameter, use default */ @@ -430,8 +430,8 @@ HB_FUNC( SX_TURBOAREA ) HB_FUNC( SX_SETTURBO ) { - LPRDDNODE pRDDNode; - USHORT uiRddID; + LPRDDNODE pRDDNode; + HB_USHORT uiRddID; const char * szDriver; szDriver = hb_parc( 2 ); diff --git a/harbour/src/rdd/hsx/hsx.c b/harbour/src/rdd/hsx/hsx.c index 1f37ec2bb4..c82d05e98a 100644 --- a/harbour/src/rdd/hsx/hsx.c +++ b/harbour/src/rdd/hsx/hsx.c @@ -308,7 +308,7 @@ typedef struct _HSXINFO { int iHandle; /* HSX handle */ ULONG ulRecCount; /* number of records */ - USHORT uiRecordSize; /* record size in bytes */ + HB_USHORT uiRecordSize; /* record size in bytes */ HB_BOOL fIgnoreCase; /* ignore case */ int iFilterType; /* character filter */ HB_BOOL fUseHash; /* use Hash functions for alphas */ @@ -658,7 +658,7 @@ static int hb_hsxHdrFlush( int iHandle ) { HB_BYTE headrBuf[ HSXHEADER_LEN ]; LPHSXHEADER pHeader = ( LPHSXHEADER ) ( void * ) headrBuf; - USHORT uiBits = 0, uiSize = pHSX->uiRecordSize; + HB_USHORT uiBits = 0, uiSize = pHSX->uiRecordSize; while( uiSize >>= 1 ) uiBits++; @@ -1383,7 +1383,7 @@ static int hb_hsxCreate( const char * szFile, int iBufSize, int iKeySize, const char * szExpr = NULL; PHB_ITEM pKeyExpr = NULL; ULONG ulBufSize; - USHORT uiRecordSize; + HB_USHORT uiRecordSize; LPHSXINFO pHSX; PHB_FILE pFile; int iRetVal; @@ -1405,7 +1405,7 @@ static int hb_hsxCreate( const char * szFile, int iBufSize, int iKeySize, ulBufSize = HSXMINBUF_LEN; else if( ulBufSize > HSXMAXBUF_LEN ) ulBufSize = HSXMAXBUF_LEN; - uiRecordSize = ( USHORT ) 0x08 << iKeySize; + uiRecordSize = ( HB_USHORT ) 0x08 << iKeySize; ulBufSize /= uiRecordSize; if( ulBufSize == 0 ) ulBufSize = 1; @@ -1472,7 +1472,7 @@ static int hb_hsxOpen( const char * szFile, int iBufSize, int iMode ) HB_BOOL fShared, fReadonly; PHB_FILE pFile; ULONG ulBufSize; - USHORT uiFlags; + HB_USHORT uiFlags; LPHSXINFO pHSX; int iRetVal, iRet; diff --git a/harbour/src/rdd/sdf1.c b/harbour/src/rdd/sdf1.c index de23d294d0..25cc711885 100644 --- a/harbour/src/rdd/sdf1.c +++ b/harbour/src/rdd/sdf1.c @@ -66,7 +66,7 @@ #define SUPERTABLE (&sdfSuper) static RDDFUNCS sdfSuper; -static const USHORT s_uiNumLength[ 9 ] = { 0, 4, 6, 8, 11, 13, 16, 18, 20 }; +static const HB_USHORT s_uiNumLength[ 9 ] = { 0, 4, 6, 8, 11, 13, 16, 18, 20 }; static void hb_sdfInitArea( SDFAREAP pArea, char * szFileName ) { @@ -100,7 +100,7 @@ static void hb_sdfClearRecordBuffer( SDFAREAP pArea ) static HB_ERRCODE hb_sdfReadRecord( SDFAREAP pArea ) { - USHORT uiRead, uiToRead, uiEolPos; + HB_USHORT uiRead, uiToRead, uiEolPos; HB_TRACE(HB_TR_DEBUG, ("hb_sdfReadRecord(%p)", pArea)); @@ -120,7 +120,7 @@ static HB_ERRCODE hb_sdfReadRecord( SDFAREAP pArea ) { pArea->area.fEof = HB_FALSE; pArea->fPositioned = HB_TRUE; - uiEolPos = ( USHORT ) hb_strAt( pArea->szEol, pArea->uiEolLen, + uiEolPos = ( HB_USHORT ) hb_strAt( pArea->szEol, pArea->uiEolLen, ( char * ) pArea->pRecord, uiRead ); if( uiEolPos ) { @@ -162,7 +162,7 @@ static HB_ERRCODE hb_sdfNextRecord( SDFAREAP pArea ) { if( pArea->ulNextOffset == 0 ) { - USHORT uiRead, uiToRead, uiEolPos, uiRest = 0; + HB_USHORT uiRead, uiToRead, uiEolPos, uiRest = 0; HB_FOFFSET ulOffset = pArea->ulRecordOffset; uiToRead = pArea->uiRecordLen + pArea->uiEolLen + 2; @@ -175,7 +175,7 @@ static HB_ERRCODE hb_sdfNextRecord( SDFAREAP pArea ) pArea->pRecord[ uiRead - 1 ] == '\032' ) --uiRead; - uiEolPos = ( USHORT ) hb_strAt( pArea->szEol, pArea->uiEolLen, + uiEolPos = ( HB_USHORT ) hb_strAt( pArea->szEol, pArea->uiEolLen, ( char * ) pArea->pRecord, uiRead ); if( uiEolPos ) { @@ -367,7 +367,7 @@ static HB_ERRCODE hb_sdfDeleteRec( SDFAREAP pArea ) /* * Obtain the current value of a field. */ -static HB_ERRCODE hb_sdfGetValue( SDFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_sdfGetValue( SDFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; @@ -465,7 +465,7 @@ static HB_ERRCODE hb_sdfGetValue( SDFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem /* * Assign a value to a field. */ -static HB_ERRCODE hb_sdfPutValue( SDFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_sdfPutValue( SDFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { char szBuffer[ 256 ]; HB_ERRCODE errCode; @@ -725,7 +725,7 @@ static HB_ERRCODE hb_sdfFlush( SDFAREAP pArea ) /* * Retrieve information about the current table/driver. */ -static HB_ERRCODE hb_sdfInfo( SDFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_sdfInfo( SDFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_sdfInfo(%p,%hu,%p)", pArea, uiIndex, pItem)); @@ -896,7 +896,7 @@ static HB_ERRCODE hb_sdfAddField( SDFAREAP pArea, LPDBFIELDINFO pFieldInfo ) /* * Establish the extent of the array of fields for a WorkArea. */ -static HB_ERRCODE hb_sdfSetFieldExtent( SDFAREAP pArea, USHORT uiFieldExtent ) +static HB_ERRCODE hb_sdfSetFieldExtent( SDFAREAP pArea, HB_USHORT uiFieldExtent ) { HB_TRACE(HB_TR_DEBUG, ("hb_sdfSetFieldExtent(%p,%hu)", pArea, uiFieldExtent)); @@ -906,8 +906,8 @@ static HB_ERRCODE hb_sdfSetFieldExtent( SDFAREAP pArea, USHORT uiFieldExtent ) /* Alloc field offsets array */ if( uiFieldExtent ) { - pArea->pFieldOffset = ( USHORT * ) hb_xgrab( uiFieldExtent * sizeof( USHORT ) ); - memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( USHORT ) ); + pArea->pFieldOffset = ( HB_USHORT * ) hb_xgrab( uiFieldExtent * sizeof( HB_USHORT ) ); + memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( HB_USHORT ) ); } return HB_SUCCESS; @@ -933,7 +933,7 @@ static HB_ERRCODE hb_sdfNewArea( SDFAREAP pArea ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_sdfStructSize( SDFAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_sdfStructSize( SDFAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_sdfStrucSize(%p,%p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -1076,7 +1076,7 @@ static HB_ERRCODE hb_sdfOpen( SDFAREAP pArea, LPDBOPENINFO pOpenInfo ) PHB_ITEM pError = NULL; PHB_FNAME pFileName; HB_ERRCODE errCode; - USHORT uiFlags; + HB_USHORT uiFlags; HB_BOOL fRetry; char szFileName[ HB_PATH_MAX ]; char szAlias[ HB_RDD_MAX_ALIAS_LEN + 1 ]; @@ -1173,7 +1173,7 @@ static HB_ERRCODE hb_sdfOpen( SDFAREAP pArea, LPDBOPENINFO pOpenInfo ) /* * Retrieve information about the current driver. */ -static HB_ERRCODE hb_sdfRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_sdfRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_sdfRddInfo(%p,%hu,%lu,%p)", pRDD, uiIndex, ulConnect, pItem)); @@ -1304,9 +1304,9 @@ HB_FUNC( SDF ) { ; } HB_FUNC( SDF_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount; + HB_USHORT * uiCount; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); HB_TRACE(HB_TR_DEBUG, ("SDF_GETFUNCTABLE(%p, %p)", uiCount, pTable)); diff --git a/harbour/src/rdd/usrrdd/usrrdd.c b/harbour/src/rdd/usrrdd/usrrdd.c index 5b0334438c..6706141068 100644 --- a/harbour/src/rdd/usrrdd/usrrdd.c +++ b/harbour/src/rdd/usrrdd/usrrdd.c @@ -74,7 +74,7 @@ typedef struct _USRRDDNODE { - USHORT uiDataOffset; + HB_USHORT uiDataOffset; PRDDFUNCS pSuperTable; PHB_ITEM pMethods; PHB_ITEM pItem; @@ -87,17 +87,17 @@ typedef struct _USRRDDDATA } USRRDDDATA; typedef USRRDDDATA * LPUSRRDDDATA; -static USHORT s_uiUsrNodes = 0; +static HB_USHORT s_uiUsrNodes = 0; static LPUSRRDDNODE * s_pUsrRddNodes = NULL; -static HB_BOOL hb_usrIsMethod( PHB_ITEM pMethods, USHORT uiMethod ) +static HB_BOOL hb_usrIsMethod( PHB_ITEM pMethods, HB_USHORT uiMethod ) { PHB_ITEM pItem = hb_arrayGetItemPtr( pMethods, uiMethod ); return pItem && ( HB_IS_SYMBOL( pItem ) || HB_IS_BLOCK( pItem ) ); } -static HB_BOOL hb_usrPushMethod( PHB_ITEM pMethods, USHORT uiMethod ) +static HB_BOOL hb_usrPushMethod( PHB_ITEM pMethods, HB_USHORT uiMethod ) { PHB_ITEM pItem = hb_arrayGetItemPtr( pMethods, uiMethod ); @@ -132,7 +132,7 @@ static HB_ERRCODE hb_usrReturn( void ) return errCode; } -static HB_ERRCODE hb_usrEvalRddFunc( PHB_ITEM pMethods, USHORT uiMethod, USHORT uiRddID ) +static HB_ERRCODE hb_usrEvalRddFunc( PHB_ITEM pMethods, HB_USHORT uiMethod, HB_USHORT uiRddID ) { if( hb_usrPushMethod( pMethods, uiMethod ) ) { @@ -144,7 +144,7 @@ static HB_ERRCODE hb_usrEvalRddFunc( PHB_ITEM pMethods, USHORT uiMethod, USHORT return HB_SUCCESS; } -static HB_ERRCODE hb_usrEvalAreaFunc( PHB_ITEM pMethods, USHORT uiMethod, AREAP pArea ) +static HB_ERRCODE hb_usrEvalAreaFunc( PHB_ITEM pMethods, HB_USHORT uiMethod, AREAP pArea ) { if( hb_usrPushMethod( pMethods, uiMethod ) ) { @@ -440,7 +440,7 @@ static PHB_ITEM hb_usrTransInfoToItem( LPDBTRANSINFO pTransInfo ) { PHB_ITEM pItems = hb_arrayGetItemPtr( pItem, UR_TI_ITEMS ), pItm; LPDBTRANSITEM pTransItem = pTransInfo->lpTransItems; - USHORT uiCount; + HB_USHORT uiCount; hb_arrayNew( pItems, pTransInfo->uiItemCount ); for( uiCount = 1; uiCount <= pTransInfo->uiItemCount; ++uiCount, ++pTransItem ) @@ -460,7 +460,7 @@ static HB_BOOL hb_usrItemToTransInfo( PHB_ITEM pItem, LPDBTRANSINFO pTransInfo ) { if( pItem && hb_arrayLen( pItem ) == UR_TI_SIZE ) { - USHORT uiItemCount = hb_arrayGetNI( pItem, UR_TI_ITEMCOUNT ), uiCount; + HB_USHORT uiItemCount = hb_arrayGetNI( pItem, UR_TI_ITEMCOUNT ), uiCount; PHB_ITEM pItems = hb_arrayGetItemPtr( pItem, UR_TI_ITEMS ), pItm; if( hb_arrayLen( pItems ) == ( ULONG ) uiItemCount && @@ -513,7 +513,7 @@ static PHB_ITEM hb_usrSortInfoToItem( LPDBSORTINFO pSortInfo ) { PHB_ITEM pItems = hb_arrayGetItemPtr( pItem, UR_SRI_ITEMS ), pItm; LPDBSORTITEM pSortItem = pSortInfo->lpdbsItem; - USHORT uiCount; + HB_USHORT uiCount; hb_arrayNew( pItems, pSortInfo->uiItemCount ); for( uiCount = 1; uiCount <= pSortInfo->uiItemCount; ++uiCount, ++pSortItem ) @@ -533,7 +533,7 @@ static HB_BOOL hb_usrItemToSortInfo( PHB_ITEM pItem, LPDBSORTINFO pSortInfo ) { if( pItem && hb_arrayLen( pItem ) == UR_SRI_SIZE ) { - USHORT uiItemCount = hb_arrayGetNI( pItem, UR_SRI_ITEMCOUNT ), uiCount; + HB_USHORT uiItemCount = hb_arrayGetNI( pItem, UR_SRI_ITEMCOUNT ), uiCount; PHB_ITEM pItems = hb_arrayGetItemPtr( pItem, UR_SRI_ITEMS ), pItm; if( hb_arrayLen( pItems ) == ( ULONG ) uiItemCount && @@ -870,7 +870,7 @@ static HB_ERRCODE hb_usrExit( LPRDDNODE pRDD ) return errCode; } -static HB_ERRCODE hb_usrStructSize( AREAP pArea, USHORT * puiSize ) +static HB_ERRCODE hb_usrStructSize( AREAP pArea, HB_USHORT * puiSize ) { HB_ERRCODE errCode; @@ -1213,7 +1213,7 @@ static HB_ERRCODE hb_usrFieldDisplay( AREAP pArea, LPDBFIELDINFO pFieldInfo ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrFieldName( AREAP pArea, USHORT uiIndex, char * szName ) +static HB_ERRCODE hb_usrFieldName( AREAP pArea, HB_USHORT uiIndex, char * szName ) { LONG lOffset; @@ -1279,7 +1279,7 @@ static HB_ERRCODE hb_usrRecall( AREAP pArea ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrFieldCount( AREAP pArea, USHORT * puiFields ) +static HB_ERRCODE hb_usrFieldCount( AREAP pArea, HB_USHORT * puiFields ) { LONG lOffset; @@ -1385,7 +1385,7 @@ static HB_ERRCODE hb_usrGetRec( AREAP pArea, HB_BYTE ** pBuffer ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrGetValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_usrGetValue( AREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrGetValue(%p,%hu,%p)", pArea, uiIndex, pItem)); @@ -1400,7 +1400,7 @@ static HB_ERRCODE hb_usrGetValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrPutValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_usrPutValue( AREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrPutValue(%p,%hu,%p)", pArea, uiIndex, pItem)); @@ -1415,7 +1415,7 @@ static HB_ERRCODE hb_usrPutValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrGetVarLen( AREAP pArea, USHORT uiIndex, ULONG * pulLength ) +static HB_ERRCODE hb_usrGetVarLen( AREAP pArea, HB_USHORT uiIndex, ULONG * pulLength ) { LONG lOffset; @@ -1464,7 +1464,7 @@ static HB_ERRCODE hb_usrRecCount( AREAP pArea, ULONG * pulRecCount ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrRecInfo( AREAP pArea, PHB_ITEM pRecID, USHORT uiInfoType, PHB_ITEM pInfo ) +static HB_ERRCODE hb_usrRecInfo( AREAP pArea, PHB_ITEM pRecID, HB_USHORT uiInfoType, PHB_ITEM pInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrRecInfo(%p,%p,%hu,%p)", pArea, pRecID, uiInfoType, pInfo)); @@ -1518,7 +1518,7 @@ static HB_ERRCODE hb_usrRecId( AREAP pArea, PHB_ITEM pRecId ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiInfoType, PHB_ITEM pInfo ) +static HB_ERRCODE hb_usrFieldInfo( AREAP pArea, HB_USHORT uiIndex, HB_USHORT uiInfoType, PHB_ITEM pInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrFieldInfo(%p,%hu,%hu,%p)", pArea, uiIndex, uiInfoType, pInfo)); @@ -1548,7 +1548,7 @@ static HB_ERRCODE hb_usrCreateFields( AREAP pArea, PHB_ITEM pStruct ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrSetFieldExtent( AREAP pArea, USHORT uiFieldExtent ) +static HB_ERRCODE hb_usrSetFieldExtent( AREAP pArea, HB_USHORT uiFieldExtent ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrSetFieldExtent(%p,%hu)", pArea, uiFieldExtent)); @@ -1643,7 +1643,7 @@ static HB_ERRCODE hb_usrOpen( AREAP pArea, LPDBOPENINFO pOpenInfo ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrInfo( AREAP pArea, USHORT uiInfoType, PHB_ITEM pInfo ) +static HB_ERRCODE hb_usrInfo( AREAP pArea, HB_USHORT uiInfoType, PHB_ITEM pInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrInfo(%p,%hu,%p)", pArea, uiInfoType, pInfo)); @@ -1888,7 +1888,7 @@ static HB_ERRCODE hb_usrForceRel( AREAP pArea ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrRelArea( AREAP pArea, USHORT uiRelNo, USHORT * puiRelArea ) +static HB_ERRCODE hb_usrRelArea( AREAP pArea, HB_USHORT uiRelNo, HB_USHORT * puiRelArea ) { LONG lOffset; @@ -1932,7 +1932,7 @@ static HB_ERRCODE hb_usrRelEval( AREAP pArea, LPDBRELINFO pRelInfo ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrRelText( AREAP pArea, USHORT uiRelNo, PHB_ITEM pExpr ) +static HB_ERRCODE hb_usrRelText( AREAP pArea, HB_USHORT uiRelNo, PHB_ITEM pExpr ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrRelText(%p,%hu,%p)", pArea, uiRelNo, pExpr)); @@ -2153,7 +2153,7 @@ static HB_ERRCODE hb_usrOrderDestroy( AREAP pArea, LPDBORDERINFO pOrderInfo ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrOrderInfo( AREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ) +static HB_ERRCODE hb_usrOrderInfo( AREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pOrderInfo ) { PHB_ITEM pItem, pResult; @@ -2351,7 +2351,7 @@ static HB_ERRCODE hb_usrEvalBlock( AREAP pArea, PHB_ITEM pBlock ) * Network operations */ -static HB_ERRCODE hb_usrRawLock( AREAP pArea, USHORT uiAction, ULONG ulRecNo ) +static HB_ERRCODE hb_usrRawLock( AREAP pArea, HB_USHORT uiAction, ULONG ulRecNo ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrRawLock(%p,%hu,%lu)", pArea, uiAction, ulRecNo)); @@ -2460,7 +2460,7 @@ static HB_ERRCODE hb_usrOpenMemFile( AREAP pArea, LPDBOPENINFO pOpenInfo ) return hb_usrReturn(); } -static HB_ERRCODE hb_usrGetValueFile( AREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE hb_usrGetValueFile( AREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrGetValueFile(%p,%hu,%p,%hu)", pArea, uiIndex, szFile, uiMode)); @@ -2476,7 +2476,7 @@ static HB_ERRCODE hb_usrGetValueFile( AREAP pArea, USHORT uiIndex, const char * return hb_usrReturn(); } -static HB_ERRCODE hb_usrPutValueFile( AREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE hb_usrPutValueFile( AREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrPutValueFile(%p,%hu,%p,%hu)", pArea, uiIndex, szFile, uiMode)); @@ -2577,7 +2577,7 @@ static HB_ERRCODE hb_usrRename( LPRDDNODE pRDD, PHB_ITEM pTable, PHB_ITEM pIndex return hb_usrReturn(); } -static HB_ERRCODE hb_usrRddInfo( LPRDDNODE pRDD, USHORT uiInfoType, ULONG ulConnection, PHB_ITEM pInfo ) +static HB_ERRCODE hb_usrRddInfo( LPRDDNODE pRDD, HB_USHORT uiInfoType, ULONG ulConnection, PHB_ITEM pInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_usrRddInfo(%p,%hu,%lu,%p)", pRDD, uiInfoType, ulConnection, pInfo)); @@ -2851,14 +2851,14 @@ static const RDDFUNCS rddFuncTable = HB_FUNC( USRRDD_GETFUNCTABLE ) { RDDFUNCS * pSelfTable, * pSuperTable; - USHORT * puiCount, uiCount, uiSize; + HB_USHORT * puiCount, uiCount, uiSize; HB_ERRCODE uiResult; const char * szSuperRDD; PHB_ITEM pMethods; HB_TRACE(HB_TR_DEBUG, ("USRRDD_GETFUNCTABLE()")); - puiCount = ( USHORT * ) hb_parptr( 1 ); + puiCount = ( HB_USHORT * ) hb_parptr( 1 ); pSelfTable = ( RDDFUNCS * ) hb_parptr( 2 ); pSuperTable = ( RDDFUNCS * ) hb_parptr( 3 ); /* uiRddID = hb_parni( 4 ); */ @@ -2872,7 +2872,7 @@ HB_FUNC( USRRDD_GETFUNCTABLE ) const DBENTRYP_V * pUsrFunction, * pRddFunction; * puiCount = RDDFUNCSCOUNT; - uiSize = ( USHORT ) hb_arrayLen( pMethods ); + uiSize = ( HB_USHORT ) hb_arrayLen( pMethods ); pUsrFunction = ( const DBENTRYP_V * ) ( const void * ) &usrFuncTable; pRddFunction = ( const DBENTRYP_V * ) ( const void * ) &rddFuncTable; @@ -2903,7 +2903,7 @@ HB_FUNC( USRRDD_GETFUNCTABLE ) HB_FUNC( USRRDD_RDDDATA ) { - USHORT uiRddID = hb_parni( 1 ); + HB_USHORT uiRddID = hb_parni( 1 ); if( uiRddID < s_uiUsrNodes && s_pUsrRddNodes[ uiRddID ] ) { @@ -3101,7 +3101,7 @@ static AREAP hb_usrGetAreaParam( int iParams ) static LPRDDNODE hb_usrGetNodeParam( int iParams ) { LPRDDNODE pRDD = NULL; - USHORT uiNode = 0; + HB_USHORT uiNode = 0; if( iParams <= hb_pcount() ) { @@ -3328,7 +3328,7 @@ HB_FUNC_UR_SUPER( FIELDCOUNT ) if( pArea ) { - USHORT uiCount; + HB_USHORT uiCount; hb_retni( SUPER_FIELDCOUNT( pArea, &uiCount ) ); hb_storni( uiCount, 2 ); @@ -3762,7 +3762,7 @@ HB_FUNC_UR_SUPER( RELAREA ) if( pArea ) { - USHORT uiRelArea; + HB_USHORT uiRelArea; hb_retni( SUPER_RELAREA( pArea, hb_parni( 2 ), &uiRelArea ) ); hb_storni( uiRelArea, 3 ); diff --git a/harbour/src/rdd/wacore.c b/harbour/src/rdd/wacore.c index 7837f3d985..52f85f1703 100644 --- a/harbour/src/rdd/wacore.c +++ b/harbour/src/rdd/wacore.c @@ -74,7 +74,7 @@ */ static void hb_waNodeInsert( PHB_STACKRDD pRddInfo, AREAP pArea ) { - USHORT uiWaPos; + HB_USHORT uiWaPos; if( pRddInfo->uiCurrArea >= pRddInfo->uiWaNumMax ) { @@ -85,13 +85,13 @@ static void hb_waNodeInsert( PHB_STACKRDD pRddInfo, AREAP pArea ) if( pRddInfo->uiWaNumMax == 0 ) { - pRddInfo->waNums = ( USHORT * ) hb_xgrab( iSize * sizeof( USHORT ) ); + pRddInfo->waNums = ( HB_USHORT * ) hb_xgrab( iSize * sizeof( HB_USHORT ) ); } else { - pRddInfo->waNums = ( USHORT * ) hb_xrealloc( pRddInfo->waNums, iSize * sizeof( USHORT ) ); + pRddInfo->waNums = ( HB_USHORT * ) hb_xrealloc( pRddInfo->waNums, iSize * sizeof( HB_USHORT ) ); } - memset( &pRddInfo->waNums[ pRddInfo->uiWaNumMax ], 0, ( iSize - pRddInfo->uiWaNumMax ) * sizeof( USHORT ) ); + memset( &pRddInfo->waNums[ pRddInfo->uiWaNumMax ], 0, ( iSize - pRddInfo->uiWaNumMax ) * sizeof( HB_USHORT ) ); pRddInfo->uiWaNumMax = iSize; } @@ -132,7 +132,7 @@ static void hb_waNodeInsert( PHB_STACKRDD pRddInfo, AREAP pArea ) */ static void hb_waNodeDelete( PHB_STACKRDD pRddInfo ) { - USHORT uiWaPos; + HB_USHORT uiWaPos; uiWaPos = pRddInfo->waNums[ pRddInfo->uiCurrArea ]; pRddInfo->waNums[ pRddInfo->uiCurrArea ] = 0; @@ -169,7 +169,7 @@ static void hb_waNodeDelete( PHB_STACKRDD pRddInfo ) HB_ERRCODE hb_rddSelectFirstAvailable( void ) { PHB_STACKRDD pRddInfo; - USHORT uiArea; + HB_USHORT uiArea; HB_TRACE(HB_TR_DEBUG, ("hb_rddSelectFirstAvailable()")); @@ -191,11 +191,11 @@ HB_ERRCODE hb_rddSelectFirstAvailable( void ) /* * Create and insert the new WorkArea node */ -USHORT hb_rddInsertAreaNode( const char *szDriver ) +HB_USHORT hb_rddInsertAreaNode( const char *szDriver ) { PHB_STACKRDD pRddInfo; LPRDDNODE pRddNode; - USHORT uiRddID; + HB_USHORT uiRddID; AREAP pArea; HB_TRACE(HB_TR_DEBUG, ("hb_rddInsertAreaNode(%s)", szDriver)); @@ -261,7 +261,7 @@ void hb_rddCloseAll( void ) { HB_BOOL isParents, isFinish = HB_FALSE; AREAP pArea; - USHORT uiIndex; + HB_USHORT uiIndex; do { @@ -304,7 +304,7 @@ void hb_rddCloseAll( void ) void hb_rddFlushAll( void ) { PHB_STACKRDD pRddInfo = hb_stackRDD(); - USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(), uiIndex; + HB_USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(), uiIndex; for( uiIndex = 1; uiIndex < pRddInfo->uiWaMax; ++uiIndex ) { @@ -317,7 +317,7 @@ void hb_rddFlushAll( void ) void hb_rddUnLockAll( void ) { PHB_STACKRDD pRddInfo = hb_stackRDD(); - USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(), uiIndex; + HB_USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(), uiIndex; for( uiIndex = 1; uiIndex < pRddInfo->uiWaMax; ++uiIndex ) { @@ -334,7 +334,7 @@ HB_ERRCODE hb_rddIterateWorkAreas( WACALLBACK pCallBack, void * cargo ) { PHB_STACKRDD pRddInfo; HB_ERRCODE errCode = HB_SUCCESS; - USHORT uiIndex; + HB_USHORT uiIndex; HB_TRACE(HB_TR_DEBUG, ("hb_rddIterateWorkAreas(%p,%p)", pCallBack, cargo)); @@ -372,7 +372,7 @@ const char * hb_rddDefaultDrv( const char * szDriver ) if( szDriver && *szDriver ) { char szNewDriver[ HB_RDD_MAX_DRIVERNAME_LEN + 1 ]; - USHORT uiRddID; + HB_USHORT uiRddID; hb_strncpyUpper( szNewDriver, szDriver, sizeof( szNewDriver ) - 1 ); if( !hb_rddFindNode( szNewDriver, &uiRddID ) ) diff --git a/harbour/src/rdd/wafunc.c b/harbour/src/rdd/wafunc.c index 5e06feac7d..c336e67036 100644 --- a/harbour/src/rdd/wafunc.c +++ b/harbour/src/rdd/wafunc.c @@ -102,7 +102,7 @@ HB_ERRCODE hb_rddVerifyAliasName( const char * szAlias ) /* * Prepares a new WorkArea node. */ -void * hb_rddNewAreaNode( LPRDDNODE pRddNode, USHORT uiRddID ) +void * hb_rddNewAreaNode( LPRDDNODE pRddNode, HB_USHORT uiRddID ) { AREAP pArea; @@ -110,7 +110,7 @@ void * hb_rddNewAreaNode( LPRDDNODE pRddNode, USHORT uiRddID ) if( pRddNode->uiAreaSize == 0 ) /* Calculate the size of WorkArea */ { - USHORT uiSize; + HB_USHORT uiSize; pArea = ( AREAP ) hb_xgrab( sizeof( AREA ) ); memset( pArea, 0, sizeof( AREA ) ); @@ -206,9 +206,9 @@ void * hb_rddAllocWorkAreaAlias( const char * szAlias, int iArea ) /* * Find a field index by name */ -USHORT hb_rddFieldIndex( AREAP pArea, const char * szName ) +HB_USHORT hb_rddFieldIndex( AREAP pArea, const char * szName ) { - USHORT uiCount = 0; + HB_USHORT uiCount = 0; LPFIELD pField; HB_TRACE(HB_TR_DEBUG, ("hb_rddFieldIndex(%p, %s)", pArea, szName)); @@ -239,7 +239,7 @@ USHORT hb_rddFieldIndex( AREAP pArea, const char * szName ) * find a field expression index, this function strips _FIELD->, FIELD->, * alias-> prefixes */ -USHORT hb_rddFieldExpIndex( AREAP pArea, const char * szField ) +HB_USHORT hb_rddFieldExpIndex( AREAP pArea, const char * szField ) { int n; @@ -471,7 +471,7 @@ HB_ERRCODE hb_rddFieldGet( HB_ITEM_PTR pItem, PHB_SYMB pFieldSymbol ) pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) { - USHORT uiField = 1; + HB_USHORT uiField = 1; LPFIELD pField = pArea->lpFields; PHB_DYNS pDynSym = pFieldSymbol->pDynSym; @@ -500,7 +500,7 @@ HB_ERRCODE hb_rddFieldPut( HB_ITEM_PTR pItem, PHB_SYMB pFieldSymbol ) pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) { - USHORT uiField = 1; + HB_USHORT uiField = 1; LPFIELD pField = pArea->lpFields; PHB_DYNS pDynSym = pFieldSymbol->pDynSym; @@ -584,7 +584,7 @@ HB_ERRCODE hb_rddPutFieldValue( HB_ITEM_PTR pItem, PHB_SYMB pFieldSymbol ) } HB_ERRCODE hb_rddOpenTable( const char * szFileName, const char * szDriver, - USHORT uiArea, const char *szAlias, + HB_USHORT uiArea, const char *szAlias, HB_BOOL fShared, HB_BOOL fReadonly, const char * szCpId, ULONG ulConnection, PHB_ITEM pStruct, PHB_ITEM pDelim ) @@ -672,7 +672,7 @@ HB_ERRCODE hb_rddOpenTable( const char * szFileName, const char * szDriver, } HB_ERRCODE hb_rddCreateTable( const char * szFileName, const char * szDriver, - USHORT uiArea, const char *szAlias, + HB_USHORT uiArea, const char *szAlias, HB_BOOL fKeepOpen, const char * szCpId, ULONG ulConnection, PHB_ITEM pStruct, PHB_ITEM pDelim ) @@ -680,7 +680,7 @@ HB_ERRCODE hb_rddCreateTable( const char * szFileName, const char * szDriver, char szDriverBuffer[ HB_RDD_MAX_DRIVERNAME_LEN + 1 ]; DBOPENINFO pInfo; HB_ERRCODE errCode; - USHORT uiPrevArea; + HB_USHORT uiPrevArea; AREAP pArea; if( !szFileName ) @@ -753,7 +753,7 @@ HB_ERRCODE hb_rddCreateTableTemp( const char * szDriver, DBOPENINFO pInfo; PHB_ITEM pItem; HB_ERRCODE errCode; - USHORT uiPrevArea; + HB_USHORT uiPrevArea; AREAP pArea; if( szDriver && szDriver[ 0 ] ) @@ -808,7 +808,7 @@ HB_ERRCODE hb_rddCreateTableTemp( const char * szDriver, return errCode; } -static void hb_fldStructure( AREAP pArea, USHORT uiField, USHORT uiSize, +static void hb_fldStructure( AREAP pArea, HB_USHORT uiField, HB_USHORT uiSize, PHB_ITEM pField ) { #define HB_DBS_ALEN ( sizeof( s_uiActions ) / sizeof( int ) ) @@ -819,7 +819,7 @@ static void hb_fldStructure( AREAP pArea, USHORT uiField, USHORT uiSize, static const int s_uiActions[] = { DBS_NAME, DBS_TYPE, DBS_LEN, DBS_DEC }; #endif - USHORT uiCount; + HB_USHORT uiCount; if( uiSize == 0 || uiSize > HB_DBS_ALEN ) uiSize = HB_DBS_ALEN; @@ -832,9 +832,9 @@ static void hb_fldStructure( AREAP pArea, USHORT uiField, USHORT uiSize, } } -void hb_tblStructure( AREAP pArea, PHB_ITEM pStruct, USHORT uiSize ) +void hb_tblStructure( AREAP pArea, PHB_ITEM pStruct, HB_USHORT uiSize ) { - USHORT uiFields, uiCount; + HB_USHORT uiFields, uiCount; if( SELF_FIELDCOUNT( pArea, &uiFields ) == HB_SUCCESS ) { @@ -847,7 +847,7 @@ void hb_tblStructure( AREAP pArea, PHB_ITEM pStruct, USHORT uiSize ) } } -static const char * hb_dbTransFieldPos( PHB_ITEM pFields, USHORT uiField ) +static const char * hb_dbTransFieldPos( PHB_ITEM pFields, HB_USHORT uiField ) { const char * szField = NULL; PHB_ITEM pItem; @@ -873,7 +873,7 @@ HB_ERRCODE hb_dbTransStruct( AREAP lpaSource, AREAP lpaDest, LPDBTRANSINFO lpdbTransInfo, PHB_ITEM *pStruct, PHB_ITEM pFields ) { - USHORT uiFields, uiSize, uiCount, uiPosSrc, uiPosDst, uiSizeSrc, uiSizeDst; + HB_USHORT uiFields, uiSize, uiCount, uiPosSrc, uiPosDst, uiSizeSrc, uiSizeDst; HB_ERRCODE errCode; const char * szField; HB_BOOL fAll; @@ -898,7 +898,7 @@ HB_ERRCODE hb_dbTransStruct( AREAP lpaSource, AREAP lpaDest, return HB_FAILURE; if( hb_itemType( pFields ) & HB_IT_ARRAY ) { - uiFields = ( USHORT ) hb_arrayLen( pFields ); + uiFields = ( HB_USHORT ) hb_arrayLen( pFields ); if( uiFields ) uiSize = uiFields; } @@ -937,7 +937,7 @@ HB_ERRCODE hb_dbTransStruct( AREAP lpaSource, AREAP lpaDest, fAll = HB_FALSE; if( uiPosDst ) { - USHORT ui; + HB_USHORT ui; /* check for replicated field names in source area */ for( ui = 0; ui < uiSize; ++ui ) @@ -957,7 +957,7 @@ HB_ERRCODE hb_dbTransStruct( AREAP lpaSource, AREAP lpaDest, else { hb_tblStructure( lpaSource, *pStruct, 0 ); - uiSize = ( USHORT ) hb_arrayLen( *pStruct ); + uiSize = ( HB_USHORT ) hb_arrayLen( *pStruct ); for( uiCount = 0; uiCount < uiSize; ++uiCount ) { lpdbTransInfo->lpTransItems[ uiCount ].uiSource = @@ -1083,7 +1083,7 @@ HB_ERRCODE hb_rddTransRecords( AREAP pArea, AREAP lpaClose = NULL; PHB_ITEM pStruct = NULL; DBTRANSINFO dbTransInfo; - USHORT uiPrevArea, uiCount, uiSwap; + HB_USHORT uiPrevArea, uiCount, uiSwap; HB_ERRCODE errCode; memset( &dbTransInfo, 0, sizeof( DBTRANSINFO ) ); @@ -1199,7 +1199,7 @@ static HB_ERRCODE hb_rddCloseParentRel( AREAP pArea, void * pChildArea ) if( pArea->lpdbRelations ) { LPDBRELINFO * lpdbRelationPtr = &pArea->lpdbRelations; - USHORT uiArea = ( ( AREAP ) pChildArea )->uiArea; + HB_USHORT uiArea = ( ( AREAP ) pChildArea )->uiArea; do { @@ -1235,7 +1235,7 @@ HB_ERRCODE hb_rddCloseAllParentRelations( AREAP pArea ) if( pArea->uiParents > 0 ) { - USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(); + HB_USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(); errCode = hb_rddIterateWorkAreas( hb_rddCloseParentRel, pArea ); hb_rddSelectWorkAreaNumber( uiArea ); } @@ -1260,7 +1260,7 @@ static HB_ERRCODE hb_rddEvalWABlock( AREAP pArea, void * pBlock ) HB_ERRCODE hb_rddEvalWA( PHB_ITEM pBlock ) { HB_ERRCODE errCode; - USHORT uiArea; + HB_USHORT uiArea; HB_TRACE(HB_TR_DEBUG, ("hb_rddEvalWA(%p)", pBlock)); diff --git a/harbour/src/rdd/workarea.c b/harbour/src/rdd/workarea.c index 3ccb56e570..dbb72efab5 100644 --- a/harbour/src/rdd/workarea.c +++ b/harbour/src/rdd/workarea.c @@ -273,7 +273,7 @@ static HB_ERRCODE hb_waAddField( AREAP pArea, LPDBFIELDINFO pFieldInfo ) */ static HB_ERRCODE hb_waCreateFields( AREAP pArea, PHB_ITEM pStruct ) { - USHORT uiItems, uiCount, uiLen, uiDec; + HB_USHORT uiItems, uiCount, uiLen, uiDec; HB_ERRCODE errCode = HB_SUCCESS; DBFIELDINFO pFieldInfo; PHB_ITEM pFieldDesc; @@ -281,7 +281,7 @@ static HB_ERRCODE hb_waCreateFields( AREAP pArea, PHB_ITEM pStruct ) HB_TRACE(HB_TR_DEBUG, ("hb_waCreateFields(%p, %p)", pArea, pStruct)); - uiItems = ( USHORT ) hb_arrayLen( pStruct ); + uiItems = ( HB_USHORT ) hb_arrayLen( pStruct ); if( SELF_SETFIELDEXTENT( pArea, uiItems ) != HB_SUCCESS ) return HB_FAILURE; @@ -293,11 +293,11 @@ static HB_ERRCODE hb_waCreateFields( AREAP pArea, PHB_ITEM pStruct ) iData = hb_arrayGetNI( pFieldDesc, DBS_LEN ); if( iData < 0 ) iData = 0; - uiLen = pFieldInfo.uiLen = ( USHORT ) iData; + uiLen = pFieldInfo.uiLen = ( HB_USHORT ) iData; iData = hb_arrayGetNI( pFieldDesc, DBS_DEC ); if( iData < 0 ) iData = 0; - uiDec = ( USHORT ) iData; + uiDec = ( HB_USHORT ) iData; pFieldInfo.uiDec = 0; #ifdef DBS_FLAG pFieldInfo.uiFlags = hb_arrayGetNI( pFieldDesc, DBS_FLAG ); @@ -466,7 +466,7 @@ static HB_ERRCODE hb_waCreateFields( AREAP pArea, PHB_ITEM pStruct ) /* * Determine the number of fields in the WorkArea. */ -static HB_ERRCODE hb_waFieldCount( AREAP pArea, USHORT * uiFields ) +static HB_ERRCODE hb_waFieldCount( AREAP pArea, HB_USHORT * uiFields ) { HB_TRACE(HB_TR_DEBUG, ("hb_waFieldCount(%p, %p)", pArea, uiFields)); @@ -477,7 +477,7 @@ static HB_ERRCODE hb_waFieldCount( AREAP pArea, USHORT * uiFields ) /* * Retrieve information about a field. */ -static HB_ERRCODE hb_waFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ITEM pItem ) +static HB_ERRCODE hb_waFieldInfo( AREAP pArea, HB_USHORT uiIndex, HB_USHORT uiType, PHB_ITEM pItem ) { LPFIELD pField; @@ -606,7 +606,7 @@ static HB_ERRCODE hb_waFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiType, PH /* * Determine the name associated with a field number. */ -static HB_ERRCODE hb_waFieldName( AREAP pArea, USHORT uiIndex, char * szName ) +static HB_ERRCODE hb_waFieldName( AREAP pArea, HB_USHORT uiIndex, char * szName ) { LPFIELD pField; @@ -624,7 +624,7 @@ static HB_ERRCODE hb_waFieldName( AREAP pArea, USHORT uiIndex, char * szName ) /* * Establish the extent of the array of fields for a WorkArea. */ -static HB_ERRCODE hb_waSetFieldExtent( AREAP pArea, USHORT uiFieldExtent ) +static HB_ERRCODE hb_waSetFieldExtent( AREAP pArea, HB_USHORT uiFieldExtent ) { HB_TRACE(HB_TR_DEBUG, ("hb_waSetFieldExtent(%p, %hu)", pArea, uiFieldExtent)); @@ -679,7 +679,7 @@ static HB_ERRCODE hb_waClose( AREAP pArea ) /* * Retrieve information about the current driver. */ -static HB_ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE hb_waInfo( AREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_waInfo(%p, %hu, %p)", pArea, uiIndex, pItem)); @@ -718,7 +718,7 @@ static HB_ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) case DBI_CHILDCOUNT: { LPDBRELINFO lpdbRelations = pArea->lpdbRelations; - USHORT uiCount = 0; + HB_USHORT uiCount = 0; while( lpdbRelations ) { uiCount++; @@ -822,7 +822,7 @@ static HB_ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) * Retrieve information about the current order that SELF could not. * Called by SELF_ORDINFO if uiIndex is not supported. */ -static HB_ERRCODE hb_waOrderInfo( AREAP pArea, USHORT index, LPDBORDERINFO pInfo ) +static HB_ERRCODE hb_waOrderInfo( AREAP pArea, HB_USHORT index, LPDBORDERINFO pInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_waOrderInfo(%p, %hu, %p)", pArea, index, pInfo)); @@ -931,7 +931,7 @@ static HB_ERRCODE hb_waRelease( AREAP pArea ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_waStructSize( AREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_waStructSize( AREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_waStrucSize(%p, %p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -1216,7 +1216,7 @@ static HB_ERRCODE hb_waTransRec( AREAP pArea, LPDBTRANSINFO pTransInfo ) { LPDBTRANSITEM pTransItem; PHB_ITEM pItem; - USHORT uiCount; + HB_USHORT uiCount; /* Append a new record */ errCode = SELF_APPEND( ( AREAP ) pTransInfo->lpaDest, HB_TRUE ); @@ -1350,10 +1350,10 @@ static HB_ERRCODE hb_waClearRel( AREAP pArea ) /* * Obtain the workarea number of the specified relation. */ -static HB_ERRCODE hb_waRelArea( AREAP pArea, USHORT uiRelNo, USHORT * pRelArea ) +static HB_ERRCODE hb_waRelArea( AREAP pArea, HB_USHORT uiRelNo, HB_USHORT * pRelArea ) { LPDBRELINFO lpdbRelations; - USHORT uiIndex = 1; + HB_USHORT uiIndex = 1; HB_TRACE(HB_TR_DEBUG, ("hb_waRelArea(%p, %hu, %p)", pArea, uiRelNo, pRelArea)); @@ -1445,10 +1445,10 @@ static HB_ERRCODE hb_waRelEval( AREAP pArea, LPDBRELINFO pRelInfo ) /* * Obtain the character expression of the specified relation. */ -static HB_ERRCODE hb_waRelText( AREAP pArea, USHORT uiRelNo, PHB_ITEM pExpr ) +static HB_ERRCODE hb_waRelText( AREAP pArea, HB_USHORT uiRelNo, PHB_ITEM pExpr ) { LPDBRELINFO lpdbRelations; - USHORT uiIndex = 1; + HB_USHORT uiIndex = 1; HB_TRACE(HB_TR_DEBUG, ("hb_waRelText(%p, %hu, %p)", pArea, uiRelNo, pExpr)); @@ -1720,7 +1720,7 @@ static HB_ERRCODE hb_waEvalBlock( AREAP pArea, PHB_ITEM pBlock ) /* * RDD info */ -static HB_ERRCODE hb_waRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnection, PHB_ITEM pItem ) +static HB_ERRCODE hb_waRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnection, PHB_ITEM pItem ) { HB_BOOL fResult; int iResult; @@ -2028,22 +2028,22 @@ static const RDDFUNCS waTable = /* common for all threads list of registered RDDs */ static HB_CRITICAL_NEW( s_rddMtx ); static LPRDDNODE * s_RddList = NULL; /* Registered RDDs pool */ -static USHORT s_uiRddMax = 0; /* Size of RDD pool */ -static USHORT s_uiRddCount = 0; /* Number of registered RDD */ +static HB_USHORT s_uiRddMax = 0; /* Size of RDD pool */ +static HB_USHORT s_uiRddCount = 0; /* Number of registered RDD */ /* * Get RDD node poionter */ -LPRDDNODE hb_rddGetNode( USHORT uiNode ) +LPRDDNODE hb_rddGetNode( HB_USHORT uiNode ) { HB_TRACE(HB_TR_DEBUG, ("hb_rddGetNode(%hu)", uiNode)); return uiNode < s_uiRddCount ? s_RddList[ uiNode ] : NULL; } -PHB_ITEM hb_rddList( USHORT uiType ) +PHB_ITEM hb_rddList( HB_USHORT uiType ) { - USHORT uiCount, uiIndex, uiRdds; + HB_USHORT uiCount, uiIndex, uiRdds; PHB_ITEM pRddArray; LPRDDNODE pNode; @@ -2067,9 +2067,9 @@ PHB_ITEM hb_rddList( USHORT uiType ) /* * Find a RDD node. */ -LPRDDNODE hb_rddFindNode( const char * szDriver, USHORT * uiIndex ) +LPRDDNODE hb_rddFindNode( const char * szDriver, HB_USHORT * uiIndex ) { - USHORT uiCount; + HB_USHORT uiCount; HB_TRACE(HB_TR_DEBUG, ("hb_rddFindNode(%s, %p)", szDriver, uiIndex)); @@ -2093,7 +2093,7 @@ LPRDDNODE hb_rddFindNode( const char * szDriver, USHORT * uiIndex ) */ void hb_rddShutDown( void ) { - USHORT uiCount; + HB_USHORT uiCount; HB_TRACE(HB_TR_DEBUG, ("hb_rddShutDown()")); @@ -2118,12 +2118,12 @@ void hb_rddShutDown( void ) /* * Register a RDD driver. */ -int hb_rddRegister( const char * szDriver, USHORT uiType ) +int hb_rddRegister( const char * szDriver, HB_USHORT uiType ) { LPRDDNODE pRddNewNode; PHB_DYNS pGetFuncTable; char szGetFuncTable[ HB_RDD_MAX_DRIVERNAME_LEN + 14 ]; - USHORT uiFunctions; + HB_USHORT uiFunctions; int iResult; HB_TRACE(HB_TR_DEBUG, ("hb_rddRegister(%s, %hu)", szDriver, uiType)); @@ -2196,7 +2196,7 @@ int hb_rddRegister( const char * szDriver, USHORT uiType ) HB_ERRCODE hb_rddInherit( RDDFUNCS * pTable, const RDDFUNCS * pSubTable, RDDFUNCS * pSuperTable, const char * szDrvName ) { LPRDDNODE pRddNode; - USHORT uiCount; + HB_USHORT uiCount; DBENTRYP_V * pFunction, * pSubFunction; HB_TRACE(HB_TR_DEBUG, ("hb_rddInherit(%p, %p, %p, %s)", pTable, pSubTable, pSuperTable, szDrvName)); diff --git a/harbour/src/rtl/console.c b/harbour/src/rtl/console.c index 7e4ace876e..166749d739 100644 --- a/harbour/src/rtl/console.c +++ b/harbour/src/rtl/console.c @@ -366,13 +366,13 @@ HB_FUNC( QOUT ) { char * pBuf = ( char * ) hb_xgrab( pPrnPos->col ); memset( pBuf, ' ', pPrnPos->col ); - hb_fsWrite( hFile, pBuf, ( USHORT ) pPrnPos->col ); + hb_fsWrite( hFile, pBuf, ( HB_USHORT ) pPrnPos->col ); hb_xfree( pBuf ); } else { memset( buf, ' ', pPrnPos->col ); - hb_fsWrite( hFile, buf, ( USHORT ) pPrnPos->col ); + hb_fsWrite( hFile, buf, ( HB_USHORT ) pPrnPos->col ); } } } @@ -443,7 +443,7 @@ static void hb_conDevPos( int iRow, int iCol ) { if( iPtr + s_iCrLfLen > ( int ) sizeof( buf ) ) { - hb_fsWrite( hFile, buf, ( USHORT ) iPtr ); + hb_fsWrite( hFile, buf, ( HB_USHORT ) iPtr ); iPtr = 0; } memcpy( &buf[ iPtr ], s_szCrLf, s_iCrLfLen ); @@ -462,7 +462,7 @@ static void hb_conDevPos( int iRow, int iCol ) { if( iPtr == ( int ) sizeof( buf ) ) { - hb_fsWrite( hFile, buf, ( USHORT ) iPtr ); + hb_fsWrite( hFile, buf, ( HB_USHORT ) iPtr ); iPtr = 0; } buf[ iPtr++ ] = ' '; @@ -470,7 +470,7 @@ static void hb_conDevPos( int iRow, int iCol ) } if( iPtr ) - hb_fsWrite( hFile, buf, ( USHORT ) iPtr ); + hb_fsWrite( hFile, buf, ( HB_USHORT ) iPtr ); } } else diff --git a/harbour/src/rtl/copyfile.c b/harbour/src/rtl/copyfile.c index 6f90801380..a4d5d785a6 100644 --- a/harbour/src/rtl/copyfile.c +++ b/harbour/src/rtl/copyfile.c @@ -110,7 +110,7 @@ static HB_BOOL hb_copyfile( const char * szSource, const char * szDest ) int iSuccess = fstat( fhndSource, &struFileInfo ); #endif void * buffer; - USHORT usRead; + HB_USHORT usRead; buffer = hb_xgrab( BUFFER_SIZE ); diff --git a/harbour/src/rtl/disksphb.c b/harbour/src/rtl/disksphb.c index 8f693df34d..de39771583 100644 --- a/harbour/src/rtl/disksphb.c +++ b/harbour/src/rtl/disksphb.c @@ -71,7 +71,7 @@ HB_FUNC( HB_DISKSPACE ) { char szPathBuf[ 4 ]; const char * szPath = hb_parc( 1 ); - USHORT uiType = HB_ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : HB_DISK_AVAIL; + HB_USHORT uiType = HB_ISNUM( 2 ) ? ( HB_USHORT ) hb_parni( 2 ) : HB_DISK_AVAIL; double dSpace = 0.0; if( uiType > HB_DISK_TOTAL ) @@ -98,11 +98,11 @@ HB_FUNC( HB_DISKSPACE ) #if defined( HB_OS_DOS ) { - USHORT uiDrive = szPath[ 1 ] != HB_OS_DRIVE_DELIM_CHR ? 0 : - ( szPath[ 0 ] >= 'A' && szPath[ 0 ] <= 'Z' ? - szPath[ 0 ] - 'A' + 1 : - ( szPath[ 0 ] >= 'a' && szPath[ 0 ] <= 'z' ? - szPath[ 0 ] - 'a' + 1 : 0 ) ); + HB_USHORT uiDrive = szPath[ 1 ] != HB_OS_DRIVE_DELIM_CHR ? 0 : + ( szPath[ 0 ] >= 'A' && szPath[ 0 ] <= 'Z' ? + szPath[ 0 ] - 'A' + 1 : + ( szPath[ 0 ] >= 'a' && szPath[ 0 ] <= 'z' ? + szPath[ 0 ] - 'a' + 1 : 0 ) ); for( ;; ) { union REGS regs; @@ -113,10 +113,10 @@ HB_FUNC( HB_DISKSPACE ) if( regs.HB_XREGS.ax != 0xFFFF ) { - USHORT uiClusterTotal = regs.HB_XREGS.dx; - USHORT uiClusterFree = regs.HB_XREGS.bx; - USHORT uiSecPerCluster = regs.HB_XREGS.ax; - USHORT uiSectorSize = regs.HB_XREGS.cx; + HB_USHORT uiClusterTotal = regs.HB_XREGS.dx; + HB_USHORT uiClusterFree = regs.HB_XREGS.bx; + HB_USHORT uiSecPerCluster = regs.HB_XREGS.ax; + HB_USHORT uiSectorSize = regs.HB_XREGS.cx; switch( uiType ) { diff --git a/harbour/src/rtl/do.c b/harbour/src/rtl/do.c index 14d45bab87..2d94671f55 100644 --- a/harbour/src/rtl/do.c +++ b/harbour/src/rtl/do.c @@ -65,7 +65,7 @@ HB_FUNC( DO ) { - USHORT uiPCount = ( USHORT ) hb_pcount(); + HB_USHORT uiPCount = ( HB_USHORT ) hb_pcount(); PHB_ITEM pSelf = NULL; if( uiPCount > 0 ) @@ -96,7 +96,7 @@ HB_FUNC( DO ) if( uiPCount > 0 ) { - USHORT uiParam; + HB_USHORT uiParam; if( pSelf ) hb_vmPush( pSelf ); @@ -107,9 +107,9 @@ HB_FUNC( DO ) hb_vmPush( hb_stackItemFromBase( uiParam ) ); if( pSelf ) - hb_vmSend( ( USHORT ) ( uiPCount - 1 ) ); + hb_vmSend( ( HB_USHORT ) ( uiPCount - 1 ) ); else - hb_vmProc( ( USHORT ) ( uiPCount - 1 ) ); + hb_vmProc( ( HB_USHORT ) ( uiPCount - 1 ) ); } else hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/src/rtl/errapi.c b/harbour/src/rtl/errapi.c index ff8c3cc871..85e2c4b1f2 100644 --- a/harbour/src/rtl/errapi.c +++ b/harbour/src/rtl/errapi.c @@ -206,9 +206,9 @@ HB_FUNC_STATIC( _CANDEFAULT ) HB_BOOL fCan = hb_parl( 1 ); if( fCan ) - hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) | EF_CANDEFAULT ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( hb_errGetFlags( pError ) | EF_CANDEFAULT ) ); else - hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) & ~EF_CANDEFAULT ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( hb_errGetFlags( pError ) & ~EF_CANDEFAULT ) ); hb_retl( fCan ); } @@ -228,9 +228,9 @@ HB_FUNC_STATIC( _CANRETRY ) HB_BOOL fCan = hb_parl( 1 ); if( fCan ) - hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) | EF_CANRETRY ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( hb_errGetFlags( pError ) | EF_CANRETRY ) ); else - hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) & ~EF_CANRETRY ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( hb_errGetFlags( pError ) & ~EF_CANRETRY ) ); hb_retl( fCan ); } @@ -250,9 +250,9 @@ HB_FUNC_STATIC( _CANSUBST ) HB_BOOL fCan = hb_parl( 1 ); if( fCan ) - hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) | EF_CANSUBSTITUTE ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( hb_errGetFlags( pError ) | EF_CANSUBSTITUTE ) ); else - hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) & ~EF_CANSUBSTITUTE ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( hb_errGetFlags( pError ) & ~EF_CANSUBSTITUTE ) ); hb_retl( fCan ); } @@ -385,7 +385,7 @@ HB_FUNC_STATIC( _SEVERITY ) int iValue; if( hb_errGetNumCode( &iValue, "SEVERITY" ) ) - hb_errPutSeverity( hb_stackSelfItem(), ( USHORT ) iValue ); + hb_errPutSeverity( hb_stackSelfItem(), ( HB_USHORT ) iValue ); hb_retni( iValue ); } @@ -401,15 +401,15 @@ HB_FUNC_STATIC( _TRIES ) int iValue; if( hb_errGetNumCode( &iValue, "TRIES" ) ) - hb_errPutTries( hb_stackSelfItem(), ( USHORT ) iValue ); + hb_errPutTries( hb_stackSelfItem(), ( HB_USHORT ) iValue ); hb_retni( iValue ); } -static USHORT hb_errClassCreate( void ) +static HB_USHORT hb_errClassCreate( void ) { - USHORT usClassH = hb_clsCreate( HB_TERROR_IVARCOUNT, "ERROR" ); + HB_USHORT usClassH = hb_clsCreate( HB_TERROR_IVARCOUNT, "ERROR" ); hb_clsAdd( usClassH, "ARGS" , HB_FUNCNAME( ARGS ) ); hb_clsAdd( usClassH, "_ARGS" , HB_FUNCNAME( _ARGS ) ); @@ -536,16 +536,16 @@ PHB_ITEM hb_errNew( void ) return hb_arrayClone( s_pError ); } -USHORT hb_errLaunch( PHB_ITEM pError ) +HB_USHORT hb_errLaunch( PHB_ITEM pError ) { - USHORT uiAction = E_DEFAULT; /* Needed to avoid GCC -O2 warning */ + HB_USHORT uiAction = E_DEFAULT; /* Needed to avoid GCC -O2 warning */ HB_TRACE(HB_TR_DEBUG, ("hb_errLaunch(%p)", pError)); if( pError ) { PHB_ERRDATA pErrData = ( PHB_ERRDATA ) hb_stackGetTSD( &s_errData ); - USHORT uiFlags = hb_errGetFlags( pError ); + HB_USHORT uiFlags = hb_errGetFlags( pError ); PHB_ITEM pResult; /* Check if we have a valid error handler */ @@ -564,7 +564,7 @@ USHORT hb_errLaunch( PHB_ITEM pError ) /* Add one try to the counter. */ if( uiFlags & EF_CANRETRY ) - hb_errPutTries( pError, ( USHORT ) ( hb_errGetTries( pError ) + 1 ) ); + hb_errPutTries( pError, ( HB_USHORT ) ( hb_errGetTries( pError ) + 1 ) ); if( pErrData->errorHandler ) { @@ -640,7 +640,7 @@ PHB_ITEM hb_errLaunchSubst( PHB_ITEM pError ) if( pError ) { PHB_ERRDATA pErrData = ( PHB_ERRDATA ) hb_stackGetTSD( &s_errData ); - USHORT uiFlags = hb_errGetFlags( pError ); + HB_USHORT uiFlags = hb_errGetFlags( pError ); /* Check if we have a valid error handler */ if( ! pErrData->errorBlock || hb_itemType( pErrData->errorBlock ) != HB_IT_BLOCK ) @@ -658,7 +658,7 @@ PHB_ITEM hb_errLaunchSubst( PHB_ITEM pError ) /* Add one try to the counter. */ if( uiFlags & EF_CANRETRY ) - hb_errPutTries( pError, ( USHORT ) ( hb_errGetTries( pError ) + 1 ) ); + hb_errPutTries( pError, ( HB_USHORT ) ( hb_errGetTries( pError ) + 1 ) ); if( pErrData->errorHandler ) { @@ -823,14 +823,14 @@ PHB_ITEM hb_errPutOsCode( PHB_ITEM pError, HB_ERRCODE errOsCode ) return pError; } -USHORT hb_errGetSeverity( PHB_ITEM pError ) +HB_USHORT hb_errGetSeverity( PHB_ITEM pError ) { HB_TRACE(HB_TR_DEBUG, ("hb_errGetSeverity(%p)", pError)); - return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_SEVERITY ); + return ( HB_USHORT ) hb_arrayGetNI( pError, HB_TERROR_SEVERITY ); } -PHB_ITEM hb_errPutSeverity( PHB_ITEM pError, USHORT uiSeverity ) +PHB_ITEM hb_errPutSeverity( PHB_ITEM pError, HB_USHORT uiSeverity ) { HB_TRACE(HB_TR_DEBUG, ("hb_errPutSeverity(%p, %hu)", pError, uiSeverity)); @@ -871,14 +871,14 @@ PHB_ITEM hb_errPutSubSystem( PHB_ITEM pError, const char * szSubSystem ) return pError; } -USHORT hb_errGetTries( PHB_ITEM pError ) +HB_USHORT hb_errGetTries( PHB_ITEM pError ) { HB_TRACE(HB_TR_DEBUG, ("hb_errGetTries(%p)", pError)); - return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_TRIES ); + return ( HB_USHORT ) hb_arrayGetNI( pError, HB_TERROR_TRIES ); } -PHB_ITEM hb_errPutTries( PHB_ITEM pError, USHORT uiTries ) +PHB_ITEM hb_errPutTries( PHB_ITEM pError, HB_USHORT uiTries ) { HB_TRACE(HB_TR_DEBUG, ("hb_errPutTries(%p, %hu)", pError, uiTries)); @@ -887,14 +887,14 @@ PHB_ITEM hb_errPutTries( PHB_ITEM pError, USHORT uiTries ) return pError; } -USHORT hb_errGetFlags( PHB_ITEM pError ) +HB_USHORT hb_errGetFlags( PHB_ITEM pError ) { HB_TRACE(HB_TR_DEBUG, ("hb_errGetFlags(%p)", pError)); - return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_FLAGS ); + return ( HB_USHORT ) hb_arrayGetNI( pError, HB_TERROR_FLAGS ); } -PHB_ITEM hb_errPutFlags( PHB_ITEM pError, USHORT uiFlags ) +PHB_ITEM hb_errPutFlags( PHB_ITEM pError, HB_USHORT uiFlags ) { HB_TRACE(HB_TR_DEBUG, ("hb_errPutFlags(%p, %hu)", pError, uiFlags)); @@ -933,14 +933,14 @@ PHB_ITEM hb_errPutArgs( PHB_ITEM pError, ULONG ulArgCount, ... ) /* Wrappers for hb_errLaunch() */ PHB_ITEM hb_errRT_New( - USHORT uiSeverity, + HB_USHORT uiSeverity, const char * szSubSystem, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode, - USHORT uiFlags ) + HB_USHORT uiFlags ) { PHB_ITEM pError = hb_errNew(); @@ -957,14 +957,14 @@ PHB_ITEM hb_errRT_New( } PHB_ITEM hb_errRT_New_Subst( - USHORT uiSeverity, + HB_USHORT uiSeverity, const char * szSubSystem, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode, - USHORT uiFlags ) + HB_USHORT uiFlags ) { PHB_ITEM pError = hb_errNew(); @@ -975,7 +975,7 @@ PHB_ITEM hb_errRT_New_Subst( hb_errPutDescription( pError, szDescription ? szDescription : hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + errGenCode ) ); hb_errPutOperation( pError, szOperation ); hb_errPutOsCode( pError, errOsCode ); - hb_errPutFlags( pError, ( USHORT ) ( uiFlags | EF_CANSUBSTITUTE ) ); + hb_errPutFlags( pError, ( HB_USHORT ) ( uiFlags | EF_CANSUBSTITUTE ) ); return pError; } @@ -1047,9 +1047,9 @@ HB_FUNC( __ERRRT_SBASE ) hb_param( 6, HB_IT_ANY ) ); } -USHORT hb_errRT_BASE( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... ) +HB_USHORT hb_errRT_BASE( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; PHB_ITEM pArray; @@ -1108,9 +1108,9 @@ USHORT hb_errRT_BASE( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * return uiAction; } -USHORT hb_errRT_BASE_Ext1( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode, USHORT uiFlags, ULONG ulArgCount, ... ) +HB_USHORT hb_errRT_BASE_Ext1( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode, HB_USHORT uiFlags, ULONG ulArgCount, ... ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; PHB_ITEM pArray; @@ -1275,9 +1275,9 @@ void hb_errRT_BASE_SubstR( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const c hb_errRelease( pError ); } -USHORT hb_errRT_TERM( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode, USHORT uiFlags ) +HB_USHORT hb_errRT_TERM( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode, HB_USHORT uiFlags ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError = hb_errRT_New( ES_ERROR, HB_ERR_SS_TERMINAL, errGenCode, errSubCode, szDescription, szOperation, errOsCode, uiFlags ); @@ -1288,9 +1288,9 @@ USHORT hb_errRT_TERM( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * return uiAction; } -USHORT hb_errRT_DBCMD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation ) +HB_USHORT hb_errRT_DBCMD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError = hb_errRT_New( ES_ERROR, HB_ERR_SS_DBCMD, errGenCode, errSubCode, szDescription, szOperation, 0, EF_NONE ); @@ -1301,9 +1301,9 @@ USHORT hb_errRT_DBCMD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char return uiAction; } -USHORT hb_errRT_DBCMD_Ext( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, USHORT uiFlags ) +HB_USHORT hb_errRT_DBCMD_Ext( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_USHORT uiFlags ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; pError = hb_errRT_New( ES_ERROR, HB_ERR_SS_DBCMD, errGenCode, errSubCode, szDescription, szOperation, 0, uiFlags ); diff --git a/harbour/src/rtl/errintlo.c b/harbour/src/rtl/errintlo.c index a4d5a5e87e..fe9a2d7206 100644 --- a/harbour/src/rtl/errintlo.c +++ b/harbour/src/rtl/errintlo.c @@ -66,7 +66,7 @@ void hb_errInternalRaw( HB_ERRCODE errCode, const char * szText, const char * sz char file[ HB_PATH_MAX ]; const char * szFile, * szInfo; HB_BOOL fStack, fLang; - USHORT uiLine; + HB_USHORT uiLine; int iLevel; FILE * hLog; diff --git a/harbour/src/rtl/filebuf.c b/harbour/src/rtl/filebuf.c index 0744cdd1e4..b471942e3c 100644 --- a/harbour/src/rtl/filebuf.c +++ b/harbour/src/rtl/filebuf.c @@ -314,7 +314,7 @@ static HB_BOOL s_fileAccept( const char * pFilename ) } static PHB_FILE s_fileExtOpen( const char * pFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths, + HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ) { PHB_FILE pFile = NULL; @@ -490,7 +490,7 @@ static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, fResult = hb_fileUnlock( pFile, &fLockFS, ulStart, ulLen ); hb_threadLeaveCriticalSection( &s_fileMtx ); if( fLockFS ) - hb_fsLockLarge( pFile->hFile, ulStart, ulLen, ( USHORT ) iType ); + hb_fsLockLarge( pFile->hFile, ulStart, ulLen, ( HB_USHORT ) iType ); else hb_fsSetError( fResult ? 0 : 33 ); } @@ -501,7 +501,7 @@ static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, hb_threadLeaveCriticalSection( &s_fileMtx ); if( fLockFS ) { - fResult = hb_fsLockLarge( pFile->hFile, ulStart, ulLen, ( USHORT ) iType ); + fResult = hb_fsLockLarge( pFile->hFile, ulStart, ulLen, ( HB_USHORT ) iType ); if( !fResult ) { hb_threadEnterCriticalSection( &s_fileMtx ); @@ -645,7 +645,7 @@ HB_BOOL hb_fileRename( const char * pFilename, const char * pszNewName ) } PHB_FILE hb_fileExtOpen( const char * pFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths, + HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ) { int i = s_iFileTypes; diff --git a/harbour/src/rtl/filesys.c b/harbour/src/rtl/filesys.c index e00a163ffb..98e924dec8 100644 --- a/harbour/src/rtl/filesys.c +++ b/harbour/src/rtl/filesys.c @@ -320,7 +320,7 @@ static HANDLE DosToWinHandle( HB_FHANDLE fHandle ) return ( HANDLE ) fHandle; } -static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, +static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, HB_USHORT uiFlags, DWORD *dwMode, DWORD *dwShare, DWORD *dwCreat, DWORD *dwAttr ) { @@ -396,7 +396,7 @@ static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags #else -static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, +static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, HB_USHORT uiFlags, int *flags, unsigned *mode, int *share, int *attr ) { @@ -510,10 +510,10 @@ static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags } #endif -static USHORT convert_seek_flags( USHORT uiFlags ) +static HB_USHORT convert_seek_flags( HB_USHORT uiFlags ) { /* by default FS_SET is set */ - USHORT result_flags = SEEK_SET; + HB_USHORT result_flags = SEEK_SET; HB_TRACE(HB_TR_DEBUG, ("convert_seek_flags(%hu)", uiFlags)); @@ -664,7 +664,7 @@ HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode ) return hFileHandle; } -HB_FHANDLE hb_fsOpen( const char * pFilename, USHORT uiFlags ) +HB_FHANDLE hb_fsOpen( const char * pFilename, HB_USHORT uiFlags ) { HB_FHANDLE hFileHandle; char * pszFree; @@ -790,7 +790,7 @@ HB_FHANDLE hb_fsCreate( const char * pFilename, HB_FATTR ulAttr ) [vszakats] */ -HB_FHANDLE hb_fsCreateEx( const char * pFilename, HB_FATTR ulAttr, USHORT uiFlags ) +HB_FHANDLE hb_fsCreateEx( const char * pFilename, HB_FATTR ulAttr, HB_USHORT uiFlags ) { HB_FHANDLE hFileHandle; char * pszFree; @@ -1409,9 +1409,9 @@ HB_BOOL hb_fsSetAttr( const char * pszFileName, HB_FATTR ulAttr ) return fResult; } -USHORT hb_fsRead( HB_FHANDLE hFileHandle, void * pBuff, USHORT uiCount ) +HB_USHORT hb_fsRead( HB_FHANDLE hFileHandle, void * pBuff, HB_USHORT uiCount ) { - USHORT uiRead; + HB_USHORT uiRead; HB_TRACE(HB_TR_DEBUG, ("hb_fsRead(%p, %p, %hu)", ( void * ) ( HB_PTRDIFF ) hFileHandle, pBuff, uiCount)); @@ -1427,16 +1427,16 @@ USHORT hb_fsRead( HB_FHANDLE hFileHandle, void * pBuff, USHORT uiCount ) hb_fsSetIOError( fResult, 0 ); hb_vmLock(); - uiRead = fResult ? ( USHORT ) dwRead : 0; + uiRead = fResult ? ( HB_USHORT ) dwRead : 0; } #else hb_vmUnlock(); uiRead = read( hFileHandle, pBuff, uiCount ); - hb_fsSetIOError( uiRead != ( USHORT ) -1, 0 ); + hb_fsSetIOError( uiRead != ( HB_USHORT ) -1, 0 ); hb_vmLock(); #endif - if( uiRead == ( USHORT ) -1 ) + if( uiRead == ( HB_USHORT ) -1 ) uiRead = 0; #else @@ -1449,9 +1449,9 @@ USHORT hb_fsRead( HB_FHANDLE hFileHandle, void * pBuff, USHORT uiCount ) return uiRead; } -USHORT hb_fsWrite( HB_FHANDLE hFileHandle, const void * pBuff, USHORT uiCount ) +HB_USHORT hb_fsWrite( HB_FHANDLE hFileHandle, const void * pBuff, HB_USHORT uiCount ) { - USHORT uiWritten; + HB_USHORT uiWritten; HB_TRACE(HB_TR_DEBUG, ("hb_fsWrite(%p, %p, %hu)", ( void * ) ( HB_PTRDIFF ) hFileHandle, pBuff, uiCount)); @@ -1475,15 +1475,15 @@ USHORT hb_fsWrite( HB_FHANDLE hFileHandle, const void * pBuff, USHORT uiCount ) hb_fsSetIOError( fResult, 0 ); hb_vmLock(); - uiWritten = fResult ? ( USHORT ) dwWritten : 0; + uiWritten = fResult ? ( HB_USHORT ) dwWritten : 0; } #else if( uiCount ) { hb_vmUnlock(); uiWritten = write( hFileHandle, pBuff, uiCount ); - hb_fsSetIOError( uiWritten != ( USHORT ) -1, 0 ); - if( uiWritten == ( USHORT ) -1 ) + hb_fsSetIOError( uiWritten != ( HB_USHORT ) -1, 0 ); + if( uiWritten == ( HB_USHORT ) -1 ) uiWritten = 0; hb_vmLock(); } @@ -1536,8 +1536,8 @@ HB_SIZE hb_fsReadLarge( HB_FHANDLE hFileHandle, void * pBuff, HB_SIZE ulCount ) #else { HB_SIZE ulLeftToRead = ulCount; - USHORT uiToRead; - USHORT uiRead; + HB_USHORT uiToRead; + HB_USHORT uiRead; void * pPtr = pBuff; ulRead = 0; @@ -1553,7 +1553,7 @@ HB_SIZE hb_fsReadLarge( HB_FHANDLE hFileHandle, void * pBuff, HB_SIZE ulCount ) } else { - uiToRead = ( USHORT ) ulLeftToRead; + uiToRead = ( HB_USHORT ) ulLeftToRead; ulLeftToRead = 0; } @@ -1565,7 +1565,7 @@ HB_SIZE hb_fsReadLarge( HB_FHANDLE hFileHandle, void * pBuff, HB_SIZE ulCount ) if( uiRead == 0 ) break; - if( uiRead == ( USHORT ) -1 ) + if( uiRead == ( HB_USHORT ) -1 ) { uiRead = 0; break; @@ -1625,8 +1625,8 @@ HB_SIZE hb_fsWriteLarge( HB_FHANDLE hFileHandle, const void * pBuff, HB_SIZE ulC #else { HB_SIZE ulLeftToWrite = ulCount; - USHORT uiToWrite; - USHORT uiWritten; + HB_USHORT uiToWrite; + HB_USHORT uiWritten; const void * pPtr = pBuff; ulWritten = 0; @@ -1642,7 +1642,7 @@ HB_SIZE hb_fsWriteLarge( HB_FHANDLE hFileHandle, const void * pBuff, HB_SIZE ulC } else { - uiToWrite = ( USHORT ) ulLeftToWrite; + uiToWrite = ( HB_USHORT ) ulLeftToWrite; ulLeftToWrite = 0; } @@ -1655,7 +1655,7 @@ HB_SIZE hb_fsWriteLarge( HB_FHANDLE hFileHandle, const void * pBuff, HB_SIZE ulC if( uiWritten == 0 ) break; - if( uiWritten == ( USHORT ) -1 ) + if( uiWritten == ( HB_USHORT ) -1 ) { uiWritten = 0; break; @@ -2013,7 +2013,7 @@ void hb_fsCommit( HB_FHANDLE hFileHandle ) } HB_BOOL hb_fsLock( HB_FHANDLE hFileHandle, HB_SIZE ulStart, - HB_SIZE ulLength, USHORT uiMode ) + HB_SIZE ulLength, HB_USHORT uiMode ) { HB_BOOL fResult; @@ -2217,7 +2217,7 @@ HB_BOOL hb_fsLock( HB_FHANDLE hFileHandle, HB_SIZE ulStart, } HB_BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, - HB_FOFFSET ulLength, USHORT uiMode ) + HB_FOFFSET ulLength, HB_USHORT uiMode ) { HB_BOOL fResult; @@ -2330,7 +2330,7 @@ HB_BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, return fResult; } -HB_SIZE hb_fsSeek( HB_FHANDLE hFileHandle, HB_ISIZ lOffset, USHORT uiFlags ) +HB_SIZE hb_fsSeek( HB_FHANDLE hFileHandle, HB_ISIZ lOffset, HB_USHORT uiFlags ) { HB_SIZE ulPos; @@ -2338,7 +2338,7 @@ HB_SIZE hb_fsSeek( HB_FHANDLE hFileHandle, HB_ISIZ lOffset, USHORT uiFlags ) #if defined( HB_FS_FILE_IO ) { - USHORT Flags = convert_seek_flags( uiFlags ); + HB_USHORT Flags = convert_seek_flags( uiFlags ); hb_vmUnlock(); #if defined( HB_OS_OS2 ) @@ -2412,7 +2412,7 @@ HB_SIZE hb_fsSeek( HB_FHANDLE hFileHandle, HB_ISIZ lOffset, USHORT uiFlags ) return ulPos; } -HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT uiFlags ) +HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, HB_USHORT uiFlags ) { HB_FOFFSET llPos; @@ -2420,7 +2420,7 @@ HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT u #if defined( HB_IO_WIN ) { - USHORT Flags = convert_seek_flags( uiFlags ); + HB_USHORT Flags = convert_seek_flags( uiFlags ); ULONG ulOffsetLow = ( ULONG ) ( llOffset & ULONG_MAX ), ulOffsetHigh = ( ULONG ) ( llOffset >> 32 ); @@ -2451,7 +2451,7 @@ HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT u } #elif defined( HB_USE_LARGEFILE64 ) { - USHORT Flags = convert_seek_flags( uiFlags ); + HB_USHORT Flags = convert_seek_flags( uiFlags ); hb_vmUnlock(); if( llOffset < 0 && Flags == SEEK_SET ) @@ -3021,7 +3021,7 @@ HB_BOOL hb_fsIsDevice( HB_FHANDLE hFileHandle ) * caller must free the returned buffer */ char * hb_fsExtName( const char * pFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths ) + HB_USHORT uiExFlags, const char * pPaths ) { HB_PATHNAMES * pNextPath; PHB_FNAME pFilepath; @@ -3098,11 +3098,11 @@ char * hb_fsExtName( const char * pFilename, const char * pDefExt, } HB_FHANDLE hb_fsExtOpen( const char * pFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths, + HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ) { HB_FHANDLE hFile; - USHORT uiFlags; + HB_USHORT uiFlags; char * szPath; HB_TRACE(HB_TR_DEBUG, ("hb_fsExtOpen(%s, %s, %hu, %p, %p)", pFilename, pDefExt, uiExFlags, pPaths, pError)); @@ -3152,7 +3152,7 @@ HB_FHANDLE hb_fsExtOpen( const char * pFilename, const char * pDefExt, hb_vmLock(); if( iLock != 0 ) #else - USHORT uiLock; + HB_USHORT uiLock; if( ( uiFlags & ( FO_READ | FO_WRITE | FO_READWRITE ) ) == FO_READ || ( uiFlags & ( FO_DENYREAD | FO_DENYWRITE | FO_EXCLUSIVE ) ) == 0 ) uiLock = FL_LOCK | FLX_SHARED; diff --git a/harbour/src/rtl/fscopy.c b/harbour/src/rtl/fscopy.c index b6e091fb72..eafa4d2294 100644 --- a/harbour/src/rtl/fscopy.c +++ b/harbour/src/rtl/fscopy.c @@ -74,7 +74,7 @@ HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) struct stat struFileInfo; int iSuccess = fstat( fhndSource, &struFileInfo ); #endif - USHORT nBytesRead; + HB_USHORT nBytesRead; void * pbyBuffer = hb_xgrab( HB_FSCOPY_BUFFERSIZE ); while( ( nBytesRead = hb_fsRead( fhndSource, pbyBuffer, HB_FSCOPY_BUFFERSIZE ) ) > 0 ) diff --git a/harbour/src/rtl/fserr.c b/harbour/src/rtl/fserr.c index 3f48e0a588..bffc61bd72 100644 --- a/harbour/src/rtl/fserr.c +++ b/harbour/src/rtl/fserr.c @@ -221,7 +221,7 @@ void hb_fsSetError( HB_ERRCODE uiError ) } /* set error code for last operation */ -void hb_fsSetIOError( HB_BOOL fResult, USHORT uiOperation ) +void hb_fsSetIOError( HB_BOOL fResult, HB_USHORT uiOperation ) { HB_ERRCODE uiOsErrorLast, uiErrorLast; PHB_IOERRORS pIOErrors; diff --git a/harbour/src/rtl/gt_tpl/gt_tpl.c b/harbour/src/rtl/gt_tpl/gt_tpl.c index 920b9a2695..ec7d6b1ed8 100644 --- a/harbour/src/rtl/gt_tpl/gt_tpl.c +++ b/harbour/src/rtl/gt_tpl/gt_tpl.c @@ -122,7 +122,7 @@ static void hb_gt_tpl_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_tpl_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) ); diff --git a/harbour/src/rtl/gtapi.c b/harbour/src/rtl/gtapi.c index 3f7d9f4f08..43174138e7 100644 --- a/harbour/src/rtl/gtapi.c +++ b/harbour/src/rtl/gtapi.c @@ -584,7 +584,7 @@ HB_BOOL hb_gtIsColor( void ) return fColor; } -HB_ERRCODE hb_gtRepChar( int iRow, int iCol, USHORT usChar, HB_SIZE ulCount ) +HB_ERRCODE hb_gtRepChar( int iRow, int iCol, HB_USHORT usChar, HB_SIZE ulCount ) { PHB_GT pGT; @@ -635,7 +635,7 @@ HB_ERRCODE hb_gtRest( int iTop, int iLeft, int iBottom, int iRight, const void * return HB_FAILURE; } -HB_ERRCODE hb_gtGetChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ) +HB_ERRCODE hb_gtGetChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ) { HB_ERRCODE errCode = HB_FAILURE; PHB_GT pGT; @@ -652,7 +652,7 @@ HB_ERRCODE hb_gtGetChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, US return errCode; } -HB_ERRCODE hb_gtPutChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, USHORT usChar ) +HB_ERRCODE hb_gtPutChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, HB_USHORT usChar ) { HB_ERRCODE errCode = HB_FAILURE; PHB_GT pGT; @@ -1138,9 +1138,9 @@ HB_ERRCODE hb_gtSetClearColor( int iColor ) return HB_FAILURE; } -USHORT hb_gtGetClearChar( void ) +HB_USHORT hb_gtGetClearChar( void ) { - USHORT usChar; + HB_USHORT usChar; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_gtGetClearChar()")); @@ -1152,12 +1152,12 @@ USHORT hb_gtGetClearChar( void ) hb_gt_BaseFree( pGT ); } else - usChar = ( USHORT ) ' '; + usChar = ( HB_USHORT ) ' '; return usChar; } -HB_ERRCODE hb_gtSetClearChar( USHORT usChar ) +HB_ERRCODE hb_gtSetClearChar( HB_USHORT usChar ) { PHB_GT pGT; @@ -1173,7 +1173,7 @@ HB_ERRCODE hb_gtSetClearChar( USHORT usChar ) return HB_FAILURE; } -HB_ERRCODE hb_gtGetScrChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ) +HB_ERRCODE hb_gtGetScrChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ) { HB_ERRCODE errCode = HB_FAILURE; PHB_GT pGT; @@ -1190,7 +1190,7 @@ HB_ERRCODE hb_gtGetScrChar( int iRow, int iCol, int * piColor, HB_BYTE * pbAttr, return errCode; } -HB_ERRCODE hb_gtPutScrChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, USHORT usChar ) +HB_ERRCODE hb_gtPutScrChar( int iRow, int iCol, int iColor, HB_BYTE bAttr, HB_USHORT usChar ) { HB_ERRCODE errCode = HB_FAILURE; PHB_GT pGT; @@ -1254,7 +1254,7 @@ HB_ERRCODE hb_gtScrollEx( int iTop, int iLeft, int iBottom, int iRight, int iCol if( iChar < 0 ) iChar = HB_GTSELF_GETCLEARCHAR( pGT ); HB_GTSELF_SCROLL( pGT, iTop, iLeft, iBottom, iRight, - iColor, ( USHORT ) iChar, iRows, iCols ); + iColor, ( HB_USHORT ) iChar, iRows, iCols ); HB_GTSELF_FLUSH( pGT ); hb_gt_BaseFree( pGT ); return HB_SUCCESS; diff --git a/harbour/src/rtl/gtcgi/gtcgi.c b/harbour/src/rtl/gtcgi/gtcgi.c index a9badd6efc..ca21f15199 100644 --- a/harbour/src/rtl/gtcgi/gtcgi.c +++ b/harbour/src/rtl/gtcgi/gtcgi.c @@ -199,7 +199,7 @@ static const char * hb_gt_cgi_Version( PHB_GT pGT, int iType ) } static void hb_gt_cgi_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight, - int iColor, USHORT usChar, int iRows, int iCols ) + int iColor, HB_USHORT usChar, int iRows, int iCols ) { int iHeight, iWidth; @@ -332,7 +332,7 @@ static void hb_gt_cgi_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iLineFeed, iHeight, iWidth, iLen; PHB_GTCGI pGTCGI; diff --git a/harbour/src/rtl/gtcrs/gtcrs.c b/harbour/src/rtl/gtcrs/gtcrs.c index bb4d104146..e120af9d8f 100644 --- a/harbour/src/rtl/gtcrs/gtcrs.c +++ b/harbour/src/rtl/gtcrs/gtcrs.c @@ -2897,7 +2897,7 @@ static void hb_gt_crs_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; chtype ch; wmove( s_ioBase->stdscr, iRow, iCol ); diff --git a/harbour/src/rtl/gtdos/gtdos.c b/harbour/src/rtl/gtdos/gtdos.c index 2226211a07..49b6e3d115 100644 --- a/harbour/src/rtl/gtdos/gtdos.c +++ b/harbour/src/rtl/gtdos/gtdos.c @@ -1123,7 +1123,7 @@ static void vmode50x80( void ) * FFh unknown display type ****************************************************************************/ -static USHORT hb_gt_dos_GetDisplay( void ) +static HB_USHORT hb_gt_dos_GetDisplay( void ) { union REGS regs; @@ -1302,11 +1302,11 @@ static HB_BOOL hb_gt_dos_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const cha static void hb_gt_dos_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) { #if !defined( __DJGPP__ ) - USHORT FAR *pScreenPtr = ( USHORT FAR * ) hb_gt_dos_ScreenPtr( iRow, iCol ); + HB_USHORT FAR *pScreenPtr = ( HB_USHORT FAR * ) hb_gt_dos_ScreenPtr( iRow, iCol ); #endif int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iLen = 0; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_dos_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) ); diff --git a/harbour/src/rtl/gtos2/gtos2.c b/harbour/src/rtl/gtos2/gtos2.c index 667c2fe8c5..d7d00c8947 100644 --- a/harbour/src/rtl/gtos2/gtos2.c +++ b/harbour/src/rtl/gtos2/gtos2.c @@ -139,7 +139,7 @@ static int s_iLineBufSize = 0; static char * s_sLineBuf; /* Code page ID of active codepage at the time harbour program was start */ -static USHORT s_usOldCodePage; +static HB_USHORT s_usOldCodePage; /* Instead of calling VioGetMode() every time I need MaxRow() or MaxCol() I use this static which contains active mode info */ @@ -789,7 +789,7 @@ static void hb_gt_os2_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) char * pBufPtr = s_sLineBuf; int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iLen = 0; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_os2_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) ); diff --git a/harbour/src/rtl/gtpca/gtpca.c b/harbour/src/rtl/gtpca/gtpca.c index be7bfbd2d3..6c2200d079 100644 --- a/harbour/src/rtl/gtpca/gtpca.c +++ b/harbour/src/rtl/gtpca/gtpca.c @@ -814,7 +814,7 @@ static void hb_gt_pca_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iLen = 0, iColor2 = 0; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) ); diff --git a/harbour/src/rtl/gtsln/gtsln.c b/harbour/src/rtl/gtsln/gtsln.c index 011f7bc89d..6a9353a787 100644 --- a/harbour/src/rtl/gtsln/gtsln.c +++ b/harbour/src/rtl/gtsln/gtsln.c @@ -145,7 +145,7 @@ static void hb_sln_colorTrans( void ) /* * bit 7 is a blinking attribute - not used when console is not in * UTF-8 mode because we are using it for changing into ACSC - * In SLANG 2.0 the character attributes are hold in USHORT not HB_BYTE + * In SLANG 2.0 the character attributes are hold in HB_USHORT not HB_BYTE * so we can use all colors, blinking bit and ACSC switch without * any problems also when console is not in UTF-8 mode. */ @@ -643,7 +643,7 @@ static void hb_gt_sln_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil to switch into ACSC because we can display all supported characters using it's UNICODE values so we can use blink bit as in Clipper. - In SLANG 2.0 the character attributes are hold in USHORT + In SLANG 2.0 the character attributes are hold in HB_USHORT not HB_BYTE so we can use all colors, blinking bit and ACSC switch without any problems also when console is not in UTF-8 mode. @@ -989,7 +989,7 @@ static void hb_gt_sln_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) SLsmg_Char_Type SLchar; int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; while( iSize-- > 0 ) { diff --git a/harbour/src/rtl/gtsln/kbsln.c b/harbour/src/rtl/gtsln/kbsln.c index e2610191ae..fd49bef0f4 100644 --- a/harbour/src/rtl/gtsln/kbsln.c +++ b/harbour/src/rtl/gtsln/kbsln.c @@ -426,7 +426,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) if ( hb_sln_Is_Unicode && ch < 256 ) { int n = 0; - USHORT uc = 0; + HB_USHORT uc = 0; if ( hb_cdpGetFromUTF8( hb_sln_cdpIN, HB_FALSE, ( HB_BYTE ) ch, &n, &uc ) ) { diff --git a/harbour/src/rtl/gtsln/mousesln.c b/harbour/src/rtl/gtsln/mousesln.c index b3fd37df8e..f7a4d0905c 100644 --- a/harbour/src/rtl/gtsln/mousesln.c +++ b/harbour/src/rtl/gtsln/mousesln.c @@ -70,8 +70,8 @@ static int s_iMouseCol = 0; static HB_BOOL s_bMousePresent = HB_FALSE; static int s_iMouseButtons = -1; -static USHORT s_usMouseState = 0; -static USHORT s_usLastMouseState = 0; +static HB_USHORT s_usMouseState = 0; +static HB_USHORT s_usLastMouseState = 0; static struct timeval mLeftDblckTime; static struct timeval mMiddleDblckTime; @@ -127,7 +127,7 @@ static HB_BOOL GetXtermEvent( int *Btn, int *Col, int *Row ) static void hb_sln_CheckDoubleClick() { - USHORT usNewButtons = ( s_usMouseState & ~s_usLastMouseState ) & M_BUTTON_KEYMASK; + HB_USHORT usNewButtons = ( s_usMouseState & ~s_usLastMouseState ) & M_BUTTON_KEYMASK; if( usNewButtons != 0 ) { @@ -217,7 +217,7 @@ int hb_gt_sln_mouse_Inkey( int iEventMask, HB_BOOL fCheckNew ) } else { - USHORT usKeyDiff = ( s_usMouseState ^ s_usLastMouseState ); + HB_USHORT usKeyDiff = ( s_usMouseState ^ s_usLastMouseState ); if( usKeyDiff & M_BUTTON_LEFT ) { diff --git a/harbour/src/rtl/gtstd/gtstd.c b/harbour/src/rtl/gtstd/gtstd.c index 85238049bc..4050d4bef9 100644 --- a/harbour/src/rtl/gtstd/gtstd.c +++ b/harbour/src/rtl/gtstd/gtstd.c @@ -501,7 +501,7 @@ static HB_BOOL hb_gt_std_Resume( PHB_GT pGT ) } static void hb_gt_std_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight, - int iColor, USHORT usChar, int iRows, int iCols ) + int iColor, HB_USHORT usChar, int iRows, int iCols ) { int iHeight, iWidth; @@ -570,7 +570,7 @@ static void hb_gt_std_DispLine( PHB_GT pGT, int iRow ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iCol, iMin = 0; PHB_GTSTD pGTSTD = HB_GTSTD_GET( pGT ); @@ -602,7 +602,7 @@ static void hb_gt_std_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iLineFeed, iBackSpace, iLen, iMin; PHB_GTSTD pGTSTD; diff --git a/harbour/src/rtl/gttrm/gttrm.c b/harbour/src/rtl/gttrm/gttrm.c index ccd7bb3fdd..0ac9424948 100644 --- a/harbour/src/rtl/gttrm/gttrm.c +++ b/harbour/src/rtl/gttrm/gttrm.c @@ -1462,7 +1462,7 @@ again: if( nKey > 0 && nKey <= 255 && pTerm->fUTF8 && pTerm->cdpIn ) { - USHORT uc = 0; + HB_USHORT uc = 0; n = i = 0; if( hb_cdpGetFromUTF8( pTerm->cdpIn, HB_FALSE, ( HB_UCHAR ) nKey, &n, &uc ) ) { @@ -3369,7 +3369,7 @@ static HB_BOOL hb_gt_trm_Resume( PHB_GT pGT ) } static void hb_gt_trm_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight, - int iColor, USHORT usChar, int iRows, int iCols ) + int iColor, HB_USHORT usChar, int iRows, int iCols ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_Scroll(%p,%d,%d,%d,%d,%d,%d,%d,%d)", pGT, iTop, iLeft, iBottom, iRight, iColor, usChar, iRows, iCols ) ); @@ -3488,7 +3488,7 @@ static void hb_gt_trm_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) PHB_GTTRM pTerm; int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iLen = 0, iAttribute = 0, iColor2; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) ); diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index 0707a3b333..e5a5ddf1c2 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -112,10 +112,10 @@ static HB_BOOL b_MouseEnable = HB_TRUE; #else #if ! defined( HB_DONT_DEFINE_BASIC_TYPES ) #undef WORD /* 2 bytes unsigned */ - typedef USHORT WORD; + typedef unsigned short int WORD; #undef DWORD /* 4 bytes unsigned */ - typedef ULONG DWORD; + typedef unsigned long int DWORD; #endif #endif diff --git a/harbour/src/rtl/gtxwc/gtxwc.c b/harbour/src/rtl/gtxwc/gtxwc.c index ca87f870b6..594de0261c 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.c +++ b/harbour/src/rtl/gtxwc/gtxwc.c @@ -307,17 +307,17 @@ typedef struct tag_x_wnddef HB_BOOL fRefresh; /* window size in character cells */ - USHORT cols; - USHORT rows; + HB_USHORT cols; + HB_USHORT rows; /* window size in pixels */ - USHORT width; - USHORT height; + HB_USHORT width; + HB_USHORT height; /* Set to true when Windows is resized */ HB_BOOL fWinResize; - USHORT newWidth; - USHORT newHeight; + HB_USHORT newWidth; + HB_USHORT newHeight; HB_BOOL fResizable; HB_BOOL fClosable; @@ -505,7 +505,7 @@ static void hb_gt_xwc_Enable( void ) /* *********************************************************************** */ -static HB_BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans *bxCh ) +static HB_BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, HB_USHORT usCh, XWC_CharTrans *bxCh ) { XSegment segs[9]; XPoint pts[XWC_MAX_CHAR_POINTS]; @@ -1545,8 +1545,8 @@ static void hb_gt_xwc_DestroyCharTrans( PXWND_DEF wnd ) static void hb_gt_xwc_BuildCharTrans( PXWND_DEF wnd ) { int i; - USHORT usCh16; - USHORT usBx16; + HB_USHORT usCh16; + HB_USHORT usBx16; hb_gt_xwc_DestroyCharTrans( wnd ); @@ -2464,7 +2464,7 @@ static HB_BOOL hb_gt_xwc_setPalette( PXWND_DEF wnd ) /* *********************************************************************** */ -static void hb_gt_xwc_DrawString( PXWND_DEF wnd, int col, int row, HB_BYTE color, USHORT *usChBuf, int len ) +static void hb_gt_xwc_DrawString( PXWND_DEF wnd, int col, int row, HB_BYTE color, HB_USHORT *usChBuf, int len ) { if( wnd->fClearBkg ) { @@ -2491,7 +2491,7 @@ static void hb_gt_xwc_DrawString( PXWND_DEF wnd, int col, int row, HB_BYTE color /* *********************************************************************** */ -static ULONG hb_gt_xwc_HashCurrChar( HB_BYTE attr, HB_BYTE color, USHORT chr ) +static ULONG hb_gt_xwc_HashCurrChar( HB_BYTE attr, HB_BYTE color, HB_USHORT chr ) { return ( ( ULONG ) attr << 24 ) | ( ( ULONG ) color << 16 ) | ( ULONG ) chr; } @@ -2500,9 +2500,9 @@ static ULONG hb_gt_xwc_HashCurrChar( HB_BYTE attr, HB_BYTE color, USHORT chr ) static void hb_gt_xwc_RepaintChar( PXWND_DEF wnd, int colStart, int rowStart, int colStop, int rowStop ) { - USHORT irow, icol, index, startCol = 0, len, basex, basey, nsize; + HB_USHORT irow, icol, index, startCol = 0, len, basex, basey, nsize; HB_BYTE oldColor = 0, color, attr; - USHORT usCh16, usChBuf[ XWC_MAX_COLS ]; + HB_USHORT usCh16, usChBuf[ XWC_MAX_COLS ]; ULONG ulCurr = 0xFFFFFFFFL; int i, iColor; XWC_CharTrans * chTrans; @@ -2773,9 +2773,9 @@ static void hb_gt_xwc_UpdateCursor( PXWND_DEF wnd ) } if( cursorType != SC_NONE ) { - USHORT basex = wnd->col * wnd->fontWidth, - basey = wnd->row * wnd->fontHeight, - size; + HB_USHORT basex = wnd->col * wnd->fontWidth, + basey = wnd->row * wnd->fontHeight, + size; switch( cursorType ) { @@ -2803,7 +2803,7 @@ static void hb_gt_xwc_UpdateCursor( PXWND_DEF wnd ) { int color; HB_BYTE attr; - USHORT usChar; + HB_USHORT usChar; HB_GTSELF_GETSCRCHAR( wnd->pGT, wnd->row, wnd->col, &color, &attr, &usChar ); XSetForeground( wnd->dpy, wnd->gc, wnd->colors[color & 0x0f].pixel ); @@ -2985,7 +2985,7 @@ static void hb_gt_xwc_ProcessMessages( PXWND_DEF wnd ) /* *********************************************************************** */ -static void hb_gt_xwc_SetScrBuff( PXWND_DEF wnd, USHORT cols, USHORT rows ) +static void hb_gt_xwc_SetScrBuff( PXWND_DEF wnd, HB_USHORT cols, HB_USHORT rows ) { if( rows <= XWC_MAX_ROWS && cols <= XWC_MAX_COLS && ( wnd->cols != cols || wnd->rows != rows || wnd->pCurrScr == NULL ) ) @@ -3008,11 +3008,11 @@ static void hb_gt_xwc_SetScrBuff( PXWND_DEF wnd, USHORT cols, USHORT rows ) /* *********************************************************************** */ -static HB_BOOL hb_gt_xwc_Resize( PXWND_DEF wnd, USHORT cols, USHORT rows ) +static HB_BOOL hb_gt_xwc_Resize( PXWND_DEF wnd, HB_USHORT cols, HB_USHORT rows ) { if( rows <= XWC_MAX_ROWS && cols <= XWC_MAX_COLS ) { - USHORT width, height; + HB_USHORT width, height; hb_gt_xwc_SetScrBuff( wnd, cols, rows ); @@ -4334,7 +4334,7 @@ static void hb_gt_xwc_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) int iDefColor = HB_GTSELF_GETCOLOR( pGT ); int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; while( iSize-- ) { diff --git a/harbour/src/rtl/gtxwc/gtxwc.h b/harbour/src/rtl/gtxwc/gtxwc.h index 7e89bd9d9d..4712f7f4c2 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.h +++ b/harbour/src/rtl/gtxwc/gtxwc.h @@ -83,7 +83,7 @@ /************************************************************/ /* Utility functions */ typedef unsigned long HB_GT_PIXELTYPE; -typedef USHORT HB_GT_CELLTYPE; +typedef HB_USHORT HB_GT_CELLTYPE; #define XWC_CHAR_QUEUE_SIZE 128 #define XWC_CHAR_BUFFER 1024 @@ -280,7 +280,7 @@ typedef struct tag_XWC_CharTrans XPoint *pts; XSegment *seg; XRectangle *rect; - USHORT ch16; + HB_USHORT ch16; } u; HB_BYTE size; HB_BOOL inverse; diff --git a/harbour/src/rtl/hbgtcore.c b/harbour/src/rtl/hbgtcore.c index d6fd5e9eac..4461d9e48a 100644 --- a/harbour/src/rtl/hbgtcore.c +++ b/harbour/src/rtl/hbgtcore.c @@ -117,7 +117,7 @@ static void hb_gt_def_BaseInit( PHB_GT_BASE pGT ) static void * hb_gt_def_New( PHB_GT pGT ) { HB_SIZE ulSize, ulIndex; - USHORT usChar; + HB_USHORT usChar; int iColor; HB_BYTE bAttr; int i; @@ -327,12 +327,12 @@ static void hb_gt_def_SetClearColor( PHB_GT pGT, int iColor ) pGT->iClearColor = ( iColor & 0xFF ); } -static USHORT hb_gt_def_GetClearChar( PHB_GT pGT ) +static HB_USHORT hb_gt_def_GetClearChar( PHB_GT pGT ) { return pGT->usClearChar; } -static void hb_gt_def_SetClearChar( PHB_GT pGT, USHORT usChar ) +static void hb_gt_def_SetClearChar( PHB_GT pGT, HB_USHORT usChar ) { pGT->usClearChar = usChar; } @@ -741,7 +741,7 @@ static const char * hb_gt_def_Version( PHB_GT pGT, int iType ) } static HB_BOOL hb_gt_def_GetChar( PHB_GT pGT, int iRow, int iCol, - int * piColor, HB_BYTE * pbAttr, USHORT * pusChar ) + int * piColor, HB_BYTE * pbAttr, HB_USHORT * pusChar ) { long lIndex; @@ -756,7 +756,7 @@ static HB_BOOL hb_gt_def_GetChar( PHB_GT pGT, int iRow, int iCol, } static HB_BOOL hb_gt_def_PutChar( PHB_GT pGT, int iRow, int iCol, - int iColor, HB_BYTE bAttr, USHORT usChar ) + int iColor, HB_BYTE bAttr, HB_USHORT usChar ) { long lIndex; @@ -783,7 +783,7 @@ static void hb_gt_def_PutText( PHB_GT pGT, int iRow, int iCol, int iColor, const } static void hb_gt_def_Replicate( PHB_GT pGT, int iRow, int iCol, int iColor, - HB_BYTE bAttr, USHORT usChar, HB_SIZE ulLen ) + HB_BYTE bAttr, HB_USHORT usChar, HB_SIZE ulLen ) { if( iCol < 0 ) { @@ -984,7 +984,7 @@ static void hb_gt_def_Save( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iR { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iCol; for( iCol = iLeft; iCol <= iRight; ++iCol ) @@ -1021,7 +1021,7 @@ static void hb_gt_def_Rest( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iR { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iCol; for( iCol = iLeft; iCol <= iRight; ++iCol ) @@ -1052,7 +1052,7 @@ static void hb_gt_def_SetAttribute( PHB_GT pGT, int iTop, int iLeft, int iBottom { int iColorOld; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; int iCol; for( iCol = iLeft; iCol <= iRight; ++iCol ) @@ -1103,7 +1103,7 @@ static void hb_gt_def_DrawShadow( PHB_GT pGT, int iTop, int iLeft, int iBottom, } static void hb_gt_def_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight, - int iColor, USHORT usChar, int iRows, int iCols ) + int iColor, HB_USHORT usChar, int iRows, int iCols ) { int iColOld, iColNew, iColSize, iColClear, iClrs, iLength; @@ -1164,7 +1164,7 @@ static void hb_gt_def_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int } static void hb_gt_def_ScrollArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight, - int iColor, USHORT usChar, int iRows, int iCols ) + int iColor, HB_USHORT usChar, int iRows, int iCols ) { if( iRows || iCols ) { @@ -1247,7 +1247,7 @@ static void hb_gt_def_ScrollArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, } } -static void hb_gt_def_ScrollUp( PHB_GT pGT, int iRows, int iColor, USHORT usChar ) +static void hb_gt_def_ScrollUp( PHB_GT pGT, int iRows, int iColor, HB_USHORT usChar ) { if( iRows > 0 ) { @@ -1383,7 +1383,7 @@ static void hb_gt_def_BoxD( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iR } static void hb_gt_def_HorizLine( PHB_GT pGT, int iRow, int iLeft, int iRight, - USHORT usChar, int iColor ) + HB_USHORT usChar, int iColor ) { int iLength, iCol; @@ -1402,7 +1402,7 @@ static void hb_gt_def_HorizLine( PHB_GT pGT, int iRow, int iLeft, int iRight, } static void hb_gt_def_VertLine( PHB_GT pGT, int iCol, int iTop, int iBottom, - USHORT usChar, int iColor ) + HB_USHORT usChar, int iColor ) { int iLength, iRow; diff --git a/harbour/src/rtl/itemseri.c b/harbour/src/rtl/itemseri.c index 2c27106684..1c2a33fcc4 100644 --- a/harbour/src/rtl/itemseri.c +++ b/harbour/src/rtl/itemseri.c @@ -279,7 +279,7 @@ static HB_SIZE hb_itemSerialSize( PHB_ITEM pItem, HB_BOOL fNumSize, { HB_SIZE ulSize, ulLen, u; HB_MAXINT lVal; - USHORT uiClass; + HB_USHORT uiClass; PHB_ITEM pDefVal; const char * szVal; @@ -657,7 +657,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, } else { - USHORT uiClass = hb_objGetClass( pItem ); + HB_USHORT uiClass = hb_objGetClass( pItem ); if( uiClass ) { const char * szClass = hb_clsName( uiClass ), diff --git a/harbour/src/rtl/philes.c b/harbour/src/rtl/philes.c index 87a40f950e..ddf4e8524d 100644 --- a/harbour/src/rtl/philes.c +++ b/harbour/src/rtl/philes.c @@ -65,7 +65,7 @@ HB_FUNC( FOPEN ) if( szFile ) { hb_retnint( ( HB_NHANDLE ) hb_fsOpen( szFile, - HB_ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : FO_READ | FO_COMPAT ) ); + HB_ISNUM( 2 ) ? ( HB_USHORT ) hb_parni( 2 ) : FO_READ | FO_COMPAT ) ); hb_fsSetFError( hb_fsError() ); } else @@ -99,7 +99,7 @@ HB_FUNC( HB_FCREATE ) { hb_retnint( ( HB_NHANDLE ) hb_fsCreateEx( szFile, HB_ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL, - HB_ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FO_COMPAT ) ); + HB_ISNUM( 3 ) ? ( HB_USHORT ) hb_parni( 3 ) : FO_COMPAT ) ); hb_fsSetFError( hb_fsError() ); } else @@ -222,7 +222,7 @@ HB_FUNC( FSEEK ) { hb_retnint( hb_fsSeekLarge( hb_numToHandle( hb_parnint( 1 ) ), hb_parnint( 2 ), - HB_ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FS_SET ) ); + HB_ISNUM( 3 ) ? ( HB_USHORT ) hb_parni( 3 ) : FS_SET ) ); uiError = hb_fsError(); } else @@ -336,7 +336,7 @@ HB_FUNC( HB_FLOCK ) fResult = hb_fsLockLarge( hb_numToHandle( hb_parnint( 1 ) ), ( HB_FOFFSET ) hb_parnint( 2 ), ( HB_FOFFSET ) hb_parnint( 3 ), - FL_LOCK | ( ( USHORT ) hb_parni( 4 ) & ~FL_MASK ) ); + FL_LOCK | ( ( HB_USHORT ) hb_parni( 4 ) & ~FL_MASK ) ); uiError = hb_fsError(); } hb_fsSetFError( uiError ); diff --git a/harbour/src/rtl/philesx.c b/harbour/src/rtl/philesx.c index f65e012a97..18c973f12e 100644 --- a/harbour/src/rtl/philesx.c +++ b/harbour/src/rtl/philesx.c @@ -81,9 +81,9 @@ HB_FUNC( CURDRIVE ) { while( hb_fsChDrv( iDrive ) != 0 ) { - USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 6001, "Operating system error", - HB_ERR_FUNCNAME, 0, EF_CANDEFAULT | EF_CANRETRY, - HB_ERR_ARGS_BASEPARAMS ); + HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 6001, "Operating system error", + HB_ERR_FUNCNAME, 0, EF_CANDEFAULT | EF_CANRETRY, + HB_ERR_ARGS_BASEPARAMS ); if( uiAction != E_RETRY ) break; } diff --git a/harbour/src/rtl/spfiles.c b/harbour/src/rtl/spfiles.c index 80548058a9..03c5d021a9 100644 --- a/harbour/src/rtl/spfiles.c +++ b/harbour/src/rtl/spfiles.c @@ -181,7 +181,7 @@ HB_BOOL hb_spFileExists( const char * pFilename, char * pRetPath ) return bIsFile; } -HB_FHANDLE hb_spOpen( const char * pFilename, USHORT uiFlags ) +HB_FHANDLE hb_spOpen( const char * pFilename, HB_USHORT uiFlags ) { char path[ HB_PATH_MAX ]; @@ -210,7 +210,7 @@ HB_FHANDLE hb_spCreate( const char * pFilename, HB_FATTR ulAttr ) return hb_fsCreate( path, ulAttr ); } -HB_FHANDLE hb_spCreateEx( const char * pFilename, HB_FATTR ulAttr, USHORT uiFlags ) +HB_FHANDLE hb_spCreateEx( const char * pFilename, HB_FATTR ulAttr, HB_USHORT uiFlags ) { char path[ HB_PATH_MAX ]; PHB_FNAME pFilepath; diff --git a/harbour/src/rtl/trace.c b/harbour/src/rtl/trace.c index 910fb04679..a03b9ed492 100644 --- a/harbour/src/rtl/trace.c +++ b/harbour/src/rtl/trace.c @@ -113,7 +113,7 @@ HB_FUNC( HB_TRACELOG ) char message[ 1024 ]; char procname[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 ]; char file[ HB_PATH_MAX ]; - USHORT line; + HB_USHORT line; hb_trace_message( message, sizeof( message ) - 1, 1, hb_pcount() ); hb_procinfo( 1, procname, &line, file ); @@ -131,7 +131,7 @@ HB_FUNC( HB_TRACELOGAT ) char message[ 1024 ]; char procname[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 ]; char file[ HB_PATH_MAX ]; - USHORT line; + HB_USHORT line; hb_trace_message( message, sizeof( message ) - 1, 2, hb_pcount() ); hb_procinfo( 1, procname, &line, file ); diff --git a/harbour/src/rtl/transfrm.c b/harbour/src/rtl/transfrm.c index 3d4acb8469..b49d17ca9a 100644 --- a/harbour/src/rtl/transfrm.c +++ b/harbour/src/rtl/transfrm.c @@ -98,7 +98,7 @@ HB_FUNC( TRANSFORM ) char szPicDate[ 11 ]; const char * szPic = hb_itemGetCPtr( pPic ); HB_SIZE ulPicLen = hb_itemGetCLen( pPic ); - USHORT uiPicFlags; /* Function flags */ + HB_USHORT uiPicFlags; /* Function flags */ HB_SIZE ulParamS = 0; /* To avoid GCC -O2 warning */ char cParamL = '\0'; /* To avoid GCC -O2 warning */ diff --git a/harbour/src/rtl/xhelp.c b/harbour/src/rtl/xhelp.c index cb337b2936..8aee07d3ee 100644 --- a/harbour/src/rtl/xhelp.c +++ b/harbour/src/rtl/xhelp.c @@ -76,7 +76,7 @@ HB_FUNC( __XHELP ) for( iParam = 1; iParam <= iPCount; iParam++ ) hb_vmPush( hb_stackItemFromBase( iParam ) ); - hb_vmProc( ( USHORT ) iPCount ); + hb_vmProc( ( HB_USHORT ) iPCount ); /* NOTE: Leave the return value as it is. */ } } diff --git a/harbour/src/vm/arrays.c b/harbour/src/vm/arrays.c index d24fc7b61c..19ab904946 100644 --- a/harbour/src/vm/arrays.c +++ b/harbour/src/vm/arrays.c @@ -1523,11 +1523,11 @@ PHB_ITEM hb_arrayClone( PHB_ITEM pArray ) return hb_arrayCloneTo( hb_itemNew( NULL ), pArray ); } -PHB_ITEM hb_arrayFromStack( USHORT uiLen ) +PHB_ITEM hb_arrayFromStack( HB_USHORT uiLen ) { HB_STACK_TLS_PRELOAD PHB_ITEM pArray = hb_itemNew( NULL ); - USHORT uiPos; + HB_USHORT uiPos; HB_TRACE(HB_TR_DEBUG, ("hb_arrayFromStack(%hu)", uiLen)); @@ -1543,7 +1543,7 @@ PHB_ITEM hb_arrayFromParams( int iLevel ) { HB_STACK_TLS_PRELOAD PHB_ITEM pArray; - USHORT uiPos, uiPCount; + HB_USHORT uiPos, uiPCount; LONG lBaseOffset; HB_TRACE(HB_TR_DEBUG, ("hb_arrayFromParams(%d)", iLevel)); @@ -1565,7 +1565,7 @@ PHB_ITEM hb_arrayBaseParams( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pArray; - USHORT uiPos, uiPCount; + HB_USHORT uiPos, uiPCount; HB_TRACE(HB_TR_DEBUG, ("hb_arrayBaseParams()")); @@ -1584,7 +1584,7 @@ PHB_ITEM hb_arraySelfParams( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pArray; - USHORT uiPos, uiPCount; + HB_USHORT uiPos, uiPCount; HB_TRACE(HB_TR_DEBUG, ("hb_arraySelfParams()")); diff --git a/harbour/src/vm/classes.c b/harbour/src/vm/classes.c index 1b792fc34c..92f6a66016 100644 --- a/harbour/src/vm/classes.c +++ b/harbour/src/vm/classes.c @@ -153,30 +153,30 @@ typedef struct { - PHB_ITEM pInitValue; /* Init Value for data */ - USHORT uiType; /* HB_OO_MSG_DATA, HB_OO_MSG_CLASSDATA or HB_OO_MSG_INITIALIZED */ - USHORT uiData; /* Item position in instance area or class data */ - USHORT uiOffset; /* Super cast instance area offset for HB_OO_MSG_DATA or real class item position */ - USHORT uiSprClass; /* The real class where method were defined */ + PHB_ITEM pInitValue; /* Init Value for data */ + HB_USHORT uiType; /* HB_OO_MSG_DATA, HB_OO_MSG_CLASSDATA or HB_OO_MSG_INITIALIZED */ + HB_USHORT uiData; /* Item position in instance area or class data */ + HB_USHORT uiOffset; /* Super cast instance area offset for HB_OO_MSG_DATA or real class item position */ + HB_USHORT uiSprClass; /* The real class where method were defined */ } INITDATA, * PINITDATA; typedef struct { - PHB_DYNS pMessage; /* Method symbolic name */ - PHB_DYNS pAccMsg; /* Corresponding access method symbolic name */ - PHB_SYMB pFuncSym; /* Function symbol */ - PHB_SYMB pRealSym; /* Real function symbol when wrapper is used */ - HB_TYPE itemType; /* Type of item in restricted assignment */ - USHORT uiSprClass; /* Originalclass'handel (super or current class'handel if not herited). */ /*Added by RAC&JF*/ - USHORT uiScope; /* Scoping value */ - USHORT uiData; /* Item position for instance data, class data and shared data (Harbour like, begin from 1) or delegated message index object */ - USHORT uiOffset; /* position in pInitData for class datas (from 1) or offset to instance area in inherited instance data and supercast messages (from 0) */ - USHORT uiPrevCls; - USHORT uiPrevMth; + PHB_DYNS pMessage; /* Method symbolic name */ + PHB_DYNS pAccMsg; /* Corresponding access method symbolic name */ + PHB_SYMB pFuncSym; /* Function symbol */ + PHB_SYMB pRealSym; /* Real function symbol when wrapper is used */ + HB_TYPE itemType; /* Type of item in restricted assignment */ + HB_USHORT uiSprClass; /* Originalclass'handel (super or current class'handel if not herited). */ /*Added by RAC&JF*/ + HB_USHORT uiScope; /* Scoping value */ + HB_USHORT uiData; /* Item position for instance data, class data and shared data (Harbour like, begin from 1) or delegated message index object */ + HB_USHORT uiOffset; /* position in pInitData for class datas (from 1) or offset to instance area in inherited instance data and supercast messages (from 0) */ + HB_USHORT uiPrevCls; + HB_USHORT uiPrevMth; #ifndef HB_NO_PROFILER - ULONG ulCalls; /* profiler support */ - ULONG ulTime; /* profiler support */ - ULONG ulRecurse; /* profiler support */ + ULONG ulCalls; /* profiler support */ + ULONG ulTime; /* profiler support */ + ULONG ulRecurse; /* profiler support */ #endif } METHOD, * PMETHOD; @@ -184,33 +184,33 @@ typedef struct #define HB_MSG_POOL typedef struct { - char * szName; /* Class name */ - PHB_DYNS pClassSym; /* Class symbolic name */ - PMETHOD pMethods; /* Class methods */ - PHB_SYMB pClassFuncSym; /* Class function symbol */ - PHB_SYMB pFriendModule; /* Class friend symbols */ - PINITDATA pInitData; /* Class/instance Initialization data */ - PHB_ITEM pClassDatas; /* Harbour Array for Class Datas */ - PHB_ITEM pSharedDatas; /* Harbour Array for Class Shared Datas */ - PHB_ITEM pInlines; /* Array for inline codeblocks */ - PHB_ITEM pMutex; /* Class sync method mutex */ - PHB_SYMB * pFriendSyms; /* Friend functions' symbols */ - ULONG ulOpFlags; /* Flags for overloaded operators */ - USHORT uiClass; /* This class handle */ - USHORT fHasDestructor; /* has the class destructor message? */ - USHORT fHasOnError; /* has the class OnError message? */ - USHORT fLocked; /* Class is locked against modifications */ - USHORT uiMethods; /* Total Method initialised Counter */ - USHORT uiInitDatas; /* Total Method initialised Counter */ - USHORT uiDatas; /* Total Data Counter */ - USHORT uiDataFirst; /* First instance item from this class */ - USHORT uiFriendSyms; /* Number of friend function's symbols */ - USHORT uiFriendModule; /* Number of friend symbols in pFriendModule */ - USHORT uiMutexOffset; /* Offset in instance area to SYNC method mutex */ - USHORT uiHashKey; + char * szName; /* Class name */ + PHB_DYNS pClassSym; /* Class symbolic name */ + PMETHOD pMethods; /* Class methods */ + PHB_SYMB pClassFuncSym; /* Class function symbol */ + PHB_SYMB pFriendModule; /* Class friend symbols */ + PINITDATA pInitData; /* Class/instance Initialization data */ + PHB_ITEM pClassDatas; /* Harbour Array for Class Datas */ + PHB_ITEM pSharedDatas; /* Harbour Array for Class Shared Datas */ + PHB_ITEM pInlines; /* Array for inline codeblocks */ + PHB_ITEM pMutex; /* Class sync method mutex */ + PHB_SYMB * pFriendSyms; /* Friend functions' symbols */ + ULONG ulOpFlags; /* Flags for overloaded operators */ + HB_USHORT uiClass; /* This class handle */ + HB_USHORT fHasDestructor; /* has the class destructor message? */ + HB_USHORT fHasOnError; /* has the class OnError message? */ + HB_USHORT fLocked; /* Class is locked against modifications */ + HB_USHORT uiMethods; /* Total Method initialised Counter */ + HB_USHORT uiInitDatas; /* Total Method initialised Counter */ + HB_USHORT uiDatas; /* Total Data Counter */ + HB_USHORT uiDataFirst; /* First instance item from this class */ + HB_USHORT uiFriendSyms; /* Number of friend function's symbols */ + HB_USHORT uiFriendModule; /* Number of friend symbols in pFriendModule */ + HB_USHORT uiMutexOffset; /* Offset in instance area to SYNC method mutex */ + HB_USHORT uiHashKey; #ifdef HB_MSG_POOL - USHORT * puiMsgIdx; - USHORT uiMethodCount; + HB_USHORT * puiMsgIdx; + HB_USHORT uiMethodCount; #endif } CLASS, * PCLASS; @@ -360,17 +360,17 @@ static HB_SYMB s___msgWithObjectPop = { "___WITHOBJECT", {HB_FS_MESSAGE}, {HB_F /* If user wants to change scalar classes at runtime in MT mode then * he must resolve thread synchronization problem himself, [druzus] */ -static USHORT s_uiArrayClass = 0; -static USHORT s_uiBlockClass = 0; -static USHORT s_uiCharacterClass = 0; -static USHORT s_uiDateClass = 0; -static USHORT s_uiTimeStampClass = 0; -static USHORT s_uiHashClass = 0; -static USHORT s_uiLogicalClass = 0; -static USHORT s_uiNilClass = 0; -static USHORT s_uiNumericClass = 0; -static USHORT s_uiSymbolClass = 0; -static USHORT s_uiPointerClass = 0; +static HB_USHORT s_uiArrayClass = 0; +static HB_USHORT s_uiBlockClass = 0; +static HB_USHORT s_uiCharacterClass = 0; +static HB_USHORT s_uiDateClass = 0; +static HB_USHORT s_uiTimeStampClass = 0; +static HB_USHORT s_uiHashClass = 0; +static HB_USHORT s_uiLogicalClass = 0; +static HB_USHORT s_uiNilClass = 0; +static HB_USHORT s_uiNumericClass = 0; +static HB_USHORT s_uiSymbolClass = 0; +static HB_USHORT s_uiPointerClass = 0; /* ================================================ */ @@ -400,16 +400,16 @@ static USHORT s_uiPointerClass = 0; #define HB_CLASS_POOL_RESIZE 16 -static PCLASS * s_pClasses = NULL; -static USHORT s_uiClsSize = 0; -static USHORT s_uiClasses = 0; +static PCLASS * s_pClasses = NULL; +static HB_USHORT s_uiClsSize = 0; +static HB_USHORT s_uiClasses = 0; -static PHB_ITEM s_pClassMtx = NULL; +static PHB_ITEM s_pClassMtx = NULL; /* ================================================ */ #if 0 -static USHORT hb_clsBucketPos( PHB_DYNS pMsg, USHORT uiMask ) +static HB_USHORT hb_clsBucketPos( PHB_DYNS pMsg, HB_USHORT uiMask ) { /* * we can use PHB_DYNS address as base for hash key. @@ -424,7 +424,7 @@ static USHORT hb_clsBucketPos( PHB_DYNS pMsg, USHORT uiMask ) * HB_DYNS structure */ /* - return ( ( USHORT ) ( ( HB_PTRDIFF ) pMsg >> 4 ) & uiMask ) << BUCKETBITS; + return ( ( HB_USHORT ) ( ( HB_PTRDIFF ) pMsg >> 4 ) & uiMask ) << BUCKETBITS; */ /* Using continuous symbol numbers we are 100% sure that we will cover @@ -444,7 +444,7 @@ static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) { ULONG ulNewHashKey, ulLimit, ul; #ifdef HB_MSG_POOL - USHORT * puiMsgIdx; + HB_USHORT * puiMsgIdx; #else PMETHOD pNewMethods; #endif @@ -461,16 +461,16 @@ static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) hb_errInternal( 6002, "Unable to realloc class message in __clsDictRealloc()", NULL, NULL ); #ifdef HB_MSG_POOL - puiMsgIdx = ( USHORT * ) hb_xgrab( ( ulNewHashKey << BUCKETBITS ) * sizeof( USHORT ) ); - memset( puiMsgIdx, 0, ( ulNewHashKey << BUCKETBITS ) * sizeof( USHORT ) ); + puiMsgIdx = ( HB_USHORT * ) hb_xgrab( ( ulNewHashKey << BUCKETBITS ) * sizeof( HB_USHORT ) ); + memset( puiMsgIdx, 0, ( ulNewHashKey << BUCKETBITS ) * sizeof( HB_USHORT ) ); for( ul = 0; ul < ulLimit; ul++ ) { - USHORT uiMsg = pClass->puiMsgIdx[ ul ]; + HB_USHORT uiMsg = pClass->puiMsgIdx[ ul ]; if( pClass->puiMsgIdx[ ul ] ) { - USHORT uiBucket = BUCKETSIZE; - USHORT * puiIdx = puiMsgIdx + hb_clsBucketPos( + HB_USHORT uiBucket = BUCKETSIZE; + HB_USHORT * puiIdx = puiMsgIdx + hb_clsBucketPos( pClass->pMethods[ uiMsg ].pMessage, ulNewHashKey - 1 ); do { @@ -493,7 +493,7 @@ static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) } while( ul < ulLimit ); - pClass->uiHashKey = ( USHORT ) ( ulNewHashKey - 1 ); + pClass->uiHashKey = ( HB_USHORT ) ( ulNewHashKey - 1 ); hb_xfree( pClass->puiMsgIdx ); pClass->puiMsgIdx = puiMsgIdx; @@ -509,7 +509,7 @@ static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) if( pMessage ) { PMETHOD pMethod = pNewMethods + hb_clsBucketPos( pMessage, ulNewHashKey - 1 ); - USHORT uiBucket = BUCKETSIZE; + HB_USHORT uiBucket = BUCKETSIZE; do { @@ -532,7 +532,7 @@ static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) } while( ul < ulLimit ); - pClass->uiHashKey = ( USHORT ) ( ulNewHashKey - 1 ); + pClass->uiHashKey = ( HB_USHORT ) ( ulNewHashKey - 1 ); hb_xfree( pClass->pMethods ); pClass->pMethods = pNewMethods; #endif @@ -540,7 +540,7 @@ static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) return HB_TRUE; } -static void hb_clsDictInit( PCLASS pClass, USHORT uiHashKey ) +static void hb_clsDictInit( PCLASS pClass, HB_USHORT uiHashKey ) { ULONG ulSize; @@ -548,8 +548,8 @@ static void hb_clsDictInit( PCLASS pClass, USHORT uiHashKey ) pClass->uiHashKey = uiHashKey; #ifdef HB_MSG_POOL - ulSize = ( ( ( ULONG ) uiHashKey + 1 ) << BUCKETBITS ) * sizeof( USHORT ); - pClass->puiMsgIdx = ( USHORT * ) hb_xgrab( ulSize ); + ulSize = ( ( ( ULONG ) uiHashKey + 1 ) << BUCKETBITS ) * sizeof( HB_USHORT ); + pClass->puiMsgIdx = ( HB_USHORT * ) hb_xgrab( ulSize ); memset( pClass->puiMsgIdx, 0, ulSize ); pClass->uiMethodCount = 1; @@ -566,7 +566,7 @@ static PMETHOD hb_clsFindMsg( PCLASS pClass, PHB_DYNS pMsg ) { #ifdef HB_MSG_POOL - USHORT uiBucket, * puiMsgIdx; + HB_USHORT uiBucket, * puiMsgIdx; HB_TRACE(HB_TR_DEBUG, ("hb_clsFindMsg(%p,%p)", pClass, pMsg)); @@ -586,7 +586,7 @@ static PMETHOD hb_clsFindMsg( PCLASS pClass, PHB_DYNS pMsg ) #else PMETHOD pMethod; - USHORT uiBucket; + HB_USHORT uiBucket; HB_TRACE(HB_TR_DEBUG, ("hb_clsFindMsg(%p,%p)", pClass, pMsg)); @@ -614,7 +614,7 @@ static PMETHOD hb_clsAllocMsg( PCLASS pClass, PHB_DYNS pMsg ) #ifdef HB_MSG_POOL - USHORT uiBucket = BUCKETSIZE, * puiMsgIdx = pClass->puiMsgIdx + + HB_USHORT uiBucket = BUCKETSIZE, * puiMsgIdx = pClass->puiMsgIdx + hb_clsBucketPos( pMsg, pClass->uiHashKey ); do @@ -636,7 +636,7 @@ static PMETHOD hb_clsAllocMsg( PCLASS pClass, PHB_DYNS pMsg ) #else PMETHOD pMethod = pClass->pMethods + hb_clsBucketPos( pMsg, pClass->uiHashKey ); - USHORT uiBucket = BUCKETSIZE; + HB_USHORT uiBucket = BUCKETSIZE; do { @@ -673,7 +673,7 @@ static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) { #ifdef HB_MSG_POOL - USHORT uiBucket, * puiMsgIdx; + HB_USHORT uiBucket, * puiMsgIdx; HB_TRACE(HB_TR_DEBUG, ("hb_clsFreeMsg(%p,%p)", pClass, pMsg)); @@ -700,7 +700,7 @@ static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) #else PMETHOD pMethod; - USHORT uiBucket; + HB_USHORT uiBucket; HB_TRACE(HB_TR_DEBUG, ("hb_clsFreeMsg(%p,%p)", pClass, pMsg)); @@ -738,16 +738,16 @@ static HB_BOOL hb_clsHasParent( PCLASS pClass, PHB_DYNS pParentSym ) return pMethod && pMethod->pFuncSym == &s___msgSuper; } -static USHORT hb_clsParentInstanceOffset( PCLASS pClass, PHB_DYNS pParentSym ) +static HB_USHORT hb_clsParentInstanceOffset( PCLASS pClass, PHB_DYNS pParentSym ) { PMETHOD pMethod = hb_clsFindMsg( pClass, pParentSym ); return ( pMethod && pMethod->pFuncSym == &s___msgSuper ) ? pMethod->uiOffset : 0; } -static USHORT hb_clsAddInitValue( PCLASS pClass, PHB_ITEM pItem, - USHORT uiType, USHORT uiData, - USHORT uiOffset, USHORT uiSprClass ) +static HB_USHORT hb_clsAddInitValue( PCLASS pClass, PHB_ITEM pItem, + HB_USHORT uiType, HB_USHORT uiData, + HB_USHORT uiOffset, HB_USHORT uiSprClass ) { PINITDATA pInitData; @@ -763,7 +763,7 @@ static USHORT hb_clsAddInitValue( PCLASS pClass, PHB_ITEM pItem, } else { - USHORT ui = pClass->uiInitDatas; + HB_USHORT ui = pClass->uiInitDatas; pInitData = pClass->pInitData; do { @@ -794,7 +794,7 @@ static USHORT hb_clsAddInitValue( PCLASS pClass, PHB_ITEM pItem, return pClass->uiInitDatas; } -static USHORT hb_clsFindRealClassDataOffset( PMETHOD pMethod ) +static HB_USHORT hb_clsFindRealClassDataOffset( PMETHOD pMethod ) { PMETHOD pRealMth; @@ -811,9 +811,9 @@ static USHORT hb_clsFindRealClassDataOffset( PMETHOD pMethod ) return 0; } -static USHORT hb_clsFindClassDataOffset( PCLASS pClass, PMETHOD pNewMethod ) +static HB_USHORT hb_clsFindClassDataOffset( PCLASS pClass, PMETHOD pNewMethod ) { - USHORT uiData; + HB_USHORT uiData; HB_TRACE(HB_TR_DEBUG, ("hb_clsFindClassDataOffset(%p,%p)", pClass, pNewMethod)); @@ -865,8 +865,8 @@ static HB_BOOL hb_clsUpdateHiddenMessages( PMETHOD pSrcMethod, PMETHOD pDstMetho !( pNewMethod->uiScope & HB_OO_CLSTP_HIDDEN ) && hb_clsCanClearMethod( pDstMethod, HB_FALSE ) ) { - USHORT uiPrevCls = pDstMethod->uiPrevCls, - uiPrevMth = pDstMethod->uiPrevMth; + HB_USHORT uiPrevCls = pDstMethod->uiPrevCls, + uiPrevMth = pDstMethod->uiPrevMth; memcpy( pDstMethod, pNewMethod, sizeof( METHOD ) ); pDstMethod->uiPrevCls = uiPrevCls; @@ -882,13 +882,13 @@ static HB_BOOL hb_clsUpdateHiddenMessages( PMETHOD pSrcMethod, PMETHOD pDstMetho pDstMethod->pFuncSym == &s___msgGetClsData ) { PCLASS pSrcClass = s_pClasses[ pDstMethod->uiSprClass ]; - USHORT uiData; + HB_USHORT uiData; uiData = hb_clsFindClassDataOffset( pDstClass, pDstMethod ); if( uiData == 0 ) { - uiData = ( USHORT ) hb_arrayLen( pDstClass->pClassDatas ) + 1; + uiData = ( HB_USHORT ) hb_arrayLen( pDstClass->pClassDatas ) + 1; hb_arraySize( pDstClass->pClassDatas, uiData ); } if( pDstMethod->uiOffset ) @@ -931,7 +931,7 @@ static void hb_clsCopyClass( PCLASS pClsDst, PCLASS pClsSrc ) if( pClsSrc->uiInitDatas ) { ULONG ulSize = ( ULONG ) pClsSrc->uiInitDatas * sizeof( INITDATA ); - USHORT uiData; + HB_USHORT uiData; pClsDst->uiInitDatas = pClsSrc->uiInitDatas; pClsDst->pInitData = ( PINITDATA ) hb_xgrab( ulSize ); @@ -948,7 +948,7 @@ static void hb_clsCopyClass( PCLASS pClsDst, PCLASS pClsSrc ) ulLimit = hb_clsMthNum( pClsSrc ); #ifdef HB_MSG_POOL memcpy( pClsDst->puiMsgIdx, pClsSrc->puiMsgIdx, - ( ( ( ULONG ) pClsSrc->uiHashKey + 1 ) << BUCKETBITS ) * sizeof( USHORT ) ); + ( ( ( ULONG ) pClsSrc->uiHashKey + 1 ) << BUCKETBITS ) * sizeof( HB_USHORT ) ); pClsDst->uiMethodCount = pClsSrc->uiMethodCount; pClsDst->pMethods = ( PMETHOD ) hb_xrealloc( pClsDst->pMethods, ulLimit * sizeof( METHOD ) ); @@ -971,7 +971,7 @@ static void hb_clsCopyClass( PCLASS pClsDst, PCLASS pClsSrc ) static HB_BOOL hb_clsIsFriendSymbol( PCLASS pClass, PHB_SYMB pSym ) { - USHORT uiCount; + HB_USHORT uiCount; HB_TRACE(HB_TR_DEBUG, ("hb_clsIsFriendSymbol(%p,%p)", pClass, pSym)); @@ -1015,7 +1015,7 @@ static void hb_clsAddFriendSymbol( PCLASS pClass, PHB_SYMB pSym ) void hb_clsInit( void ) { PHB_SYMB pOpSym; - USHORT uiOperator; + HB_USHORT uiOperator; HB_TRACE(HB_TR_DEBUG, ("hb_clsInit()")); @@ -1070,7 +1070,7 @@ void hb_clsDoInit( void ) "HBDATE", "HBTIMESTAMP", "HBHASH", "HBLOGICAL", "HBNIL", "HBNUMERIC", "HBSYMBOL", "HBPOINTER" }; - static USHORT * s_puiHandles[] = + static HB_USHORT * s_puiHandles[] = { &s_uiArrayClass, &s_uiBlockClass, &s_uiCharacterClass, &s_uiDateClass, &s_uiTimeStampClass, &s_uiHashClass, &s_uiLogicalClass, &s_uiNilClass, &s_uiNumericClass, @@ -1081,7 +1081,7 @@ void hb_clsDoInit( void ) HB_TRACE(HB_TR_DEBUG, ("hb_clsDoInit()")); - for( i = 0; i < ( int ) ( sizeof( s_puiHandles ) / sizeof( USHORT * ) ); ++i ) + for( i = 0; i < ( int ) ( sizeof( s_puiHandles ) / sizeof( HB_USHORT * ) ); ++i ) { PHB_DYNS pFuncSym = hb_dynsymFindName( s_pszFuncNames[i] ); if( pFuncSym && hb_dynsymIsFunction( pFuncSym ) ) @@ -1108,7 +1108,7 @@ static void hb_clsRelease( PCLASS pClass ) if( pClass->uiInitDatas ) { - USHORT ui = pClass->uiInitDatas; + HB_USHORT ui = pClass->uiInitDatas; PINITDATA pInitData = pClass->pInitData; do @@ -1152,7 +1152,7 @@ void hb_clsReleaseAll( void ) if( s_uiClasses ) { - USHORT uiClass = s_uiClasses; + HB_USHORT uiClass = s_uiClasses; /* It blocks destructor execution - don't move. [druzus] */ s_uiClasses = 0; @@ -1191,7 +1191,7 @@ void hb_clsIsClassRef( void ) * to repeat scanning here [druzus]. */ #if 0 - USHORT uiClass = s_uiClasses; + HB_USHORT uiClass = s_uiClasses; HB_TRACE(HB_TR_DEBUG, ("hb_clsIsClassRef()")); @@ -1210,7 +1210,7 @@ void hb_clsIsClassRef( void ) if( pClass->uiInitDatas ) { - USHORT ui = pClass->uiInitDatas; + HB_USHORT ui = pClass->uiInitDatas; PINITDATA pInitData = pClass->pInitData; do @@ -1225,7 +1225,7 @@ void hb_clsIsClassRef( void ) #endif } -HB_BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ) +HB_BOOL hb_clsIsParent( HB_USHORT uiClass, const char * szParentName ) { if( uiClass && uiClass <= s_uiClasses ) { @@ -1245,7 +1245,7 @@ HB_BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ) return HB_FALSE; } -USHORT hb_objGetClass( PHB_ITEM pItem ) +HB_USHORT hb_objGetClass( PHB_ITEM pItem ) { if( pItem && HB_IS_ARRAY( pItem ) ) return pItem->item.asArray.value->uiClass; @@ -1254,9 +1254,9 @@ USHORT hb_objGetClass( PHB_ITEM pItem ) } /* get object class handle using class name and class function name */ -USHORT hb_objSetClass( PHB_ITEM pItem, const char * szClass, const char * szFunc ) +HB_USHORT hb_objSetClass( PHB_ITEM pItem, const char * szClass, const char * szFunc ) { - USHORT uiClass = 0; + HB_USHORT uiClass = 0; if( pItem && HB_IS_ARRAY( pItem ) && pItem->item.asArray.value->uiClass == 0 ) @@ -1272,7 +1272,7 @@ USHORT hb_objSetClass( PHB_ITEM pItem, const char * szClass, const char * szFunc /* * Get the class handle */ -static USHORT hb_objGetClassH( PHB_ITEM pObject ) +static HB_USHORT hb_objGetClassH( PHB_ITEM pObject ) { HB_TRACE(HB_TR_DEBUG, ("hb_objGetClassH(%p)", pObject)); @@ -1366,7 +1366,7 @@ const char * hb_objGetClsName( PHB_ITEM pObject ) return "UNKNOWN"; } -const char * hb_clsName( USHORT uiClass ) +const char * hb_clsName( HB_USHORT uiClass ) { if( uiClass && uiClass <= s_uiClasses ) return s_pClasses[ uiClass ]->szName; @@ -1374,7 +1374,7 @@ const char * hb_clsName( USHORT uiClass ) return NULL; } -const char * hb_clsFuncName( USHORT uiClass ) +const char * hb_clsFuncName( HB_USHORT uiClass ) { if( uiClass && uiClass <= s_uiClasses ) return s_pClasses[ uiClass ]->pClassFuncSym ? @@ -1384,7 +1384,7 @@ const char * hb_clsFuncName( USHORT uiClass ) return NULL; } -const char * hb_clsMethodName( USHORT uiClass, USHORT uiMethod ) +const char * hb_clsMethodName( HB_USHORT uiClass, HB_USHORT uiMethod ) { if( uiClass && uiClass <= s_uiClasses && ( HB_UINT ) uiMethod < ( HB_UINT ) hb_clsMthNum( s_pClasses[ uiClass ] ) ) @@ -1396,9 +1396,9 @@ const char * hb_clsMethodName( USHORT uiClass, USHORT uiMethod ) return NULL; } -USHORT hb_clsFindClass( const char * szClass, const char * szFunc ) +HB_USHORT hb_clsFindClass( const char * szClass, const char * szFunc ) { - USHORT uiClass; + HB_USHORT uiClass; for( uiClass = 1; uiClass <= s_uiClasses; uiClass++ ) { @@ -1412,9 +1412,9 @@ USHORT hb_clsFindClass( const char * szClass, const char * szFunc ) return 0; } -static USHORT hb_clsFindClassByFunc( PHB_SYMB pClassFuncSym ) +static HB_USHORT hb_clsFindClassByFunc( PHB_SYMB pClassFuncSym ) { - USHORT uiClass; + HB_USHORT uiClass; for( uiClass = 1; uiClass <= s_uiClasses; uiClass++ ) { @@ -1459,7 +1459,7 @@ PHB_SYMB hb_clsMethodSym( PHB_ITEM pBaseSymbol ) */ const char * hb_objGetRealClsName( PHB_ITEM pObject, const char * szName ) { - USHORT uiClass; + HB_USHORT uiClass; HB_TRACE(HB_TR_DEBUG, ("hb_objGetrealClsName(%p,%s)", pObject, szName)); @@ -1508,7 +1508,7 @@ static LONG hb_clsSenderOffset( void ) #endif #if 0 -static USHORT hb_clsSenderClasss( void ) +static HB_USHORT hb_clsSenderClasss( void ) { LONG lOffset = hb_clsSenderOffset(); @@ -1519,7 +1519,7 @@ static USHORT hb_clsSenderClasss( void ) } #endif -static USHORT hb_clsSenderMethodClasss( void ) +static HB_USHORT hb_clsSenderMethodClasss( void ) { LONG lOffset = hb_clsSenderOffset(); @@ -1557,7 +1557,7 @@ static PHB_SYMB hb_clsSenderSymbol( void ) return hb_vmGetRealFuncSym( pSym ); } -static USHORT hb_clsSenderObjectClasss( void ) +static HB_USHORT hb_clsSenderObjectClasss( void ) { LONG lOffset = hb_clsSenderOffset(); @@ -1577,7 +1577,7 @@ static PHB_SYMB hb_clsValidScope( PMETHOD pMethod, PHB_STACK_STATE pStack ) if( pMethod->uiScope & ( HB_OO_CLSTP_HIDDEN | HB_OO_CLSTP_PROTECTED | HB_OO_CLSTP_OVERLOADED ) ) { - USHORT uiSenderClass = hb_clsSenderMethodClasss(); + HB_USHORT uiSenderClass = hb_clsSenderMethodClasss(); if( uiSenderClass ) { @@ -1597,7 +1597,7 @@ static PHB_SYMB hb_clsValidScope( PMETHOD pMethod, PHB_STACK_STATE pStack ) pHiddenMthd->uiSprClass == uiSenderClass ) { pStack->uiClass = uiSenderClass; - pStack->uiMethod = ( USHORT ) ( pHiddenMthd - pClass->pMethods ); + pStack->uiMethod = ( HB_USHORT ) ( pHiddenMthd - pClass->pMethods ); return pHiddenMthd->pFuncSym; } } @@ -1646,7 +1646,7 @@ static PHB_SYMB hb_clsScalarMethod( PCLASS pClass, PHB_DYNS pMsg, pStack->uiClass = pClass->uiClass; if( pMethod ) { - pStack->uiMethod = ( USHORT ) ( pMethod - pClass->pMethods ); + pStack->uiMethod = ( HB_USHORT ) ( pMethod - pClass->pMethods ); return hb_clsValidScope( pMethod, pStack ); } } @@ -1657,7 +1657,7 @@ static PHB_SYMB hb_clsScalarMethod( PCLASS pClass, PHB_DYNS pMsg, } static void hb_clsMakeSuperObject( PHB_ITEM pDest, PHB_ITEM pObject, - USHORT uiSuperClass ) + HB_USHORT uiSuperClass ) { HB_TRACE(HB_TR_DEBUG, ("hb_clsMakeSuperObject(%p, %p, %hu)", pDest, pObject, uiSuperClass)); @@ -1715,7 +1715,7 @@ PHB_SYMB hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pMessage, } #ifdef HB_MSG_POOL { - USHORT uiBucket = BUCKETSIZE, * puiMsgIdx = + HB_USHORT uiBucket = BUCKETSIZE, * puiMsgIdx = pClass->puiMsgIdx + hb_clsBucketPos( pMsg, pClass->uiHashKey ); do @@ -1735,7 +1735,7 @@ PHB_SYMB hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pMessage, PMETHOD pMethod = hb_clsFindMsg( pClass, pMsg ); if( pMethod ) { - pStack->uiMethod = ( USHORT ) ( pMethod - pClass->pMethods ); + pStack->uiMethod = ( HB_USHORT ) ( pMethod - pClass->pMethods ); return hb_clsValidScope( pMethod, pStack ); } } @@ -2047,7 +2047,7 @@ PHB_SYMB hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pMessage, PMETHOD pMethod = hb_clsFindMsg( pClass, s___msgOnError.pDynSym ); if( pMethod ) { - pStack->uiMethod = ( USHORT ) ( pMethod - pClass->pMethods ); + pStack->uiMethod = ( HB_USHORT ) ( pMethod - pClass->pMethods ); return pMethod->pFuncSym; } } @@ -2082,10 +2082,10 @@ HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, HB_STACK_TLS_PRELOAD if( pExecSym->value.pFunPtr == HB_FUNCNAME( msgSetData ) ) { - USHORT uiObjClass = pObject->item.asArray.value->uiClass; - PCLASS pClass = s_pClasses[ pStack->uiClass ]; - PMETHOD pMethod = pClass->pMethods + pStack->uiMethod; - ULONG ulIndex = pMethod->uiData; + HB_USHORT uiObjClass = pObject->item.asArray.value->uiClass; + PCLASS pClass = s_pClasses[ pStack->uiClass ]; + PMETHOD pMethod = pClass->pMethods + pStack->uiMethod; + ULONG ulIndex = pMethod->uiData; if( pStack->uiClass != uiObjClass ) ulIndex += hb_clsParentInstanceOffset( s_pClasses[ uiObjClass ], @@ -2137,7 +2137,7 @@ HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, /* * Check if class has object destructors */ -HB_BOOL hb_clsHasDestructor( USHORT uiClass ) +HB_BOOL hb_clsHasDestructor( HB_USHORT uiClass ) { if( uiClass && uiClass <= s_uiClasses ) return s_pClasses[ uiClass ]->fHasDestructor; @@ -2154,7 +2154,7 @@ static void hb_objSupperDestructorCall( PHB_ITEM pObject, PCLASS pClass ) PMETHOD pMethod = pClass->pMethods; ULONG ulLimit = hb_clsMthNum( pClass ); char * pcClasses; - USHORT uiClass; + HB_USHORT uiClass; pcClasses = ( char * ) hb_xgrab( s_uiClasses + 1 ); memset( pcClasses, 0, s_uiClasses + 1 ); @@ -2228,9 +2228,9 @@ void hb_objDestructorCall( PHB_ITEM pObject ) /* * Check if object has a given operator */ -HB_BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ) +HB_BOOL hb_objHasOperator( PHB_ITEM pObject, HB_USHORT uiOperator ) { - USHORT uiClass; + HB_USHORT uiClass; HB_TRACE(HB_TR_DEBUG, ("hb_objHasOperator(%p,%hu)", pObject, uiOperator)); @@ -2248,7 +2248,7 @@ HB_BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ) * Function return HB_TRUE when object class overloads given operator * and HB_FALSE otherwise. [druzus] */ -HB_BOOL hb_objOperatorCall( USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObject, +HB_BOOL hb_objOperatorCall( HB_USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObject, PHB_ITEM pMsgArg1, PHB_ITEM pMsgArg2 ) { HB_TRACE(HB_TR_DEBUG, ("hb_objOperatorCall(%hu,%p,%p,%p,%p)", uiOperator, pResult, pObject, pMsgArg1, pMsgArg2)); @@ -2327,7 +2327,7 @@ PHB_ITEM hb_objSendMessage( PHB_ITEM pObject, PHB_DYNS pMsgSym, ULONG ulArg, ... } va_end( ap ); } - hb_vmSend( ( USHORT ) ulArg ); + hb_vmSend( ( HB_USHORT ) ulArg ); } else hb_errRT_BASE( EG_ARG, 3000, NULL, "__ObjSendMessage()", 0 ); @@ -2354,7 +2354,7 @@ PHB_ITEM hb_objSendMsg( PHB_ITEM pObject, const char *sMsg, ULONG ulArg, ... ) } va_end( ap ); } - hb_vmSend( ( USHORT ) ulArg ); + hb_vmSend( ( HB_USHORT ) ulArg ); { HB_STACK_TLS_PRELOAD @@ -2413,7 +2413,7 @@ void hb_dbg_objSendMessage( int iProcLevel, PHB_ITEM pObject, PHB_ITEM pMessage, pMsgSym = hb_objGetMsgSym( pMessage ); if( pObject && pMsgSym ) { - USHORT uiParams = 0; + HB_USHORT uiParams = 0; /* set requested sender class and method id for scope verification */ if( iProcLevel > 0 ) @@ -2437,7 +2437,7 @@ void hb_dbg_objSendMessage( int iProcLevel, PHB_ITEM pObject, PHB_ITEM pMessage, { /* set scope like for internal object messages to any visible method without respecting overloaded methods */ - USHORT uiClass = hb_objGetClassH( pObject ); + HB_USHORT uiClass = hb_objGetClassH( pObject ); if( uiClass && uiClass <= s_uiClasses ) { @@ -2448,7 +2448,7 @@ void hb_dbg_objSendMessage( int iProcLevel, PHB_ITEM pObject, PHB_ITEM pMessage, pBase->item.asSymbol.stackstate->uiClass = uiClass; pBase->item.asSymbol.stackstate->uiMethod = - ( USHORT ) ( pMethod - s_pClasses[ uiClass ]->pMethods ); + ( HB_USHORT ) ( pMethod - s_pClasses[ uiClass ]->pMethods ); } } } @@ -2473,7 +2473,7 @@ void hb_dbg_objSendMessage( int iProcLevel, PHB_ITEM pObject, PHB_ITEM pMessage, hb_errRT_BASE( EG_ARG, 3000, NULL, "hb_dbg_objSendMessage()", 2, pObject, pMsgSym ); } -static USHORT hb_clsUpdateScope( USHORT uiScope, HB_BOOL fAssign ) +static HB_USHORT hb_clsUpdateScope( HB_USHORT uiScope, HB_BOOL fAssign ) { if( !fAssign ) uiScope &= ~HB_OO_CLSTP_READONLY; @@ -2641,20 +2641,20 @@ static HB_TYPE hb_clsGetItemType( PHB_ITEM pItem, HB_TYPE nDefault ) * HB_OO_MSG_CLSASSIGN : / * HB_OO_MSG_SUPER : Superclass handle */ -static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, - USHORT uiType, USHORT uiScope, +static HB_BOOL hb_clsAddMsg( HB_USHORT uiClass, const char * szMessage, + HB_USHORT uiType, HB_USHORT uiScope, PHB_ITEM pFunction, PHB_ITEM pInit ) { if( szMessage && uiClass && uiClass <= s_uiClasses ) { - PCLASS pClass = s_pClasses[ uiClass ]; + PCLASS pClass = s_pClasses[ uiClass ]; - PHB_DYNS pMessage; - PMETHOD pNewMeth; - USHORT uiOperator, uiSprClass = 0, uiIndex = 0, uiPrevCls, uiPrevMth; - PHB_SYMB pOpSym, pFuncSym = NULL; - HB_BOOL fOK; - ULONG ulOpFlags = 0; + PHB_DYNS pMessage; + PMETHOD pNewMeth; + HB_USHORT uiOperator, uiSprClass = 0, uiIndex = 0, uiPrevCls, uiPrevMth; + PHB_SYMB pOpSym, pFuncSym = NULL; + HB_BOOL fOK; + ULONG ulOpFlags = 0; if( pClass->fLocked ) return HB_FALSE; @@ -2747,15 +2747,15 @@ static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, break; case HB_OO_MSG_SUPER: - uiIndex = ( USHORT ) hb_itemGetNI( pFunction ); - uiSprClass = ( USHORT ) hb_itemGetNI( pInit ); + uiIndex = ( HB_USHORT ) hb_itemGetNI( pFunction ); + uiSprClass = ( HB_USHORT ) hb_itemGetNI( pInit ); fOK = uiSprClass && uiSprClass <= s_uiClasses && uiIndex <= pClass->uiDatas; break; case HB_OO_MSG_ASSIGN: case HB_OO_MSG_ACCESS: - uiIndex = ( USHORT ) hb_itemGetNI( pFunction ); + uiIndex = ( HB_USHORT ) hb_itemGetNI( pFunction ); /* This validation can break buggy .prg code which wrongly * sets data offsets but IMHO it will help to clean the code. * [druzus] @@ -2765,7 +2765,7 @@ static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, case HB_OO_MSG_CLSASSIGN: case HB_OO_MSG_CLSACCESS: - uiIndex = ( USHORT ) hb_itemGetNI( pFunction ); + uiIndex = ( HB_USHORT ) hb_itemGetNI( pFunction ); fOK = uiIndex != 0; break; @@ -2776,7 +2776,7 @@ static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, { pNewMeth = hb_clsFindMsg( pClass, pDelegMsg ); if( pNewMeth ) - uiIndex = ( USHORT ) ( pNewMeth - pClass->pMethods ); + uiIndex = ( HB_USHORT ) ( pNewMeth - pClass->pMethods ); } fOK = uiIndex != 0; break; @@ -2802,7 +2802,7 @@ static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, return HB_FALSE; uiPrevCls = uiClass; - uiPrevMth = ( USHORT ) ( pClass->pMethods - pNewMeth ); + uiPrevMth = ( HB_USHORT ) ( pClass->pMethods - pNewMeth ); #ifndef HB_VIRTUAL_HIDDEN if( uiScope & HB_OO_CLSTP_HIDDEN ) @@ -2926,7 +2926,7 @@ static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, pNewMeth->pFuncSym = &s___msgEvalInline; pNewMeth->uiScope = uiScope; hb_arrayAdd( pClass->pInlines, pFunction ); - pNewMeth->uiData = ( USHORT ) hb_arrayLen( pClass->pInlines ); + pNewMeth->uiData = ( HB_USHORT ) hb_arrayLen( pClass->pInlines ); break; case HB_OO_MSG_VIRTUAL: @@ -3052,15 +3052,15 @@ static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, HB_FUNC( __CLSADDMSG ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); const char * szMessage = hb_parc( 2 ); if( szMessage && uiClass && uiClass <= s_uiClasses ) { - USHORT nType = ( USHORT ) hb_parni( 4 ); - USHORT uiScope = ( USHORT ) hb_parni( 6 ); - PHB_ITEM pFunction = hb_param( 3, HB_IT_ANY ); - PHB_ITEM pInit = hb_param( 5, HB_IT_ANY ); + HB_USHORT nType = ( HB_USHORT ) hb_parni( 4 ); + HB_USHORT uiScope = ( HB_USHORT ) hb_parni( 6 ); + PHB_ITEM pFunction = hb_param( 3, HB_IT_ANY ); + PHB_ITEM pInit = hb_param( 5, HB_IT_ANY ); if( nType == HB_OO_MSG_DATA ) { @@ -3088,14 +3088,14 @@ HB_FUNC( __CLSADDMSG ) if( nType == HB_OO_MSG_PROPERTY ) { hb_clsAddMsg( uiClass, szAssign, HB_OO_MSG_ASSIGN, - ( USHORT ) ( uiScope & ~HB_OO_CLSTP_PERSIST ), + ( HB_USHORT ) ( uiScope & ~HB_OO_CLSTP_PERSIST ), pFunction, pInit ); nType = HB_OO_MSG_ACCESS; } else { hb_clsAddMsg( uiClass, szAssign, HB_OO_MSG_CLSASSIGN, - ( USHORT ) ( uiScope & ~HB_OO_CLSTP_PERSIST ), + ( HB_USHORT ) ( uiScope & ~HB_OO_CLSTP_PERSIST ), pFunction, pInit ); nType = HB_OO_MSG_CLSACCESS; } @@ -3120,17 +3120,17 @@ HB_FUNC( __CLSADDMSG ) * when true all functions and classes from the same * module as pClassFunc are defined as friends */ -static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, - PHB_ITEM pSuperArray, PHB_SYMB pClassFunc, - HB_BOOL fModuleFriendly ) +static HB_USHORT hb_clsNew( const char * szClassName, HB_USHORT uiDatas, + PHB_ITEM pSuperArray, PHB_SYMB pClassFunc, + HB_BOOL fModuleFriendly ) { PCLASS pNewCls; PMETHOD pMethod; - USHORT ui, uiSuper, uiSuperCls; - USHORT * puiClassData = NULL, uiClassDataSize = 0; + HB_USHORT ui, uiSuper, uiSuperCls; + HB_USHORT * puiClassData = NULL, uiClassDataSize = 0; HB_BOOL fClsMutex = HB_FALSE; - uiSuper = ( USHORT ) ( pSuperArray ? hb_arrayLen( pSuperArray ) : 0 ); + uiSuper = ( HB_USHORT ) ( pSuperArray ? hb_arrayLen( pSuperArray ) : 0 ); pClassFunc = hb_vmGetRealFuncSym( pClassFunc ); pNewCls = ( PCLASS ) hb_xgrab( sizeof( CLASS ) ); @@ -3160,7 +3160,7 @@ static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, for( ui = 1; ui <= uiSuper; ++ui ) { - uiSuperCls = ( USHORT ) hb_arrayGetNI( pSuperArray, ui ); + uiSuperCls = ( HB_USHORT ) hb_arrayGetNI( pSuperArray, ui ); if( uiSuperCls && uiSuperCls < s_uiClasses ) { PCLASS pSprCls; @@ -3173,23 +3173,23 @@ static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, else if( !hb_clsHasParent( pNewCls, pSprCls->pClassSym ) ) { ULONG ul, ulLimit; - USHORT nLenClsDatas; + HB_USHORT nLenClsDatas; /* create class data translation tables */ - nLenClsDatas = ( USHORT ) hb_itemSize( pSprCls->pClassDatas ); + nLenClsDatas = ( HB_USHORT ) hb_itemSize( pSprCls->pClassDatas ); if( nLenClsDatas ) { if( nLenClsDatas > uiClassDataSize ) { if( puiClassData ) - puiClassData = ( USHORT * ) hb_xrealloc( puiClassData, - sizeof( USHORT ) * nLenClsDatas ); + puiClassData = ( HB_USHORT * ) hb_xrealloc( puiClassData, + sizeof( HB_USHORT ) * nLenClsDatas ); else - puiClassData = ( USHORT * ) hb_xgrab( sizeof( USHORT ) * + puiClassData = ( HB_USHORT * ) hb_xgrab( sizeof( HB_USHORT ) * nLenClsDatas ); uiClassDataSize = nLenClsDatas; } - memset( puiClassData, 0, sizeof( USHORT ) * nLenClsDatas ); + memset( puiClassData, 0, sizeof( HB_USHORT ) * nLenClsDatas ); } /* Copy super class handles */ @@ -3233,12 +3233,12 @@ static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, /* Copy instance area init data */ if( pSprCls->uiInitDatas ) { - USHORT u; + HB_USHORT u; for( u = 0; u < pSprCls->uiInitDatas; ++u ) { if( pSprCls->pInitData[ u ].uiType == HB_OO_MSG_DATA ) { - USHORT uiCls = pSprCls->pInitData[ u ].uiSprClass; + HB_USHORT uiCls = pSprCls->pInitData[ u ].uiSprClass; hb_clsAddInitValue( pNewCls, pSprCls->pInitData[ u ].pInitValue, HB_OO_MSG_DATA, pSprCls->pInitData[ u ].uiData, @@ -3275,7 +3275,7 @@ static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, if( puiClassData[ pMethod->uiData - 1 ] == 0 ) { - puiClassData[ pMethod->uiData - 1 ] = ( USHORT ) + puiClassData[ pMethod->uiData - 1 ] = ( HB_USHORT ) hb_arrayLen( pNewCls->pClassDatas ) + 1; hb_arraySize( pNewCls->pClassDatas, puiClassData[ pMethod->uiData - 1 ] ); @@ -3395,8 +3395,8 @@ HB_FUNC( __CLSNEW ) ( ! pModFriend || HB_IS_LOGICAL( pModFriend ) ) ) { HB_STACK_TLS_PRELOAD - USHORT uiClass; - uiClass = hb_clsNew( szClassName, ( USHORT ) hb_itemGetNI( pDatas ), + HB_USHORT uiClass; + uiClass = hb_clsNew( szClassName, ( HB_USHORT ) hb_itemGetNI( pDatas ), pSuperArray, hb_itemGetSymbol( pClassFunc ), hb_itemGetL( pModFriend ) ); hb_retni( uiClass ); @@ -3412,7 +3412,7 @@ HB_FUNC( __CLSNEW ) */ HB_FUNC( __CLSADDFRIEND ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); if( uiClass && uiClass <= s_uiClasses ) { @@ -3438,7 +3438,7 @@ HB_FUNC( __CLSADDFRIEND ) */ HB_FUNC( __CLSDELMSG ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); PHB_ITEM pString = hb_param( 2, HB_IT_STRING ); if( uiClass && uiClass <= s_uiClasses && pString && @@ -3457,14 +3457,14 @@ HB_FUNC( __CLSDELMSG ) * * Create a new object from class definition */ -static PHB_ITEM hb_clsInst( USHORT uiClass ) +static PHB_ITEM hb_clsInst( HB_USHORT uiClass ) { PHB_ITEM pSelf = NULL; if( uiClass && uiClass <= s_uiClasses ) { - PCLASS pClass = s_pClasses[ uiClass ]; - USHORT uiDatas = pClass->uiDatas; + PCLASS pClass = s_pClasses[ uiClass ]; + HB_USHORT uiDatas = pClass->uiDatas; if( pClass->uiMutexOffset ) ++uiDatas; @@ -3482,7 +3482,7 @@ static PHB_ITEM hb_clsInst( USHORT uiClass ) if( pClass->uiInitDatas ) { PINITDATA pInitData = pClass->pInitData; - USHORT ui = pClass->uiInitDatas; + HB_USHORT ui = pClass->uiInitDatas; PHB_ITEM pDestItm; do @@ -3519,7 +3519,7 @@ static PHB_ITEM hb_clsInst( USHORT uiClass ) */ HB_FUNC( __CLSINST ) { - PHB_ITEM pSelf = hb_clsInst( ( USHORT ) hb_parni( 1 ) ); + PHB_ITEM pSelf = hb_clsInst( ( HB_USHORT ) hb_parni( 1 ) ); if( pSelf ) hb_itemReturnRelease( pSelf ); @@ -3531,7 +3531,7 @@ HB_FUNC( __CLSINST ) */ HB_FUNC( __CLSLOCK ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); if( uiClass && uiClass <= s_uiClasses ) s_pClasses[ uiClass ]->fLocked = HB_TRUE; @@ -3544,7 +3544,7 @@ HB_FUNC( __CLSLOCK ) */ HB_FUNC( __CLSMODMSG ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); PHB_ITEM pString = hb_param( 2, HB_IT_STRING ); if( uiClass && uiClass <= s_uiClasses && pString && @@ -3618,7 +3618,7 @@ HB_FUNC( __CLSMODMSG ) else { hb_arrayAdd( pClass->pInlines, pBlock ); - pMethod->uiData = ( USHORT ) hb_arrayLen( pClass->pInlines ); + pMethod->uiData = ( HB_USHORT ) hb_arrayLen( pClass->pInlines ); } } else @@ -3648,12 +3648,12 @@ HB_FUNC( __OBJGETCLSNAME ) { HB_STACK_TLS_PRELOAD PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT ); - USHORT uiClass; + HB_USHORT uiClass; if( pObject ) uiClass = pObject->item.asArray.value->uiClass; else - uiClass = ( USHORT ) hb_parni( 1 ); + uiClass = ( HB_USHORT ) hb_parni( 1 ); hb_retc( hb_clsName( uiClass ) ); } @@ -3709,8 +3709,8 @@ HB_FUNC( __OBJSENDMSG ) if( pMessage ) { HB_STACK_TLS_PRELOAD - USHORT uiPCount = hb_pcount(); - USHORT uiParam; + HB_USHORT uiPCount = hb_pcount(); + HB_USHORT uiParam; hb_vmPushSymbol( pMessage->pSymbol ); /* Push message symbol */ hb_vmPush( hb_param( 1, HB_IT_ANY ) ); /* Push object */ @@ -3718,7 +3718,7 @@ HB_FUNC( __OBJSENDMSG ) for( uiParam = 3; uiParam <= uiPCount; ++uiParam ) /* Push arguments on stack */ hb_vmPush( hb_stackItemFromBase( uiParam ) ); - hb_vmSend( ( USHORT ) ( uiPCount - 2 ) ); /* Execute message */ + hb_vmSend( ( HB_USHORT ) ( uiPCount - 2 ) ); /* Execute message */ } else hb_errRT_BASE( EG_ARG, 3000, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -3749,7 +3749,7 @@ HB_FUNC( __CLSINSTSUPER ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem = hb_param( 1, HB_IT_STRING | HB_IT_SYMBOL ); - USHORT uiClassH = 0, uiClass; + HB_USHORT uiClassH = 0, uiClass; PHB_SYMB pClassFuncSym = NULL; if( pItem ) @@ -3827,7 +3827,7 @@ HB_FUNC( __CLSINSTSUPER ) HB_FUNC( __CLSASSOCTYPE ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); PHB_ITEM pType = hb_param( 2, HB_IT_ANY ); HB_BOOL fResult = HB_FALSE; @@ -3900,7 +3900,7 @@ HB_FUNC( __CLSCNTCLASSES ) HB_FUNC( __CLS_CNTCLSDATA ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); hb_retni( uiClass && uiClass <= s_uiClasses ? hb_arrayLen( s_pClasses[ uiClass ]->pClassDatas ) : 0 ); @@ -3914,7 +3914,7 @@ HB_FUNC( __CLS_CNTCLSDATA ) HB_FUNC( __CLS_CNTSHRDATA ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); hb_retni( uiClass && uiClass <= s_uiClasses ? hb_arrayLen( s_pClasses[ uiClass ]->pSharedDatas ) : 0 ); @@ -3928,7 +3928,7 @@ HB_FUNC( __CLS_CNTSHRDATA ) HB_FUNC( __CLS_CNTDATA ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); hb_retni( uiClass && uiClass <= s_uiClasses ? s_pClasses[ uiClass ]->uiDatas : 0 ); @@ -3942,7 +3942,7 @@ HB_FUNC( __CLS_CNTDATA ) HB_FUNC( __CLS_DECDATA ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); if( uiClass && uiClass <= s_uiClasses && s_pClasses[ uiClass ]->uiDatas > s_pClasses[ uiClass ]->uiDataFirst ) @@ -3962,7 +3962,7 @@ HB_FUNC( __CLS_DECDATA ) HB_FUNC( __CLS_INCDATA ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); if( uiClass && uiClass <= s_uiClasses ) { @@ -4004,14 +4004,14 @@ HB_FUNC( __CLASSADD ) HB_FUNC( __CLASSNAME ) { HB_STACK_TLS_PRELOAD - hb_retc( hb_clsName( ( USHORT ) hb_parni( 1 ) ) ); + hb_retc( hb_clsName( ( HB_USHORT ) hb_parni( 1 ) ) ); } /* NOTE: Undocumented Clipper function */ HB_FUNC( __CLASSSEL ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); PHB_ITEM pReturn = hb_itemNew( NULL ); if( uiClass && uiClass <= s_uiClasses ) @@ -4047,7 +4047,7 @@ HB_FUNC( __GETMESSAGE ) HB_FUNC( __CLSPARENT ) { HB_STACK_TLS_PRELOAD - hb_retl( hb_clsIsParent( ( USHORT ) hb_parni( 1 ) , hb_parc( 2 ) ) ); + hb_retl( hb_clsIsParent( ( HB_USHORT ) hb_parni( 1 ) , hb_parc( 2 ) ) ); } HB_FUNC( __SENDER ) @@ -4093,7 +4093,7 @@ HB_FUNC( __CLSSYNCWAIT ) { PHB_ITEM pBase = hb_stackItem( lOffset ); PHB_STACK_STATE pStack = pBase->item.asSymbol.stackstate; - USHORT uiClass = pStack->uiClass; + HB_USHORT uiClass = pStack->uiClass; if( uiClass && uiClass <= s_uiClasses ) { @@ -4163,7 +4163,7 @@ HB_FUNC_STATIC( msgClassH ) HB_FUNC_STATIC( msgClassName ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; + HB_USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; if( uiClass ) hb_retc( s_pClasses[ uiClass ]->szName ); @@ -4225,7 +4225,7 @@ static int hb_methodType( PMETHOD pMethod ) HB_FUNC_STATIC( msgClassSel ) { HB_STACK_TLS_PRELOAD - USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; + HB_USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; if( uiClass && uiClass <= s_uiClasses ) { @@ -4233,11 +4233,11 @@ HB_FUNC_STATIC( msgClassSel ) PCLASS pClass = s_pClasses[ uiClass ]; PMETHOD pMethod = pClass->pMethods; ULONG ulLimit = hb_clsMthNum( pClass ), ulPos = 0; - USHORT nParam, nScope; + HB_USHORT nParam, nScope; HB_BOOL lFull; nParam = hb_parnidef( 1, HB_MSGLISTALL ); - nScope = ( USHORT ) hb_parni( 2 ); + nScope = ( HB_USHORT ) hb_parni( 2 ); lFull = hb_parl( 3 ); pReturn = hb_itemArrayNew( pClass->uiMethods ); @@ -4300,7 +4300,7 @@ HB_FUNC_STATIC( msgClassParent ) { char * szParentName = NULL; PHB_ITEM pItem; - USHORT uiClass; + HB_USHORT uiClass; uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; pItemParam = hb_param( 1, HB_IT_ANY ); @@ -4330,7 +4330,7 @@ HB_FUNC_STATIC( msgEvalInline ) PHB_STACK_STATE pStack = hb_stackBaseItem()->item.asSymbol.stackstate; PCLASS pClass = s_pClasses[ pStack->uiClass ]; PMETHOD pMethod = pClass->pMethods + pStack->uiMethod; - USHORT uiPCount = hb_pcount(), uiParam; + HB_USHORT uiPCount = hb_pcount(), uiParam; PHB_ITEM pBlock; hb_vmPushSymbol( &hb_symEval ); @@ -4348,14 +4348,14 @@ HB_FUNC_STATIC( msgEvalInline ) hb_vmPush( hb_stackItemFromBase( uiParam ) ); } - hb_vmSend( ( USHORT ) ( uiPCount + 1 ) ); + hb_vmSend( ( HB_USHORT ) ( uiPCount + 1 ) ); } HB_FUNC_STATIC( msgPerform ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem = hb_param( 1, HB_IT_ANY ); - USHORT uiPCount = hb_pcount(), uiParam; + HB_USHORT uiPCount = hb_pcount(), uiParam; PHB_SYMB pSym = NULL; if( pItem ) @@ -4382,7 +4382,7 @@ HB_FUNC_STATIC( msgPerform ) { hb_vmPush( hb_stackItemFromBase( uiParam ) ); } - hb_vmSend( ( USHORT ) ( uiPCount - 1 ) ); + hb_vmSend( ( HB_USHORT ) ( uiPCount - 1 ) ); } } } @@ -4420,7 +4420,7 @@ HB_FUNC_STATIC( msgSync ) if( pExecSym && HB_VM_ISFUNC( pExecSym ) ) { PHB_ITEM pObject = hb_stackSelfItem(); - USHORT uiClass = hb_objGetClass( pObject ); + HB_USHORT uiClass = hb_objGetClass( pObject ); PHB_ITEM pMutex = NULL; if( uiClass && uiClass <= s_uiClasses ) @@ -4557,8 +4557,8 @@ HB_FUNC_STATIC( msgRealClass ) { HB_STACK_TLS_PRELOAD PHB_ITEM pObject = hb_stackSelfItem(); - USHORT uiClass = hb_clsSenderMethodClasss(); - USHORT uiCurClass = hb_objGetClassH( pObject ); + HB_USHORT uiClass = hb_clsSenderMethodClasss(); + HB_USHORT uiCurClass = hb_objGetClassH( pObject ); if( uiClass && uiClass != uiCurClass && hb_clsSenderObjectClasss() == uiCurClass ) @@ -4690,12 +4690,12 @@ HB_FUNC_STATIC( msgGetData ) if( HB_IS_ARRAY( pObject ) ) { - USHORT uiObjClass = pObject->item.asArray.value->uiClass; - USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; - PCLASS pClass = s_pClasses[ uiClass ]; - PMETHOD pMethod = pClass->pMethods + - hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; - ULONG ulIndex = pMethod->uiData; + HB_USHORT uiObjClass = pObject->item.asArray.value->uiClass; + HB_USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; + PCLASS pClass = s_pClasses[ uiClass ]; + PMETHOD pMethod = pClass->pMethods + + hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; + ULONG ulIndex = pMethod->uiData; if( uiClass != uiObjClass ) { @@ -4723,13 +4723,13 @@ HB_FUNC_STATIC( msgSetData ) if( HB_IS_ARRAY( pObject ) ) { - PHB_ITEM pReturn = hb_param( 1, HB_IT_ANY ); - USHORT uiObjClass = pObject->item.asArray.value->uiClass; - USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; - PCLASS pClass = s_pClasses[ uiClass ]; - PMETHOD pMethod = pClass->pMethods + - hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; - ULONG ulIndex = pMethod->uiData; + PHB_ITEM pReturn = hb_param( 1, HB_IT_ANY ); + HB_USHORT uiObjClass = pObject->item.asArray.value->uiClass; + HB_USHORT uiClass = hb_stackBaseItem()->item.asSymbol.stackstate->uiClass; + PCLASS pClass = s_pClasses[ uiClass ]; + PMETHOD pMethod = pClass->pMethods + + hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; + ULONG ulIndex = pMethod->uiData; if( uiClass != uiObjClass ) { @@ -4784,7 +4784,7 @@ void hb_mthAddTime( ULONG ulClockTicks ) { PHB_ITEM pObject = hb_stackSelfItem(); PCLASS pClass = s_pClasses[ hb_objGetClassH( pObject ) ]; - USHORT uiMethod = hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; + HB_USHORT uiMethod = hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; if( pClass && uiMethod < hb_clsMthNum( pClass ) ) { @@ -4813,8 +4813,8 @@ HB_FUNC( __GETMSGPRF ) /* profiler: returns a method called and consumed times * { HB_STACK_TLS_PRELOAD #ifndef HB_NO_PROFILER - USHORT uiClass = ( USHORT ) hb_parni( 1 ); - char * cMsg = hb_parc( 2 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); + char * cMsg = hb_parc( 2 ); hb_reta( 2 ); if( uiClass && uiClass <= s_uiClasses && cMsg && *cMsg ) @@ -4850,7 +4850,7 @@ HB_FUNC( __GETMSGPRF ) /* profiler: returns a method called and consumed times * HB_FUNC( __CLSGETPROPERTIES ) { - USHORT uiClass = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); PHB_ITEM pReturn = hb_itemNew( NULL ); if( uiClass && uiClass <= s_uiClasses ) @@ -4858,7 +4858,7 @@ HB_FUNC( __CLSGETPROPERTIES ) PCLASS pClass = s_pClasses[ uiClass ]; PMETHOD pMethod; ULONG ulLimit, ulCount; - USHORT uiScope = HB_OO_CLSTP_PERSIST; + HB_USHORT uiScope = HB_OO_CLSTP_PERSIST; if( hb_parl( 2 ) ) uiScope |= HB_OO_CLSTP_EXPORTED; @@ -4927,7 +4927,7 @@ HB_FUNC( __CLSPREALLOCATE ) if( lNewSize > ( LONG ) s_uiClsSize ) { - s_uiClsSize = ( USHORT ) lNewSize; + s_uiClsSize = ( HB_USHORT ) lNewSize; s_pClasses = ( PCLASS * ) hb_xrealloc( s_pClasses, sizeof( PCLASS ) * ( ( ULONG ) s_uiClsSize + 1 ) ); } @@ -4983,11 +4983,11 @@ HB_FUNC( HB_SETCLSHANDLE ) /* ( oObject, nClassHandle ) --> nPrevClassHandle */ { HB_STACK_TLS_PRELOAD PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT ); - USHORT uiPrevClassHandle = 0; + HB_USHORT uiPrevClassHandle = 0; if( pObject ) { - USHORT uiClass = ( USHORT ) hb_parni( 2 ); + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 2 ); uiPrevClassHandle = pObject->item.asArray.value->uiClass; if( uiClass <= s_uiClasses ) @@ -5016,13 +5016,13 @@ HB_FUNC( __OBJSETCLASS ) } /* Harbour equivalent for Clipper internal __mdCreate() */ -USHORT hb_clsCreate( USHORT usSize, const char * szClassName ) +HB_USHORT hb_clsCreate( HB_USHORT usSize, const char * szClassName ) { return hb_clsNew( szClassName, usSize, NULL, NULL, HB_FALSE ); } /* Harbour equivalent for Clipper internal __mdAdd() */ -void hb_clsAdd( USHORT usClassH, const char * szMethodName, PHB_FUNC pFuncPtr ) +void hb_clsAdd( HB_USHORT usClassH, const char * szMethodName, PHB_FUNC pFuncPtr ) { PHB_SYMB pExecSym; PHB_ITEM pFuncItem; @@ -5042,7 +5042,7 @@ void hb_clsAdd( USHORT usClassH, const char * szMethodName, PHB_FUNC pFuncPtr ) } /* Harbour equivalent for Clipper internal __mdAssociate() */ -void hb_clsAssociate( USHORT usClassH ) +void hb_clsAssociate( HB_USHORT usClassH ) { PHB_ITEM pSelf = hb_clsInst( usClassH ); @@ -5060,8 +5060,8 @@ HB_FUNC( __CLS_PARAM ) { HB_STACK_TLS_PRELOAD PHB_ITEM array; - USHORT uiParam = ( USHORT ) hb_pcount(); - USHORT n; + HB_USHORT uiParam = ( HB_USHORT ) hb_pcount(); + HB_USHORT n; if( uiParam >= 1 ) { @@ -5082,8 +5082,8 @@ HB_FUNC( __CLS_PAR00 ) { HB_STACK_TLS_PRELOAD PHB_ITEM array; - USHORT uiParam = ( USHORT ) hb_pcount(); - USHORT n; + HB_USHORT uiParam = ( HB_USHORT ) hb_pcount(); + HB_USHORT n; array = hb_itemArrayNew( uiParam ); for( n = 1; n <= uiParam; n++ ) diff --git a/harbour/src/vm/codebloc.c b/harbour/src/vm/codebloc.c index b2f4a44931..77085af857 100644 --- a/harbour/src/vm/codebloc.c +++ b/harbour/src/vm/codebloc.c @@ -88,7 +88,7 @@ static HB_GARBAGE_FUNC( hb_codeblockGarbageDelete ) if( pCBlock->pLocals ) { PHB_ITEM pLocals = pCBlock->pLocals; - USHORT uiLocals = pCBlock->uiLocals; + HB_USHORT uiLocals = pCBlock->uiLocals; /* clear pCBlock->pLocals to avoid infinit loop in cross * referenced items @@ -114,7 +114,7 @@ static HB_GARBAGE_FUNC( hb_codeblockGarbageMark ) if( pCBlock->uiLocals ) { PHB_ITEM pLocals = pCBlock->pLocals; - USHORT uiLocals = pCBlock->uiLocals; + HB_USHORT uiLocals = pCBlock->uiLocals; do hb_gcItemRef( &pLocals[ uiLocals] ); @@ -139,7 +139,7 @@ static const HB_GC_FUNCS s_gcCodeblockFuncs = * */ HB_CODEBLOCK_PTR hb_codeblockNew( const HB_BYTE * pBuffer, - USHORT uiLocals, + HB_USHORT uiLocals, const HB_BYTE * pLocalPosTable, PHB_SYMB pSymbols, HB_SIZE ulLen ) @@ -183,7 +183,7 @@ HB_CODEBLOCK_PTR hb_codeblockNew( const HB_BYTE * pBuffer, * uiLocal have to be ZERO * uiLocal will be also ZERO if it is a nested codeblock */ - USHORT ui = 1; + HB_USHORT ui = 1; PHB_ITEM pLocal; /* Create a table that will store the values of local variables diff --git a/harbour/src/vm/dynlibhb.c b/harbour/src/vm/dynlibhb.c index a0b4533f56..8b8a45e231 100644 --- a/harbour/src/vm/dynlibhb.c +++ b/harbour/src/vm/dynlibhb.c @@ -210,7 +210,7 @@ HB_FUNC( HB_LIBDO ) for( iParam = 2; iParam <= iPCount; iParam++ ) hb_vmPush( hb_stackItemFromBase( iParam ) ); - hb_vmProc( ( USHORT ) ( iPCount - 1 ) ); + hb_vmProc( ( HB_USHORT ) ( iPCount - 1 ) ); } } } diff --git a/harbour/src/vm/dynsym.c b/harbour/src/vm/dynsym.c index bdf2ab9b53..d01e761b12 100644 --- a/harbour/src/vm/dynsym.c +++ b/harbour/src/vm/dynsym.c @@ -90,7 +90,7 @@ HB_SYM_HOLDER, * PHB_SYM_HOLDER; static PDYNHB_ITEM s_pDynItems = NULL; /* Pointer to dynamic items */ -static USHORT s_uiDynSymbols = 0; /* Number of symbols present */ +static HB_USHORT s_uiDynSymbols = 0; /* Number of symbols present */ static PHB_SYM_HOLDER s_pAllocSyms = NULL;/* symbols allocated dynamically */ @@ -497,7 +497,7 @@ void hb_dynsymSetAreaHandle( PHB_DYNS pDynSym, int iArea ) { HB_TRACE(HB_TR_DEBUG, ("hb_dynsymSetAreaHandle(%p,%d)", pDynSym, iArea)); - hb_dynsymHandles( pDynSym )->uiArea = ( USHORT ) iArea; + hb_dynsymHandles( pDynSym )->uiArea = ( HB_USHORT ) iArea; } static PHB_DYNS hb_dynsymGetByIndex( long lIndex ) @@ -524,7 +524,7 @@ long hb_dynsymCount( void ) void hb_dynsymEval( PHB_DYNS_FUNC pFunction, void * Cargo ) { PHB_DYNS pDynSym = NULL; - USHORT uiPos = 0; + HB_USHORT uiPos = 0; HB_TRACE(HB_TR_DEBUG, ("hb_dynsymEval(%p, %p)", pFunction, Cargo)); @@ -558,7 +558,7 @@ void hb_dynsymEval( PHB_DYNS_FUNC pFunction, void * Cargo ) void hb_dynsymProtectEval( PHB_DYNS_FUNC pFunction, void * Cargo ) { - USHORT uiPos = 0; + HB_USHORT uiPos = 0; HB_TRACE(HB_TR_DEBUG, ("hb_dynsymProtectEval(%p, %p)", pFunction, Cargo)); diff --git a/harbour/src/vm/estack.c b/harbour/src/vm/estack.c index 548a01b918..14606fd1cb 100644 --- a/harbour/src/vm/estack.c +++ b/harbour/src/vm/estack.c @@ -393,7 +393,7 @@ void hb_stackListSet( void * pStackLst ) } #undef hb_stackIdSetActionRequest -void hb_stackIdSetActionRequest( void * pStackId, USHORT uiAction ) +void hb_stackIdSetActionRequest( void * pStackId, HB_USHORT uiAction ) { ( ( PHB_STACK ) pStackId )->uiActionRequest = uiAction; } @@ -455,7 +455,7 @@ HB_BOOL hb_stackQuitState( void ) } #undef hb_stackSetQuitState -void hb_stackSetQuitState( USHORT uiState ) +void hb_stackSetQuitState( HB_USHORT uiState ) { HB_STACK_TLS_PRELOAD hb_stack.uiQuitState = uiState; @@ -671,7 +671,7 @@ void hb_stackRemove( LONG lUntilPos ) } } -HB_ITEM_PTR hb_stackNewFrame( PHB_STACK_STATE pFrame, USHORT uiParams ) +HB_ITEM_PTR hb_stackNewFrame( PHB_STACK_STATE pFrame, HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD HB_ITEM_PTR * pBase, pItem; @@ -942,14 +942,14 @@ void hb_stackSetRecoverBase( LONG lBase ) } #undef hb_stackGetActionRequest -USHORT hb_stackGetActionRequest( void ) +HB_USHORT hb_stackGetActionRequest( void ) { HB_STACK_TLS_PRELOAD return hb_stack.uiActionRequest; } #undef hb_stackSetActionRequest -void hb_stackSetActionRequest( USHORT uiAction ) +void hb_stackSetActionRequest( HB_USHORT uiAction ) { HB_STACK_TLS_PRELOAD hb_stack.uiActionRequest = uiAction; @@ -1071,7 +1071,7 @@ LONG hb_stackBaseProcOffset( int iLevel ) return -1; } -void hb_stackBaseProcInfo( char * szProcName, USHORT * puiProcLine ) +void hb_stackBaseProcInfo( char * szProcName, HB_USHORT * puiProcLine ) { /* * This function is called by FM module and has to be ready for execution @@ -1201,7 +1201,7 @@ void hb_stackDispCall( void ) { char buffer[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 + 10 ]; /* additional 10 bytes for line info (%hu) overhead */ char file[ HB_PATH_MAX ]; - USHORT uiLine; + HB_USHORT uiLine; int iLevel; HB_TRACE(HB_TR_DEBUG, ("hb_stackDispCall()")); diff --git a/harbour/src/vm/eval.c b/harbour/src/vm/eval.c index c241f56107..7c3fba3f03 100644 --- a/harbour/src/vm/eval.c +++ b/harbour/src/vm/eval.c @@ -122,7 +122,7 @@ PHB_ITEM hb_evalLaunch( PHB_EVALINFO pEvalInfo ) { PHB_ITEM pItem = pEvalInfo->pItems[ 0 ]; PHB_SYMB pSymbol = NULL; - USHORT uiParam = 0; + HB_USHORT uiParam = 0; if( HB_IS_STRING( pItem ) ) { @@ -174,7 +174,7 @@ HB_BOOL hb_evalRelease( PHB_EVALINFO pEvalInfo ) if( pEvalInfo ) { - USHORT uiParam; + HB_USHORT uiParam; for( uiParam = 0; uiParam <= pEvalInfo->paramCount; uiParam++ ) { @@ -250,9 +250,9 @@ PHB_ITEM hb_itemDo( PHB_ITEM pItem, ULONG ulPCount, ... ) va_end( va ); } if( pItem ) - hb_vmSend( ( USHORT ) ulPCount ); + hb_vmSend( ( HB_USHORT ) ulPCount ); else - hb_vmProc( ( USHORT ) ulPCount ); + hb_vmProc( ( HB_USHORT ) ulPCount ); pResult = hb_itemNew( hb_stackReturnItem() ); hb_vmRequestRestore(); @@ -295,7 +295,7 @@ PHB_ITEM hb_itemDoC( const char * szFunc, ULONG ulPCount, ... ) hb_vmPush( va_arg( va, PHB_ITEM ) ); va_end( va ); } - hb_vmProc( ( USHORT ) ulPCount ); + hb_vmProc( ( HB_USHORT ) ulPCount ); pResult = hb_itemNew( hb_stackReturnItem() ); hb_vmRequestRestore(); } @@ -331,7 +331,7 @@ void hb_evalBlock1( PHB_ITEM pCodeBlock, PHB_ITEM pParam ) void hb_evalBlock( PHB_ITEM pCodeBlock, ... ) { va_list args; - USHORT uiParams = 0; + HB_USHORT uiParams = 0; PHB_ITEM pParam; hb_vmPushSymbol( &hb_symEval ); @@ -494,9 +494,9 @@ HB_FUNC( HB_EXECFROMARRAY ) } if( pSelf ) - hb_vmSend( ( USHORT ) iPCount ); + hb_vmSend( ( HB_USHORT ) iPCount ); else - hb_vmProc( ( USHORT ) iPCount ); + hb_vmProc( ( HB_USHORT ) iPCount ); } else hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -556,9 +556,9 @@ HB_BOOL hb_execFromArray( PHB_ITEM pParam ) } if( pSelf ) - hb_vmSend( ( USHORT ) iPCount ); + hb_vmSend( ( HB_USHORT ) iPCount ); else - hb_vmProc( ( USHORT ) iPCount ); + hb_vmProc( ( HB_USHORT ) iPCount ); return HB_TRUE; } @@ -580,7 +580,7 @@ HB_FUNC( HB_EXECMSG ) { PHB_ITEM pBase = hb_stackBaseItem(); pBase->item.asSymbol.paramcnt = pBase->item.asSymbol.paramdeclcnt = 0; - hb_vmProc( ( USHORT ) ( iParams - 2 ) ); + hb_vmProc( ( HB_USHORT ) ( iParams - 2 ) ); } else hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/src/vm/evalhb.c b/harbour/src/vm/evalhb.c index 37661788f1..4f27929f07 100644 --- a/harbour/src/vm/evalhb.c +++ b/harbour/src/vm/evalhb.c @@ -75,7 +75,7 @@ HB_FUNC( EVAL ) for( iParam = 2; iParam <= iPCount; iParam++ ) hb_vmPush( hb_stackItemFromBase( iParam ) ); - hb_vmSend( ( USHORT ) ( iPCount - 1 ) ); + hb_vmSend( ( HB_USHORT ) ( iPCount - 1 ) ); } else hb_errRT_BASE_SubstR( EG_NOMETHOD, 1004, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/src/vm/extrap.c b/harbour/src/vm/extrap.c index c1a7b05d9f..79c53c5767 100644 --- a/harbour/src/vm/extrap.c +++ b/harbour/src/vm/extrap.c @@ -304,7 +304,7 @@ static ULONG _System hb_os2ExceptionHandler( PEXCEPTIONREPORTRECORD p1, { char buffer[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 ]; char file[ HB_PATH_MAX ]; - USHORT uiLine; + HB_USHORT uiLine; int iLevel = 0; fprintf( stderr, HB_I_("\nException %lx at address %p \n"), p1->ExceptionNum, p1->ExceptionAddress ); diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index ba300d1714..26589cc239 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -271,7 +271,7 @@ typedef struct _HB_MEMINFO { HB_U32 u32Signature; HB_SIZE ulSize; - USHORT uiProcLine; + HB_USHORT uiProcLine; char szProcName[ HB_SYMBOL_NAME_LEN + 1 ]; struct _HB_MEMINFO * pPrevBlock; struct _HB_MEMINFO * pNextBlock; @@ -1100,7 +1100,7 @@ void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ { char membuffer[ HB_MAX_MEM2STR_BLOCK * 2 + 1 ]; /* multiplied by 2 to allow hex format */ PHB_MEMINFO pMemBlock; - USHORT ui; + HB_USHORT ui; char buffer[ 100 ]; FILE * hLog = NULL; diff --git a/harbour/src/vm/garbage.c b/harbour/src/vm/garbage.c index 674340f49a..24f9817847 100644 --- a/harbour/src/vm/garbage.c +++ b/harbour/src/vm/garbage.c @@ -95,7 +95,7 @@ #endif /* HB_MT_VM */ /* holder of memory block information */ -/* NOTE: USHORT is used intentionally to fill up the structure to +/* NOTE: HB_USHORT is used intentionally to fill up the structure to * full 16 bytes (on 16/32 bit environment) */ typedef struct HB_GARBAGE_ @@ -103,8 +103,8 @@ typedef struct HB_GARBAGE_ struct HB_GARBAGE_ * pNext; /* next memory block */ struct HB_GARBAGE_ * pPrev; /* previous memory block */ const HB_GC_FUNCS * pFuncs; /* cleanup function called before memory releasing */ - USHORT locked; /* locking counter */ - USHORT used; /* used/unused block */ + HB_USHORT locked; /* locking counter */ + HB_USHORT used; /* used/unused block */ } HB_GARBAGE, *HB_GARBAGE_PTR; #ifdef HB_ALLOC_ALIGNMENT @@ -163,7 +163,7 @@ static HB_BOOL s_bCollecting = HB_FALSE; /* flag for used/unused blocks - the meaning of the HB_GC_USED_FLAG bit * is reversed on every collecting attempt */ -static USHORT s_uUsedFlag = HB_GC_USED_FLAG; +static HB_USHORT s_uUsedFlag = HB_GC_USED_FLAG; static void hb_gcLink( HB_GARBAGE_PTR *pList, HB_GARBAGE_PTR pAlloc ) diff --git a/harbour/src/vm/hvm.c b/harbour/src/vm/hvm.c index e381bdaf8d..9e942ac6e1 100644 --- a/harbour/src/vm/hvm.c +++ b/harbour/src/vm/hvm.c @@ -131,7 +131,7 @@ static void hb_vmEnumStart( int nVars, int nDescend ); /* prepare FOR EACH lo static void hb_vmEnumNext( void ); /* increment FOR EACH loop counter */ static void hb_vmEnumPrev( void ); /* decrement FOR EACH loop counter */ static void hb_vmEnumEnd( void ); /* rewind the stack after FOR EACH loop counter */ -static const HB_BYTE * hb_vmSwitch( const HB_BYTE * pCode, USHORT ); /* make a SWITCH statement */ +static const HB_BYTE * hb_vmSwitch( const HB_BYTE * pCode, HB_USHORT ); /* make a SWITCH statement */ /* Operators (logical) */ static void hb_vmNot( void ); /* changes the latest logical value on the stack */ @@ -142,15 +142,15 @@ static void hb_vmOr( void ); /* performs the logical OR on the l static void hb_vmArrayPush( void ); /* pushes an array element to the stack, removing the array and the index from the stack */ static void hb_vmArrayPushRef( void ); /* pushes a reference to an array element to the stack, removing the array and the index from the stack */ static void hb_vmArrayPop( void ); /* pops a value from the stack */ -static void hb_vmArrayDim( USHORT uiDimensions ); /* generates an uiDimensions Array and initialize those dimensions from the stack values */ +static void hb_vmArrayDim( HB_USHORT uiDimensions ); /* generates an uiDimensions Array and initialize those dimensions from the stack values */ static void hb_vmArrayGen( HB_SIZE ulElements ); /* generates an ulElements Array and fills it from the stack values */ static void hb_vmHashGen( HB_SIZE ulElements ); /* generates an ulElements Hash and fills it from the stack values */ /* macros */ -static void hb_vmMacroDo( USHORT uiArgSets ); /* execute function passing arguments set(s) on HVM stack func( &var ) */ -static void hb_vmMacroFunc( USHORT uiArgSets ); /* execute procedure passing arguments set(s) on HVM stack func( &var ) */ -static void hb_vmMacroSend( USHORT uiArgSets ); /* execute procedure passing arguments set(s) on HVM stack func( &var ) */ -static void hb_vmMacroArrayGen( USHORT uiArgSets ); /* generate array from arguments set(s) on HVM stack { &var } */ +static void hb_vmMacroDo( HB_USHORT uiArgSets ); /* execute function passing arguments set(s) on HVM stack func( &var ) */ +static void hb_vmMacroFunc( HB_USHORT uiArgSets ); /* execute procedure passing arguments set(s) on HVM stack func( &var ) */ +static void hb_vmMacroSend( HB_USHORT uiArgSets ); /* execute procedure passing arguments set(s) on HVM stack func( &var ) */ +static void hb_vmMacroArrayGen( HB_USHORT uiArgSets ); /* generate array from arguments set(s) on HVM stack { &var } */ static void hb_vmMacroPushIndex( void ); /* push macro array index {...}[ &var ] */ /* Database */ @@ -159,11 +159,11 @@ static void hb_vmSwapAlias( void ); /* swaps items on the eval s /* Execution */ static HARBOUR hb_vmDoBlock( void ); /* executes a codeblock */ -static void hb_vmFrame( USHORT usLocals, unsigned char ucParams ); /* increases the stack pointer for the amount of locals and params suplied */ -static void hb_vmVFrame( USHORT usLocals, unsigned char ucParams ); /* increases the stack pointer for the amount of locals and variable number of params suplied */ +static void hb_vmFrame( HB_USHORT usLocals, unsigned char ucParams ); /* increases the stack pointer for the amount of locals and params suplied */ +static void hb_vmVFrame( HB_USHORT usLocals, unsigned char ucParams ); /* increases the stack pointer for the amount of locals and variable number of params suplied */ static void hb_vmSFrame( PHB_SYMB pSym ); /* sets the statics frame for a function */ -static void hb_vmStatics( PHB_SYMB pSym, USHORT uiStatics ); /* increases the global statics array to hold a PRG statics */ -static void hb_vmInitThreadStatics( USHORT uiCount, const HB_BYTE * pCode ); /* mark thread static variables */ +static void hb_vmStatics( PHB_SYMB pSym, HB_USHORT uiStatics ); /* increases the global statics array to hold a PRG statics */ +static void hb_vmInitThreadStatics( HB_USHORT uiCount, const HB_BYTE * pCode ); /* mark thread static variables */ static void hb_vmStaticsClear( void ); /* clear complex static variables */ static void hb_vmStaticsRelease( void ); /* release arrays with static variables */ /* Push */ @@ -172,7 +172,7 @@ static void hb_vmPushAliasedField( PHB_SYMB ); /* pushes an aliased field on static void hb_vmPushAliasedVar( PHB_SYMB ); /* pushes an aliased variable on the eval stack */ static void hb_vmPushBlock( const HB_BYTE * pCode, PHB_SYMB pSymbols, HB_SIZE ulLen ); /* creates a codeblock */ static void hb_vmPushBlockShort( const HB_BYTE * pCode, PHB_SYMB pSymbols, HB_SIZE ulLen ); /* creates a codeblock */ -static void hb_vmPushMacroBlock( const HB_BYTE * pCode, HB_SIZE ulSize, USHORT usParams ); /* creates a macro-compiled codeblock */ +static void hb_vmPushMacroBlock( const HB_BYTE * pCode, HB_SIZE ulSize, HB_USHORT usParams ); /* creates a macro-compiled codeblock */ static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec ); /* Pushes a double constant (pcode) */ static void hb_vmPushLocal( int iLocal ); /* pushes the containts of a local onto the stack */ static void hb_vmPushLocalByRef( int iLocal ); /* pushes a local by refrence onto the stack */ @@ -185,8 +185,8 @@ static void hb_vmPushIntegerConst( int iNumber ); /* Pushes a int constant ( #else static void hb_vmPushLongConst( long lNumber ); /* Pushes a long constant (pcode) */ #endif -static void hb_vmPushStatic( USHORT uiStatic ); /* pushes the containts of a static onto the stack */ -static void hb_vmPushStaticByRef( USHORT uiStatic ); /* pushes a static by refrence onto the stack */ +static void hb_vmPushStatic( HB_USHORT uiStatic ); /* pushes the containts of a static onto the stack */ +static void hb_vmPushStaticByRef( HB_USHORT uiStatic ); /* pushes a static by refrence onto the stack */ static void hb_vmPushVariable( PHB_SYMB pVarSymb ); /* pushes undeclared variable */ static void hb_vmPushObjectVarRef( void ); /* pushes reference to object variable */ static void hb_vmPushVParams( void ); /* pusges variable parameters */ @@ -201,7 +201,7 @@ static void hb_vmPopAlias( void ); /* pops the workarea number fo static void hb_vmPopAliasedField( PHB_SYMB ); /* pops an aliased field from the eval stack*/ static void hb_vmPopAliasedVar( PHB_SYMB ); /* pops an aliased variable from the eval stack*/ static void hb_vmPopLocal( int iLocal ); /* pops the stack latest value onto a local */ -static void hb_vmPopStatic( USHORT uiStatic ); /* pops the stack latest value onto a static */ +static void hb_vmPopStatic( HB_USHORT uiStatic ); /* pops the stack latest value onto a static */ /* misc */ static void hb_vmDoInitStatics( void ); /* executes all _INITSTATICS functions */ @@ -212,13 +212,13 @@ static void hb_vmReleaseLocalSymbols( void ); /* releases the memory of the static void hb_vmMsgIndexReference( PHB_ITEM pRefer, PHB_ITEM pObject, PHB_ITEM pIndex ); /* create object index reference */ #ifndef HB_NO_DEBUG -static void hb_vmLocalName( USHORT uiLocal, const char * szLocalName ); /* locals and parameters index and name information for the debugger */ -static void hb_vmStaticName( HB_BYTE bIsGlobal, USHORT uiStatic, const char * szStaticName ); /* statics vars information for the debugger */ +static void hb_vmLocalName( HB_USHORT uiLocal, const char * szLocalName ); /* locals and parameters index and name information for the debugger */ +static void hb_vmStaticName( HB_BYTE bIsGlobal, HB_USHORT uiStatic, const char * szStaticName ); /* statics vars information for the debugger */ static void hb_vmModuleName( const char * szModuleName ); /* PRG and function name information for the debugger */ static void hb_vmDebugEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM pFrame ); static void hb_vmDebuggerExit( HB_BOOL fRemove ); /* shuts down the debugger */ -static void hb_vmDebuggerShowLine( USHORT uiLine ); /* makes the debugger shows a specific source code line */ +static void hb_vmDebuggerShowLine( HB_USHORT uiLine ); /* makes the debugger shows a specific source code line */ static void hb_vmDebuggerEndProc( void ); /* notifies the debugger for an endproc */ static PHB_DYNS s_pDynsDbgEntry = NULL; /* Cached __DBGENTRY symbol */ @@ -881,7 +881,7 @@ void hb_vmSetFunction( PHB_SYMB pOldSym, PHB_SYMB pNewSym ) while( pLastSymbols ) { - USHORT ui, uiSymbols = pLastSymbols->uiModuleSymbols; + HB_USHORT ui, uiSymbols = pLastSymbols->uiModuleSymbols; for( ui = 0; ui < uiSymbols; ++ui ) { @@ -1071,7 +1071,7 @@ void hb_vmInit( HB_BOOL bStartMainProc ) } } - hb_vmProc( ( USHORT ) iArgCount ); /* invoke it with number of supplied parameters */ + hb_vmProc( ( HB_USHORT ) iArgCount ); /* invoke it with number of supplied parameters */ } } @@ -1712,7 +1712,7 @@ void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols ) case HB_P_THREADSTATICS: { - USHORT uiCount = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); + HB_USHORT uiCount = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); hb_vmInitThreadStatics( uiCount, &pCode[ 3 ] ); pCode += 3 + ( ( ULONG ) uiCount << 1 ); break; @@ -1837,7 +1837,7 @@ void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols ) case HB_P_ALWAYSEND: { - USHORT uiPrevAction, uiCurrAction; + HB_USHORT uiPrevAction, uiCurrAction; #if defined( _HB_RECOVER_DEBUG ) if( hb_stackItemFromTop( HB_RECOVER_STATE )->type != HB_IT_RECOVER ) @@ -2136,7 +2136,7 @@ void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols ) case HB_P_PUSHSTR: { - USHORT uiSize = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); + HB_USHORT uiSize = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); if( bDynCode ) hb_vmPushString( ( const char * ) pCode + 3, uiSize - 1 ); else @@ -2684,7 +2684,7 @@ void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols ) case HB_P_MPUSHSTR: { - USHORT uiSize = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); + HB_USHORT uiSize = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); hb_vmPushString( ( const char * ) ( pCode + 3 ), uiSize - 1 ); pCode += 3 + uiSize; @@ -2757,7 +2757,7 @@ void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols ) case HB_P_WITHOBJECTMESSAGE: { PHB_ITEM pWith; - USHORT wSymPos = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); + HB_USHORT wSymPos = HB_PCODE_MKUSHORT( &pCode[ 1 ] ); if( wSymPos != 0xFFFF ) { /* NOTE: 0xFFFF is passed when ':&varmacro' syntax is used. @@ -4841,7 +4841,7 @@ static PHB_ITEM hb_vmSwitchGet( void ) return pSwitch; } -static const HB_BYTE * hb_vmSwitch( const HB_BYTE * pCode, USHORT casesCnt ) +static const HB_BYTE * hb_vmSwitch( const HB_BYTE * pCode, HB_USHORT casesCnt ) { HB_STACK_TLS_PRELOAD HB_ITEM_PTR pSwitch = hb_vmSwitchGet(); @@ -5322,7 +5322,7 @@ static void hb_vmArrayGen( HB_SIZE ulElements ) /* generates an ulElements Array /* This function creates an array item using 'uiDimension' as an index * to retrieve the number of elements from the stack */ -static void hb_vmArrayNew( HB_ITEM_PTR pArray, USHORT uiDimension ) +static void hb_vmArrayNew( HB_ITEM_PTR pArray, HB_USHORT uiDimension ) { HB_STACK_TLS_PRELOAD HB_SIZE ulElements; @@ -5358,7 +5358,7 @@ static void hb_vmArrayNew( HB_ITEM_PTR pArray, USHORT uiDimension ) } } -static void hb_vmArrayDim( USHORT uiDimensions ) /* generates an uiDimensions Array and initialize those dimensions from the stack values */ +static void hb_vmArrayDim( HB_USHORT uiDimensions ) /* generates an uiDimensions Array and initialize those dimensions from the stack values */ { HB_STACK_TLS_PRELOAD @@ -5464,7 +5464,7 @@ static void hb_vmMacroPushIndex( void ) * (-1) 2 // number of arguments * we should join them into one continuous list */ -static LONG hb_vmArgsJoin( LONG lLevel, USHORT uiArgSets ) +static LONG hb_vmArgsJoin( LONG lLevel, HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD LONG lArgs, lRestArgs, lOffset; @@ -5491,7 +5491,7 @@ static LONG hb_vmArgsJoin( LONG lLevel, USHORT uiArgSets ) return lArgs; } -static void hb_vmMacroDo( USHORT uiArgSets ) +static void hb_vmMacroDo( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD LONG lArgs; @@ -5500,10 +5500,10 @@ static void hb_vmMacroDo( USHORT uiArgSets ) lArgs = hb_vmArgsJoin( -1, uiArgSets ); hb_stackDecrease( uiArgSets ); - hb_vmProc( ( USHORT ) lArgs ); + hb_vmProc( ( HB_USHORT ) lArgs ); } -static void hb_vmMacroFunc( USHORT uiArgSets ) +static void hb_vmMacroFunc( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD LONG lArgs; @@ -5513,11 +5513,11 @@ static void hb_vmMacroFunc( USHORT uiArgSets ) lArgs = hb_vmArgsJoin( -1, uiArgSets ); hb_stackDecrease( uiArgSets ); hb_itemSetNil( hb_stackReturnItem() ); - hb_vmProc( ( USHORT ) lArgs ); + hb_vmProc( ( HB_USHORT ) lArgs ); hb_stackPushReturn(); } -static void hb_vmMacroSend( USHORT uiArgSets ) +static void hb_vmMacroSend( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD LONG lArgs; @@ -5527,11 +5527,11 @@ static void hb_vmMacroSend( USHORT uiArgSets ) lArgs = hb_vmArgsJoin( -1, uiArgSets ); hb_stackDecrease( uiArgSets ); hb_itemSetNil( hb_stackReturnItem() ); - hb_vmSend( ( USHORT ) lArgs ); + hb_vmSend( ( HB_USHORT ) lArgs ); hb_stackPushReturn(); } -static void hb_vmMacroArrayGen( USHORT uiArgSets ) +static void hb_vmMacroArrayGen( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD LONG lArgs; @@ -5696,7 +5696,7 @@ static void hb_vmSwapAlias( void ) /* Execution */ /* ------------------------------- */ -void hb_vmProc( USHORT uiParams ) +void hb_vmProc( HB_USHORT uiParams ) { HB_STACK_STATE sStackState; PHB_SYMB pSym; @@ -5754,7 +5754,7 @@ void hb_vmProc( USHORT uiParams ) hb_stackOldFrame( &sStackState ); } -void hb_vmDo( USHORT uiParams ) +void hb_vmDo( HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD HB_STACK_STATE sStackState; @@ -5842,7 +5842,7 @@ void hb_vmDo( USHORT uiParams ) hb_stackOldFrame( &sStackState ); } -void hb_vmSend( USHORT uiParams ) +void hb_vmSend( HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD HB_STACK_STATE sStackState; @@ -5991,7 +5991,7 @@ HB_ITEM_PTR hb_vmEvalBlockV( HB_ITEM_PTR pBlock, ULONG ulArgCount, ... ) /* take care here, possible loss of data long to short ... */ /* added an explicit casting here for VC++ JFL */ - hb_vmSend( ( USHORT ) ulArgCount ); + hb_vmSend( ( HB_USHORT ) ulArgCount ); return hb_stackReturnItem(); } @@ -6044,7 +6044,7 @@ void hb_vmDestroyBlockOrMacro( PHB_ITEM pItem ) -void hb_vmFunction( USHORT uiParams ) +void hb_vmFunction( HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -6159,14 +6159,14 @@ static void hb_vmDebuggerEndProc( void ) s_pFunDbgEntry( HB_DBG_ENDPROC, 0, NULL, 0, NULL ); } -static void hb_vmDebuggerShowLine( USHORT uiLine ) /* makes the debugger shows a specific source code line */ +static void hb_vmDebuggerShowLine( HB_USHORT uiLine ) /* makes the debugger shows a specific source code line */ { HB_TRACE(HB_TR_DEBUG, ("hb_vmDebuggerShowLine(%hu)", uiLine)); s_pFunDbgEntry( HB_DBG_SHOWLINE, uiLine, NULL, 0, NULL ); } -static void hb_vmLocalName( USHORT uiLocal, const char * szLocalName ) /* locals and parameters index and name information for the debugger */ +static void hb_vmLocalName( HB_USHORT uiLocal, const char * szLocalName ) /* locals and parameters index and name information for the debugger */ { HB_STACK_TLS_PRELOAD @@ -6176,7 +6176,7 @@ static void hb_vmLocalName( USHORT uiLocal, const char * szLocalName ) /* locals s_pFunDbgEntry( HB_DBG_LOCALNAME, 0, szLocalName, uiLocal, NULL ); } -static void hb_vmStaticName( HB_BYTE bIsGlobal, USHORT uiStatic, const char * szStaticName ) /* statics vars information for the debugger */ +static void hb_vmStaticName( HB_BYTE bIsGlobal, HB_USHORT uiStatic, const char * szStaticName ) /* statics vars information for the debugger */ { HB_STACK_TLS_PRELOAD @@ -6201,7 +6201,7 @@ static void hb_vmModuleName( const char * szModuleName ) /* PRG and function nam } #endif -static void hb_vmFrame( USHORT usLocals, unsigned char ucParams ) +static void hb_vmFrame( HB_USHORT usLocals, unsigned char ucParams ) { HB_STACK_TLS_PRELOAD PHB_ITEM pBase; @@ -6248,7 +6248,7 @@ static void hb_vmFrame( USHORT usLocals, unsigned char ucParams ) #endif } -static void hb_vmVFrame( USHORT usLocals, unsigned char ucParams ) +static void hb_vmVFrame( HB_USHORT usLocals, unsigned char ucParams ) { HB_STACK_TLS_PRELOAD PHB_ITEM pBase; @@ -6283,7 +6283,7 @@ static void hb_vmSFrame( PHB_SYMB pSym ) /* sets the statics frame for a fu hb_stackSetStaticsBase( pSym->value.pStaticsBase ); } -static void hb_vmStatics( PHB_SYMB pSym, USHORT uiStatics ) /* initializes the global aStatics array or redimensionates it */ +static void hb_vmStatics( PHB_SYMB pSym, HB_USHORT uiStatics ) /* initializes the global aStatics array or redimensionates it */ { HB_TRACE(HB_TR_DEBUG, ("hb_vmStatics(%p, %hu)", pSym, uiStatics)); @@ -6400,7 +6400,7 @@ static void hb_vmTSVReference( PHB_ITEM pStatic ) hb_itemMove( pStatic, pRefer ); } -static void hb_vmInitThreadStatics( USHORT uiCount, const HB_BYTE * pCode ) +static void hb_vmInitThreadStatics( HB_USHORT uiCount, const HB_BYTE * pCode ) { HB_STACK_TLS_PRELOAD @@ -6408,14 +6408,14 @@ static void hb_vmInitThreadStatics( USHORT uiCount, const HB_BYTE * pCode ) while( uiCount-- ) { - USHORT uiStatic = HB_PCODE_MKUSHORT( pCode ); + HB_USHORT uiStatic = HB_PCODE_MKUSHORT( pCode ); PHB_ITEM pStatic = ( ( PHB_ITEM ) hb_stackGetStaticsBase() )->item.asArray.value->pItems + uiStatic - 1; hb_vmTSVReference( pStatic ); pCode += 2; } } #else -static void hb_vmInitThreadStatics( USHORT uiCount, const HB_BYTE * pCode ) +static void hb_vmInitThreadStatics( HB_USHORT uiCount, const HB_BYTE * pCode ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmInitThreadStatics(%hu,%p)", uiCount, pCode)); @@ -6533,7 +6533,7 @@ static void hb_vmPushIntegerConst( int iNumber ) pItem->type = HB_IT_INTEGER; pItem->item.asInteger.value = iNumber; - pItem->item.asInteger.length = ( USHORT ) hb_vmCalcIntWidth( iNumber ); + pItem->item.asInteger.length = ( HB_USHORT ) hb_vmCalcIntWidth( iNumber ); } #else static void hb_vmPushLongConst( long lNumber ) @@ -6545,7 +6545,7 @@ static void hb_vmPushLongConst( long lNumber ) pItem->type = HB_IT_LONG; pItem->item.asLong.value = ( HB_MAXINT ) lNumber; - pItem->item.asLong.length = ( USHORT ) hb_vmCalcIntWidth( lNumber ); + pItem->item.asLong.length = ( HB_USHORT ) hb_vmCalcIntWidth( lNumber ); } #endif @@ -6582,7 +6582,7 @@ static void hb_vmPushLongLongConst( HB_LONGLONG llNumber ) pItem->type = HB_IT_LONG; pItem->item.asLong.value = ( HB_MAXINT ) llNumber; - pItem->item.asLong.length = ( USHORT ) hb_vmCalcIntWidth( llNumber ); + pItem->item.asLong.length = ( HB_USHORT ) hb_vmCalcIntWidth( llNumber ); } #endif @@ -6605,9 +6605,9 @@ void hb_vmPushDouble( double dNumber, int iDec ) pItem->item.asDouble.value = dNumber; pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber ); if( iDec == HB_DEFAULT_DECIMALS ) - pItem->item.asDouble.decimal = ( USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; + pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; else - pItem->item.asDouble.decimal = ( USHORT ) iDec; + pItem->item.asDouble.decimal = ( HB_USHORT ) iDec; } static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec ) @@ -6621,14 +6621,14 @@ static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec ) pItem->item.asDouble.value = dNumber; if( iDec == HB_DEFAULT_DECIMALS ) - pItem->item.asDouble.decimal = ( USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; + pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; else - pItem->item.asDouble.decimal = ( USHORT ) iDec; + pItem->item.asDouble.decimal = ( HB_USHORT ) iDec; if( iWidth == HB_DEFAULT_WIDTH ) pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber ); else - pItem->item.asDouble.length = ( USHORT ) iWidth; + pItem->item.asDouble.length = ( HB_USHORT ) iWidth; } void hb_vmPushDate( long lDate ) @@ -6737,7 +6737,7 @@ void hb_vmPushEvalSym( void ) static void hb_vmPushBlock( const HB_BYTE * pCode, PHB_SYMB pSymbols, HB_SIZE ulLen ) { HB_STACK_TLS_PRELOAD - USHORT uiLocals; + HB_USHORT uiLocals; PHB_ITEM pItem = hb_stackAllocItem(); HB_TRACE(HB_TR_DEBUG, ("hb_vmPushBlock(%p,%p,%lu)", pCode, pSymbols, ulLen)); @@ -6804,7 +6804,7 @@ static void hb_vmPushBlockShort( const HB_BYTE * pCode, PHB_SYMB pSymbols, HB_SI * * NOTE: pCode points to dynamically allocated memory */ -static void hb_vmPushMacroBlock( const HB_BYTE * pCode, HB_SIZE ulSize, USHORT usParams ) +static void hb_vmPushMacroBlock( const HB_BYTE * pCode, HB_SIZE ulSize, HB_USHORT usParams ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem = hb_stackAllocItem(); @@ -6959,7 +6959,7 @@ static void hb_vmPushLocalByRef( int iLocal ) pTop->item.asRefer.offset = hb_stackBaseOffset(); } -static void hb_vmPushStatic( USHORT uiStatic ) +static void hb_vmPushStatic( HB_USHORT uiStatic ) { HB_STACK_TLS_PRELOAD PHB_ITEM pStatic; @@ -6971,7 +6971,7 @@ static void hb_vmPushStatic( USHORT uiStatic ) HB_IS_BYREF( pStatic ) ? hb_itemUnRef( pStatic ) : pStatic ); } -static void hb_vmPushStaticByRef( USHORT uiStatic ) +static void hb_vmPushStaticByRef( HB_USHORT uiStatic ) { HB_STACK_TLS_PRELOAD PHB_ITEM pTop, pBase; @@ -6998,7 +6998,7 @@ static void hb_vmPushStaticByRef( USHORT uiStatic ) static void hb_vmPushVariable( PHB_SYMB pVarSymb ) { HB_STACK_TLS_PRELOAD - USHORT uiAction = E_DEFAULT; + HB_USHORT uiAction = E_DEFAULT; PHB_ITEM pItem; HB_TRACE(HB_TR_INFO, ("(hb_vmPushVariable)")); @@ -7225,7 +7225,7 @@ static void hb_vmPopLocal( int iLocal ) hb_stackDec(); } -static void hb_vmPopStatic( USHORT uiStatic ) +static void hb_vmPopStatic( HB_USHORT uiStatic ) { HB_STACK_TLS_PRELOAD PHB_ITEM pStatic, pVal; @@ -7296,7 +7296,7 @@ const char * hb_vmFindModuleSymbolName( PHB_SYMB pSym ) } HB_BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, - USHORT * puiSymbols ) + HB_USHORT * puiSymbols ) { if( pSym ) { @@ -7435,7 +7435,7 @@ static PHB_ITEM hb_vmStaticsArray( void ) return pArray; } -static PHB_SYMBOLS hb_vmFindFreeModule( PHB_SYMB pSymbols, USHORT uiSymbols, +static PHB_SYMBOLS hb_vmFindFreeModule( PHB_SYMB pSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmFindFreeModule(%p,%hu,%s,%lu)", pSymbols, uiSymbols, szModuleName, ulID)); @@ -7453,7 +7453,7 @@ static PHB_SYMBOLS hb_vmFindFreeModule( PHB_SYMB pSymbols, USHORT uiSymbols, strcmp( pLastSymbols->szModuleName, szModuleName ) == 0 ) { PHB_SYMB pModuleSymbols = pLastSymbols->pModuleSymbols; - USHORT ui; + HB_USHORT ui; for( ui = 0; ui < uiSymbols; ++ui ) { @@ -7487,7 +7487,7 @@ void hb_vmFreeSymbols( PHB_SYMBOLS pSymbols ) { if( pSymbols->fActive ) { - USHORT ui; + HB_USHORT ui; for( ui = 0; ui < pSymbols->uiModuleSymbols; ++ui ) { @@ -7531,7 +7531,7 @@ void hb_vmInitSymbolGroup( void * hNewDynLib, int argc, const char * argv[] ) PHB_SYMBOLS pLastSymbols = s_pSymbols; void * hDynLib = s_hDynLibID; HB_BOOL fFound = HB_FALSE; - USHORT ui; + HB_USHORT ui; s_hDynLibID = NULL; @@ -7586,7 +7586,7 @@ void hb_vmInitSymbolGroup( void * hNewDynLib, int argc, const char * argv[] ) { hb_vmPushString( argv[i], strlen( argv[i] ) ); } - hb_vmProc( ( USHORT ) argc ); + hb_vmProc( ( HB_USHORT ) argc ); } } } @@ -7613,7 +7613,7 @@ void hb_vmExitSymbolGroup( void * hDynLib ) fFound = HB_TRUE; if( pLastSymbols->fActive && ( pLastSymbols->hScope & HB_FS_EXIT ) != 0 ) { - USHORT ui; + HB_USHORT ui; for( ui = 0; ui < pLastSymbols->uiModuleSymbols; ui++ ) { HB_SYMBOLSCOPE scope = ( pLastSymbols->pModuleSymbols + ui )->scope.value & HB_FS_INITEXIT; @@ -7645,13 +7645,13 @@ void hb_vmExitSymbolGroup( void * hDynLib ) } } -PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, +PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_BOOL fDynLib, HB_BOOL fClone ) { PHB_SYMBOLS pNewSymbols; HB_BOOL fRecycled, fInitStatics = HB_FALSE; - USHORT ui; + HB_USHORT ui; HB_TRACE(HB_TR_DEBUG, ("hb_vmRegisterSymbols(%p,%hu,%s,%lu,%d,%d)", pModuleSymbols, uiSymbols, szModuleName, ulID, (int)fDynLib, (int)fClone)); @@ -7805,7 +7805,7 @@ PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, return pNewSymbols; } -static void hb_vmVerifyPCodeVersion( const char * szModuleName, USHORT uiPCodeVer ) +static void hb_vmVerifyPCodeVersion( const char * szModuleName, HB_USHORT uiPCodeVer ) { if( uiPCodeVer != 0 ) { @@ -7826,9 +7826,9 @@ static void hb_vmVerifyPCodeVersion( const char * szModuleName, USHORT uiPCodeVe /* * module symbols initialization with extended information */ -PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiModuleSymbols, +PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, HB_USHORT uiModuleSymbols, const char * szModuleName, ULONG ulID, - USHORT uiPCodeVer ) + HB_USHORT uiPCodeVer ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmProcessSymbols(%p,%hu,%s,%lu,%hu)", pSymbols, uiModuleSymbols, szModuleName, ulID, uiPCodeVer)); @@ -7837,9 +7837,9 @@ PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiModuleSymbols, s_fCloneSym, s_fCloneSym )->pModuleSymbols; } -PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, USHORT uiModuleSymbols, +PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, HB_USHORT uiModuleSymbols, const char * szModuleName, ULONG ulID, - USHORT uiPCodeVer ) + HB_USHORT uiPCodeVer ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmProcessDynLibSymbols(%p,%hu,%s,%lu,%hu)", pSymbols, uiModuleSymbols, szModuleName, ulID, uiPCodeVer)); @@ -7881,7 +7881,7 @@ static void hb_vmDoInitStatics( void ) { if( pLastSymbols->fInitStatics ) { - USHORT ui; + HB_USHORT ui; for( ui = 0; ui < pLastSymbols->uiModuleSymbols; ui++ ) { @@ -7911,7 +7911,7 @@ static void hb_vmDoInitFunctions( void ) /* only if module contains some INIT functions */ if( pLastSymbols->fActive && pLastSymbols->hScope & HB_FS_INIT ) { - USHORT ui; + HB_USHORT ui; for( ui = 0; ui < pLastSymbols->uiModuleSymbols; ui++ ) { @@ -7938,7 +7938,7 @@ static void hb_vmDoInitFunctions( void ) } } - hb_vmProc( ( USHORT ) iArgCount ); + hb_vmProc( ( HB_USHORT ) iArgCount ); } } } @@ -7964,7 +7964,7 @@ static void hb_vmDoExitFunctions( void ) /* only if module contains some EXIT functions */ if( pLastSymbols->fActive && pLastSymbols->hScope & HB_FS_EXIT ) { - USHORT ui; + HB_USHORT ui; for( ui = 0; ui < pLastSymbols->uiModuleSymbols; ui++ ) { @@ -8447,7 +8447,7 @@ void hb_vmRequestCancel( void ) { char buffer[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 + 10 ]; /* additional 10 bytes for line info (%hu) overhead */ char file[ HB_PATH_MAX ]; - USHORT uiLine; + HB_USHORT uiLine; int iLevel = 0, l; hb_conOutErr( hb_conNewLine(), 0 ); @@ -8470,7 +8470,7 @@ void hb_vmRequestCancel( void ) } } -USHORT hb_vmRequestQuery( void ) +HB_USHORT hb_vmRequestQuery( void ) { HB_STACK_TLS_PRELOAD return hb_stackGetActionRequest(); @@ -8496,11 +8496,11 @@ HB_BOOL hb_vmRequestReenter( void ) void hb_vmRequestRestore( void ) { HB_STACK_TLS_PRELOAD - USHORT uiAction; + HB_USHORT uiAction; HB_TRACE(HB_TR_DEBUG, ("hb_vmRequestRestore()")); - uiAction = ( USHORT ) hb_stackItemFromTop( -1 )->item.asInteger.value | + uiAction = ( HB_USHORT ) hb_stackItemFromTop( -1 )->item.asInteger.value | hb_stackGetActionRequest(); if( uiAction & HB_QUIT_REQUESTED ) hb_stackSetActionRequest( HB_QUIT_REQUESTED ); @@ -8775,7 +8775,7 @@ HB_BOOL hb_xvmAlwaysBegin( void ) HB_BOOL hb_xvmAlwaysEnd( void ) { HB_STACK_TLS_PRELOAD - USHORT uiPrevAction, uiCurrAction; + HB_USHORT uiPrevAction, uiCurrAction; HB_TRACE(HB_TR_DEBUG, ("hb_xvmAlwaysEnd()")); @@ -8873,7 +8873,7 @@ HB_BOOL hb_xvmSwitchGet( PHB_ITEM * pSwitchPtr ) HB_XVM_RETURN } -void hb_xvmSetLine( USHORT uiLine ) +void hb_xvmSetLine( HB_USHORT uiLine ) { HB_STACK_TLS_PRELOAD @@ -8890,14 +8890,14 @@ void hb_xvmFrame( int iLocals, int iParams ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmFrame(%d, %d)", iLocals, iParams)); - hb_vmFrame( ( USHORT ) iLocals, ( unsigned char ) iParams ); + hb_vmFrame( ( HB_USHORT ) iLocals, ( unsigned char ) iParams ); } void hb_xvmVFrame( int iLocals, int iParams ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmVFrame(%d, %d)", iLocals, iParams)); - hb_vmVFrame( ( USHORT ) iLocals, ( unsigned char ) iParams ); + hb_vmVFrame( ( HB_USHORT ) iLocals, ( unsigned char ) iParams ); } void hb_xvmSFrame( PHB_SYMB pSymbol ) @@ -8907,7 +8907,7 @@ void hb_xvmSFrame( PHB_SYMB pSymbol ) hb_vmSFrame( pSymbol ); } -HB_BOOL hb_xvmDo( USHORT uiParams ) +HB_BOOL hb_xvmDo( HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -8918,7 +8918,7 @@ HB_BOOL hb_xvmDo( USHORT uiParams ) HB_XVM_RETURN } -HB_BOOL hb_xvmFunction( USHORT uiParams ) +HB_BOOL hb_xvmFunction( HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -8931,7 +8931,7 @@ HB_BOOL hb_xvmFunction( USHORT uiParams ) HB_XVM_RETURN } -HB_BOOL hb_xvmSend( USHORT uiParams ) +HB_BOOL hb_xvmSend( HB_USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -8965,14 +8965,14 @@ void hb_xvmRetValue( void ) hb_stackReturnItem()->type &= ~HB_IT_MEMOFLAG; } -void hb_xvmStatics( PHB_SYMB pSymbol, USHORT uiStatics ) +void hb_xvmStatics( PHB_SYMB pSymbol, HB_USHORT uiStatics ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmStatics(%p,%hu)", pSymbol, uiStatics)); hb_vmStatics( pSymbol, uiStatics ); } -void hb_xvmThreadStatics( USHORT uiStatics, const HB_BYTE * statics ) +void hb_xvmThreadStatics( HB_USHORT uiStatics, const HB_BYTE * statics ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmThreadStatics(%hu,%p)", uiStatics, statics)); @@ -9040,21 +9040,21 @@ void hb_xvmCopyLocals( int iDest, int iSource ) HB_IS_BYREF( pDest ) ? hb_itemUnRef( pDest ) : pDest ); } -void hb_xvmPushStatic( USHORT uiStatic ) +void hb_xvmPushStatic( HB_USHORT uiStatic ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmPushStatic(%hu)", uiStatic)); hb_vmPushStatic( uiStatic ); } -void hb_xvmPushStaticByRef( USHORT uiStatic ) +void hb_xvmPushStaticByRef( HB_USHORT uiStatic ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmPushStaticByRef(%hu)", uiStatic)); hb_vmPushStaticByRef( uiStatic ); } -void hb_xvmPopStatic( USHORT uiStatic ) +void hb_xvmPopStatic( HB_USHORT uiStatic ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmPopStatic(%hu)", uiStatic)); @@ -9378,7 +9378,7 @@ HB_BOOL hb_xvmLocalAdd( int iLocal ) HB_XVM_RETURN } -HB_BOOL hb_xvmStaticAdd( USHORT uiStatic ) +HB_BOOL hb_xvmStaticAdd( HB_USHORT uiStatic ) { HB_STACK_TLS_PRELOAD PHB_ITEM pStatic; @@ -10664,7 +10664,7 @@ HB_BOOL hb_xvmDecEqPop( void ) HB_XVM_RETURN } -void hb_xvmArrayDim( USHORT uiDimensions ) +void hb_xvmArrayDim( HB_USHORT uiDimensions ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmArrayDim(%hu)", uiDimensions)); @@ -10945,7 +10945,7 @@ void hb_xvmPushStringHidden( int iMethod, const char * szText, HB_SIZE ulSize ) hb_itemPutCLPtr( hb_stackAllocItem(), szString, ulSize ); } -void hb_xvmLocalName( USHORT uiLocal, const char * szLocalName ) +void hb_xvmLocalName( HB_USHORT uiLocal, const char * szLocalName ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmLocalName(%hu, %s)", uiLocal, szLocalName)); @@ -10957,7 +10957,7 @@ void hb_xvmLocalName( USHORT uiLocal, const char * szLocalName ) #endif } -void hb_xvmStaticName( HB_BYTE bIsGlobal, USHORT uiStatic, const char * szStaticName ) +void hb_xvmStaticName( HB_BYTE bIsGlobal, HB_USHORT uiStatic, const char * szStaticName ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmStaticName(%d, %hu, %s)", (int)bIsGlobal, uiStatic, szStaticName)); @@ -10981,7 +10981,7 @@ void hb_xvmModuleName( const char * szModuleName ) #endif } -HB_BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroArrayGen( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -10992,7 +10992,7 @@ HB_BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ) HB_XVM_RETURN } -HB_BOOL hb_xvmMacroDo( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroDo( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -11003,7 +11003,7 @@ HB_BOOL hb_xvmMacroDo( USHORT uiArgSets ) HB_XVM_RETURN } -HB_BOOL hb_xvmMacroFunc( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroFunc( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -11014,7 +11014,7 @@ HB_BOOL hb_xvmMacroFunc( USHORT uiArgSets ) HB_XVM_RETURN } -HB_BOOL hb_xvmMacroSend( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroSend( HB_USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD diff --git a/harbour/src/vm/itemapi.c b/harbour/src/vm/itemapi.c index 5d827bc415..e2683950dc 100644 --- a/harbour/src/vm/itemapi.c +++ b/harbour/src/vm/itemapi.c @@ -106,7 +106,7 @@ PHB_ITEM hb_itemNew( PHB_ITEM pNull ) return hb_gcGripGet( pNull ); } -PHB_ITEM hb_itemParam( USHORT uiParam ) +PHB_ITEM hb_itemParam( HB_USHORT uiParam ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemParam(%hu)", uiParam)); @@ -115,14 +115,14 @@ PHB_ITEM hb_itemParam( USHORT uiParam ) /* Internal Item API. Use this with care. */ -PHB_ITEM hb_itemParamPtr( USHORT uiParam, long lMask ) +PHB_ITEM hb_itemParamPtr( HB_USHORT uiParam, long lMask ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemParamPtr(%hu, %ld)", uiParam, lMask)); return hb_param( ( int ) uiParam, lMask ); } -HB_BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ) +HB_BOOL hb_itemParamStore( HB_USHORT uiParam, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemParamStore(%hu, %p)", uiParam, pItem)); @@ -136,7 +136,7 @@ HB_BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ) return HB_FALSE; } -HB_BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ) +HB_BOOL hb_itemParamStoreForward( HB_USHORT uiParam, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemParamStoreForward(%hu, %p)", uiParam, pItem)); @@ -150,13 +150,13 @@ HB_BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ) return HB_FALSE; } -USHORT hb_itemPCount( void ) +HB_USHORT hb_itemPCount( void ) { HB_STACK_TLS_PRELOAD HB_TRACE(HB_TR_DEBUG, ("hb_itemPCount()")); - return ( USHORT ) hb_pcount(); + return ( HB_USHORT ) hb_pcount(); } HB_BOOL hb_itemRelease( PHB_ITEM pItem ) @@ -921,7 +921,7 @@ PHB_ITEM hb_itemPutND( PHB_ITEM pItem, double dNumber ) pItem->type = HB_IT_DOUBLE; pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber ); - pItem->item.asDouble.decimal = ( USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; + pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; pItem->item.asDouble.value = dNumber; return pItem; @@ -1085,8 +1085,8 @@ PHB_ITEM hb_itemPutNDLen( PHB_ITEM pItem, double dNumber, int iWidth, int iDec ) } pItem->type = HB_IT_DOUBLE; - pItem->item.asDouble.length = ( USHORT ) iWidth; - pItem->item.asDouble.decimal = ( USHORT ) iDec; + pItem->item.asDouble.length = ( HB_USHORT ) iWidth; + pItem->item.asDouble.decimal = ( HB_USHORT ) iDec; pItem->item.asDouble.value = dNumber; return pItem; @@ -1110,11 +1110,11 @@ PHB_ITEM hb_itemPutNDDec( PHB_ITEM pItem, double dNumber, int iDec ) if( iDec == HB_DEFAULT_DECIMALS ) { HB_STACK_TLS_PRELOAD - pItem->item.asDouble.decimal = ( USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; + pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS; } else { - pItem->item.asDouble.decimal = ( USHORT ) iDec; + pItem->item.asDouble.decimal = ( HB_USHORT ) iDec; } pItem->item.asDouble.value = dNumber; @@ -1163,7 +1163,7 @@ PHB_ITEM hb_itemPutNILen( PHB_ITEM pItem, int iNumber, int iWidth ) iWidth = HB_INT_LENGTH( iNumber ); pItem->type = HB_IT_INTEGER; - pItem->item.asInteger.length = ( USHORT ) iWidth; + pItem->item.asInteger.length = ( HB_USHORT ) iWidth; pItem->item.asInteger.value = iNumber; return pItem; @@ -1187,7 +1187,7 @@ PHB_ITEM hb_itemPutNLLen( PHB_ITEM pItem, long lNumber, int iWidth ) pItem->type = HB_IT_INTEGER; pItem->item.asInteger.value = ( int ) lNumber; - pItem->item.asInteger.length = ( USHORT ) iWidth; + pItem->item.asInteger.length = ( HB_USHORT ) iWidth; #else if( iWidth <= 0 || iWidth > 99 ) iWidth = HB_LONG_LENGTH( lNumber ); @@ -1219,7 +1219,7 @@ PHB_ITEM hb_itemPutNLLLen( PHB_ITEM pItem, HB_LONGLONG llNumber, int iWidth ) pItem->type = HB_IT_LONG; pItem->item.asLong.value = ( HB_MAXINT ) llNumber; - pItem->item.asLong.length = ( USHORT ) iWidth; + pItem->item.asLong.length = ( HB_USHORT ) iWidth; #else pItem->type = HB_IT_DOUBLE; pItem->item.asDouble.value = ( double ) llNumber; diff --git a/harbour/src/vm/macro.c b/harbour/src/vm/macro.c index 9d2f775e3c..742a4f2a99 100644 --- a/harbour/src/vm/macro.c +++ b/harbour/src/vm/macro.c @@ -1671,7 +1671,7 @@ void hb_macroCodeBlockEnd( HB_COMP_DECL ) { HB_PCODE_INFO_PTR pCodeblock; /* pointer to the current codeblock */ ULONG ulSize; - USHORT wParms = 0; /* number of codeblock parameters */ + HB_USHORT wParms = 0; /* number of codeblock parameters */ HB_CBVAR_PTR pVar; HB_TRACE(HB_TR_DEBUG, ("hb_macroCodeBlockEnd(%p)", HB_COMP_PARAM)); @@ -1696,7 +1696,7 @@ void hb_macroCodeBlockEnd( HB_COMP_DECL ) ++wParms; } - /*NOTE: 6 = HB_P_MPUSHBLOCK + USHORT( size ) + USHORT( wParams ) + _ENDBLOCK + /*NOTE: 6 = HB_P_MPUSHBLOCK + HB_USHORT( size ) + HB_USHORT( wParams ) + _ENDBLOCK * runtime compiled codeblock cannot reference local variables defined in a * function */ diff --git a/harbour/src/vm/maindllp.c b/harbour/src/vm/maindllp.c index 2bb6b4d2d8..22447974c1 100644 --- a/harbour/src/vm/maindllp.c +++ b/harbour/src/vm/maindllp.c @@ -163,7 +163,7 @@ HB_EXPORT BOOL WINAPI HB_DLL_ENTRY_POINT( HINSTANCE hInstance, DWORD fdwReason, } /* module symbols initialization with extended information */ -PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols, const char * szModuleName, ULONG ulID, USHORT uiPcodeVer ) +PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, HB_USHORT uiSymbols, const char * szModuleName, ULONG ulID, HB_USHORT uiPcodeVer ) { static FARPROC s_pProcessSymbols = NULL; diff --git a/harbour/src/vm/memvars.c b/harbour/src/vm/memvars.c index 64d082d611..25f962e5a3 100644 --- a/harbour/src/vm/memvars.c +++ b/harbour/src/vm/memvars.c @@ -1607,9 +1607,9 @@ HB_FUNC( __MVRESTORE ) /* FoxPro does not add 128 to item type: 'N', 'C', 'D', 'L' * CA-Cl*pper respects it and read such files so we also should. */ - USHORT uiType = ( USHORT ) ( buffer[ 11 ] & 0x7f ); - USHORT uiWidth = ( USHORT ) buffer[ 16 ]; - USHORT uiDec = ( USHORT ) buffer[ 17 ]; + HB_USHORT uiType = ( HB_USHORT ) ( buffer[ 11 ] & 0x7f ); + HB_USHORT uiWidth = ( HB_USHORT ) buffer[ 16 ]; + HB_USHORT uiDec = ( HB_USHORT ) buffer[ 17 ]; /* protect against corrupted files */ buffer[ 10 ] = '\0'; diff --git a/harbour/src/vm/proc.c b/harbour/src/vm/proc.c index 87362e575e..c3c9ebf5dc 100644 --- a/harbour/src/vm/proc.c +++ b/harbour/src/vm/proc.c @@ -221,7 +221,7 @@ char * hb_procname( int iLevel, char * szName, HB_BOOL fMethodName ) * szFile szie must be an at least: * HB_PATH_MAX */ -HB_BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ) +HB_BOOL hb_procinfo( int iLevel, char * szName, HB_USHORT * puiLine, char * szFile ) { long lOffset = hb_stackBaseProcOffset( iLevel ); diff --git a/harbour/src/vm/pvalue.c b/harbour/src/vm/pvalue.c index 7bfeecfe8f..1093fda839 100644 --- a/harbour/src/vm/pvalue.c +++ b/harbour/src/vm/pvalue.c @@ -58,7 +58,7 @@ HB_FUNC( HB_PVALUE ) { LONG lOffset = hb_stackBaseItem()->item.asSymbol.stackstate->lBaseItem; - USHORT uiParam = ( USHORT ) hb_parni( 1 ); + HB_USHORT uiParam = ( HB_USHORT ) hb_parni( 1 ); if( uiParam && uiParam <= hb_stackItem( lOffset )->item.asSymbol.paramcnt ) { diff --git a/harbour/src/vm/runner.c b/harbour/src/vm/runner.c index 4a0d490715..16b6f4a748 100644 --- a/harbour/src/vm/runner.c +++ b/harbour/src/vm/runner.c @@ -217,7 +217,7 @@ static void hb_hrbInit( PHRB_BODY pHrbBody, int iPCount, PHB_ITEM * pParams ) hb_vmPushNil(); for( i = 0; i < iPCount; i++ ) hb_vmPush( pParams[ i ] ); - hb_vmProc( ( USHORT ) iPCount ); + hb_vmProc( ( HB_USHORT ) iPCount ); if( hb_vmRequestQuery() != 0 ) break; } @@ -299,7 +299,7 @@ static void hb_hrbUnLoad( PHRB_BODY pHrbBody ) -static PHRB_BODY hb_hrbLoad( const char * szHrbBody, HB_SIZE ulBodySize, USHORT usMode ) +static PHRB_BODY hb_hrbLoad( const char * szHrbBody, HB_SIZE ulBodySize, HB_USHORT usMode ) { PHRB_BODY pHrbBody = NULL; @@ -310,7 +310,7 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, HB_SIZE ulBodySize, USHORT HB_SIZE ulPos; ULONG ul; char * buffer, ch; - USHORT usBind = ( usMode & HB_HRB_BIND_MODEMASK ); + HB_USHORT usBind = ( usMode & HB_HRB_BIND_MODEMASK ); PHB_SYMB pSymRead; /* Symbols read */ PHB_DYNF pDynFunc; /* Functions read */ @@ -519,7 +519,7 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, HB_SIZE ulBodySize, USHORT } pHrbBody->pModuleSymbols = hb_vmRegisterSymbols( pHrbBody->pSymRead, - ( USHORT ) pHrbBody->ulSymbols, "pcode.hrb", 0, HB_TRUE, HB_FALSE ); + ( HB_USHORT ) pHrbBody->ulSymbols, "pcode.hrb", 0, HB_TRUE, HB_FALSE ); if( pHrbBody->pModuleSymbols->pModuleSymbols != pSymRead ) { @@ -553,7 +553,7 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, HB_SIZE ulBodySize, USHORT return pHrbBody; } -static PHRB_BODY hb_hrbLoadFromFile( const char * szHrb, USHORT usMode ) +static PHRB_BODY hb_hrbLoadFromFile( const char * szHrb, HB_USHORT usMode ) { char szFileName[ HB_PATH_MAX ]; PHRB_BODY pHrbBody = NULL; @@ -619,7 +619,7 @@ static void hb_hrbDo( PHRB_BODY pHrbBody, int iPCount, PHB_ITEM * pParams ) for( i = 0; i < iPCount; i++ ) hb_vmPush( pParams[ i ] ); - hb_vmProc( ( USHORT ) iPCount ); + hb_vmProc( ( HB_USHORT ) iPCount ); pRetVal = hb_itemNew( NULL ); hb_itemMove( pRetVal, hb_stackReturnItem() ); @@ -677,13 +677,13 @@ static void hb_hrbReturn( PHRB_BODY pHrbBody ) */ HB_FUNC( HB_HRBRUN ) { - USHORT usMode = HB_HRB_BIND_DEFAULT; - USHORT nParam = 1; + HB_USHORT usMode = HB_HRB_BIND_DEFAULT; + HB_USHORT nParam = 1; HB_SIZE ulLen; if( HB_ISNUM( 1 ) ) { - usMode = ( USHORT ) hb_parni( 1 ); + usMode = ( HB_USHORT ) hb_parni( 1 ); nParam++; } @@ -727,13 +727,13 @@ HB_FUNC( HB_HRBRUN ) HB_FUNC( HB_HRBLOAD ) { - USHORT usMode = HB_HRB_BIND_DEFAULT; - USHORT nParam = 1; + HB_USHORT usMode = HB_HRB_BIND_DEFAULT; + HB_USHORT nParam = 1; HB_SIZE ulLen; if( HB_ISNUM( 1 ) ) { - usMode = ( USHORT ) hb_parni( 1 ); + usMode = ( HB_USHORT ) hb_parni( 1 ); nParam++; } diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index 0c9c629b38..a4b7b65b14 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -964,9 +964,9 @@ static HB_THREAD_STARTFUNC( hb_threadStartVM ) pThread->pParams = NULL; if( fSend ) - hb_vmSend( ( USHORT ) ( ulPCount - 1 ) ); + hb_vmSend( ( HB_USHORT ) ( ulPCount - 1 ) ); else - hb_vmProc( ( USHORT ) ( ulPCount - 1 ) ); + hb_vmProc( ( HB_USHORT ) ( ulPCount - 1 ) ); } else { diff --git a/harbour/src/vm/vm.c b/harbour/src/vm/vm.c index e00f5cd553..e7340f3ea0 100644 --- a/harbour/src/vm/vm.c +++ b/harbour/src/vm/vm.c @@ -57,7 +57,7 @@ #include "hbapi.h" -HB_VMHANDLE hb_xvalloc( HB_SIZE nSize, USHORT nFlags ) +HB_VMHANDLE hb_xvalloc( HB_SIZE nSize, HB_USHORT nFlags ) { /* TODO */ HB_SYMBOL_UNUSED( nSize ); @@ -71,7 +71,7 @@ void hb_xvfree( HB_VMHANDLE h ) HB_SYMBOL_UNUSED( h ); } -HB_VMHANDLE hb_xvrealloc( HB_VMHANDLE h, HB_SIZE nSize, USHORT nFlags ) +HB_VMHANDLE hb_xvrealloc( HB_VMHANDLE h, HB_SIZE nSize, HB_USHORT nFlags ) { /* TODO */ HB_SYMBOL_UNUSED( h );