From 003fd7c41e48a8a570404dbd3870ef3241398985 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 14 Jan 2010 17:59:30 +0000 Subject: [PATCH] 2010-01-14 18:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/strclear.c + HB_STRCLEAR() return value will now precisely inform about successful clear operation. Thanks to Mindaugas. * src/vm/hashfunc.c * src/vm/macro.c * src/vm/strapi.c * src/vm/runner.c * src/vm/estack.c * src/vm/codebloc.c * src/vm/hashes.c * src/vm/maindll.c * src/vm/dynsym.c * src/vm/debug.c * src/vm/itemapi.c * src/vm/garbage.c * src/vm/asort.c * src/vm/hvm.c * src/vm/cmdarg.c * src/vm/mainstd.c * src/vm/maindllp.c * src/vm/arrays.c * src/vm/task.c * src/vm/fm.c * src/vm/proc.c * src/vm/thread.c * src/vm/memvars.c * src/vm/arrayshb.c * src/vm/eval.c * src/vm/extend.c * src/vm/dynlibhb.c * src/vm/set.c * src/vm/classes.c * src/debug/dbgentry.c * src/common/hbgete.c * src/common/hbffind.c * src/common/hbver.c * src/common/hbprintf.c * src/common/hbfsapi.c * src/common/hbstr.c * src/common/expropt1.c * src/common/expropt2.c * src/common/hbdate.c * src/common/strwild.c * src/common/hbhash.c * src/rtl/gtdos/gtdos.c * src/rtl/fscopy.c * src/rtl/run.c * src/rtl/gtwin/gtwin.c * src/rtl/gtxwc/gtxwc.h * src/rtl/gtxwc/gtxwc.c * src/rtl/math.c * src/rtl/empty.c * src/rtl/gtcrs/gtcrs.c * src/rtl/trim.c * src/rtl/filehb.c * src/rtl/hbtoken.c * src/rtl/fstemp.c * src/rtl/gtchrmap.c * src/rtl/strmatch.c * src/rtl/gtstd/gtstd.c * src/rtl/gttrm/gttrm.c * src/rtl/padr.c * src/rtl/hbstrfmt.c * src/rtl/transfrm.c * src/rtl/fserr.c * src/rtl/minmax.c * src/rtl/hbfeof.c * src/rtl/dates.c * src/rtl/padc.c * src/rtl/gtcgi/gtcgi.c * src/rtl/errapi.c * src/rtl/version.c * src/rtl/hbregexc.c * src/rtl/hbrandom.c * src/rtl/strtran.c * src/rtl/hbprocfn.c * src/rtl/hbsocket.c * src/rtl/hbinet.c * src/rtl/copyfile.c * src/rtl/errintlo.c * src/rtl/gtapi.c * src/rtl/filesys.c * src/rtl/padl.c * src/rtl/hbregex.c * src/rtl/hbbit.c * src/rtl/isprint.c * src/rtl/saverest.c * src/rtl/diskspac.c * src/rtl/console.c * src/rtl/spfiles.c * src/rtl/gtos2/gtos2.c * src/rtl/philes.c * src/rtl/hbbffnc.c * src/rtl/hbgtcore.c * src/rtl/cdpapi.c * src/rtl/dirdrive.c * src/rtl/hbi18n1.c * src/rtl/gtclip.c * src/rtl/mlcfunc.c * src/rtl/gtapiu.c * src/rtl/accept.c * src/rtl/idle.c * src/rtl/itemseri.c * src/rtl/hbrunfun.c * src/rtl/setcolor.c * src/rtl/setkey.c * src/rtl/gtsln/mousesln.c * src/rtl/gtsln/gtsln.c * src/rtl/gtsln/kbsln.c * src/rtl/gtsln/gtsln.h * src/rtl/disksphb.c * src/rtl/strc.c * src/rtl/gtpca/gtpca.c * src/rtl/gtgui/gtgui.c * src/rtl/hbhex.c * src/rtl/trace.c * src/rtl/gt_tpl/gt_tpl.c * src/rtl/inkeyapi.c * src/rtl/filebuf.c * src/rtl/gete.c * src/rtl/setcurs.c * src/rtl/hbproces.c * src/rtl/langapi.c * src/rtl/gtwvt/gtwvt.h * src/rtl/gtwvt/gtwvt.c * src/rtl/mouse53.c * src/rtl/fssize.c * src/rtl/hbbyte.c * src/rtl/mouseapi.c * src/rtl/memofile.c * src/rtl/valtostr.c * src/rtl/file.c * src/rtl/val.c * src/rtl/rat.c * src/rdd/hbsix/sxcompr.c * include/hbvmpub.h * include/hbset.h * include/hbapicdp.h * include/hbstack.h * include/hbapilng.h * include/hbgtcore.h * include/hbapifs.h * include/hbthread.h * include/hbxvm.h * include/hbmacro.h * include/hbtypes.h * include/hbapi.h * include/hbapiitm.h * include/hbznet.h * include/hbvm.h * include/hbapidbg.h * include/hbcomp.h * include/hbsxfunc.h * include/hbcompdf.h * include/hbmather.h * include/hbapistr.h * include/hbwmain.c * include/hbexpra.c * include/hbexprop.h * include/hbsocket.h * include/hbapigt.h * include/hbapicls.h * include/hbhash.h * include/hbregex.h * include/hbexprb.c * include/hbdate.h * contrib/gtalleg/gtalleg.c * contrib/xhb/hboutdbg.c * contrib/xhb/hbserv.h * contrib/xhb/bkgtsks.c * contrib/xhb/dbf2txt.c * contrib/xhb/xhbis.c * contrib/xhb/fparse.c * contrib/xhb/xhb.h * contrib/xhb/xhbsave.c * contrib/xhb/xhbmsgs.c * contrib/xhb/freadlin.c * contrib/xhb/txtline.c * contrib/xhb/dbgfxc.c * contrib/xhb/xhberrc.c * contrib/xhb/filestat.c * contrib/xhb/xhbcopyf.c * contrib/xhb/hbnxs.h * contrib/xhb/hbserv.c * contrib/xhb/cstructc.c * contrib/xhb/xhbfunc.c * contrib/hbmzip/hbmzip.c * contrib/gtqtc/gtqtc.cpp * contrib/gtwvg/gtwvg.c * contrib/gtwvg/gtwvg.h * contrib/gtwvg/wvggui.c * contrib/gtwvg/wvgcuig.c * contrib/gtwvg/wvggui.h * contrib/gtwvg/wvgwin.c * contrib/gtwvg/wvgutils.c * contrib/gtwvg/wvgcore.c * contrib/gtwvg/wvgwing.c * contrib/hbmisc/hb_f.c * contrib/hbmisc/dates2.c * contrib/hbwin/hbwapi.h * contrib/hbbtree/tests/ctest.c * BOOL -> HB_BOOL * TRUE -> HB_TRUE * FALSE -> HB_FALSE ; If possible please try to verify me, at least your own are of interest or expertise. Look for HB_BOOL/HB_TRUE/HB_FALSE usage in WINAPI calls, if you see such thing, it's wrong. Also some, HB_BOOL WINAPI BOOL implicit conversions may need to be cleaned. ; I didn't touch PP, RDD, SDD and compiler parts yet. ; In few places it's possible that some in-line comments are disaligned after this operation. --- harbour/ChangeLog | 214 +++++++++++ harbour/contrib/gtalleg/gtalleg.c | 60 +-- harbour/contrib/gtqtc/gtqtc.cpp | 134 +++---- harbour/contrib/gtwvg/gtwvg.c | 280 +++++++------- harbour/contrib/gtwvg/gtwvg.h | 80 ++-- harbour/contrib/gtwvg/wvgcore.c | 34 +- harbour/contrib/gtwvg/wvgcuig.c | 6 +- harbour/contrib/gtwvg/wvggui.c | 30 +- harbour/contrib/gtwvg/wvggui.h | 46 +-- harbour/contrib/gtwvg/wvgutils.c | 20 +- harbour/contrib/gtwvg/wvgwin.c | 4 +- harbour/contrib/gtwvg/wvgwing.c | 14 +- harbour/contrib/hbbtree/tests/ctest.c | 74 ++-- harbour/contrib/hbmisc/dates2.c | 14 +- harbour/contrib/hbmisc/hb_f.c | 18 +- harbour/contrib/hbmzip/hbmzip.c | 34 +- harbour/contrib/hbwin/hbwapi.h | 4 +- harbour/contrib/xhb/bkgtsks.c | 36 +- harbour/contrib/xhb/cstructc.c | 6 +- harbour/contrib/xhb/dbf2txt.c | 18 +- harbour/contrib/xhb/dbgfxc.c | 20 +- harbour/contrib/xhb/filestat.c | 16 +- harbour/contrib/xhb/fparse.c | 4 +- harbour/contrib/xhb/freadlin.c | 14 +- harbour/contrib/xhb/hbnxs.h | 34 +- harbour/contrib/xhb/hboutdbg.c | 12 +- harbour/contrib/xhb/hbserv.c | 36 +- harbour/contrib/xhb/hbserv.h | 2 +- harbour/contrib/xhb/txtline.c | 16 +- harbour/contrib/xhb/xhb.h | 8 +- harbour/contrib/xhb/xhbcopyf.c | 10 +- harbour/contrib/xhb/xhberrc.c | 2 +- harbour/contrib/xhb/xhbfunc.c | 4 +- harbour/contrib/xhb/xhbis.c | 4 +- harbour/contrib/xhb/xhbmsgs.c | 2 +- harbour/contrib/xhb/xhbsave.c | 14 +- harbour/include/hbapi.h | 176 ++++----- harbour/include/hbapicdp.h | 42 +-- harbour/include/hbapicls.h | 14 +- harbour/include/hbapidbg.h | 36 +- harbour/include/hbapifs.h | 88 ++--- harbour/include/hbapigt.h | 30 +- harbour/include/hbapiitm.h | 36 +- harbour/include/hbapilng.h | 4 +- harbour/include/hbapistr.h | 12 +- harbour/include/hbcomp.h | 68 ++-- harbour/include/hbcompdf.h | 126 +++---- harbour/include/hbdate.h | 10 +- harbour/include/hbexpra.c | 10 +- harbour/include/hbexprb.c | 32 +- harbour/include/hbexprop.h | 34 +- harbour/include/hbgtcore.h | 92 ++--- harbour/include/hbhash.h | 4 +- harbour/include/hbmacro.h | 18 +- harbour/include/hbmather.h | 2 +- harbour/include/hbregex.h | 6 +- harbour/include/hbset.h | 142 ++++---- harbour/include/hbsocket.h | 26 +- harbour/include/hbstack.h | 8 +- harbour/include/hbsxfunc.h | 8 +- harbour/include/hbthread.h | 44 +-- harbour/include/hbtypes.h | 20 +- harbour/include/hbvm.h | 28 +- harbour/include/hbvmpub.h | 2 +- harbour/include/hbwmain.c | 2 +- harbour/include/hbxvm.h | 300 +++++++-------- harbour/include/hbznet.h | 22 +- harbour/src/common/expropt1.c | 18 +- harbour/src/common/expropt2.c | 232 ++++++------ harbour/src/common/hbdate.c | 38 +- harbour/src/common/hbffind.c | 36 +- harbour/src/common/hbfsapi.c | 30 +- harbour/src/common/hbgete.c | 24 +- harbour/src/common/hbhash.c | 14 +- harbour/src/common/hbprintf.c | 6 +- harbour/src/common/hbstr.c | 56 +-- harbour/src/common/hbver.c | 16 +- harbour/src/common/strwild.c | 38 +- harbour/src/debug/dbgentry.c | 156 ++++---- harbour/src/rdd/hbsix/sxcompr.c | 40 +- harbour/src/rtl/accept.c | 2 +- harbour/src/rtl/cdpapi.c | 112 +++--- harbour/src/rtl/console.c | 18 +- harbour/src/rtl/copyfile.c | 10 +- harbour/src/rtl/dates.c | 10 +- harbour/src/rtl/dirdrive.c | 4 +- harbour/src/rtl/diskspac.c | 26 +- harbour/src/rtl/disksphb.c | 14 +- harbour/src/rtl/empty.c | 4 +- harbour/src/rtl/errapi.c | 18 +- harbour/src/rtl/errintlo.c | 2 +- harbour/src/rtl/file.c | 12 +- harbour/src/rtl/filebuf.c | 78 ++-- harbour/src/rtl/filehb.c | 2 +- harbour/src/rtl/filesys.c | 168 ++++----- harbour/src/rtl/fscopy.c | 10 +- harbour/src/rtl/fserr.c | 2 +- harbour/src/rtl/fssize.c | 6 +- harbour/src/rtl/fstemp.c | 14 +- harbour/src/rtl/gete.c | 2 +- harbour/src/rtl/gt_tpl/gt_tpl.c | 10 +- harbour/src/rtl/gtapi.c | 12 +- harbour/src/rtl/gtapiu.c | 8 +- harbour/src/rtl/gtcgi/gtcgi.c | 16 +- harbour/src/rtl/gtchrmap.c | 2 +- harbour/src/rtl/gtclip.c | 14 +- harbour/src/rtl/gtcrs/gtcrs.c | 128 +++---- harbour/src/rtl/gtdos/gtdos.c | 104 +++--- harbour/src/rtl/gtgui/gtgui.c | 8 +- harbour/src/rtl/gtos2/gtos2.c | 54 +-- harbour/src/rtl/gtpca/gtpca.c | 66 ++-- harbour/src/rtl/gtsln/gtsln.c | 82 ++--- harbour/src/rtl/gtsln/gtsln.h | 32 +- harbour/src/rtl/gtsln/kbsln.c | 20 +- harbour/src/rtl/gtsln/mousesln.c | 28 +- harbour/src/rtl/gtstd/gtstd.c | 58 +-- harbour/src/rtl/gttrm/gttrm.c | 126 +++---- harbour/src/rtl/gtwin/gtwin.c | 88 ++--- harbour/src/rtl/gtwvt/gtwvt.c | 192 +++++----- harbour/src/rtl/gtwvt/gtwvt.h | 36 +- harbour/src/rtl/gtxwc/gtxwc.c | 266 +++++++------- harbour/src/rtl/gtxwc/gtxwc.h | 10 +- harbour/src/rtl/hbbffnc.c | 4 +- harbour/src/rtl/hbbit.c | 6 +- harbour/src/rtl/hbbyte.c | 6 +- harbour/src/rtl/hbfeof.c | 2 +- harbour/src/rtl/hbgtcore.c | 245 ++++++------- harbour/src/rtl/hbhex.c | 2 +- harbour/src/rtl/hbi18n1.c | 44 +-- harbour/src/rtl/hbinet.c | 52 +-- harbour/src/rtl/hbproces.c | 58 +-- harbour/src/rtl/hbprocfn.c | 4 +- harbour/src/rtl/hbrandom.c | 4 +- harbour/src/rtl/hbregex.c | 24 +- harbour/src/rtl/hbregexc.c | 10 +- harbour/src/rtl/hbrunfun.c | 2 +- harbour/src/rtl/hbsocket.c | 126 +++---- harbour/src/rtl/hbstrfmt.c | 2 +- harbour/src/rtl/hbtoken.c | 8 +- harbour/src/rtl/idle.c | 18 +- harbour/src/rtl/inkeyapi.c | 2 +- harbour/src/rtl/isprint.c | 8 +- harbour/src/rtl/itemseri.c | 68 ++-- harbour/src/rtl/langapi.c | 14 +- harbour/src/rtl/math.c | 10 +- harbour/src/rtl/memofile.c | 14 +- harbour/src/rtl/minmax.c | 8 +- harbour/src/rtl/mlcfunc.c | 16 +- harbour/src/rtl/mouse53.c | 4 +- harbour/src/rtl/mouseapi.c | 22 +- harbour/src/rtl/padc.c | 2 +- harbour/src/rtl/padl.c | 2 +- harbour/src/rtl/padr.c | 2 +- harbour/src/rtl/philes.c | 10 +- harbour/src/rtl/rat.c | 4 +- harbour/src/rtl/run.c | 2 +- harbour/src/rtl/saverest.c | 14 +- harbour/src/rtl/setcolor.c | 2 +- harbour/src/rtl/setcurs.c | 2 +- harbour/src/rtl/setkey.c | 14 +- harbour/src/rtl/spfiles.c | 12 +- harbour/src/rtl/strc.c | 6 +- harbour/src/rtl/strclear.c | 16 +- harbour/src/rtl/strmatch.c | 10 +- harbour/src/rtl/strtran.c | 6 +- harbour/src/rtl/trace.c | 2 +- harbour/src/rtl/transfrm.c | 40 +- harbour/src/rtl/trim.c | 6 +- harbour/src/rtl/val.c | 2 +- harbour/src/rtl/valtostr.c | 2 +- harbour/src/rtl/version.c | 8 +- harbour/src/vm/arrays.c | 200 +++++----- harbour/src/vm/arrayshb.c | 8 +- harbour/src/vm/asort.c | 16 +- harbour/src/vm/classes.c | 146 ++++---- harbour/src/vm/cmdarg.c | 30 +- harbour/src/vm/codebloc.c | 4 +- harbour/src/vm/debug.c | 2 +- harbour/src/vm/dynlibhb.c | 4 +- harbour/src/vm/dynsym.c | 2 +- harbour/src/vm/estack.c | 14 +- harbour/src/vm/eval.c | 24 +- harbour/src/vm/extend.c | 60 +-- harbour/src/vm/fm.c | 16 +- harbour/src/vm/garbage.c | 18 +- harbour/src/vm/hashes.c | 80 ++-- harbour/src/vm/hashfunc.c | 22 +- harbour/src/vm/hvm.c | 502 +++++++++++++------------- harbour/src/vm/itemapi.c | 96 ++--- harbour/src/vm/macro.c | 50 +-- harbour/src/vm/maindll.c | 2 +- harbour/src/vm/maindllp.c | 36 +- harbour/src/vm/mainstd.c | 2 +- harbour/src/vm/memvars.c | 50 +-- harbour/src/vm/proc.c | 12 +- harbour/src/vm/runner.c | 30 +- harbour/src/vm/set.c | 334 ++++++++--------- harbour/src/vm/strapi.c | 74 ++-- harbour/src/vm/task.c | 8 +- harbour/src/vm/thread.c | 198 +++++----- 200 files changed, 4271 insertions(+), 4060 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 024ff42117..d57b7f4962 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,220 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-14 18:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/strclear.c + + HB_STRCLEAR() return value will now precisely inform about + successful clear operation. Thanks to Mindaugas. + + * src/vm/hashfunc.c + * src/vm/macro.c + * src/vm/strapi.c + * src/vm/runner.c + * src/vm/estack.c + * src/vm/codebloc.c + * src/vm/hashes.c + * src/vm/maindll.c + * src/vm/dynsym.c + * src/vm/debug.c + * src/vm/itemapi.c + * src/vm/garbage.c + * src/vm/asort.c + * src/vm/hvm.c + * src/vm/cmdarg.c + * src/vm/mainstd.c + * src/vm/maindllp.c + * src/vm/arrays.c + * src/vm/task.c + * src/vm/fm.c + * src/vm/proc.c + * src/vm/thread.c + * src/vm/memvars.c + * src/vm/arrayshb.c + * src/vm/eval.c + * src/vm/extend.c + * src/vm/dynlibhb.c + * src/vm/set.c + * src/vm/classes.c + * src/debug/dbgentry.c + * src/common/hbgete.c + * src/common/hbffind.c + * src/common/hbver.c + * src/common/hbprintf.c + * src/common/hbfsapi.c + * src/common/hbstr.c + * src/common/expropt1.c + * src/common/expropt2.c + * src/common/hbdate.c + * src/common/strwild.c + * src/common/hbhash.c + * src/rtl/gtdos/gtdos.c + * src/rtl/fscopy.c + * src/rtl/run.c + * src/rtl/gtwin/gtwin.c + * src/rtl/gtxwc/gtxwc.h + * src/rtl/gtxwc/gtxwc.c + * src/rtl/math.c + * src/rtl/empty.c + * src/rtl/gtcrs/gtcrs.c + * src/rtl/trim.c + * src/rtl/filehb.c + * src/rtl/hbtoken.c + * src/rtl/fstemp.c + * src/rtl/gtchrmap.c + * src/rtl/strmatch.c + * src/rtl/gtstd/gtstd.c + * src/rtl/gttrm/gttrm.c + * src/rtl/padr.c + * src/rtl/hbstrfmt.c + * src/rtl/transfrm.c + * src/rtl/fserr.c + * src/rtl/minmax.c + * src/rtl/hbfeof.c + * src/rtl/dates.c + * src/rtl/padc.c + * src/rtl/gtcgi/gtcgi.c + * src/rtl/errapi.c + * src/rtl/version.c + * src/rtl/hbregexc.c + * src/rtl/hbrandom.c + * src/rtl/strtran.c + * src/rtl/hbprocfn.c + * src/rtl/hbsocket.c + * src/rtl/hbinet.c + * src/rtl/copyfile.c + * src/rtl/errintlo.c + * src/rtl/gtapi.c + * src/rtl/filesys.c + * src/rtl/padl.c + * src/rtl/hbregex.c + * src/rtl/hbbit.c + * src/rtl/isprint.c + * src/rtl/saverest.c + * src/rtl/diskspac.c + * src/rtl/console.c + * src/rtl/spfiles.c + * src/rtl/gtos2/gtos2.c + * src/rtl/philes.c + * src/rtl/hbbffnc.c + * src/rtl/hbgtcore.c + * src/rtl/cdpapi.c + * src/rtl/dirdrive.c + * src/rtl/hbi18n1.c + * src/rtl/gtclip.c + * src/rtl/mlcfunc.c + * src/rtl/gtapiu.c + * src/rtl/accept.c + * src/rtl/idle.c + * src/rtl/itemseri.c + * src/rtl/hbrunfun.c + * src/rtl/setcolor.c + * src/rtl/setkey.c + * src/rtl/gtsln/mousesln.c + * src/rtl/gtsln/gtsln.c + * src/rtl/gtsln/kbsln.c + * src/rtl/gtsln/gtsln.h + * src/rtl/disksphb.c + * src/rtl/strc.c + * src/rtl/gtpca/gtpca.c + * src/rtl/gtgui/gtgui.c + * src/rtl/hbhex.c + * src/rtl/trace.c + * src/rtl/gt_tpl/gt_tpl.c + * src/rtl/inkeyapi.c + * src/rtl/filebuf.c + * src/rtl/gete.c + * src/rtl/setcurs.c + * src/rtl/hbproces.c + * src/rtl/langapi.c + * src/rtl/gtwvt/gtwvt.h + * src/rtl/gtwvt/gtwvt.c + * src/rtl/mouse53.c + * src/rtl/fssize.c + * src/rtl/hbbyte.c + * src/rtl/mouseapi.c + * src/rtl/memofile.c + * src/rtl/valtostr.c + * src/rtl/file.c + * src/rtl/val.c + * src/rtl/rat.c + * src/rdd/hbsix/sxcompr.c + * include/hbvmpub.h + * include/hbset.h + * include/hbapicdp.h + * include/hbstack.h + * include/hbapilng.h + * include/hbgtcore.h + * include/hbapifs.h + * include/hbthread.h + * include/hbxvm.h + * include/hbmacro.h + * include/hbtypes.h + * include/hbapi.h + * include/hbapiitm.h + * include/hbznet.h + * include/hbvm.h + * include/hbapidbg.h + * include/hbcomp.h + * include/hbsxfunc.h + * include/hbcompdf.h + * include/hbmather.h + * include/hbapistr.h + * include/hbwmain.c + * include/hbexpra.c + * include/hbexprop.h + * include/hbsocket.h + * include/hbapigt.h + * include/hbapicls.h + * include/hbhash.h + * include/hbregex.h + * include/hbexprb.c + * include/hbdate.h + * contrib/gtalleg/gtalleg.c + * contrib/xhb/hboutdbg.c + * contrib/xhb/hbserv.h + * contrib/xhb/bkgtsks.c + * contrib/xhb/dbf2txt.c + * contrib/xhb/xhbis.c + * contrib/xhb/fparse.c + * contrib/xhb/xhb.h + * contrib/xhb/xhbsave.c + * contrib/xhb/xhbmsgs.c + * contrib/xhb/freadlin.c + * contrib/xhb/txtline.c + * contrib/xhb/dbgfxc.c + * contrib/xhb/xhberrc.c + * contrib/xhb/filestat.c + * contrib/xhb/xhbcopyf.c + * contrib/xhb/hbnxs.h + * contrib/xhb/hbserv.c + * contrib/xhb/cstructc.c + * contrib/xhb/xhbfunc.c + * contrib/hbmzip/hbmzip.c + * contrib/gtqtc/gtqtc.cpp + * contrib/gtwvg/gtwvg.c + * contrib/gtwvg/gtwvg.h + * contrib/gtwvg/wvggui.c + * contrib/gtwvg/wvgcuig.c + * contrib/gtwvg/wvggui.h + * contrib/gtwvg/wvgwin.c + * contrib/gtwvg/wvgutils.c + * contrib/gtwvg/wvgcore.c + * contrib/gtwvg/wvgwing.c + * contrib/hbmisc/hb_f.c + * contrib/hbmisc/dates2.c + * contrib/hbwin/hbwapi.h + * contrib/hbbtree/tests/ctest.c + * BOOL -> HB_BOOL + * TRUE -> HB_TRUE + * FALSE -> HB_FALSE + ; If possible please try to verify me, at least your own are of interest + or expertise. Look for HB_BOOL/HB_TRUE/HB_FALSE usage in WINAPI calls, + if you see such thing, it's wrong. Also some, HB_BOOL WINAPI BOOL + implicit conversions may need to be cleaned. + ; I didn't touch PP, RDD, SDD and compiler parts yet. + ; In few places it's possible that some in-line comments are disaligned + after this operation. + 2010-01-14 13:36 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rdd/hbsix/sxcompr.c * src/rdd/hbsix/sxcrypt.c diff --git a/harbour/contrib/gtalleg/gtalleg.c b/harbour/contrib/gtalleg/gtalleg.c index 597aa788ee..ef3297932c 100644 --- a/harbour/contrib/gtalleg/gtalleg.c +++ b/harbour/contrib/gtalleg/gtalleg.c @@ -72,9 +72,9 @@ static HB_GT_FUNCS SuperTable; #define HB_GTID_PTR (&s_GtId) -static BOOL s_fInit; -static BOOL s_fMakeInit; -static BOOL s_fGtError; +static HB_BOOL s_fInit; +static HB_BOOL s_fMakeInit; +static HB_BOOL s_fGtError; /* font definition */ static ssfFont s_ssfDefaultFont; @@ -204,20 +204,20 @@ static const gtAllegKey s_CtrlTable[GT_CTRL_TABLE_SIZE] = { if( r > s_GFXUpd.iRight ) s_GFXUpd.iRight = r; \ } while(0) #define GT_SCREENINIT() do { if( !s_fInit ) \ - hb_gt_alleg_InitializeScreen( pGT, s_iScrHeight, s_iScrWidth, TRUE ); \ + hb_gt_alleg_InitializeScreen( pGT, s_iScrHeight, s_iScrWidth, HB_TRUE ); \ } while( 0 ) #define MK_GT8BCOLOR(n) ((n & 0xFF) / 16 | (n & 0xFF00) / 256) static void hb_gt_alleg_Error( const char * szMsg ) { - s_fGtError = TRUE; + s_fGtError = HB_TRUE; hb_errInternal( 9997, "%s: %s", szMsg, allegro_error ); } -static BOOL hb_gt_alleg_CursorRect( int iRow, int iCol, int iStyle, - int * piTop, int * piLeft, - int * piBottom, int * piRight ) +static HB_BOOL hb_gt_alleg_CursorRect( int iRow, int iCol, int iStyle, + int * piTop, int * piLeft, + int * piBottom, int * piRight ) { *piLeft = s_iHBorder + iCol * s_byFontWidth; *piRight = *piLeft + s_byFontWidth - 1; @@ -246,10 +246,10 @@ static BOOL hb_gt_alleg_CursorRect( int iRow, int iCol, int iStyle, break; default: - return FALSE; + return HB_FALSE; } - return TRUE; + return HB_TRUE; } static void hb_gt_alleg_DoCursor( int iRow, int iCol, int iStyle ) @@ -284,7 +284,7 @@ static void hb_gt_alleg_DoCursor( int iRow, int iCol, int iStyle ) static void hb_gt_alleg_ScreenUpdate( PHB_GT pGT ) { int iRow, iCol, iStyle; - BOOL fPix, fCursor; + HB_BOOL fPix, fCursor; HB_TRACE(HB_TR_DEBUG, ("hb_gt_alleg_ScreenUpdate(%p)", pGT)); @@ -320,18 +320,18 @@ static void hb_gt_alleg_ScreenUpdate( PHB_GT pGT ) } } -static BOOL hb_gt_alleg_InitializeScreen( PHB_GT pGT, int iRows, int iCols, BOOL lClearInit ) +static HB_BOOL hb_gt_alleg_InitializeScreen( PHB_GT pGT, int iRows, int iCols, HB_BOOL lClearInit ) { PHB_FNAME pFileName; int iRet = 1, iWidth, iHeight; /* Don't remove iRet, ixFP and iyFP initializers! */ short ixFP = 0, iyFP = 0; - BOOL lMode = FALSE, lPrev = s_fInit; + HB_BOOL lMode = HB_FALSE, lPrev = s_fInit; HB_TRACE(HB_TR_DEBUG, ("hb_gt_alleg_InitializeScreen(%p,%d,%d,%d)", pGT, iRows, iCols, (int) lClearInit )); if( s_fGtError ) { - return FALSE; + return HB_FALSE; } if( lPrev ) @@ -427,7 +427,7 @@ static BOOL hb_gt_alleg_InitializeScreen( PHB_GT pGT, int iRows, int iCols, BOOL } else { - lMode = TRUE; + lMode = HB_TRUE; } pFileName = hb_fsFNameSplit( hb_cmdargARGV()[0] ); @@ -441,7 +441,7 @@ static BOOL hb_gt_alleg_InitializeScreen( PHB_GT pGT, int iRows, int iCols, BOOL s_iMsButtons = al_install_mouse(); } - s_fInit = TRUE; + s_fInit = HB_TRUE; s_mouseBound.iLeft = 0; s_mouseBound.iTop = 0; s_mouseBound.iRight = AL_SCREEN_W - 1; @@ -552,7 +552,7 @@ static void hb_gt_alleg_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hF ssfCreateThinFont( &s_ssfDefaultFont ); s_iCursorStyle = SC_NONE; - s_fMakeInit = s_fGtError = FALSE; + s_fMakeInit = s_fGtError = HB_FALSE; if( allegro_init() != 0 ) { @@ -593,13 +593,13 @@ static const char * hb_gt_alleg_Version( PHB_GT pGT, int iType ) return "Harbour Terminal: Portable Allegro GUI console"; } -static BOOL hb_gt_alleg_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_alleg_SetMode( PHB_GT pGT, int iRows, int iCols ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_alleg_SetMode(%p,%d,%d)", pGT, iRows, iCols)); HB_SYMBOL_UNUSED( pGT ); - return hb_gt_alleg_InitializeScreen( pGT, iRows, iCols, TRUE ); + return hb_gt_alleg_InitializeScreen( pGT, iRows, iCols, HB_TRUE ); } static int hb_gt_alleg_ReadKey( PHB_GT pGT, int iEventMask ) @@ -728,11 +728,11 @@ static int hb_gt_alleg_ReadKey( PHB_GT pGT, int iEventMask ) return nKey; } -static BOOL hb_gt_alleg_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_alleg_mouse_IsPresent( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); - return TRUE; + return HB_TRUE; } static void hb_gt_alleg_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) @@ -755,7 +755,7 @@ static void hb_gt_alleg_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ) al_position_mouse(iCol * s_byFontWidth, iRow * s_byFontSize); } -static BOOL hb_gt_alleg_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_alleg_mouse_ButtonState( PHB_GT pGT, int iButton ) { GT_SCREENINIT(); @@ -812,7 +812,7 @@ static void hb_gt_alleg_mouse_GetBounds( PHB_GT pGT, int *piTop, int *piLeft, in *piRight = s_mouseBound.iRight; } -static BOOL hb_gt_alleg_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_alleg_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { int iWidth, iHeight, iValue; @@ -823,7 +823,7 @@ static BOOL hb_gt_alleg_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: case HB_GTI_ISGRAPHIC: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_INPUTFD: @@ -924,7 +924,7 @@ static BOOL hb_gt_alleg_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* ********** Graphics API ********** */ @@ -1140,7 +1140,7 @@ static void hb_gt_alleg_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) if( iColor != iDefColor || usChar != ' ' ) { - s_fMakeInit = TRUE; + s_fMakeInit = HB_TRUE; break; } } @@ -1168,7 +1168,7 @@ static void hb_gt_alleg_Refresh( PHB_GT pGT ) HB_GTSUPER_REFRESH( pGT ); if( s_fMakeInit ) { - s_fMakeInit = FALSE; + s_fMakeInit = HB_FALSE; GT_SCREENINIT(); } } @@ -1178,7 +1178,7 @@ static void hb_gt_alleg_Refresh( PHB_GT pGT ) /* ******************************************************************* */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -1202,7 +1202,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->GfxPrimitive = hb_gt_alleg_gfx_Primitive; pFuncTable->GfxText = hb_gt_alleg_gfx_Text; - return TRUE; + return HB_TRUE; } /* ******************************************************************* */ @@ -1221,7 +1221,7 @@ int _mangled_main( int argc, char * argv[] ) HB_TRACE(HB_TR_DEBUG, ("_mangled_main(%d, %p)", argc, argv)); hb_cmdargInit( argc, argv ); - hb_vmInit( TRUE ); + hb_vmInit( HB_TRUE ); return hb_vmQuit(); } void * _mangled_main_address = ( void * ) _mangled_main; diff --git a/harbour/contrib/gtqtc/gtqtc.cpp b/harbour/contrib/gtqtc/gtqtc.cpp index 68b50059cb..e27ca3e7a2 100644 --- a/harbour/contrib/gtqtc/gtqtc.cpp +++ b/harbour/contrib/gtqtc/gtqtc.cpp @@ -99,7 +99,7 @@ static void DebugIt( char* text, int iVal, int iVal2 ) static bool hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) { - bool fOK = FALSE; + bool fOK = HB_FALSE; HB_WVT_LOCK @@ -112,7 +112,7 @@ static bool hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) { s_wvtWindows[ iPos ] = pWVT; pWVT->iHandle = iPos; - fOK = TRUE; + fOK = HB_TRUE; ++s_wvtCount; break; } @@ -174,35 +174,35 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, int iCmdShow ) pWVT->fontQuality = 0; hb_strncpy( pWVT->fontFace, WVT_DEFAULT_FONT_NAME, sizeof( pWVT->fontFace ) - 1 ); - pWVT->CaretExist = FALSE; - pWVT->CaretHidden = TRUE; + pWVT->CaretExist = HB_FALSE; + pWVT->CaretHidden = HB_TRUE; pWVT->CaretSize = 0; pWVT->CaretWidth = 0; pWVT->MousePos.setX( 0 ); pWVT->MousePos.setY( 0 ); - pWVT->MouseMove = TRUE; + pWVT->MouseMove = HB_TRUE; pWVT->keyPointerIn = 0; pWVT->keyPointerOut = 0; pWVT->keyLast = 0; - pWVT->CenterWindow = TRUE; /* Default is to always display window in centre of screen */ - pWVT->CodePage = 255; /* GetACP(); - set code page to default system */ + pWVT->CenterWindow = HB_TRUE; /* Default is to always display window in centre of screen */ + pWVT->CodePage = 255; /* GetACP(); - set code page to default system */ - pWVT->AltF4Close = FALSE; - pWVT->fInit = FALSE; - pWVT->bMaximized = FALSE; - pWVT->bBeingMarked = FALSE; - pWVT->bBeginMarked = FALSE; + pWVT->AltF4Close = HB_FALSE; + pWVT->fInit = HB_FALSE; + pWVT->bMaximized = HB_FALSE; + pWVT->bBeingMarked = HB_FALSE; + pWVT->bBeginMarked = HB_FALSE; pWVT->pszSelectCopy = hb_strdup( "Mark and Copy" ); - pWVT->bSelectCopy = TRUE; - pWVT->bResizable = TRUE; - pWVT->bClosable = TRUE; + pWVT->bSelectCopy = HB_TRUE; + pWVT->bResizable = HB_TRUE; + pWVT->bClosable = HB_TRUE; pWVT->ResizeMode = HB_GTI_RESIZEMODE_FONT; - pWVT->bResizing = FALSE; - pWVT->bAlreadySizing = FALSE; + pWVT->bResizing = HB_FALSE; + pWVT->bAlreadySizing = HB_FALSE; pWVT->hostCDP = hb_vmCDP(); #if defined( UNICODE ) @@ -309,7 +309,7 @@ static void hb_gt_wvt_QUpdateCaret( PHB_GTWVT pWVT ) if( pWVT->CaretExist && !pWVT->CaretHidden ) { pWVT->qWnd->_drawingArea->hideCaret(); - pWVT->CaretHidden = TRUE; + pWVT->CaretHidden = HB_TRUE; } } else @@ -326,7 +326,7 @@ static void hb_gt_wvt_QUpdateCaret( PHB_GTWVT pWVT ) { pWVT->qWnd->_drawingArea->setCaretPos( iCol, iRow ); pWVT->qWnd->_drawingArea->showCaret(); - pWVT->CaretHidden = FALSE; + pWVT->CaretHidden = HB_FALSE; } } } @@ -336,7 +336,7 @@ static void hb_gt_wvt_QKillCaret( PHB_GTWVT pWVT ) if( pWVT->CaretExist ) { pWVT->qWnd->_drawingArea->destroyCaret(); - pWVT->CaretExist = FALSE; + pWVT->CaretExist = HB_FALSE; } } @@ -373,10 +373,10 @@ static bool hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) { pWVT->keyPointerOut = 0; } - return TRUE; + return HB_TRUE; } *iKey = 0; - return FALSE; + return HB_FALSE; } int hb_gt_wvt_getKbdState( void ) @@ -449,9 +449,9 @@ static bool hb_gt_wvt_QSetWindowSize( PHB_GTWVT pWVT, int iRows, int iCols ) pWVT->qWnd->_drawingArea->_iROWS = iRows; pWVT->qWnd->_drawingArea->_iCOLS = iCols; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } static bool hb_gt_wvt_QInitWindow( PHB_GTWVT pWVT, int iRow, int iCol ) @@ -493,7 +493,7 @@ static bool hb_gt_wvt_QValidWindowSize( int rows, int cols, QFont *qFont, int iW HB_SYMBOL_UNUSED( qFont ); HB_SYMBOL_UNUSED( iWidth ); - return TRUE; + return HB_TRUE; } #endif @@ -536,7 +536,7 @@ static bool hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) { #if 0 - HMENU hSysMenu = GetSystemMenu( pWVT->hWnd, FALSE ); + HMENU hSysMenu = GetSystemMenu( pWVT->hWnd, HB_FALSE ); if( hSysMenu ) { /* Create "Mark" prompt in SysMenu to allow console type copy operation */ @@ -547,7 +547,7 @@ static bool hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) } #endif } - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -664,7 +664,7 @@ static void hb_gt_wvt_Refresh( PHB_GT pGT ) { if( !pWVT->fInit ) { - pWVT->fInit = TRUE; + pWVT->fInit = HB_TRUE; if( pWVT->CenterWindow ) { hb_gt_wvt_QCenterWindow( pWVT ); @@ -680,10 +680,10 @@ static void hb_gt_wvt_Refresh( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) +static HB_BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) { PHB_GTWVT pWVT; - bool fResult = FALSE; + bool fResult = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_SetMode(%p,%d,%d)", pGT, iRow, iCol ) ); @@ -728,7 +728,7 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask ) { PHB_GTWVT pWVT; int c = 0; - bool fKey = FALSE; + bool fKey = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", pGT, iEventMask ) ); HB_SYMBOL_UNUSED( iEventMask ); /* we ignore the eventmask! */ @@ -761,7 +761,7 @@ static void hb_gt_wvt_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox ); @@ -803,15 +803,15 @@ static BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char for( i = 0; i < 256; i++ ) { pWVT->chrTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); } } # endif - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) +static HB_BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) { HB_GTSUPER_SETKEYCP( pGT, pszTermCDP, pszHostCDP ); @@ -847,23 +847,23 @@ static BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char for( i = 0; i < 256; i++ ) pWVT->keyTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); pWVT->inCDP = cdpTerm; } # endif - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ -static BOOL hb_gt_wvt_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_wvt_mouse_IsPresent( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_wvt_mouse_IsPresent(%p)", pGT)); HB_SYMBOL_UNUSED( pGT ); - return TRUE; + return HB_TRUE; } static void hb_gt_wvt_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) @@ -877,7 +877,7 @@ static void hb_gt_wvt_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) *piCol = pWVT->MousePos.x(); } -static BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) { HB_SYMBOL_UNUSED( iButton ); HB_TRACE( HB_TR_DEBUG, ("hb_gt_wvt_mouse_ButtonState(%p,%i)", pGT, iButton) ); @@ -893,7 +893,7 @@ static BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) case 2: return qApp->mouseButtons() & Qt::MidButton; } - return FALSE; + return HB_FALSE; } static int hb_gt_wvt_mouse_CountButton( PHB_GT pGT ) @@ -908,7 +908,7 @@ static int hb_gt_wvt_mouse_CountButton( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { PHB_GTWVT pWVT; int iVal; @@ -928,11 +928,11 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: case HB_GTI_ISGRAPHIC: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ISUNICODE: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; #if 0 case HB_GTI_INPUTFD: @@ -1128,7 +1128,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( iY > 0 ) { bool bOldCentre = pWVT->CenterWindow; - pWVT->CenterWindow = pWVT->bMaximized ? TRUE : FALSE; + pWVT->CenterWindow = pWVT->bMaximized ? HB_TRUE : HB_FALSE; HB_GTSELF_SETMODE( pGT, ( USHORT ) ( iY / pWVT->PTEXTSIZE.y() ), ( USHORT ) ( iX / pWVT->PTEXTSIZE.x() ) ); pWVT->CenterWindow = bOldCentre; } @@ -1177,17 +1177,17 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( hb_itemGetCLen( pInfo->pNewVal ) ) { #if 0 - HMENU hSysMenu = pWVT->hWnd ? GetSystemMenu( pWVT->hWnd, FALSE ) : NULL; + HMENU hSysMenu = pWVT->hWnd ? GetSystemMenu( pWVT->hWnd, HB_FALSE ) : NULL; if( hSysMenu || !pWVT->hWnd ) { if( pWVT->pszSelectCopy ) hb_xfree( pWVT->pszSelectCopy ); pWVT->pszSelectCopy = hb_strdup( hb_itemGetCPtr( pInfo->pNewVal ) ); - pWVT->bSelectCopy = TRUE; + pWVT->bSelectCopy = HB_TRUE; } #endif pWVT->pszSelectCopy = hb_strdup( hb_itemGetCPtr( pInfo->pNewVal ) ); - pWVT->bSelectCopy = TRUE; + pWVT->bSelectCopy = HB_TRUE; } } else if( pInfo->pNewVal ) @@ -1198,7 +1198,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( pWVT->qWnd ) { #if 0 - HMENU hSysMenu = GetSystemMenu( pWVT->hWnd, FALSE ); + HMENU hSysMenu = GetSystemMenu( pWVT->hWnd, HB_FALSE ); if( hSysMenu ) { EnableMenuItem( hSysMenu, SYS_EV_MARK, MF_BYCOMMAND | ( bNewValue ? MF_ENABLED : MF_GRAYED ) ); @@ -1312,12 +1312,12 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -1338,7 +1338,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseButtonState = hb_gt_wvt_mouse_ButtonState; pFuncTable->MouseCountButton = hb_gt_wvt_mouse_CountButton; - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -1374,19 +1374,19 @@ DrawingArea::DrawingArea(QWidget *parent) _iCOLS = 80; setFocusPolicy( Qt::StrongFocus ); - setMouseTracking( TRUE ); + setMouseTracking( HB_TRUE ); setAttribute( Qt::WA_InputMethodEnabled, true ); /* Important but give it a thought */ //setAttribute(Qt::WA_OpaquePaintEvent); - _bBlinking = FALSE; + _bBlinking = HB_FALSE; _basicTimer = new QBasicTimer(); - _bFirst = TRUE; - _bSizing = FALSE; - _bCopying = FALSE; + _bFirst = HB_TRUE; + _bSizing = HB_FALSE; + _bCopying = HB_FALSE; _image = new QImage(); @@ -1405,7 +1405,7 @@ void DrawingArea::resetWindowSize( void ) _qFont = QFont(); _qFont.setFamily( pWVT->fontFace ); _qFont.setPixelSize( pWVT->fontHeight ); - _qFont.setFixedPitch( TRUE ); + _qFont.setFixedPitch( HB_TRUE ); _qFont = QFont( _qFont, painter.device() ); QFontMetrics fontMetrics( _qFont ); _fontHeight = fontMetrics.height(); @@ -1598,12 +1598,12 @@ bool DrawingArea::createCaret( int iWidth, int iHeight ) { _crtWidth = iWidth; _crtHeight = iHeight; - return TRUE; + return HB_TRUE; } void DrawingArea::hideCaret( void ) { _basicTimer->stop(); - _bBlinking = FALSE; + _bBlinking = HB_FALSE; displayCell( _crtLastRow, _crtLastCol ); } void DrawingArea::showCaret( void ) @@ -1656,12 +1656,12 @@ void DrawingArea::timerEvent( QTimerEvent *event ) { if( _bBlinking ) { - _bBlinking = FALSE; + _bBlinking = HB_FALSE; displayCell( _crtLastRow, _crtLastCol ); } else { - _bBlinking = TRUE; + _bBlinking = HB_TRUE; displayBlock( _crtLastRow, _crtLastCol ); } } @@ -1690,14 +1690,14 @@ void DrawingArea::resizeEvent( QResizeEvent *event ) { PHB_GTWVT pWVT = HB_GTWVT_GET( pGT ); - _bSizing = TRUE; + _bSizing = HB_TRUE; int iW = width(); int iH = height(); if( _bFirst ) { - _bFirst = FALSE; + _bFirst = HB_FALSE; QWidget::resizeEvent( event ); } else @@ -1897,7 +1897,7 @@ void DrawingArea::mousePressEvent( QMouseEvent *event ) if( _bSizing ) { - _bSizing = FALSE; + _bSizing = HB_FALSE; pWVT->qWnd->setWindowSize(); } @@ -1933,7 +1933,7 @@ void DrawingArea::mouseReleaseEvent( QMouseEvent *event ) if( _bSizing ) { - _bSizing = FALSE; + _bSizing = HB_FALSE; pWVT->qWnd->setWindowSize(); } if( _bCopying ) @@ -1971,7 +1971,7 @@ bool DrawingArea::event( QEvent *event ) { if( _bSizing && ( event->type() == QEvent::Enter || event->type() == QEvent::Leave ) ) { - _bSizing = FALSE; + _bSizing = HB_FALSE; PHB_GTWVT pWVT = HB_GTWVT_GET( pGT ); pWVT->qWnd->setWindowSize(); } diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index 33dffec582..4466add530 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -118,7 +118,7 @@ static const int K_Ctrl[] = K_CTRL_V, K_CTRL_W, K_CTRL_X, K_CTRL_Y, K_CTRL_Z }; -static BOOL b_MouseEnable = TRUE; +static HB_BOOL b_MouseEnable = HB_TRUE; static void hb_wvt_gtInitGui( PHB_GTWVT pWVT ); static void hb_wvt_gtExitGui( PHB_GTWVT pWVT ); @@ -184,9 +184,9 @@ static PHB_GTWVT hb_gt_wvt_Find( HWND hWnd ) return pWVT; } -static BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) { - BOOL fOK = FALSE; + HB_BOOL fOK = HB_FALSE; HB_WVT_LOCK @@ -204,7 +204,7 @@ static BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) hb_gt_wvt_RegisterClass( pWVT->hInstance ); hb_wvt_gtLoadGuiData(); } - fOK = TRUE; + fOK = HB_TRUE; break; } ++iPos; @@ -363,41 +363,41 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow ) pWVT->fontQuality = DEFAULT_QUALITY; hb_strncpy( pWVT->fontFace, WVT_DEFAULT_FONT_NAME, sizeof( pWVT->fontFace ) - 1 ); - pWVT->CaretExist = FALSE; - pWVT->CaretHidden = TRUE; + pWVT->CaretExist = HB_FALSE; + pWVT->CaretHidden = HB_TRUE; pWVT->CaretSize = 0; pWVT->CaretWidth = 0; pWVT->MousePos.x = 0; pWVT->MousePos.y = 0; - pWVT->MouseMove = TRUE; + pWVT->MouseMove = HB_TRUE; pWVT->hWnd = NULL; pWVT->keyPointerIn = 0; pWVT->keyPointerOut = 0; pWVT->keyLast = 0; - pWVT->CentreWindow = TRUE; /* Default is to always display window in centre of screen */ + pWVT->CentreWindow = HB_TRUE; /* Default is to always display window in centre of screen */ pWVT->CodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */ #if !defined( UNICODE ) pWVT->boxCodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */ #endif pWVT->Win9X = ( osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ); - pWVT->AltF4Close = FALSE; + pWVT->AltF4Close = HB_FALSE; - pWVT->IgnoreWM_SYSCHAR = FALSE; + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; - pWVT->bMaximized = FALSE; - pWVT->bBeingMarked = FALSE; - pWVT->bBeginMarked = FALSE; + pWVT->bMaximized = HB_FALSE; + pWVT->bBeingMarked = HB_FALSE; + pWVT->bBeginMarked = HB_FALSE; pWVT->pszSelectCopy = hb_strdup( "Mark and Copy" ); - pWVT->bSelectCopy = TRUE; - pWVT->bResizable = TRUE; - pWVT->bClosable = TRUE; + pWVT->bSelectCopy = HB_TRUE; + pWVT->bResizable = HB_TRUE; + pWVT->bClosable = HB_TRUE; pWVT->ResizeMode = HB_GTI_RESIZEMODE_FONT; - pWVT->bResizing = FALSE; + pWVT->bResizing = HB_FALSE; pWVT->pPP = ( HB_GT_PARAMS * ) hb_xgrab( sizeof( HB_GT_PARAMS ) ); pWVT->pPP->style = WS_THICKFRAME|WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX; @@ -407,9 +407,9 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow ) pWVT->pPP->width = CW_USEDEFAULT; pWVT->pPP->height = CW_USEDEFAULT; pWVT->pPP->pParentGT = NULL; - pWVT->pPP->bVisible = FALSE; - pWVT->pPP->bConfigured = FALSE; - pWVT->pPP->bRowCols = FALSE; + pWVT->pPP->bVisible = HB_FALSE; + pWVT->pPP->bConfigured = HB_FALSE; + pWVT->pPP->bRowCols = HB_FALSE; pWVT->pPP->iWndType = 0; pWVT->hostCDP = hb_vmCDP(); @@ -556,7 +556,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT ) if( pWVT->CaretExist && !pWVT->CaretHidden ) { HideCaret( pWVT->hWnd ); - pWVT->CaretHidden = TRUE; + pWVT->CaretHidden = HB_TRUE; } } else @@ -571,7 +571,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT ) } if( pWVT->CaretExist ) { - BOOL bShow; + HB_BOOL bShow; POINT xy; xy = hb_gt_wvt_GetXYFromColRow( pWVT, iCol, iRow ); SetCaretPos( xy.x, pWVT->CaretSize < 0 ? @@ -588,7 +588,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT ) xy.y : xy.y + pWVT->PTEXTSIZE.y - pWVT->CaretSize ); ShowCaret( pWVT->hWnd ); } - pWVT->CaretHidden = FALSE; + pWVT->CaretHidden = HB_FALSE; } } } @@ -598,7 +598,7 @@ static void hb_gt_wvt_KillCaret( PHB_GTWVT pWVT ) if( pWVT->CaretExist ) { DestroyCaret(); - pWVT->CaretExist = FALSE; + pWVT->CaretExist = HB_FALSE; } } @@ -645,7 +645,7 @@ static void hb_gt_wvt_AddCharToInputQueue( PHB_GTWVT pWVT, int iKey ) } } -static BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) +static HB_BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) { if( pWVT->keyPointerOut != pWVT->keyPointerIn ) { @@ -654,11 +654,11 @@ static BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) { pWVT->keyPointerOut = 0; } - return TRUE; + return HB_TRUE; } *iKey = 0; - return FALSE; + return HB_FALSE; } static void hb_gt_wvt_TranslateKey( PHB_GTWVT pWVT, int key, int shiftkey, int altkey, int controlkey ) @@ -704,7 +704,7 @@ static int hb_gt_wvt_key_ansi_to_oem( int c ) return pszDst[ 0 ]; } -static BOOL hb_gt_wvt_FitRows( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_FitRows( PHB_GTWVT pWVT ) { RECT wi; RECT ci; @@ -718,7 +718,7 @@ static BOOL hb_gt_wvt_FitRows( PHB_GTWVT pWVT ) && ( ci.bottom - ci.top ) == ( pWVT->PTEXTSIZE.y * pWVT->ROWS ) ) { - return FALSE; + return HB_FALSE; } GetWindowRect( pWVT->hWnd, &wi ); @@ -740,16 +740,16 @@ static BOOL hb_gt_wvt_FitRows( PHB_GTWVT pWVT ) if( maxHeight > 0 ) { - BOOL bOldCentre = pWVT->CentreWindow; - pWVT->CentreWindow = pWVT->bMaximized ? TRUE : FALSE; + HB_BOOL bOldCentre = pWVT->CentreWindow; + pWVT->CentreWindow = pWVT->bMaximized ? HB_TRUE : HB_FALSE; HB_GTSELF_SETMODE( pWVT->pGT, ( maxHeight / pWVT->PTEXTSIZE.y ), ( maxWidth / pWVT->PTEXTSIZE.x ) ); pWVT->CentreWindow = bOldCentre; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) { RECT wi; RECT ci; @@ -765,7 +765,7 @@ static BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) && ( ci.bottom - ci.top ) == ( pWVT->PTEXTSIZE.y * pWVT->ROWS ) ) { - return FALSE; + return HB_FALSE; } GetWindowRect( pWVT->hWnd, &wi ); @@ -848,7 +848,7 @@ static BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) pWVT->PTEXTSIZE.y = tm.tmHeight; #if defined( HB_OS_WIN_CE ) - pWVT->FixedFont = FALSE; + pWVT->FixedFont = HB_FALSE; #else pWVT->FixedFont = !pWVT->Win9X && pWVT->fontWidth >= 0 && ( tm.tmPitchAndFamily & TMPF_FIXED_PITCH ) == 0 && @@ -885,12 +885,12 @@ static BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) HB_GTSELF_EXPOSEAREA( pWVT->pGT, 0, 0, pWVT->ROWS, pWVT->COLS ); } } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_wvt_FitSizeRows( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_FitSizeRows( PHB_GTWVT pWVT ) { - BOOL bSizeChanged = FALSE; + HB_BOOL bSizeChanged = HB_FALSE; if( pWVT->bResizable ) { @@ -902,7 +902,7 @@ static BOOL hb_gt_wvt_FitSizeRows( PHB_GTWVT pWVT ) else bSizeChanged = hb_gt_wvt_FitRows( pWVT ); - pWVT->bResizing = FALSE; + pWVT->bResizing = HB_FALSE; if( bSizeChanged ) { @@ -920,19 +920,19 @@ static BOOL hb_gt_wvt_FitSizeRows( PHB_GTWVT pWVT ) hb_wvt_gtSaveGuiState( pWVT ); } else - InvalidateRect( pWVT->hWnd, NULL, FALSE ); + InvalidateRect( pWVT->hWnd, NULL, HB_FALSE ); } else { - pWVT->bResizing = FALSE; - InvalidateRect( pWVT->hWnd, NULL, FALSE ); + pWVT->bResizing = HB_FALSE; + InvalidateRect( pWVT->hWnd, NULL, HB_FALSE ); } return bSizeChanged; } static void hb_gt_wvt_Maximize( PHB_GTWVT pWVT ) { - pWVT->bMaximized = TRUE; + pWVT->bMaximized = HB_TRUE; hb_gt_wvt_FitSizeRows( pWVT ); /* Disable "maximize" button */ @@ -1000,7 +1000,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT ) pWVT->PTEXTSIZE.y = tm.tmHeight; /* but seems to be a problem on Win9X so */ /* assume proportional fonts always for Win9X */ #if defined( HB_OS_WIN_CE ) - pWVT->FixedFont = FALSE; + pWVT->FixedFont = HB_FALSE; #else pWVT->FixedFont = !pWVT->Win9X && pWVT->fontWidth >= 0 && ( tm.tmPitchAndFamily & TMPF_FIXED_PITCH ) == 0 && @@ -1023,7 +1023,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT ) height += ( int ) ( wi.bottom - wi.top - ci.bottom ); /* Center the window within the CLIENT area on the screen - but only if pWVT->CentreWindow == TRUE */ + but only if pWVT->CentreWindow == HB_TRUE */ if( pWVT->CentreWindow && SystemParametersInfo( SPI_GETWORKAREA, 0, &rcWorkArea, 0 ) ) { wi.left = rcWorkArea.left + ( ( rcWorkArea.right - rcWorkArea.left - width ) / 2 ); @@ -1032,7 +1032,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT ) if( wi.left < 0 || wi.top < 0 ) { - pWVT->bMaximized = TRUE; + pWVT->bMaximized = HB_TRUE; hb_gt_wvt_FitSizeRows( pWVT ); /* resize the window to get the specified number of rows and columns */ @@ -1046,7 +1046,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT ) height += ( int ) ( wi.bottom - wi.top - ci.bottom ); /* Center the window within the CLIENT area on the screen - but only if pWVT->CentreWindow == TRUE */ + but only if pWVT->CentreWindow == HB_TRUE */ if( pWVT->CentreWindow && SystemParametersInfo( SPI_GETWORKAREA, 0, &rcWorkArea, 0 ) ) { wi.left = rcWorkArea.left + ( ( rcWorkArea.right - rcWorkArea.left - width ) / 2 ); @@ -1071,7 +1071,7 @@ static void hb_gt_wvt_SetWindowTitle( HWND hWnd, const char * title ) HB_TCHAR_FREE( text ); } -static BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) +static HB_BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) { TCHAR buffer[ WVT_MAX_TITLE_SIZE ]; int iResult; @@ -1082,28 +1082,28 @@ static BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) *title = ( char * ) hb_xgrab( iResult + 1 ); HB_TCHAR_GETFROM( *title, buffer, iResult ); ( *title )[ iResult ] = '\0'; - return TRUE; + return HB_TRUE; } *title = NULL; - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_wvt_SetWindowSize( PHB_GTWVT pWVT, int iRow, int iCol ) +static HB_BOOL hb_gt_wvt_SetWindowSize( PHB_GTWVT pWVT, int iRow, int iCol ) { if( HB_GTSELF_RESIZE( pWVT->pGT, iRow, iCol ) ) { pWVT->ROWS = iRow; pWVT->COLS = iCol; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_wvt_InitWindow( PHB_GTWVT pWVT, int iRow, int iCol ) +static HB_BOOL hb_gt_wvt_InitWindow( PHB_GTWVT pWVT, int iRow, int iCol ) { - BOOL fRet = hb_gt_wvt_SetWindowSize( pWVT, iRow, iCol ); + HB_BOOL fRet = hb_gt_wvt_SetWindowSize( pWVT, iRow, iCol ); hb_gt_wvt_ResetWindowSize( pWVT ); @@ -1175,7 +1175,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { if( pWVT->bBeginMarked ) { - pWVT->bBeingMarked = TRUE; + pWVT->bBeingMarked = HB_TRUE; pWVT->sRectNew.left = xy.x; pWVT->sRectNew.top = xy.y; @@ -1207,8 +1207,8 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { if( pWVT->bBeingMarked ) { - pWVT->bBeginMarked = FALSE; - pWVT->bBeingMarked = FALSE; + pWVT->bBeginMarked = HB_FALSE; + pWVT->bBeingMarked = HB_FALSE; RedrawWindow( pWVT->hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW ); @@ -1390,16 +1390,16 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L } } -static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPARAM lParam ) +static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPARAM lParam ) { switch( message ) { case WM_KEYDOWN: case WM_SYSKEYDOWN: { - BOOL bAlt = GetKeyState( VK_MENU ) & 0x8000; + HB_BOOL bAlt = GetKeyState( VK_MENU ) & 0x8000; - pWVT->IgnoreWM_SYSCHAR = FALSE; + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; switch( wParam ) { @@ -1474,8 +1474,8 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA break; default: { - BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; - BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000; + HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; + HB_BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000; int iScanCode = HIWORD( lParam ) & 0xFF; if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */ @@ -1491,7 +1491,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA if( bCtrl ) /* Not scroll lock */ { hb_gt_wvt_AddCharToInputQueue( pWVT, HB_BREAK_FLAG ); /* Pretend Alt+C pressed */ - pWVT->IgnoreWM_SYSCHAR = TRUE; + pWVT->IgnoreWM_SYSCHAR = HB_TRUE; } else { @@ -1507,7 +1507,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA wParam == VK_SUBTRACT || wParam == VK_DIVIDE ) ) { if( bAlt ) - pWVT->IgnoreWM_SYSCHAR = TRUE; + pWVT->IgnoreWM_SYSCHAR = HB_TRUE; switch( wParam ) { @@ -1536,7 +1536,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA case WM_CHAR: { - BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; + HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; int iScanCode = HIWORD( lParam ) & 0xFF; int c = ( int ) wParam; @@ -1571,7 +1571,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA if( pWVT->inCDP ) { #if defined( UNICODE ) - c = hb_cdpGetChar( pWVT->inCDP, FALSE, ( USHORT ) c ); + c = hb_cdpGetChar( pWVT->inCDP, HB_FALSE, ( USHORT ) c ); #else if( c > 0 && c <= 255 && pWVT->keyTransTbl[ c ] ) c = pWVT->keyTransTbl[ c ]; @@ -1584,7 +1584,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA } } } - pWVT->IgnoreWM_SYSCHAR = FALSE; /* As Suggested by Peter */ + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; /* As Suggested by Peter */ break; } @@ -1715,7 +1715,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA } hb_gt_wvt_AddCharToInputQueue( pWVT, c ); } - pWVT->IgnoreWM_SYSCHAR = FALSE; + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; } } @@ -1726,7 +1726,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA * hb_gt_wvt_TextOut converts col and row to x and y ( pixels ) and calls * the Windows function TextOut with the expected coordinates */ -static BOOL hb_gt_wvt_TextOut( PHB_GTWVT pWVT, HDC hdc, int col, int row, int iColor, LPCTSTR lpString, USHORT cbString ) +static HB_BOOL hb_gt_wvt_TextOut( PHB_GTWVT pWVT, HDC hdc, int col, int row, int iColor, LPCTSTR lpString, USHORT cbString ) { POINT xy; RECT rClip; @@ -1778,7 +1778,7 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT, RECT updateRect ) } if( pWVT->bGui && pWVT->bSetFocus ) { - pWVT->bSetFocus = FALSE; + pWVT->bSetFocus = HB_FALSE; hb_wvt_gtRestGuiState( pWVT, &updateRect ); ValidateRect( pWVT->hWnd, &updateRect ); { @@ -1818,7 +1818,7 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT, RECT updateRect ) iColor &= 0xff; #if defined( UNICODE ) - usChar = hb_cdpGetU16( bAttr & HB_GT_ATTR_BOX ? pWVT->boxCDP : pWVT->hostCDP, TRUE, ( BYTE ) usChar ); + usChar = hb_cdpGetU16( bAttr & HB_GT_ATTR_BOX ? pWVT->boxCDP : pWVT->hostCDP, HB_TRUE, ( BYTE ) usChar ); if( len == 0 ) { iOldColor = iColor; @@ -1886,7 +1886,7 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT, RECT updateRect ) } else { - pWVT->bPaint = TRUE; + pWVT->bPaint = HB_TRUE; } EndPaint( pWVT->hWnd, &ps ); @@ -1977,8 +1977,8 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case WM_SETFOCUS: hb_gt_wvt_UpdateCaret( pWVT ); - pWVT->bSetFocus = TRUE; - pWVT->bKillFocus = FALSE; + pWVT->bSetFocus = HB_TRUE; + pWVT->bKillFocus = HB_FALSE; if( pWVT->bGetFocus ) { @@ -1996,7 +1996,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara } else { - pWVT->bGetFocus = TRUE; + pWVT->bGetFocus = HB_TRUE; } { /* For mixing gui/cui items */ PHB_ITEM pEvParams = hb_itemNew( NULL ); @@ -2012,7 +2012,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case WM_KILLFOCUS: hb_gt_wvt_KillCaret( pWVT ); - pWVT->bKillFocus = TRUE; + pWVT->bKillFocus = HB_TRUE; if( pWVT->pSymWVT_KILLFOCUS ) { @@ -2072,7 +2072,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara { hb_gt_wvt_AddCharToInputQueue( pWVT, 27 ); #if 0 - PHB_ITEM pItem = hb_itemPutL( NULL, TRUE ); + PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE ); hb_setSetItem( HB_SET_CANCEL, pItem ); hb_itemRelease( pItem ); hb_vmRequestCancel(); @@ -2099,7 +2099,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case WM_ENTERSIZEMOVE: if( pWVT->bMaximized ) { - pWVT->bMaximized = FALSE; + pWVT->bMaximized = HB_FALSE; /* Enable "maximize" button */ { @@ -2112,7 +2112,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_DRAWFRAME | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE ); } - pWVT->bResizing = TRUE; + pWVT->bResizing = HB_TRUE; return 0; case WM_EXITSIZEMOVE: @@ -2138,7 +2138,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara } case SYS_EV_MARK: { - pWVT->bBeginMarked = TRUE; + pWVT->bBeginMarked = HB_TRUE; return 0; } } @@ -2233,7 +2233,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara hb_gt_wvt_FireEvent( pWVT, HB_GTE_MOUSE, pEvParams ); - pWVT->bTracking = FALSE; + pWVT->bTracking = HB_FALSE; return DefWindowProc( hWnd, message, wParam, lParam );; } #endif @@ -2277,7 +2277,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara return DefWindowProc( hWnd, message, wParam, lParam ); } -static BOOL hb_gt_wvt_IsDialogMessage( PHB_GTWVT pWVT, LPMSG lpMsg ) /* Proprietory to GTWVG */ +static HB_BOOL hb_gt_wvt_IsDialogMessage( PHB_GTWVT pWVT, LPMSG lpMsg ) /* Proprietory to GTWVG */ { int iIndex; @@ -2286,11 +2286,11 @@ static BOOL hb_gt_wvt_IsDialogMessage( PHB_GTWVT pWVT, LPMSG lpMsg ) /* Prop if( pWVT->hDlgModeless[ iIndex ] != 0 ) { if( IsDialogMessage( pWVT->hDlgModeless[ iIndex ], lpMsg ) ) - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } static WPARAM hb_gt_wvt_ProcessMessages( PHB_GTWVT pWVT ) @@ -2309,7 +2309,7 @@ static WPARAM hb_gt_wvt_ProcessMessages( PHB_GTWVT pWVT ) return msg.wParam; } -static BOOL hb_gt_wvt_ValidWindowSize( HWND hWnd, int rows, int cols, HFONT hFont, int iWidth ) +static HB_BOOL hb_gt_wvt_ValidWindowSize( HWND hWnd, int rows, int cols, HFONT hFont, int iWidth ) { HDC hdc; HFONT hOldFont; @@ -2379,15 +2379,15 @@ static void hb_gt_wvt_GetBorders( HWND hWnd, int * iBorderLeft, int * iTitlebarH *iDTHeight = wi.bottom - wi.top; } -static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) +static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, HB_BOOL bResizable ) { HWND hWnd, hWndParent; LPTSTR szAppName; - BOOL bByConf; + HB_BOOL bByConf; szAppName = HB_TCHAR_CONVTO( hb_cmdargARGV()[ 0 ] ); - bByConf = FALSE; + bByConf = HB_FALSE; hWndParent = NULL; if( pWVT->pPP->bConfigured ) { @@ -2487,7 +2487,7 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) pWVT->pPP->y = HB_MAX( 0, iDTHeight - iHeight ); } - bByConf = TRUE; + bByConf = HB_TRUE; } } } @@ -2515,7 +2515,7 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) pWVT->pPP->y = pt.y; if( pWVT->pPP->y < 0 ) - pWVT->CentreWindow = TRUE; + pWVT->CentreWindow = HB_TRUE; } if( ! bResizable ) @@ -2540,7 +2540,7 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) return hWnd; } -static BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) { if( !pWVT->hWnd ) { @@ -2625,7 +2625,7 @@ static BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) hb_wvt_gtCreateToolTipWindow( pWVT ); } } - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -2682,10 +2682,10 @@ static void hb_gt_wvt_Exit( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) +static HB_BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) { PHB_GTWVT pWVT; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_SetMode(%p,%d,%d)", pGT, iRow, iCol ) ); @@ -2724,15 +2724,15 @@ static BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_PutChar( PHB_GT pGT, int iRow, int iCol, +static HB_BOOL hb_gt_wvt_PutChar( PHB_GT pGT, int iRow, int iCol, int iColor, BYTE bAttr, USHORT usChar ) { if( HB_GTSUPER_PUTCHAR( pGT, iRow, iCol, iColor, bAttr, usChar ) ) { HB_GTSELF_TOUCHCELL( pGT, iRow, iCol ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } /* ********************************************************************** */ @@ -2755,7 +2755,7 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask ) { PHB_GTWVT pWVT; int c = 0; - BOOL fKey; + HB_BOOL fKey; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", pGT, iEventMask ) ); @@ -2784,13 +2784,13 @@ static void hb_gt_wvt_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_wvt_mouse_IsPresent( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_wvt_mouse_IsPresent(%p)", pGT)); HB_SYMBOL_UNUSED( pGT ); - return TRUE; + return HB_TRUE; } static void hb_gt_wvt_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) @@ -2804,7 +2804,7 @@ static void hb_gt_wvt_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) *piCol = pWVT->MousePos.x; } -static BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) { HB_TRACE( HB_TR_DEBUG, ("hb_gt_wvt_mouse_ButtonState(%p,%i)", pGT, iButton) ); @@ -2819,7 +2819,7 @@ static BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) case 2: return ( GetKeyState( VK_MBUTTON ) & 0x8000 ) != 0; } - return FALSE; + return HB_FALSE; } static int hb_gt_wvt_mouse_CountButton( PHB_GT pGT ) @@ -2833,7 +2833,7 @@ static int hb_gt_wvt_mouse_CountButton( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { PHB_GTWVT pWVT; int iVal; @@ -2847,14 +2847,14 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: case HB_GTI_ISGRAPHIC: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ISUNICODE: #if defined( UNICODE ) - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); #else - pInfo->pResult = hb_itemPutL( pInfo->pResult, FALSE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_FALSE ); #endif break; @@ -2874,7 +2874,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) break; case HB_GTI_SETFONT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, FALSE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_FALSE ); if( hb_itemType( pInfo->pNewVal ) & HB_IT_ARRAY ) { HFONT hFont = hb_gt_wvt_GetFont( hb_arrayGetCPtr( pInfo->pNewVal, 1 ), @@ -2887,7 +2887,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { if( hb_gt_wvt_ValidWindowSize( pWVT->hWnd, pWVT->ROWS, pWVT->COLS, hFont, hb_arrayGetNI( pInfo->pNewVal, 3 ) ) ) { - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); hb_strncpy( pWVT->fontFace, hb_arrayGetCPtr( pInfo->pNewVal, 1 ), sizeof( pWVT->fontFace ) - 1 ); pWVT->fontHeight = hb_arrayGetNI( pInfo->pNewVal, 2 ); @@ -3252,8 +3252,8 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( iY > 0 ) { - BOOL bOldCentre = pWVT->CentreWindow; - pWVT->CentreWindow = pWVT->bMaximized ? TRUE : FALSE; + HB_BOOL bOldCentre = pWVT->CentreWindow; + pWVT->CentreWindow = pWVT->bMaximized ? HB_TRUE : HB_FALSE; HB_GTSELF_SETMODE( pGT, ( iY / pWVT->PTEXTSIZE.y ), ( iX / pWVT->PTEXTSIZE.x ) ); pWVT->CentreWindow = bOldCentre; } @@ -3285,7 +3285,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bResizable ); if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bResizable ) { pWVT->bResizable = bNewValue; @@ -3327,7 +3327,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( pWVT->pszSelectCopy ) hb_xfree( pWVT->pszSelectCopy ); pWVT->pszSelectCopy = hb_strdup( hb_itemGetCPtr( pInfo->pNewVal ) ); - pWVT->bSelectCopy = TRUE; + pWVT->bSelectCopy = HB_TRUE; #if !defined( HB_OS_WIN_CE ) /* WinCE does not support ModifyMenu */ if( hSysMenu ) @@ -3343,7 +3343,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } else if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bSelectCopy ) { if( pWVT->hWnd ) @@ -3365,7 +3365,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bClosable ); if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bClosable ) { if( pWVT->hWnd ) @@ -3731,8 +3731,8 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } /* Flag that caller configured itself */ - pWVT->pPP->bConfigured = TRUE; - pWVT->CentreWindow = FALSE; + pWVT->pPP->bConfigured = HB_TRUE; + pWVT->CentreWindow = HB_FALSE; } } } @@ -3783,7 +3783,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { if( pWVT->bSelectCopy ) { - pWVT->bBeginMarked = TRUE; + pWVT->bBeginMarked = HB_TRUE; } break; } @@ -3796,7 +3796,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -3987,7 +3987,7 @@ static void hb_gt_wvt_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) InvalidateRect( pWVT->hWnd, &rect, FALSE ); } else - pWVT->fInit = TRUE; + pWVT->fInit = HB_TRUE; } } @@ -4018,7 +4018,7 @@ static void hb_gt_wvt_Refresh( PHB_GT pGT ) { if( !pWVT->fInit ) { - pWVT->fInit = TRUE; + pWVT->fInit = HB_TRUE; hb_gt_wvt_ShowWindow( pWVT ); } SendNotifyMessage( pWVT->hWnd, WM_MY_UPDATE_CARET, 0, 0 ); @@ -4030,7 +4030,7 @@ static void hb_gt_wvt_Refresh( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox ); @@ -4072,15 +4072,15 @@ static BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char for( i = 0; i < 256; i++ ) { pWVT->chrTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); } } # endif - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) +static HB_BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) { HB_GTSUPER_SETKEYCP( pGT, pszTermCDP, pszHostCDP ); @@ -4116,18 +4116,18 @@ static BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char for( i = 0; i < 256; i++ ) pWVT->keyTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); pWVT->inCDP = cdpTerm; } # endif - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -4153,7 +4153,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->GfxPrimitive = hb_gt_wvt_gfx_Primitive; - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -4286,8 +4286,8 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT ) { int iIndex; - pWVT->bDeferPaint = FALSE; - pWVT->bTracking = FALSE; + pWVT->bDeferPaint = HB_FALSE; + pWVT->bTracking = HB_FALSE; pWVT->currentPen = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 0, 0, 0 ) ); @@ -4306,8 +4306,8 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT ) pWVT->LastMenuEvent = 0; pWVT->MenuKeyEvent = 1024; - pWVT->InvalidateWindow = TRUE; - pWVT->EnableShortCuts = FALSE; + pWVT->InvalidateWindow = HB_TRUE; + pWVT->EnableShortCuts = HB_FALSE; pWVT->pSymWVT_PAINT = hb_dynsymFind( "WVT_PAINT" ); pWVT->pSymWVT_SETFOCUS = hb_dynsymFind( "WVT_SETFOCUS" ); pWVT->pSymWVT_KILLFOCUS = hb_dynsymFind( "WVT_KILLFOCUS" ); @@ -4318,7 +4318,7 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT ) pWVT->rowStop = 0; pWVT->colStart = 0; pWVT->colStop = 0; - pWVT->bToolTipActive = FALSE; + pWVT->bToolTipActive = HB_FALSE; pWVT->iFactor = 255; for( iIndex = 0; iIndex < WVT_DLGML_MAX; iIndex++ ) @@ -4334,12 +4334,12 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT ) pWVT->iTypeModal[ iIndex ] = 0; } - pWVT->bGui = FALSE; + pWVT->bGui = HB_FALSE; - pWVT->bPaint = FALSE; - pWVT->bGetFocus = FALSE; - pWVT->bSetFocus = FALSE; - pWVT->bKillFocus = FALSE; + pWVT->bPaint = HB_FALSE; + pWVT->bGetFocus = HB_FALSE; + pWVT->bSetFocus = HB_FALSE; + pWVT->bKillFocus = HB_FALSE; } static void hb_wvt_gtExitGui( PHB_GTWVT pWVT ) diff --git a/harbour/contrib/gtwvg/gtwvg.h b/harbour/contrib/gtwvg/gtwvg.h index 4bbfe7e74b..e34956f4c1 100644 --- a/harbour/contrib/gtwvg/gtwvg.h +++ b/harbour/contrib/gtwvg/gtwvg.h @@ -284,10 +284,10 @@ typedef struct _tag_GOBJS #if ! defined( HB_OS_WIN_CE ) IPicture * iPicture ; #endif - BOOL bDestroyFont ; - BOOL bDestroyPen ; - BOOL bDestroyBrush ; - BOOL bDestroyPicture ; + HB_BOOL bDestroyFont ; + HB_BOOL bDestroyPen ; + HB_BOOL bDestroyBrush ; + HB_BOOL bDestroyPicture ; TRIVERTEX vert[ 2 ] ; LPTSTR lpText ; PHB_ITEM bBlock ; @@ -304,9 +304,9 @@ typedef struct int width; int height; PHB_ITEM pParentGT; - BOOL bVisible; - BOOL bRowCols; - BOOL bConfigured; + HB_BOOL bVisible; + HB_BOOL bRowCols; + HB_BOOL bConfigured; int iWndType; } HB_GT_PARAMS, * PHB_GT_PARAMS; @@ -346,13 +346,13 @@ typedef struct COLORREF COLORS[ 16 ]; /* colors */ - BOOL CaretExist; /* TRUE if a caret has been created */ - BOOL CaretHidden; /* TRUE if a caret has been hiden */ + HB_BOOL CaretExist; /* TRUE if a caret has been created */ + HB_BOOL CaretHidden; /* TRUE if a caret has been hiden */ int CaretSize; /* Height of solid caret */ int CaretWidth; /* Width of solid caret */ POINT MousePos; /* the last mouse position */ - BOOL MouseMove; /* Flag to say whether to return mouse movement events */ + HB_BOOL MouseMove; /* Flag to say whether to return mouse movement events */ int Keys[ WVT_CHAR_QUEUE_SIZE ]; /* Array to hold the characters & events */ int keyPointerIn; /* Offset into key array for character to be placed */ @@ -360,7 +360,7 @@ typedef struct int keyLast; /* last inkey code value in buffer */ POINT PTEXTSIZE; /* size of the fixed width font */ - BOOL FixedFont; /* TRUE if current font is a fixed font */ + HB_BOOL FixedFont; /* TRUE if current font is a fixed font */ int FixedSize[ WVT_MAX_COLS ]; /* buffer for ExtTextOut() to emulate fixed pitch when Proportional font selected */ int fontHeight; /* requested font height */ int fontWidth; /* requested font width */ @@ -373,7 +373,7 @@ typedef struct #endif HWND hWnd; /* the window handle */ - BOOL fInit; /* logical variable indicating that window should be open */ + HB_BOOL fInit; /* logical variable indicating that window should be open */ PHB_CODEPAGE hostCDP; /* Host/HVM CodePage for unicode output translations */ PHB_CODEPAGE inCDP; /* Host/HVM CodePage for unicode input translations */ @@ -387,26 +387,26 @@ typedef struct #endif HICON hIcon; /* Title Bar and Task List icon. Can be NULL. */ - BOOL bIconToFree; /* Do we need to free this icon when it's not NULL? */ + HB_BOOL bIconToFree; /* Do we need to free this icon when it's not NULL? */ int CodePage; /* Code page to use for display characters */ #if ! defined( UNICODE ) int boxCodePage; /* Code page to use for display draw line characters */ #endif - BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */ - BOOL AltF4Close; /* Can use Alt+F4 to close application */ - BOOL CentreWindow; /* True if window is to be Reset into centre of window */ + HB_BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */ + HB_BOOL AltF4Close; /* Can use Alt+F4 to close application */ + HB_BOOL CentreWindow; /* True if window is to be Reset into centre of window */ - BOOL IgnoreWM_SYSCHAR; + HB_BOOL IgnoreWM_SYSCHAR; - BOOL bMaximized; /* Flag is set when window has been maximized */ - BOOL bBeingMarked; /* Flag to control DOS window like copy operation */ - BOOL bBeginMarked; + HB_BOOL bMaximized; /* Flag is set when window has been maximized */ + HB_BOOL bBeingMarked; /* Flag to control DOS window like copy operation */ + HB_BOOL bBeginMarked; - BOOL bResizable; - BOOL bSelectCopy; + HB_BOOL bResizable; + HB_BOOL bSelectCopy; char * pszSelectCopy; - BOOL bClosable; + HB_BOOL bClosable; int ResizeMode; /* Sets the resizing mode either to FONT or ROWS */ RECT sRectNew; @@ -425,19 +425,19 @@ typedef struct int LastMenuEvent; /* Last menu item selected */ int MenuKeyEvent; /* User definable event number for windows menu command */ - BOOL InvalidateWindow; /* Flag for controlling whether to use ScrollWindowEx() */ - BOOL EnableShortCuts; /* Determines whether ALT key enables menu or system menu */ + HB_BOOL InvalidateWindow; /* Flag for controlling whether to use ScrollWindowEx() */ + HB_BOOL EnableShortCuts; /* Determines whether ALT key enables menu or system menu */ - BOOL bGui; + HB_BOOL bGui; HDC hGuiDC; HBITMAP hGuiBmp; int iGuiWidth; int iGuiHeight; - BOOL bPaint; - BOOL bGetFocus; - BOOL bSetFocus; - BOOL bKillFocus; + HB_BOOL bPaint; + HB_BOOL bGetFocus; + HB_BOOL bSetFocus; + HB_BOOL bKillFocus; PHB_DYNS pSymWVT_PAINT; /* Stores pointer to WVT_PAINT function */ PHB_DYNS pSymWVT_SETFOCUS; /* Stores pointer to WVT_SETFOCUS function */ @@ -454,7 +454,7 @@ typedef struct HMENU hPopup; /* Handle of context menu invokable with right click */ HWND hWndTT; /* Handle to hold tooltip information */ - BOOL bToolTipActive; /* Flag to set whether tooltip is active or not */ + HB_BOOL bToolTipActive; /* Flag to set whether tooltip is active or not */ HWND hDlgModeless[ WVT_DLGML_MAX ]; /* Handle to a modeless dialog */ PHB_ITEM pFunc[ WVT_DLGML_MAX ]; /* Function pointer for WndProc */ @@ -469,10 +469,10 @@ typedef struct PHB_GT_PARAMS pPP; /* Presentation Parameters */ - BOOL bDeferPaint; /* To create pure Windows dialogs */ - BOOL bTracking; /* To track if mouse has eneter or left the window area */ + HB_BOOL bDeferPaint; /* To create pure Windows dialogs */ + HB_BOOL bTracking; /* To track if mouse has eneter or left the window area */ - BOOL bResizing; /* To know when it is in resizing mode */ + HB_BOOL bResizing; /* To know when it is in resizing mode */ PHB_GOBJS gObjs; /* Graphic Objects */ @@ -598,10 +598,10 @@ POINT HB_EXPORT hb_wvt_gtGetXYFromColRow( int col, int row ); #if ! defined( HB_OS_WIN_CE ) IPicture HB_EXPORT * hb_wvt_gtLoadPicture( const char * image ); IPicture HB_EXPORT * hb_wvt_gtLoadPictureFromResource( LPCSTR cResource, LPCSTR cSection ); -BOOL HB_EXPORT hb_wvt_gtRenderPicture( int x1, int y1, int wd, int ht, IPicture * iPicture ); -BOOL HB_EXPORT hb_wvt_gtDestroyPicture( IPicture * iPicture ); +HB_BOOL HB_EXPORT hb_wvt_gtRenderPicture( int x1, int y1, int wd, int ht, IPicture * iPicture ); +HB_BOOL HB_EXPORT hb_wvt_gtDestroyPicture( IPicture * iPicture ); #endif -BOOL HB_EXPORT hb_wvt_DrawImage( HDC hdc, int x1, int y1, int wd, int ht, const char * image ); +HB_BOOL HB_EXPORT hb_wvt_DrawImage( HDC hdc, int x1, int y1, int wd, int ht, const char * image ); void HB_EXPORT hb_wvt_GetStringAttrib( int top, int left, int bottom, int right, BYTE * sBuffer, BYTE * sAttrib ); void HB_EXPORT hb_wvt_PutStringAttrib( int top, int left, int bottom, int right, BYTE * sBuffer, BYTE * sAttrib ); @@ -621,11 +621,11 @@ void HB_EXPORT hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT *uRect ); /*----------------------------------------------------------------------*/ -extern BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ); +extern HB_BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ); extern PHB_ITEM wvt_Rect2Array( RECT *rc ); -extern BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ); +extern HB_BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ); extern PHB_ITEM wvt_Point2Array( POINT *pt ); -extern BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ); +extern HB_BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ); extern PHB_ITEM wvt_Size2Array( SIZE *siz ); extern void wvt_Rect2ArrayEx( RECT *rc ,PHB_ITEM aRect ); extern void wvt_Point2ArrayEx( POINT *pt , PHB_ITEM aPoint); diff --git a/harbour/contrib/gtwvg/wvgcore.c b/harbour/contrib/gtwvg/wvgcore.c index 3a2783a306..4973e2f6db 100644 --- a/harbour/contrib/gtwvg/wvgcore.c +++ b/harbour/contrib/gtwvg/wvgcore.c @@ -229,7 +229,7 @@ IPicture * hb_wvt_gtLoadPicture( const char * cImage ) /*----------------------------------------------------------------------*/ -BOOL hb_wvt_gtRenderPicture( int x1, int y1, int wd, int ht, IPicture * iPicture ) +HB_BOOL hb_wvt_gtRenderPicture( int x1, int y1, int wd, int ht, IPicture * iPicture ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); @@ -243,7 +243,7 @@ BOOL hb_wvt_gtRenderPicture( int x1, int y1, int wd, int ht, IPicture * iPicture int toc = 0; HRGN hrgn1; POINT lpp; - BOOL bResult = FALSE; + HB_BOOL bResult = FALSE; if( iPicture ) { @@ -325,9 +325,9 @@ BOOL hb_wvt_gtRenderPicture( int x1, int y1, int wd, int ht, IPicture * iPicture /*----------------------------------------------------------------------*/ -BOOL hb_wvt_gtDestroyPicture( IPicture * iPicture ) +HB_BOOL hb_wvt_gtDestroyPicture( IPicture * iPicture ) { - BOOL bResult = FALSE; + HB_BOOL bResult = FALSE; if( iPicture ) { @@ -585,7 +585,7 @@ BOOL CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPA /*----------------------------------------------------------------------*/ -BOOL hb_wvt_DrawImage( HDC hdc, int x1, int y1, int wd, int ht, const char * image ) +HB_BOOL hb_wvt_DrawImage( HDC hdc, int x1, int y1, int wd, int ht, const char * image ) { #if ! defined( HB_OS_WIN_CE ) HGLOBAL hGlobal; @@ -602,7 +602,7 @@ BOOL hb_wvt_DrawImage( HDC hdc, int x1, int y1, int wd, int ht, const char * ima int toc = 0 ; HRGN hrgn1; POINT lpp = { 0,0 }; - BOOL bResult = FALSE; + HB_BOOL bResult = FALSE; LPTSTR lpImage = HB_TCHAR_CONVTO( image ); hFile = CreateFile( lpImage, GENERIC_READ, 0, NULL, OPEN_EXISTING, @@ -1810,8 +1810,8 @@ HB_FUNC( WVT_DRAWBUTTON ) LOGBRUSH lb = { 0,0,0 }; HBRUSH hBrush; - BOOL bText = HB_ISCHAR( 5 ); - BOOL bImage = ( HB_ISNUM( 6 ) || HB_ISCHAR( 6 ) ); + HB_BOOL bText = HB_ISCHAR( 5 ); + HB_BOOL bImage = ( HB_ISNUM( 6 ) || HB_ISCHAR( 6 ) ); int iFormat = hb_parni( 7 ); COLORREF textColor = !HB_ISNUM( 8 ) ? _s->COLORS[ 0 ] : ( COLORREF ) hb_parnl( 8 ) ; COLORREF bkColor = !HB_ISNUM( 9 ) ? _s->COLORS[ 7 ] : ( COLORREF ) hb_parnl( 9 ) ; @@ -2519,7 +2519,7 @@ HB_FUNC( WVT_DRAWSCROLLBUTTON ) POINT * Point; POINT xy = { 0,0 }; int iHeight, iOff; - BOOL bDepressed = hb_parl( 7 ) ; + HB_BOOL bDepressed = hb_parl( 7 ) ; Point = ( POINT * ) hb_xgrab( 3 * sizeof( POINT ) ); iOff = 6; @@ -2733,7 +2733,7 @@ HB_FUNC( WVT_DRAWSHADEDRECT ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - BOOL bGF = FALSE; + HB_BOOL bGF = FALSE; if ( _s->pGUI->hMSImg32 ) { @@ -2764,11 +2764,11 @@ HB_FUNC( WVT_DRAWSHADEDRECT ) gRect.UpperLeft = 0; gRect.LowerRight= 1; - bGF = ( BOOL ) _s->pGUI->pfnGF( _s->hdc, vert, 2, &gRect, 1, iMode ); + bGF = ( HB_BOOL ) _s->pGUI->pfnGF( _s->hdc, vert, 2, &gRect, 1, iMode ); #if defined( __SETGUI__ ) if ( _s->bGui ) { - bGF = ( BOOL ) _s->pGUI->pfnGF( _s->hGuiDC, vert, 2, &gRect, 1, iMode ); + bGF = ( HB_BOOL ) _s->pGUI->pfnGF( _s->hGuiDC, vert, 2, &gRect, 1, iMode ); } #endif } @@ -2855,7 +2855,7 @@ HB_FUNC( WVT_DRAWPROGRESSBAR ) int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parvni( 5,3 ); int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parvni( 5,4 ); int iPercent, iBarUpto, iDirection; - BOOL bVertical, bImage; + HB_BOOL bVertical, bImage; COLORREF crBarColor; HBRUSH hBrush; LOGBRUSH lb = { 0,0,0 }; @@ -2977,7 +2977,7 @@ HB_FUNC( WVT_CREATEFONT ) */ HB_FUNC( WVT_LOADPICTURE ) { - BOOL bResult = FALSE; + HB_BOOL bResult = FALSE; #if ! defined( HB_OS_WIN_CE ) PHB_GTWVT _s = hb_wvt_gtGetWVT(); @@ -3002,7 +3002,7 @@ HB_FUNC( WVT_LOADPICTURE ) HB_FUNC( WVT_LOADPICTUREFROMRESOURCE ) { - BOOL bResult = FALSE; + HB_BOOL bResult = FALSE; #if ! defined( HB_OS_WIN_CE ) PHB_GTWVT _s = hb_wvt_gtGetWVT(); @@ -3151,8 +3151,8 @@ HB_FUNC( WVT_RESTSCREEN ) HBITMAP hBmp; HDC hCompDC; - BOOL bResult = FALSE; - BOOL bDoNotDestroyBMP = hb_parl( 6 ); + HB_BOOL bResult = FALSE; + HB_BOOL bDoNotDestroyBMP = hb_parl( 6 ); xy = hb_wvt_gtGetXYFromColRow( hb_parni( 2 ), hb_parni( 1 ) );; iTop = xy.y; diff --git a/harbour/contrib/gtwvg/wvgcuig.c b/harbour/contrib/gtwvg/wvgcuig.c index 57854beebb..8ea0e53391 100644 --- a/harbour/contrib/gtwvg/wvgcuig.c +++ b/harbour/contrib/gtwvg/wvgcuig.c @@ -207,7 +207,7 @@ HB_FUNC( WVG_SETGOBJDATA ) { PHB_GTWVT pWVT = hb_wvt_gtGetWVT(); int iHandle = hb_parni( 1 ); - BOOL bSuccess = FALSE; + HB_BOOL bSuccess = FALSE; if( iHandle ) { @@ -1182,7 +1182,7 @@ HB_FUNC( WVG_SHADEDRECT ) /*----------------------------------------------------------------------*/ static void hb_wvg_ShadedRect( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, int iRight, int iBottom ) { - BOOL bGF; + HB_BOOL bGF; GRADIENT_RECT gRect = { 0,0 }; gRect.UpperLeft = 0; @@ -1194,7 +1194,7 @@ static void hb_wvg_ShadedRect( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iT gObj->vert[ 1 ].x = iRight; gObj->vert[ 1 ].y = iBottom; - bGF = ( BOOL ) pWVT->pGUI->pfnGF( pWVT->hGuiDC, gObj->vert, 2, &gRect, 1, gObj->iData ); + bGF = ( HB_BOOL ) pWVT->pGUI->pfnGF( pWVT->hGuiDC, gObj->vert, 2, &gRect, 1, gObj->iData ); HB_SYMBOL_UNUSED( bGF ); } diff --git a/harbour/contrib/gtwvg/wvggui.c b/harbour/contrib/gtwvg/wvggui.c index 1111178de3..9813a5b0eb 100644 --- a/harbour/contrib/gtwvg/wvggui.c +++ b/harbour/contrib/gtwvg/wvggui.c @@ -179,9 +179,9 @@ static PHB_GTWVT hb_gt_wvt_Find( HWND hWnd ) return pWVT; } -static BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) { - BOOL fOK = FALSE; + HB_BOOL fOK = FALSE; WVGDEBUG( ( "wvggui:hb_gt_wvt_Alloc()" ) ); @@ -397,7 +397,7 @@ static void hb_gt_wvt_AddCharToInputQueue( PHB_GTWVT pWVT, int iKey ) #endif } -static BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) +static HB_BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) { #if 0 WVGDEBUG( ( "wvggui:hb_gt_wvt_GetCharFromInputQueue()" ) ); @@ -494,7 +494,7 @@ static void hb_gt_wvt_SetWindowTitle( HWND hWnd, const char * title ) HB_TCHAR_FREE( text ); } -static BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) +static HB_BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) { TCHAR buffer[WVT_MAX_TITLE_SIZE]; int iResult; @@ -632,7 +632,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L } } -static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPARAM lParam ) +static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPARAM lParam ) { WVGDEBUG( ( "wvggui:hb_gt_wvt_KeyEvent()" ) ); @@ -641,7 +641,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA case WM_KEYDOWN: case WM_SYSKEYDOWN: { - BOOL bAlt = GetKeyState( VK_MENU ) & 0x8000; + HB_BOOL bAlt = GetKeyState( VK_MENU ) & 0x8000; pWVT->IgnoreWM_SYSCHAR = FALSE; @@ -720,8 +720,8 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA break; default: { - BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; - BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000; + HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; + HB_BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000; int iScanCode = HIWORD( lParam ) & 0xFF; if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */ @@ -782,7 +782,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA case WM_CHAR: { - BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; + HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; int iScanCode = HIWORD( lParam ) & 0xFF; int c = ( int ) wParam; @@ -1307,7 +1307,7 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT ) return hWnd; } -static BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) { WVGDEBUG( ( "wvggui:hb_gt_wvt_CreateConsoleWindow()" ) ); @@ -1401,7 +1401,7 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask ) { PHB_GTWVT pWVT; int c = 0; - BOOL fKey; + HB_BOOL fKey; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", pGT, iEventMask ) ); #if 0 @@ -1433,7 +1433,7 @@ static void hb_gt_wvt_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { PHB_GTWVT pWVT; int iVal; @@ -1797,7 +1797,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bResizable ); if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bResizable ) { pWVT->bResizable = bNewValue; @@ -1835,7 +1835,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bClosable ); if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bClosable ) { if( pWVT->hWnd ) @@ -2237,7 +2237,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) /* ********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); WVGDEBUG( ( "wvggui:hb_gt_FuncInit() " ) ); diff --git a/harbour/contrib/gtwvg/wvggui.h b/harbour/contrib/gtwvg/wvggui.h index ac7e50a4d6..dff27693d8 100644 --- a/harbour/contrib/gtwvg/wvggui.h +++ b/harbour/contrib/gtwvg/wvggui.h @@ -251,9 +251,9 @@ typedef struct int width; int height; PHB_ITEM pParentGT; - BOOL bVisible; - BOOL bRowCols; - BOOL bConfigured; + HB_BOOL bVisible; + HB_BOOL bRowCols; + HB_BOOL bConfigured; int iWndType; } HB_GT_PARAMS, * PHB_GT_PARAMS; @@ -269,7 +269,7 @@ typedef struct USHORT COLS; /* number of displayable columns in window */ POINT MousePos; /* the last mouse position */ - BOOL MouseMove; /* Flag to say whether to return mouse movement events */ + HB_BOOL MouseMove; /* Flag to say whether to return mouse movement events */ int Keys[ WVT_CHAR_QUEUE_SIZE ]; /* Array to hold the characters & events */ int keyPointerIn; /* Offset into key array for character to be placed */ @@ -277,7 +277,7 @@ typedef struct int keyLast; /* last inkey code value in buffer */ POINT PTEXTSIZE; /* size of the fixed width font */ - BOOL FixedFont; /* TRUE if current font is a fixed font */ + HB_BOOL FixedFont; /* TRUE if current font is a fixed font */ int FixedSize[ WVT_MAX_COLS ]; /* buffer for ExtTextOut() to emulate fixed pitch when Proportional font selected */ int fontHeight; /* requested font height */ int fontWidth; /* requested font width */ @@ -287,7 +287,7 @@ typedef struct HFONT hFont; /* current font handle */ HWND hWnd; /* the window handle */ - BOOL fInit; /* logical variable indicating that window should be open */ + HB_BOOL fInit; /* logical variable indicating that window should be open */ PHB_CODEPAGE hostCDP; /* Host/HVM CodePage for unicode output translations */ PHB_CODEPAGE inCDP; /* Host/HVM CodePage for unicode input translations */ @@ -297,16 +297,16 @@ typedef struct #endif HICON hIcon; /* Title Bar and Task List icon. Can be NULL. */ - BOOL bIconToFree; /* Do we need to free this icon when it's not NULL? */ + HB_BOOL bIconToFree; /* Do we need to free this icon when it's not NULL? */ int CodePage; /* Code page to use for display characters */ - BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */ - BOOL CentreWindow; /* True if window is to be Reset into centre of window */ + HB_BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */ + HB_BOOL CentreWindow; /* True if window is to be Reset into centre of window */ - BOOL IgnoreWM_SYSCHAR; + HB_BOOL IgnoreWM_SYSCHAR; - BOOL bResizable; - BOOL bClosable; + HB_BOOL bResizable; + HB_BOOL bClosable; /* To Be Split in 2 Structures <1 GUI dynamic> <2 GUI fixed> */ @@ -319,13 +319,13 @@ typedef struct int LastMenuEvent; /* Last menu item selected */ int MenuKeyEvent; /* User definable event number for windows menu command */ - BOOL InvalidateWindow; /* Flag for controlling whether to use ScrollWindowEx() */ - BOOL EnableShortCuts; /* Determines whether ALT key enables menu or system menu */ + HB_BOOL InvalidateWindow; /* Flag for controlling whether to use ScrollWindowEx() */ + HB_BOOL EnableShortCuts; /* Determines whether ALT key enables menu or system menu */ - BOOL bPaint; - BOOL bGetFocus; - BOOL bSetFocus; - BOOL bKillFocus; + HB_BOOL bPaint; + HB_BOOL bGetFocus; + HB_BOOL bSetFocus; + HB_BOOL bKillFocus; HINSTANCE hMSImg32; /* Handle to the loaded library msimg32.dll */ wvtGradientFill pfnGF; /* Pointer to Address of the GradientFill function in MSImg32.dll*/ @@ -334,8 +334,8 @@ typedef struct PHB_GT_PARAMS pPP; /* Presentation Parameters */ - BOOL bTracking; /* To track if mouse has eneter or left the window area */ - BOOL bResizing; /* To know when it is in resizing mode */ + HB_BOOL bTracking; /* To track if mouse has eneter or left the window area */ + HB_BOOL bResizing; /* To know when it is in resizing mode */ int width; int height; @@ -431,11 +431,11 @@ typedef struct _tag_HB_GT_COLDEF void HB_EXPORT hb_ToOutDebug( const char * sTraceMsg, ... ); /*----------------------------------------------------------------------*/ #if 0 -extern BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ); +extern HB_BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ); extern PHB_ITEM wvt_Rect2Array( RECT *rc ); -extern BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ); +extern HB_BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ); extern PHB_ITEM wvt_Point2Array( POINT *pt ); -extern BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ); +extern HB_BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ); extern PHB_ITEM wvt_Size2Array( SIZE *siz ); extern void wvt_Rect2ArrayEx( RECT *rc ,PHB_ITEM aRect ); extern void wvt_Point2ArrayEx( POINT *pt , PHB_ITEM aPoint); diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 59c51b237f..2cc22f55e9 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -89,11 +89,11 @@ BOOL WINAPI ChooseColor( LPCHOOSECOLORW ); #if 0 HB_EXTERN_BEGIN -extern BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ); +extern HB_BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ); extern PHB_ITEM wvt_Rect2Array( RECT *rc ); -extern BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ); +extern HB_BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ); extern PHB_ITEM wvt_Point2Array( POINT *pt ); -extern BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ); +extern HB_BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ); extern PHB_ITEM wvt_Size2Array( SIZE *siz ); extern void wvt_Rect2ArrayEx( RECT *rc ,PHB_ITEM aRect ); extern void wvt_Point2ArrayEx( POINT *pt , PHB_ITEM aPoint); @@ -269,7 +269,7 @@ HB_FUNC( WVT_SETTOOLTIPACTIVE ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - BOOL bActive = _s->bToolTipActive; + HB_BOOL bActive = _s->bToolTipActive; if ( HB_ISLOG( 1 ) ) { @@ -480,7 +480,7 @@ HB_FUNC( WVT_SETGUI ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - BOOL bGui = _s->bGui; + HB_BOOL bGui = _s->bGui; if ( HB_ISLOG( 1 ) ) { @@ -620,7 +620,7 @@ HB_FUNC( WVT_SETMOUSEMOVE ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - BOOL bMouseMove = _s->MouseMove; + HB_BOOL bMouseMove = _s->MouseMove; if( HB_ISLOG( 1 ) ) _s->MouseMove = hb_parl( 1 ); @@ -810,7 +810,7 @@ HB_FUNC( WVT_ENABLESHORTCUTS ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - BOOL bWas = _s->EnableShortCuts; + HB_BOOL bWas = _s->EnableShortCuts; if( HB_ISLOG( 1 ) ) _s->EnableShortCuts = hb_parl( 1 ); @@ -1382,7 +1382,7 @@ HB_FUNC( WVT_GETFONTHANDLE ) /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ -BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ) +HB_BOOL wvt_Array2Rect(PHB_ITEM aRect, RECT *rc ) { if (HB_IS_ARRAY(aRect) && hb_arrayLen(aRect) == 4) { rc->left = hb_arrayGetNL(aRect,1); @@ -1410,7 +1410,7 @@ PHB_ITEM wvt_Rect2Array( RECT *rc ) /*----------------------------------------------------------------------*/ -BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ) +HB_BOOL wvt_Array2Point(PHB_ITEM aPoint, POINT *pt ) { if (HB_IS_ARRAY(aPoint) && hb_arrayLen(aPoint) == 2) { pt->x = hb_arrayGetNL(aPoint,1); @@ -1434,7 +1434,7 @@ PHB_ITEM wvt_Point2Array( POINT *pt ) /*----------------------------------------------------------------------*/ -BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ) +HB_BOOL wvt_Array2Size(PHB_ITEM aSize, SIZE *siz ) { if (HB_IS_ARRAY(aSize) && hb_arrayLen(aSize) == 2) { siz->cx = hb_arrayGetNL(aSize,1); diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index c1be69b438..a03e6ec6c0 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -722,7 +722,7 @@ HB_FUNC( WVG_SETMENU ) HWND hWnd = ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ); #if 1 - BOOL bSet; + HB_BOOL bSet; RECT wi = { 0, 0, 0, 0 }; RECT ci = { 0, 0, 0, 0 }; int height, width; @@ -1215,7 +1215,7 @@ HB_FUNC( WVG_SENDTOOLBARMESSAGE ) tbb.dwData = 0; tbb.iString = wapi_par_INT( 5 ); - wapi_ret_L( ( BOOL ) SendMessage( hTB, TB_ADDBUTTONS, ( WPARAM ) 1, ( LPARAM ) ( LPTBBUTTON ) &tbb ) ); + wapi_ret_L( SendMessage( hTB, TB_ADDBUTTONS, ( WPARAM ) 1, ( LPARAM ) ( LPTBBUTTON ) &tbb ) ); break; } case TB_ADDSTRING : diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index 26743da0d5..d7f4364de9 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -142,7 +142,7 @@ static BITMAPINFO * PackedDibLoad( PTSTR szFileName ) { BITMAPFILEHEADER bmfh; BITMAPINFO * pbmi; - BOOL bSuccess; + HB_BOOL bSuccess; DWORD dwPackedDibSize, dwBytesRead; HANDLE hFile; @@ -284,7 +284,7 @@ static BYTE * PackedDibGetBitsPtr( BITMAPINFO * pPackedDib ) #endif static HBITMAP hPrepareBitmap( const char * szBitmapX, UINT uiBitmap, int iExpWidth, int iExpHeight, - BOOL bMap3Dcolors, + HB_BOOL bMap3Dcolors, HWND hCtrl, int iMode ) { @@ -354,7 +354,7 @@ static HBITMAP hPrepareBitmap( const char * szBitmapX, UINT uiBitmap, { HDC hdcSource, hdcTarget; HBITMAP hBitmap2; - BOOL bResult; + HB_BOOL bResult; hdcSource = CreateCompatibleDC( hdc ); SelectObject( hdcSource, hBitmap ); @@ -787,7 +787,7 @@ HB_FUNC( WVG_TREEVIEW_SHOWEXPANDED ) /* WvgFontDialog() */ /*----------------------------------------------------------------------*/ -PHB_ITEM wvg_logfontTOarray( LPLOGFONT lf, BOOL bEmpty ) +PHB_ITEM wvg_logfontTOarray( LPLOGFONT lf, HB_BOOL bEmpty ) { PHB_ITEM aFont = hb_itemNew( NULL ); hb_arrayNew( aFont, 15 ); @@ -841,8 +841,8 @@ PHB_ITEM wvg_logfontTOarray( LPLOGFONT lf, BOOL bEmpty ) BOOL CALLBACK WvgDialogProcChooseFont( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { - BOOL bret = FALSE; - BOOL binit = FALSE; + HB_BOOL bret = FALSE; + HB_BOOL binit = FALSE; PHB_ITEM block; if( msg == WM_INITDIALOG ) @@ -1074,7 +1074,7 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON ) { TBBUTTON tbb; TBADDBITMAP tbab; - BOOL bSuccess; + HB_BOOL bSuccess; HWND hWndTB = wapi_par_HWND( 1 ); int iCommand = hb_parni( 4 ); TCHAR * szCaption; diff --git a/harbour/contrib/hbbtree/tests/ctest.c b/harbour/contrib/hbbtree/tests/ctest.c index e486204dda..4881b3a000 100644 --- a/harbour/contrib/hbbtree/tests/ctest.c +++ b/harbour/contrib/hbbtree/tests/ctest.c @@ -38,7 +38,7 @@ #include "hb_btree.h" -static void display( const char *cKey, LONG lData, BOOL NewLine ) +static void display( const char *cKey, LONG lData, HB_BOOL NewLine ) { int n; char buffer[ 80 ]; @@ -146,79 +146,79 @@ HB_FUNC( CTEST ) { struct hb_BTree * pBTree; - display( "Harbour API test", 0, TRUE ); + display( "Harbour API test", 0, HB_TRUE ); pBTree = hb_BTreeNew( "test_3.out", 2048, 90, HB_BTREE_UNIQUE, 0 ); if ( pBTree != NULL ) { /* a := hb_BTreeInfo( pBTree ); - display( "File", a[ hb_BTreeINFO_FILENAME ], FALSE ); - display( "Page", a[ hb_BTreeINFO_PAGESIZE ], FALSE ); - display( "Key ", a[ hb_BTreeINFO_KEYSIZE ], FALSE ); - display( "Max ", a[ hb_BTreeINFO_MAXKEYS ], FALSE ); - display( "Min ", a[ hb_BTreeINFO_MINKEYS ], FALSE ); - display( "Flag", a[ hb_BTreeINFO_FLAGS ], FALSE ); - display( "Keys", a[ hb_BTreeINFO_KEYCOUNT ], TRUE ); + display( "File", a[ hb_BTreeINFO_FILENAME ], HB_FALSE ); + display( "Page", a[ hb_BTreeINFO_PAGESIZE ], HB_FALSE ); + display( "Key ", a[ hb_BTreeINFO_KEYSIZE ], HB_FALSE ); + display( "Max ", a[ hb_BTreeINFO_MAXKEYS ], HB_FALSE ); + display( "Min ", a[ hb_BTreeINFO_MINKEYS ], HB_FALSE ); + display( "Flag", a[ hb_BTreeINFO_FLAGS ], HB_FALSE ); + display( "Keys", a[ hb_BTreeINFO_KEYCOUNT ], HB_TRUE ); */ insertdata( pBTree ); /* - display( "Keys", hb_BTreeInfo( pBTree, hb_BTreeINFO_KEYCOUNT ), TRUE ); + display( "Keys", hb_BTreeInfo( pBTree, hb_BTreeINFO_KEYCOUNT ), HB_TRUE ); */ - display( "Forward traversal", 0, TRUE ); + display( "Forward traversal", 0, HB_TRUE ); hb_BTreeGoTop( pBTree ); - while ( TRUE ) + while ( HB_TRUE ) { - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_TRUE ); if ( 1 != hb_BTreeSkip( pBTree, 1 ) ) break; } hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) ); - display( "Reverse traversal", 0, TRUE ); + display( "Reverse traversal", 0, HB_TRUE ); hb_BTreeGoBottom( pBTree ); - while ( TRUE ) + while ( HB_TRUE ) { - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_TRUE ); if ( -1 != hb_BTreeSkip( pBTree, -1 ) ) break; } hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) ); - display( "Test SEEK", 0, TRUE ); - display( hb_BTreeSeek( pBTree, "cdntyzrf", 36, FALSE ) == 1 ? ".T." : ".F.", 0, TRUE ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), TRUE ); + display( "Test SEEK", 0, HB_TRUE ); + display( hb_BTreeSeek( pBTree, "cdntyzrf", 36, HB_FALSE ) == 1 ? ".T." : ".F.", 0, HB_TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_TRUE ); hb_BTreeSkip( pBTree, 1 ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE ); - display( " dmfmivqb ?", 0, TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_FALSE ); + display( " dmfmivqb ?", 0, HB_TRUE ); hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) ); - display( "Test soft SEEK of a short key", 0, TRUE ); - display( hb_BTreeSeek( pBTree, "cd", 0, TRUE ) == 1 ? ".T." : ".F.", 0, TRUE ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), TRUE ); + display( "Test soft SEEK of a short key", 0, HB_TRUE ); + display( hb_BTreeSeek( pBTree, "cd", 0, HB_TRUE ) == 1 ? ".T." : ".F.", 0, HB_TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_TRUE ); hb_BTreeSkip( pBTree, 1 ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE ); - display( " dmfmivqb ?", 0, TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_FALSE ); + display( " dmfmivqb ?", 0, HB_TRUE ); hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) ); - display( "Test soft SEEK of an existing key", 0, TRUE ); - display( hb_BTreeSeek( pBTree, "cdntyzrf", 0, TRUE ) == 1 ? ".T." : ".F.", 0, TRUE ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), TRUE ); + display( "Test soft SEEK of an existing key", 0, HB_TRUE ); + display( hb_BTreeSeek( pBTree, "cdntyzrf", 0, HB_TRUE ) == 1 ? ".T." : ".F.", 0, HB_TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_TRUE ); hb_BTreeSkip( pBTree, 1 ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE ); - display( " dmfmivqb ?", 0, TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_FALSE ); + display( " dmfmivqb ?", 0, HB_TRUE ); hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) ); - display( "Test soft SEEK of a missing key, that should force EOF", 0, TRUE ); - display( hb_BTreeSeek( pBTree, "zzzzzz", 0, FALSE ) == 1 ? ".T." : ".F.", 0, TRUE ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), TRUE ); + display( "Test soft SEEK of a missing key, that should force EOF", 0, HB_TRUE ); + display( hb_BTreeSeek( pBTree, "zzzzzz", 0, HB_FALSE ) == 1 ? ".T." : ".F.", 0, HB_TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_TRUE ); hb_BTreeSkip( pBTree, 1 ); - display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE ); - display( " dmfmivqb ?", 0, TRUE ); + display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), HB_FALSE ); + display( " dmfmivqb ?", 0, HB_TRUE ); hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) ); hb_BTreeClose( pBTree ); } else - display( "error / failure", 0, TRUE ); + display( "error / failure", 0, HB_TRUE ); } diff --git a/harbour/contrib/hbmisc/dates2.c b/harbour/contrib/hbmisc/dates2.c index 17315b523d..91b3e6cc03 100644 --- a/harbour/contrib/hbmisc/dates2.c +++ b/harbour/contrib/hbmisc/dates2.c @@ -71,14 +71,14 @@ static int s_daysinmonth[ 12 ] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -BOOL hb_isleapyear( int iYear ) +static HB_BOOL hb_isleapyear( int iYear ) { HB_TRACE(HB_TR_DEBUG, ("hb_isleapyear(%d)", iYear)); return ( iYear % 4 == 0 && iYear % 100 != 0 ) || ( iYear % 400 == 0 ); } -int hb_daysinmonth( int iYear, int iMonth ) +static int hb_daysinmonth( int iYear, int iMonth ) { HB_TRACE(HB_TR_DEBUG, ("hb_daysinmonth(%d, %d)", iYear, iMonth)); @@ -89,7 +89,7 @@ int hb_daysinmonth( int iYear, int iMonth ) return 0; } -int hb_doy( int iYear, int iMonth, int iDay ) +static int hb_doy( int iYear, int iMonth, int iDay ) { int i; int iDoy = 0; @@ -102,7 +102,7 @@ int hb_doy( int iYear, int iMonth, int iDay ) return iDoy + iDay; } -int hb_wom( int iYear, int iMonth, int iDay ) +static int hb_wom( int iYear, int iMonth, int iDay ) { int iWom; @@ -115,7 +115,7 @@ int hb_wom( int iYear, int iMonth, int iDay ) return 0; } -int hb_woy( int iYear, int iMonth, int iDay, BOOL bISO ) +static int hb_woy( int iYear, int iMonth, int iDay, HB_BOOL bISO ) { int iWeek, n; @@ -167,7 +167,7 @@ HB_FUNC( ISLEAPYEAR ) hb_retl( hb_isleapyear( iYear ) ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } HB_FUNC( HBMISC_DAYSINMONTH ) @@ -196,7 +196,7 @@ HB_FUNC( WOY ) int iYear, iMonth, iDay; hb_dateDecode( hb_itemGetDL( pDate ), &iYear, &iMonth, &iDay ); - hb_retni( hb_woy( iYear, iMonth, iDay, HB_ISLOG( 2 ) ? hb_parl( 2 ) : TRUE ) ); + hb_retni( hb_woy( iYear, iMonth, iDay, HB_ISLOG( 2 ) ? hb_parl( 2 ) : HB_TRUE ) ); } else hb_retni( 0 ); diff --git a/harbour/contrib/hbmisc/hb_f.c b/harbour/contrib/hbmisc/hb_f.c index 36566b7f0c..f896b95341 100644 --- a/harbour/contrib/hbmisc/hb_f.c +++ b/harbour/contrib/hbmisc/hb_f.c @@ -66,7 +66,7 @@ static char * b; static char * c; static long last_off[ 10 ]; static long lastbyte[ 10 ]; -static int isEof[ 10 ]; +static HB_BOOL isEof[ 10 ]; HB_FUNC( HB_FUSE ) { @@ -101,7 +101,7 @@ HB_FUNC( HB_FUSE ) last_rec[area] = 0L; last_off[area] = 0L; lastbyte[area] = 0L; - isEof[area] = 0; + isEof[area] = HB_FALSE; } } @@ -131,17 +131,17 @@ static long hb_hbfskip( int recs ) } } if ( (offset[area] + x + 2) < lastbyte[area] ) { - isEof[area] = FALSE; + isEof[area] = HB_FALSE; offset[area] += (x + 2); recno[area] += 1; } else - isEof[area] = TRUE; + isEof[area] = HB_TRUE; } } else { recs = -recs; - isEof[area] = FALSE; + isEof[area] = HB_FALSE; if ( (recno[area] - recs) < 1 ) return( 1 ); @@ -281,7 +281,7 @@ HB_FUNC( HB_FLASTREC ) { long old_rec; long old_offset; - int bIsEof; + HB_BOOL bIsEof; old_rec = recno[area]; old_offset = offset[area]; @@ -292,7 +292,7 @@ HB_FUNC( HB_FLASTREC ) recno[area] = old_rec; offset[area] = old_offset; - isEof[area] = bIsEof ; + isEof[area] = bIsEof; } HB_FUNC( HB_FSELECT ) @@ -333,7 +333,7 @@ HB_FUNC( HB_FREADANDSKIP ) --------------------------------------------------*/ long x = 0; long read; - BOOL bInField = 0, bHasCRLF = FALSE; + HB_BOOL bInField = HB_FALSE, bHasCRLF = HB_FALSE; hb_fsSeek( handles[area], offset[area], FS_SET ); read = hb_fsRead( handles[area], b, b_size ); @@ -355,7 +355,7 @@ HB_FUNC( HB_FREADANDSKIP ) ((*(b + x) == 10) && x < read-1 && (*(b + x + 1) == 13)) ) { x += 2; - bHasCRLF = TRUE; + bHasCRLF = HB_TRUE; break; } x++; diff --git a/harbour/contrib/hbmzip/hbmzip.c b/harbour/contrib/hbmzip/hbmzip.c index 4a0315f1db..aa7cb33aa2 100644 --- a/harbour/contrib/hbmzip/hbmzip.c +++ b/harbour/contrib/hbmzip/hbmzip.c @@ -469,7 +469,7 @@ HB_FUNC( HB_UNZIPFILEINFO ) hb_stornl( 0, 7 ); hb_stornl( 0, 8 ); hb_stornl( 0, 9 ); - hb_storl( FALSE, 10 ); + hb_storl( HB_FALSE, 10 ); hb_storc( NULL, 11 ); } } @@ -534,9 +534,9 @@ HB_FUNC( HB_UNZIPFILECLOSE ) * */ -static BOOL hb_zipGetFileInfoFromHandle( HB_FHANDLE hFile, ULONG * pulCRC, BOOL * pfText ) +static HB_BOOL hb_zipGetFileInfoFromHandle( HB_FHANDLE hFile, ULONG * pulCRC, HB_BOOL * pfText ) { - BOOL fText = pfText != NULL, fResult = FALSE; + HB_BOOL fText = pfText != NULL, fResult = HB_FALSE; ULONG ulCRC = 0; if( hFile != FS_ERROR ) @@ -562,7 +562,7 @@ static BOOL hb_zipGetFileInfoFromHandle( HB_FHANDLE hFile, ULONG * pulCRC, BOOL ( pString[ u ] >= 0x7F && pString[ u ] < 0xA0 && pString[ u ] != ( unsigned char ) HB_CHAR_SOFT1 ) ) { - fText = FALSE; + fText = HB_FALSE; break; } } @@ -584,10 +584,10 @@ static BOOL hb_zipGetFileInfoFromHandle( HB_FHANDLE hFile, ULONG * pulCRC, BOOL return fResult; } -static BOOL hb_zipGetFileInfo( const char* szFileName, ULONG * pulCRC, BOOL * pfText ) +static HB_BOOL hb_zipGetFileInfo( const char* szFileName, ULONG * pulCRC, HB_BOOL * pfText ) { FILE * file; - BOOL fText = pfText != NULL, fResult = FALSE; + HB_BOOL fText = pfText != NULL, fResult = HB_FALSE; ULONG ulCRC = 0; file = hb_fopen( szFileName, "rb" ); @@ -614,7 +614,7 @@ static BOOL hb_zipGetFileInfo( const char* szFileName, ULONG * pulCRC, BOOL * pf ( pString[ u ] >= 0x7f && pString[ u ] < 0xA0 && pString[ u ] != ( unsigned char ) HB_CHAR_SOFT1 ) ) { - fText = FALSE; + fText = HB_FALSE; break; } } @@ -691,8 +691,8 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz ULONG ulLen, ulExtAttr; zip_fileinfo zfi; int iResult; - BOOL fError; - BOOL fText; + HB_BOOL fError; + HB_BOOL fText; ULONG ulCRC; if( szName ) @@ -727,7 +727,7 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz } memset( &zfi, 0, sizeof( zfi ) ); - fError = FALSE; + fError = HB_FALSE; #if defined( HB_OS_WIN ) { @@ -745,7 +745,7 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz ulExtAttr = hb_translateExtAttr( szFileName, ulExtAttr ); } else - fError = TRUE; + fError = HB_TRUE; HB_TCHAR_FREE( lpFileName ); } @@ -793,7 +793,7 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz zfi.tmz_date.tm_year = st.tm_year; } else - fError = TRUE; + fError = HB_TRUE; } #elif defined( HB_OS_DOS ) { @@ -814,7 +814,7 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz ulExtAttr = hb_translateExtAttr( szFileName, ulExtAttr ); } else - fError = TRUE; + fError = HB_TRUE; } #elif defined( HB_OS_OS2 ) { @@ -848,7 +848,7 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz zfi.tmz_date.tm_year = fs3.fdateLastWrite.year + 1980; } else - fError = TRUE; + fError = HB_TRUE; } #else { @@ -865,7 +865,7 @@ static int hb_zipStoreFile( zipFile hZip, const char* szFileName, const char* sz return -200; } - fText = FALSE; + fText = HB_FALSE; ulCRC = 0; zfi.external_fa = ulExtAttr; @@ -962,7 +962,7 @@ static int hb_zipStoreFileHandle( zipFile hZip, HB_FHANDLE hFile, const char * s ULONG ulLen; zip_fileinfo zfi; int iResult; - BOOL fText; + HB_BOOL fText; ULONG ulCRC; if( hFile == FS_ERROR || szName == NULL ) @@ -989,7 +989,7 @@ static int hb_zipStoreFileHandle( zipFile hZip, HB_FHANDLE hFile, const char * s zfi.tmz_date.tm_year = 0; ulCRC = 0; - fText = FALSE; + fText = HB_FALSE; if( szPassword && hb_zipGetFileInfoFromHandle( hFile, &ulCRC, &fText ) ) zfi.internal_fa = fText ? 1 : 0; else diff --git a/harbour/contrib/hbwin/hbwapi.h b/harbour/contrib/hbwin/hbwapi.h index 546f03bbdc..6c079182a8 100644 --- a/harbour/contrib/hbwin/hbwapi.h +++ b/harbour/contrib/hbwin/hbwapi.h @@ -76,7 +76,7 @@ #define wapi_par_STRUCT( n ) ( hb_parc( n ) ) -#define wapi_par_BOOL( n ) ( ( BOOL ) hb_parl( n ) ) +#define wapi_par_BOOL( n ) ( ( BOOL ) ( hb_parl( n ) ? TRUE : FALSE ) ) #define wapi_par_INT( n ) ( ( INT ) hb_parni( n ) ) #define wapi_par_UINT( n ) ( ( UINT ) hb_parni( n ) ) #define wapi_par_LONG( n ) ( ( LONG ) hb_parnl( n ) ) @@ -86,7 +86,7 @@ #define wapi_ret_NINT( i ) ( hb_retnint( i ) ) #define wapi_ret_NI( i ) ( hb_retni( i ) ) -#define wapi_ret_L( b ) ( hb_retl( b ) ) +#define wapi_ret_L( b ) ( hb_retl( b ? HB_TRUE : HB_FALSE ) ) #define wapi_ret_UINT( n ) ( hb_retni( n ) ) #define wapi_ret_LONG( n ) ( hb_retnl( n ) ) #define wapi_ret_WORD( n ) ( hb_retnl( n ) ) diff --git a/harbour/contrib/xhb/bkgtsks.c b/harbour/contrib/xhb/bkgtsks.c index 6b793ddf73..9d9a262461 100644 --- a/harbour/contrib/xhb/bkgtsks.c +++ b/harbour/contrib/xhb/bkgtsks.c @@ -84,7 +84,7 @@ typedef struct HB_BACKGROUNDTASK_ PHB_ITEM pTask; /* pointer to the task item */ double dSeconds; /* internal - last time this task has gone */ int millisec; /* milliseconds after this task must run */ - BOOL bActive; /* task is active ? */ + HB_BOOL bActive; /* task is active ? */ } HB_BACKGROUNDTASK, * PHB_BACKGROUNDTASK, * HB_BACKGROUNDTASK_PTR; extern void hb_backgroundRunSingle( ULONG ulID ); /* run a single background routine */ @@ -92,10 +92,10 @@ extern void hb_backgroundRunForced( void ); /* run all background routines a extern void hb_backgroundRun( void ); /* run all background routines but only if them are active*/ extern void hb_backgroundReset( void ); /* reset internal counter */ extern void hb_backgroundShutDown( void ); /* closes all background tasks */ -extern ULONG hb_backgroundAddFunc( PHB_ITEM pBlock, int nMillisec, BOOL bActive ); /* Adds a codeblock or an executable array */ +extern ULONG hb_backgroundAddFunc( PHB_ITEM pBlock, int nMillisec, HB_BOOL bActive ); /* Adds a codeblock or an executable array */ extern PHB_ITEM hb_backgroundDelFunc( ULONG ulID ); /* Deletes a prevuiously added task */ extern PHB_BACKGROUNDTASK hb_backgroundFind( ULONG ulID ); -extern BOOL hb_backgroundActive( ULONG ulID, BOOL bActive ); +extern HB_BOOL hb_backgroundActive( ULONG ulID, HB_BOOL bActive ); extern int hb_backgroundTime( ULONG ulID, int nMillisec ); HB_EXTERN_END @@ -110,10 +110,10 @@ static ULONG s_ulBackgroundID = 0; */ static HB_BACKGROUNDTASK_PTR * s_pBackgroundTasks = NULL; -static BOOL s_bEnabled = FALSE; +static HB_BOOL s_bEnabled = HB_FALSE; /* flag to prevent recursive calls of hb_backgroundRun() */ -static BOOL s_bIamBackground = FALSE; +static HB_BOOL s_bIamBackground = HB_FALSE; /* current task to be executed */ static USHORT s_uiBackgroundTask = 0; @@ -132,7 +132,7 @@ static USHORT s_uiBackgroundMaxTask = 0; /* ------------------------ C LEVEL ------------------------------ */ -ULONG hb_backgroundAddFunc( PHB_ITEM pBlock, int nMillisec, BOOL bActive ) +ULONG hb_backgroundAddFunc( PHB_ITEM pBlock, int nMillisec, HB_BOOL bActive ) { PHB_BACKGROUNDTASK pBkgTask; @@ -190,7 +190,7 @@ void hb_backgroundRun( void ) if( ! s_bIamBackground && s_bEnabled ) { - s_bIamBackground = TRUE; + s_bIamBackground = HB_TRUE; if( s_uiBackgroundTask < s_uiBackgroundMaxTask ) { @@ -219,16 +219,16 @@ void hb_backgroundRun( void ) s_uiBackgroundTask == s_uiBackgroundMaxTask ) s_uiBackgroundTask = 0; } - s_bIamBackground = FALSE; + s_bIamBackground = HB_FALSE; } } /* RUN all tasks also if SET BACKGROUND TASKS is OFF */ void hb_backgroundRunForced( void ) { - BOOL bOldSet = s_bEnabled; + HB_BOOL bOldSet = s_bEnabled; - s_bEnabled = TRUE; + s_bEnabled = HB_TRUE; hb_backgroundRun(); @@ -242,13 +242,13 @@ void hb_backgroundRunSingle( ULONG ulID ) if( ! s_bIamBackground ) { - s_bIamBackground = TRUE; + s_bIamBackground = HB_TRUE; pBkgTask = hb_backgroundFind( ulID ); if( pBkgTask ) hb_itemRelease( hb_itemDo( pBkgTask->pTask, 0 ) ); - s_bIamBackground = FALSE; + s_bIamBackground = HB_FALSE; } } @@ -285,9 +285,9 @@ PHB_ITEM hb_backgroundDelFunc( ULONG ulID ) SHORT iTask; PHB_BACKGROUNDTASK pBkgTask; PHB_ITEM pItem = NULL; - BOOL bOldSet = s_bEnabled; + HB_BOOL bOldSet = s_bEnabled; - s_bEnabled = FALSE; + s_bEnabled = HB_FALSE; iTask = 0; while( iTask < s_uiBackgroundMaxTask ) @@ -344,10 +344,10 @@ PHB_BACKGROUNDTASK hb_backgroundFind( ULONG ulID ) } /* Set task as active */ -BOOL hb_backgroundActive( ULONG ulID, BOOL bActive ) +HB_BOOL hb_backgroundActive( ULONG ulID, HB_BOOL bActive ) { PHB_BACKGROUNDTASK pBkgTask; - BOOL bOldState = FALSE; + HB_BOOL bOldState = HB_FALSE; pBkgTask = hb_backgroundFind( ulID ); @@ -421,7 +421,7 @@ HB_FUNC( HB_BACKGROUNDADD ) { hb_retnl( hb_backgroundAddFunc( pBlock, ( pMillisec == NULL ? 0 : hb_itemGetNI( pMillisec ) ), - ( pActive == NULL ? TRUE : hb_itemGetL( pActive ) ) + ( pActive == NULL ? HB_TRUE : hb_itemGetL( pActive ) ) ) ); } else @@ -446,7 +446,7 @@ HB_FUNC( HB_BACKGROUNDDEL ) /* Set a task as active or not */ HB_FUNC( HB_BACKGROUNDACTIVE ) { - BOOL bOldActive = FALSE; + HB_BOOL bOldActive = HB_FALSE; if( s_pBackgroundTasks && HB_ISNUM( 1 ) ) { diff --git a/harbour/contrib/xhb/cstructc.c b/harbour/contrib/xhb/cstructc.c index c011bee0b8..a288bd5036 100644 --- a/harbour/contrib/xhb/cstructc.c +++ b/harbour/contrib/xhb/cstructc.c @@ -1050,7 +1050,7 @@ HB_FUNC( HB_ARRAYTOSTRUCTURE ) } } -static PHB_ITEM StructureToArray( BYTE* Buffer, unsigned long ulBufferLen, PHB_ITEM aDef, unsigned int uiAlign, BOOL bAdoptNested, PHB_ITEM pRet ) +static PHB_ITEM StructureToArray( BYTE* Buffer, unsigned long ulBufferLen, PHB_ITEM aDef, unsigned int uiAlign, HB_BOOL bAdoptNested, PHB_ITEM pRet ) { PHB_BASEARRAY pBaseDef = aDef->item.asArray.value; unsigned long ulLen = pBaseDef->ulLen; @@ -1371,7 +1371,7 @@ HB_FUNC( HB_STRUCTURETOARRAY ) PHB_ITEM pAlign = hb_param( 3, HB_IT_INTEGER ); PHB_ITEM pAdopt = hb_param( 4, HB_IT_LOGICAL ); PHB_ITEM pRet = hb_param( 5, HB_IT_ARRAY ); - BOOL bAdopt; + HB_BOOL bAdopt; if( Structure && aDef ) { @@ -1393,7 +1393,7 @@ HB_FUNC( HB_STRUCTURETOARRAY ) } else { - bAdopt = FALSE; + bAdopt = HB_FALSE; } hb_itemReturnForward( StructureToArray( Buffer, Structure->item.asString.length, aDef, uiAlign, bAdopt, pRet ) ); diff --git a/harbour/contrib/xhb/dbf2txt.c b/harbour/contrib/xhb/dbf2txt.c index 07e424ed99..01beb8f0ff 100644 --- a/harbour/contrib/xhb/dbf2txt.c +++ b/harbour/contrib/xhb/dbf2txt.c @@ -86,7 +86,7 @@ static char * hb_strescape( const char * szInput, int lLen, const char * cDelim } /* Export field values to text file */ -static BOOL hb_ExportVar( HB_FHANDLE handle, PHB_ITEM pValue, const char * cDelim, PHB_CODEPAGE cdp ) +static HB_BOOL hb_ExportVar( HB_FHANDLE handle, PHB_ITEM pValue, const char * cDelim, PHB_CODEPAGE cdp ) { switch( hb_itemType( pValue ) ) { @@ -147,9 +147,9 @@ static BOOL hb_ExportVar( HB_FHANDLE handle, PHB_ITEM pValue, const char * cDeli /* an "M" field or the other, might be a "V" in SixDriver */ default: /* We do not want MEMO contents */ - return FALSE; + return HB_FALSE; } - return TRUE; + return HB_TRUE; } HB_FUNC( DBF2TEXT ) @@ -172,12 +172,12 @@ HB_FUNC( DBF2TEXT ) USHORT uiFields = 0; USHORT ui; PHB_ITEM pTmp; - BOOL bWriteSep = FALSE; + HB_BOOL bWriteSep = HB_FALSE; - BOOL bEof = TRUE; - BOOL bBof = TRUE; + HB_BOOL bEof = HB_TRUE; + HB_BOOL bBof = HB_TRUE; - BOOL bNoFieldPassed = ( pFields == NULL || hb_arrayLen( pFields ) == 0 ); + HB_BOOL bNoFieldPassed = ( pFields == NULL || hb_arrayLen( pFields ) == 0 ); if( ! pArea ) { @@ -220,7 +220,7 @@ HB_FUNC( DBF2TEXT ) break; /* For condition is met */ - /* if For is NULL, hb__Eval returns TRUE */ + /* if For is NULL, hb__Eval returns HB_TRUE */ if( ! pFor || hb_itemGetL( hb_vmEvalBlock( pFor ) ) ) { /* User does not request fields, copy all fields */ @@ -262,7 +262,7 @@ HB_FUNC( DBF2TEXT ) } } hb_fsWriteLarge( handle, "\r\n", 2 ); - bWriteSep = FALSE; + bWriteSep = HB_FALSE; } if( nCount != -1 ) diff --git a/harbour/contrib/xhb/dbgfxc.c b/harbour/contrib/xhb/dbgfxc.c index 69ea792baa..ea3a68d4c8 100644 --- a/harbour/contrib/xhb/dbgfxc.c +++ b/harbour/contrib/xhb/dbgfxc.c @@ -56,14 +56,14 @@ #include "xhb.h" -static BOOL s_bToOutputDebug = TRUE; -static BOOL s_bToLogFile = TRUE; +static HB_BOOL s_bToOutputDebug = HB_TRUE; +static HB_BOOL s_bToLogFile = HB_TRUE; -static BOOL s_bEmptyLogFile = TRUE; +static HB_BOOL s_bEmptyLogFile = HB_TRUE; -BOOL hb_ToOutDebugOnOff( BOOL bOnOff ) +HB_BOOL hb_ToOutDebugOnOff( HB_BOOL bOnOff ) { - BOOL bOld = s_bToOutputDebug; + HB_BOOL bOld = s_bToOutputDebug; s_bToOutputDebug = bOnOff; return bOld; } @@ -83,16 +83,16 @@ void hb_ToOutDebug( const char * sTraceMsg, ... ) } } -BOOL hb_ToLogFileOnOff( BOOL bOnOff ) +HB_BOOL hb_ToLogFileOnOff( HB_BOOL bOnOff ) { - BOOL bOld = s_bToLogFile; + HB_BOOL bOld = s_bToLogFile; s_bToLogFile = bOnOff; return bOld; } -BOOL hb_EmptyLogFile( BOOL bOnOff ) +HB_BOOL hb_EmptyLogFile( HB_BOOL bOnOff ) { - BOOL bOld = s_bEmptyLogFile; + HB_BOOL bOld = s_bEmptyLogFile; s_bEmptyLogFile = bOnOff; return bOld; } @@ -107,7 +107,7 @@ void hb_ToLogFile( const char * sFile, const char * sTraceMsg, ... ) { if( s_bEmptyLogFile ) { - s_bEmptyLogFile = FALSE; + s_bEmptyLogFile = HB_FALSE; /* Empty the file if it exists. */ hFile = hb_fopen( "logfile.log", "w" ); diff --git a/harbour/contrib/xhb/filestat.c b/harbour/contrib/xhb/filestat.c index 7b9d6499d6..d679d5e65e 100644 --- a/harbour/contrib/xhb/filestat.c +++ b/harbour/contrib/xhb/filestat.c @@ -70,7 +70,7 @@ #endif #endif -static BOOL hb_fsFileStats( +static HB_BOOL hb_fsFileStats( const char * pszFileName, char * pszAttr, HB_FOFFSET * llSize, @@ -79,7 +79,7 @@ static BOOL hb_fsFileStats( long * lmDate, long * lmTime ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; #if defined( OS_UNIX_COMPATIBLE ) @@ -175,7 +175,7 @@ static BOOL hb_fsFileStats( hb_fsAttrDecode( ushbAttr, pszAttr ); - fResult = TRUE; + fResult = HB_TRUE; } #elif defined( HB_OS_WIN ) @@ -194,7 +194,7 @@ static BOOL hb_fsFileStats( { /* return */ HB_TCHAR_FREE( lpFileName ); - return FALSE; + return HB_FALSE; } hb_fsAttrDecode( hb_fsAttrFromRaw( dwAttribs ), pszAttr ); @@ -232,7 +232,7 @@ static BOOL hb_fsFileStats( *lcDate = hb_dateEncode( 0, 0, 0 ); *lcTime = 0; } - fResult = TRUE; + fResult = HB_TRUE; } } @@ -256,7 +256,7 @@ static BOOL hb_fsFileStats( *lmDate = hb_dateEncode( 0, 0, 0 ); *lmTime = 0; hb_fsFindClose( findinfo ); - fResult = TRUE; + fResult = HB_TRUE; } } @@ -290,8 +290,8 @@ HB_FUNC( FILESTATS ) hb_stordl ( lmDate, 6 ); hb_stornint( lmTime, 7 ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } diff --git a/harbour/contrib/xhb/fparse.c b/harbour/contrib/xhb/fparse.c index 0d16a80f1a..ceca8e4ea9 100644 --- a/harbour/contrib/xhb/fparse.c +++ b/harbour/contrib/xhb/fparse.c @@ -325,7 +325,7 @@ static char ** hb_tokensplit ( char *string, BYTE delimiter, int iCharCount, int } /*----------------------------------------------------------------------------*/ -BOOL file_read ( FILE *stream, char *string, int *iCharCount ) +static HB_BOOL file_read( FILE *stream, char *string, int *iCharCount ) { int ch, cnbr = 0; @@ -353,7 +353,7 @@ BOOL file_read ( FILE *stream, char *string, int *iCharCount ) { *iCharCount = cnbr; string [MAX_READ] = '\0'; - return TRUE; + return HB_TRUE; } } } diff --git a/harbour/contrib/xhb/freadlin.c b/harbour/contrib/xhb/freadlin.c index 003d585434..530040ff44 100644 --- a/harbour/contrib/xhb/freadlin.c +++ b/harbour/contrib/xhb/freadlin.c @@ -58,7 +58,7 @@ #define READING_BLOCK 4096 -char * hb_fsReadLine( HB_FHANDLE hFileHandle, LONG * plBuffLen, const char ** Term, int * iTermSizes, int iTerms, BOOL * bFound, BOOL * bEOF ) +char * hb_fsReadLine( HB_FHANDLE hFileHandle, LONG * plBuffLen, const char ** Term, int * iTermSizes, int iTerms, HB_BOOL * bFound, HB_BOOL * bEOF ) { int iPosTerm = 0, iPos, iPosition; int nTries; @@ -67,8 +67,8 @@ char * hb_fsReadLine( HB_FHANDLE hFileHandle, LONG * plBuffLen, const char ** Te HB_TRACE(HB_TR_DEBUG, ("hb_fsReadLine(%p, %ld, %p, %p, %i, %i, %i)", ( void * ) ( HB_PTRDIFF ) hFileHandle, *plBuffLen, Term, iTermSizes, iTerms, *bFound, *bEOF )); - *bFound = FALSE; - *bEOF = FALSE; + *bFound = HB_FALSE; + *bEOF = HB_FALSE; nTries = 0; lOffset = 0; lSize = *plBuffLen; @@ -102,13 +102,13 @@ char * hb_fsReadLine( HB_FHANDLE hFileHandle, LONG * plBuffLen, const char ** Te /* Compare with the LAST terminator byte */ if( pBuff[lOffset+iPos] == Term[iPosTerm][iTermSizes[iPosTerm]-1] && (iTermSizes[iPosTerm]-1) <= (iPos+lOffset) ) { - *bFound = TRUE; + *bFound = HB_TRUE; for(iPosition=0; iPosition < (iTermSizes[iPosTerm]-1); iPosition++) { if(Term[iPosTerm][iPosition] != pBuff[ lOffset+(iPos-iTermSizes[iPosTerm])+iPosition+1 ]) { - *bFound = FALSE; + *bFound = HB_FALSE; break; } } @@ -149,7 +149,7 @@ char * hb_fsReadLine( HB_FHANDLE hFileHandle, LONG * plBuffLen, const char ** Te *plBuffLen = lOffset + lRead; } - *bEOF = TRUE; + *bEOF = HB_TRUE; } } @@ -171,7 +171,7 @@ HB_FUNC( HB_FREADLINE ) int * iTermSizes; LONG lSize = hb_parnl( 4 ); int i, iTerms; - BOOL bFound, bEOF; + HB_BOOL bFound, bEOF; if( ( !HB_ISBYREF( 2 ) ) || ( !HB_ISNUM( 1 ) ) ) { diff --git a/harbour/contrib/xhb/hbnxs.h b/harbour/contrib/xhb/hbnxs.h index 5ba52d5549..9c41079310 100644 --- a/harbour/contrib/xhb/hbnxs.h +++ b/harbour/contrib/xhb/hbnxs.h @@ -72,51 +72,51 @@ #define NXS_MAX_KEYLEN 256 void nxs_crypt( - const unsigned char *source, ULONG srclen, - const unsigned char *key, ULONG keylen, + const unsigned char *source, HB_SIZE srclen, + const unsigned char *key, HB_SIZE keylen, unsigned char *cipher ); void nxs_decrypt( - const unsigned char *cipher, ULONG cypherlen, - const unsigned char *key, ULONG keylen, + const unsigned char *cipher, HB_SIZE cypherlen, + const unsigned char *key, HB_SIZE keylen, unsigned char *result ); void nxs_scramble( - const unsigned char *source, ULONG srclen, - const unsigned char *key, ULONG keylen, + const unsigned char *source, HB_SIZE srclen, + const unsigned char *key, HB_SIZE keylen, unsigned char *cipher ); void nxs_partial_scramble( const unsigned char *source, unsigned char *cipher, int *scramble, - ULONG len, ULONG keylen ); + HB_SIZE len, HB_SIZE keylen ); void nxs_partial_unscramble( unsigned char *cipher, int *scramble, - ULONG len, ULONG keylen ); + HB_SIZE len, HB_SIZE keylen ); void nxs_unscramble( - unsigned char *cipher, ULONG cypherlen, - const unsigned char *key, ULONG keylen); + unsigned char *cipher, HB_SIZE cypherlen, + const unsigned char *key, HB_SIZE keylen); void nxs_xorcode( - unsigned char *cipher, ULONG cipherlen, - const unsigned char *key, ULONG keylen ); + unsigned char *cipher, HB_SIZE cipherlen, + const unsigned char *key, HB_SIZE keylen ); void nxs_xordecode( - unsigned char *cipher, ULONG cipherlen, - const unsigned char *key, ULONG keylen ); + unsigned char *cipher, HB_SIZE cipherlen, + const unsigned char *key, HB_SIZE keylen ); void nxs_xorcyclic( - unsigned char *cipher, ULONG cipherlen, - const unsigned char *key, ULONG keylen ); + unsigned char *cipher, HB_SIZE cipherlen, + const unsigned char *key, HB_SIZE keylen ); ULONG nxs_cyclic_sequence( ULONG input ); void nxs_make_scramble( int *scramble, const unsigned char *key, - ULONG keylen ); + HB_SIZE keylen ); #endif diff --git a/harbour/contrib/xhb/hboutdbg.c b/harbour/contrib/xhb/hboutdbg.c index a0723725ea..f6c0551afb 100644 --- a/harbour/contrib/xhb/hboutdbg.c +++ b/harbour/contrib/xhb/hboutdbg.c @@ -133,9 +133,9 @@ static void debugInit( void ) #endif -BOOL hb_OutDebugName( PHB_ITEM pName ) +HB_BOOL hb_OutDebugName( PHB_ITEM pName ) { - BOOL bRet; + HB_BOOL bRet; #if defined( HB_OS_UNIX ) if( s_iDebugFd == 0 && pName != NULL) @@ -143,20 +143,20 @@ BOOL hb_OutDebugName( PHB_ITEM pName ) hb_strncpy( s_szDebugName, hb_itemGetCPtr( pName ), sizeof( s_szDebugName ) - 1 ); s_iUseDebugName = 1; - bRet = TRUE; + bRet = HB_TRUE; } else if( pName == NULL) { s_iUseDebugName = 0; - bRet = TRUE; + bRet = HB_TRUE; } else - bRet = FALSE; + bRet = HB_FALSE; #else HB_SYMBOL_UNUSED( pName ); - bRet = FALSE; + bRet = HB_FALSE; #endif return bRet; diff --git a/harbour/contrib/xhb/hbserv.c b/harbour/contrib/xhb/hbserv.c index 7efef6fc25..81f39958a0 100644 --- a/harbour/contrib/xhb/hbserv.c +++ b/harbour/contrib/xhb/hbserv.c @@ -94,7 +94,7 @@ ***************************************************/ HB_EXTERN_BEGIN -BOOL hb_isService( void ); +HB_BOOL hb_isService( void ); void hb_serviceExit( void ); HB_EXTERN_END @@ -104,7 +104,7 @@ static void s_serviceSetDflSig( void ); static void s_signalHandlersInit( void ); static PHB_ITEM sp_hooks = NULL; -static BOOL bSignalEnabled = TRUE; +static HB_BOOL bSignalEnabled = HB_TRUE; static int sb_isService = 0; /* There is a service mutex in multithreading */ @@ -177,7 +177,7 @@ static void s_signalHandler( int sig, siginfo_t * info, void * v ) return; } - bSignalEnabled = FALSE; + bSignalEnabled = HB_FALSE; ulPos = hb_arrayLen( sp_hooks ); /* subsig not necessary */ uiSig = ( UINT ) s_translateSignal( ( UINT ) sig, 0 ); @@ -227,12 +227,12 @@ static void s_signalHandler( int sig, siginfo_t * info, void * v ) switch( iRet ) { case HB_SERVICE_HANDLED: - bSignalEnabled = TRUE; + bSignalEnabled = HB_TRUE; hb_threadLeaveCriticalSection( &s_ServiceMutex ); return; case HB_SERVICE_QUIT: - bSignalEnabled = FALSE; + bSignalEnabled = HB_FALSE; hb_threadLeaveCriticalSection( &s_ServiceMutex ); /* TODO: A service cleanup routine */ hb_vmRequestQuit(); @@ -250,7 +250,7 @@ static void s_signalHandler( int sig, siginfo_t * info, void * v ) ulPos--; } - bSignalEnabled = TRUE; + bSignalEnabled = HB_TRUE; /*s_serviceSetHBSig();*/ /* TODO @@ -270,7 +270,7 @@ static void s_signalHandler( int sig, siginfo_t * info, void * v ) #if defined( HB_THREAD_SUPPORT ) && ! defined( HB_OS_OS2 ) static void * s_signalListener( void * my_stack ) { - static BOOL bFirst = TRUE; + static HB_BOOL bFirst = HB_TRUE; sigset_t passall; HB_STACK * pStack = ( HB_STACK * ) my_stack; #if defined( HB_OS_BSD ) @@ -319,7 +319,7 @@ static void * s_signalListener( void * my_stack ) if( bFirst ) { pthread_sigmask( SIG_SETMASK, &passall, NULL ); - bFirst = FALSE; + bFirst = HB_FALSE; } /* This is also a cancelation point. When the main thread @@ -428,7 +428,7 @@ static LONG s_signalHandler( int type, int sig, PEXCEPTION_RECORD exc ) return EXCEPTION_EXECUTE_HANDLER; } - bSignalEnabled = FALSE; + bSignalEnabled = HB_FALSE; ulPos = hb_arrayLen( sp_hooks ); /* subsig not necessary */ uiSig = ( UINT ) s_translateSignal( ( UINT ) type, ( UINT ) sig ); @@ -484,12 +484,12 @@ static LONG s_signalHandler( int type, int sig, PEXCEPTION_RECORD exc ) switch( iRet ) { case HB_SERVICE_HANDLED: - bSignalEnabled = TRUE; + bSignalEnabled = HB_TRUE; hb_threadLeaveCriticalSection( &s_ServiceMutex ); return EXCEPTION_CONTINUE_EXECUTION; case HB_SERVICE_QUIT: - bSignalEnabled = FALSE; + bSignalEnabled = HB_FALSE; hb_threadLeaveCriticalSection( &s_ServiceMutex ); hb_vmRequestQuit(); #ifndef HB_THREAD_SUPPORT @@ -504,7 +504,7 @@ static LONG s_signalHandler( int type, int sig, PEXCEPTION_RECORD exc ) ulPos--; } - bSignalEnabled = TRUE; + bSignalEnabled = HB_TRUE; return EXCEPTION_EXECUTE_HANDLER; } @@ -785,7 +785,7 @@ HB_FUNC( HB_STARTSERVICE ) #endif /* let's begin */ - sb_isService = TRUE; + sb_isService = HB_TRUE; /* in windows, we just detach from console */ #ifdef HB_OS_WIN @@ -807,7 +807,7 @@ HB_FUNC( HB_STARTSERVICE ) * Been called. C version useful for internal api */ -BOOL hb_isService( void ) +HB_BOOL hb_isService( void ) { return sb_isService; } @@ -860,7 +860,7 @@ HB_FUNC( HB_SERVICELOOP ) } #endif - hb_gcCollectAll( FALSE ); + hb_gcCollectAll( HB_FALSE ); } HB_FUNC( HB_PUSHSIGNALHANDLER ) @@ -911,7 +911,7 @@ HB_FUNC( HB_POPSIGNALHANDLER ) hb_arrayDel( sp_hooks, nLen ); hb_arrayDel( sp_hooks, nLen - 1 ); hb_arraySize( sp_hooks, nLen - 2 ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); if( hb_arrayLen( sp_hooks ) == 0 ) { hb_itemRelease( sp_hooks ); @@ -920,13 +920,13 @@ HB_FUNC( HB_POPSIGNALHANDLER ) } else { - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } hb_threadLeaveCriticalSection( &s_ServiceMutex ); } else { - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } diff --git a/harbour/contrib/xhb/hbserv.h b/harbour/contrib/xhb/hbserv.h index 8f5af9141d..d7b0971d5d 100644 --- a/harbour/contrib/xhb/hbserv.h +++ b/harbour/contrib/xhb/hbserv.h @@ -56,7 +56,7 @@ #include "hbserv.ch" #endif HB_EXTERN_BEGIN -HB_EXPORT BOOL hb_isService( void ); +HB_EXPORT HB_BOOL hb_isService( void ); HB_EXPORT void hb_serviceExit( void ); HB_EXTERN_END #endif diff --git a/harbour/contrib/xhb/txtline.c b/harbour/contrib/xhb/txtline.c index 9e78528cf1..03f8bc3e88 100644 --- a/harbour/contrib/xhb/txtline.c +++ b/harbour/contrib/xhb/txtline.c @@ -56,11 +56,11 @@ #include "hbapiitm.h" #include "hbapierr.h" -void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USHORT uiTabLen, BOOL bWrap, char ** Term, int * iTermSizes, USHORT uiTerms, BOOL * bFound, BOOL * bEOF, LONG * lEnd, HB_SIZE * ulEndOffset ) +void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USHORT uiTabLen, HB_BOOL bWrap, char ** Term, int * iTermSizes, USHORT uiTerms, HB_BOOL * bFound, HB_BOOL * bEOF, LONG * lEnd, HB_SIZE * ulEndOffset ) { USHORT uiPosTerm, uiPosition; HB_SIZE ulPos, ulCurrCol, ulLastBlk; - BOOL bBreak = 0; + HB_BOOL bBreak = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("hb_readLine(%p, %lu, %lu, %hu, %d, %p, %p, %hu, %p, %p, %p, %p)", szText, ulTextLen, uiLineLen, uiTabLen, bWrap, Term, iTermSizes, uiTerms, bFound, bEOF, lEnd, ulEndOffset )); @@ -149,7 +149,7 @@ void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USH if( ulCurrCol > uiLineLen ) { - if( bWrap == FALSE || ulLastBlk == 0 ) + if( bWrap == HB_FALSE || ulLastBlk == 0 ) { *lEnd = ulPos-1; *ulEndOffset = ulPos; @@ -166,7 +166,7 @@ void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USH } } - if( *bFound == FALSE && bBreak == FALSE ) + if( *bFound == HB_FALSE && bBreak == HB_FALSE ) { *lEnd = ulTextLen - 1; *ulEndOffset = ulTextLen - 1; @@ -239,13 +239,13 @@ HB_FUNC( HB_READLINE ) USHORT uiTabLen, uiTerms; HB_SIZE ulLineSize = hb_parni(3); USHORT i; - BOOL bWrap = hb_parl(5); - BOOL bFound, bEOF; + HB_BOOL bWrap = hb_parl(5); + HB_BOOL bFound, bEOF; HB_SIZE ulStartOffset; HB_SIZE ulEndOffset, ulTextLen; LONG lEnd; PHB_ITEM pOpt; - BOOL bAlloc_Term1 = FALSE; + HB_BOOL bAlloc_Term1 = HB_FALSE; if( !HB_ISCHAR( 1 ) ) { @@ -276,7 +276,7 @@ HB_FUNC( HB_READLINE ) } pTerm1 = hb_itemPutC( NULL, hb_setGetCPtr( HB_SET_EOL ) ); - bAlloc_Term1 = TRUE; + bAlloc_Term1 = HB_TRUE; } else { diff --git a/harbour/contrib/xhb/xhb.h b/harbour/contrib/xhb/xhb.h index 70e9f8e391..c01aeacfcd 100644 --- a/harbour/contrib/xhb/xhb.h +++ b/harbour/contrib/xhb/xhb.h @@ -59,14 +59,14 @@ HB_EXTERN_BEGIN /* functions in hboutdbg.c */ -extern HB_EXPORT BOOL hb_OutDebugName( PHB_ITEM pName ); +extern HB_EXPORT HB_BOOL hb_OutDebugName( PHB_ITEM pName ); extern HB_EXPORT void hb_OutDebug( const char * szMsg, HB_SIZE ulMsgLen ); /* functions in dbgfxc.c */ -extern HB_EXPORT BOOL hb_ToOutDebugOnOff( BOOL bOnOff ); +extern HB_EXPORT HB_BOOL hb_ToOutDebugOnOff( HB_BOOL bOnOff ); extern HB_EXPORT void hb_ToOutDebug( const char * sTraceMsg, ... ); -extern HB_EXPORT BOOL hb_ToLogFileOnOff( BOOL bOnOff ); -extern HB_EXPORT BOOL hb_EmptyLogFile( BOOL bOnOff ); +extern HB_EXPORT HB_BOOL hb_ToLogFileOnOff( HB_BOOL bOnOff ); +extern HB_EXPORT HB_BOOL hb_EmptyLogFile( HB_BOOL bOnOff ); extern HB_EXPORT void hb_ToLogFile( const char * sFile, const char * sTraceMsg, ... ); #define hb_seconds() hb_dateSeconds() diff --git a/harbour/contrib/xhb/xhbcopyf.c b/harbour/contrib/xhb/xhbcopyf.c index 94493f7c5b..01699fd625 100644 --- a/harbour/contrib/xhb/xhbcopyf.c +++ b/harbour/contrib/xhb/xhbcopyf.c @@ -63,9 +63,9 @@ #define BUFFER_SIZE 8192 -static BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM pBlock ) +static HB_BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM pBlock ) { - BOOL bRetVal = FALSE; + HB_BOOL bRetVal = HB_FALSE; HB_FHANDLE fhndSource; HB_TRACE(HB_TR_DEBUG, ("hb_copyfile(%s, %s)", szSource, szDest)); @@ -99,7 +99,7 @@ static BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM pB BYTE * buffer = ( BYTE * ) hb_xgrab( BUFFER_SIZE ); USHORT usRead; - bRetVal = TRUE; + bRetVal = HB_TRUE; if( hb_itemType( pBlock ) != HB_IT_BLOCK ) pBlock = NULL; @@ -112,7 +112,7 @@ static BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM pB if( uiAction != E_RETRY ) { - bRetVal = FALSE; + bRetVal = HB_FALSE; break; } } @@ -150,7 +150,7 @@ HB_FUNC( XHB_COPYFILE ) if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) { if( ! hb_copyfile( hb_parc( 1 ), hb_parc( 2 ), hb_param( 3, HB_IT_BLOCK ) ) ) - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); /* NOTE: Undocumented but existing Clipper Run-time error */ diff --git a/harbour/contrib/xhb/xhberrc.c b/harbour/contrib/xhb/xhberrc.c index 6e8787b404..518dba2240 100644 --- a/harbour/contrib/xhb/xhberrc.c +++ b/harbour/contrib/xhb/xhberrc.c @@ -90,7 +90,7 @@ LONG WINAPI PRGUnhandledExceptionFilter( EXCEPTION_POINTERS *ExceptionInfo ) hb_itemPutCLStatic( &Buffer, (char *) ExceptionInfo, sizeof( EXCEPTION_POINTERS ) ); Adopt.type = HB_IT_LOGICAL; - Adopt.item.asLogical.value = FALSE; + Adopt.item.asLogical.value = HB_FALSE; hb_objSendMsg( &Exception, "Buffer", 2, &Buffer, &Adopt ); } diff --git a/harbour/contrib/xhb/xhbfunc.c b/harbour/contrib/xhb/xhbfunc.c index 9125100667..b009c22f61 100644 --- a/harbour/contrib/xhb/xhbfunc.c +++ b/harbour/contrib/xhb/xhbfunc.c @@ -222,7 +222,7 @@ HB_FUNC( HB_F_EOF ) uiError = hb_fsError(); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); hb_fsSetFError( uiError ); } @@ -278,7 +278,7 @@ HB_FUNC( HB_EXEC ) { if( HB_ISSYMBOL( 1 ) ) { - BOOL fSend = FALSE; + HB_BOOL fSend = HB_FALSE; int iParams = hb_pcount() - 1; if( iParams >= 1 ) diff --git a/harbour/contrib/xhb/xhbis.c b/harbour/contrib/xhb/xhbis.c index 722c92488e..0189e3e20e 100644 --- a/harbour/contrib/xhb/xhbis.c +++ b/harbour/contrib/xhb/xhbis.c @@ -101,7 +101,7 @@ HB_FUNC( ISALNUM ) if( szString != NULL ) hb_retl( HB_ISALNUM( ( BYTE ) * szString ) ); else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } /* determines if first char of a string is a white-space character; @@ -116,7 +116,7 @@ HB_FUNC( ISSPACE ) if( szString != NULL ) hb_retl( HB_ISSPACE( ( BYTE ) * szString ) ); else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } /* determines if first char of a string is a hexadecimal digit diff --git a/harbour/contrib/xhb/xhbmsgs.c b/harbour/contrib/xhb/xhbmsgs.c index 8531d31c2b..8c9691ad1c 100644 --- a/harbour/contrib/xhb/xhbmsgs.c +++ b/harbour/contrib/xhb/xhbmsgs.c @@ -102,7 +102,7 @@ HB_FUNC( XHB_INCLUDE ) if( HB_IS_ARRAY( pSelf ) ) { - hb_retl( hb_arrayScan( pSelf, pKey, NULL, NULL, TRUE ) != 0 ); + hb_retl( hb_arrayScan( pSelf, pKey, NULL, NULL, HB_TRUE ) != 0 ); } else if( HB_IS_HASH( pSelf ) && ( HB_IS_HASHKEY( pKey ) || hb_hashLen( pKey ) == 1 ) ) { diff --git a/harbour/contrib/xhb/xhbsave.c b/harbour/contrib/xhb/xhbsave.c index e2debbafa0..1e2a694c68 100644 --- a/harbour/contrib/xhb/xhbsave.c +++ b/harbour/contrib/xhb/xhbsave.c @@ -54,7 +54,7 @@ #include "hbapigt.h" static void hb_getScreenRange( USHORT * pusMin, USHORT * pusMax, - BOOL fNoCheck, BOOL fVertical ) + HB_BOOL fNoCheck, HB_BOOL fVertical ) { int iFrom, iTo, iMax; @@ -98,10 +98,10 @@ HB_FUNC( XHB_SAVESCREEN ) USHORT uiTop, uiLeft, uiBottom, uiRight; HB_SIZE ulSize; void * pBuffer; - BOOL fNoCheck = hb_parl( 5 ); + HB_BOOL fNoCheck = hb_parl( 5 ); - hb_getScreenRange( &uiTop, &uiBottom, fNoCheck, TRUE ); - hb_getScreenRange( &uiLeft, &uiRight, fNoCheck, FALSE ); + hb_getScreenRange( &uiTop, &uiBottom, fNoCheck, HB_TRUE ); + hb_getScreenRange( &uiLeft, &uiRight, fNoCheck, HB_FALSE ); hb_gtRectSize( uiTop, uiLeft, uiBottom, uiRight, &ulSize ); pBuffer = hb_xgrab( ulSize + 1 ); @@ -115,10 +115,10 @@ HB_FUNC( XHB_RESTSCREEN ) if( HB_ISCHAR( 5 ) ) { USHORT uiTop, uiLeft, uiBottom, uiRight; - BOOL fNoCheck = hb_parl( 6 ); + HB_BOOL fNoCheck = hb_parl( 6 ); - hb_getScreenRange( &uiTop, &uiBottom, fNoCheck, TRUE ); - hb_getScreenRange( &uiLeft, &uiRight, fNoCheck, FALSE ); + hb_getScreenRange( &uiTop, &uiBottom, fNoCheck, HB_TRUE ); + hb_getScreenRange( &uiLeft, &uiRight, fNoCheck, HB_FALSE ); hb_gtRest( uiTop, uiLeft, uiBottom, uiRight, ( void * ) hb_parc( 5 ) ); } diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 67ff87f668..cec8829fcb 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -303,8 +303,8 @@ struct hb_struBlock struct hb_struPointer { void * value; - BOOL collect; - BOOL single; + HB_BOOL collect; + HB_BOOL single; }; struct hb_struDateTime @@ -334,7 +334,7 @@ struct hb_struLong struct hb_struLogical { - BOOL value; + HB_BOOL value; }; struct hb_struMemvar @@ -442,7 +442,7 @@ typedef struct _HB_CODEBLOCK PHB_ITEM pLocals; /* table with referenced local variables */ void * pStatics; /* STATICs base frame */ USHORT uiLocals; /* number of referenced local variables */ - SHORT dynBuffer; /* is pcode buffer allocated dynamically, SHORT used instead of BOOL intentionally to force optimal alignment */ + 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; typedef void ( * HB_EXTREF_FUNC0 )( void * ); @@ -503,7 +503,7 @@ extern void hb_xclean( void ); #ifdef _HB_API_INTERNAL_ extern void hb_xRefInc( void * pMem ); /* increment reference counter */ -extern BOOL hb_xRefDec( void * pMem ); /* decrement reference counter, return HB_TRUE when 0 reached */ +extern HB_BOOL hb_xRefDec( void * pMem ); /* decrement reference counter, return HB_TRUE when 0 reached */ extern void hb_xRefFree( void * pMem ); /* decrement reference counter and free the block when 0 reached */ extern HB_COUNTER hb_xRefCount( void * pMem ); /* return number of references */ extern void * hb_xRefResize( void * pMem, ULONG ulSave, ULONG ulSize, ULONG * pulAllocated ); /* reallocates memory, create copy if reference counter greater then 1 */ @@ -617,15 +617,15 @@ extern HB_COUNTER hb_gcRefCount( void * pAlloc ); /* return number of reference #endif /* _HB_API_INTERNAL_ */ extern void hb_gcCollect( void ); /* checks if a single memory block can be released */ -extern void hb_gcCollectAll( BOOL fForce ); /* checks if all memory blocks can be released */ +extern void hb_gcCollectAll( HB_BOOL fForce ); /* checks if all memory blocks can be released */ /* Extend API */ extern HB_EXPORT ULONG hb_parinfo( int iParam ); /* Determine the param count or data type */ extern HB_EXPORT ULONG hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex ); /* retrieve length or element type of an array parameter */ extern HB_EXPORT PHB_ITEM hb_param( int iParam, long lMask ); /* retrieve a generic parameter */ extern HB_EXPORT PHB_ITEM hb_paramError( int iParam ); /* Returns either the generic parameter or a NIL item if param not provided */ -extern HB_EXPORT BOOL hb_extIsArray( int iParam ); -extern HB_EXPORT BOOL hb_extIsObject( int iParam ); +extern HB_EXPORT HB_BOOL hb_extIsArray( int iParam ); +extern HB_EXPORT HB_BOOL hb_extIsObject( int iParam ); extern HB_EXPORT const char * hb_parc( int iParam ); /* retrieve a string parameter */ extern HB_EXPORT const char * hb_parcx( int iParam ); /* retrieve a string parameter */ @@ -635,7 +635,7 @@ extern HB_EXPORT const char * hb_pards( int iParam ); /* retrieve a date as a st extern HB_EXPORT char * hb_pardsbuff( char * szDate, int iParam ); /* retrieve a date as a string YYYYMMDD */ extern HB_EXPORT long hb_pardl( int iParam ); /* retrieve a date as a long integer */ extern HB_EXPORT double hb_partd( int iParam ); /* retrieve a timestamp as a double number */ -extern HB_EXPORT BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ); /* retrieve a timestamp as two long numbers */ +extern HB_EXPORT HB_BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ); /* retrieve a timestamp as two long numbers */ extern HB_EXPORT int hb_parl( int iParam ); /* retrieve a logical parameter as an int */ extern HB_EXPORT int hb_parldef( int iParam, int iDefValue ); /* retrieve a logical parameter as an int, return default value if parameter isn't logical */ extern HB_EXPORT double hb_parnd( int iParam ); /* retrieve a numeric parameter as a double */ @@ -658,7 +658,7 @@ extern HB_EXPORT const char * hb_parvds( int iParam, ... ); /* retrieve a date a extern HB_EXPORT char * hb_parvdsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string YYYYMMDD */ extern HB_EXPORT long hb_parvdl( int iParam, ... ); /* retrieve a date as a long integer */ extern HB_EXPORT double hb_parvtd( int iParam, ... ); /* retrieve a timestamp as a double number */ -extern HB_EXPORT BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */ +extern HB_EXPORT HB_BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */ extern HB_EXPORT int hb_parvl( int iParam, ... ); /* retrieve a logical parameter as an int */ extern HB_EXPORT double hb_parvnd( int iParam, ... ); /* retrieve a numeric parameter as a double */ extern HB_EXPORT int hb_parvni( int iParam, ... ); /* retrieve a numeric parameter as a integer */ @@ -787,18 +787,18 @@ extern HB_EXPORT int hb_storvnll( LONGLONG lValue, int iParam, ... ); /* stor #endif /* array management */ -extern HB_EXPORT BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ); /* creates a new array */ +extern HB_EXPORT HB_BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ); /* creates a new array */ extern HB_EXPORT HB_SIZE hb_arrayLen( PHB_ITEM pArray ); /* retrieves the array len */ -extern HB_EXPORT BOOL hb_arrayIsObject( PHB_ITEM pArray ); /* retrieves if the array is an object */ +extern HB_EXPORT HB_BOOL hb_arrayIsObject( PHB_ITEM pArray ); /* retrieves if the array is an object */ extern HB_EXPORT void * hb_arrayId( PHB_ITEM pArray ); /* retrieves the array unique ID */ -extern HB_EXPORT BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ); /* add a new item to the end of an array item */ -extern HB_EXPORT BOOL hb_arrayAddForward( PHB_ITEM pArray, PHB_ITEM pValue ); /* add a new item to the end of an array item with no incrementing of reference counters */ -extern HB_EXPORT BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ); /* insert a nil item into an array, without changing the length */ -extern HB_EXPORT BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ); /* delete an array item, without changing length */ -extern HB_EXPORT BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ); /* sets the array total length */ -extern HB_EXPORT BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ); /* retrieve last item in an array */ -extern HB_EXPORT BOOL hb_arrayGet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* retrieves an item */ -extern HB_EXPORT BOOL hb_arrayGetItemRef( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* create a reference to an array element */ +extern HB_EXPORT HB_BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ); /* add a new item to the end of an array item */ +extern HB_EXPORT HB_BOOL hb_arrayAddForward( PHB_ITEM pArray, PHB_ITEM pValue ); /* add a new item to the end of an array item with no incrementing of reference counters */ +extern HB_EXPORT HB_BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ); /* insert a nil item into an array, without changing the length */ +extern HB_EXPORT HB_BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ); /* delete an array item, without changing length */ +extern HB_EXPORT HB_BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ); /* sets the array total length */ +extern HB_EXPORT HB_BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ); /* retrieve last item in an array */ +extern HB_EXPORT HB_BOOL hb_arrayGet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* retrieves an item */ +extern HB_EXPORT HB_BOOL hb_arrayGetItemRef( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* create a reference to an array element */ /* hb_arrayGetItemPtr() is dangerous, be sure that base ARRAY value will not be changed (f.e. resized) */ extern HB_EXPORT PHB_ITEM hb_arrayGetItemPtr( PHB_ITEM pArray, HB_SIZE ulIndex ); /* returns pointer to specified element of the array */ extern HB_EXPORT HB_SIZE hb_arrayCopyC( PHB_ITEM pArray, HB_SIZE ulIndex, char * szBuffer, HB_SIZE ulLen ); /* copy a string from an array item */ @@ -808,7 +808,7 @@ extern HB_EXPORT HB_SIZE hb_arrayGetCLen( PHB_ITEM pArray, HB_SIZE ulIndex extern HB_EXPORT void * hb_arrayGetPtr( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the pointer contained on an array element */ extern HB_EXPORT void * hb_arrayGetPtrGC( PHB_ITEM pArray, HB_SIZE ulIndex, const HB_GC_FUNCS * pFuncs ); /* retrieves the GC pointer contained on an array element */ extern HB_EXPORT PHB_SYMB hb_arrayGetSymbol( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves symbol contained on an array element */ -extern HB_EXPORT BOOL hb_arrayGetL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the logical value contained on an array element */ +extern HB_EXPORT HB_BOOL hb_arrayGetL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the logical value contained on an array element */ extern HB_EXPORT int hb_arrayGetNI( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the int value contained on an array element */ extern HB_EXPORT long hb_arrayGetNL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the long numeric value contained on an array element */ extern HB_EXPORT HB_LONG hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the HB_LONG value contained on an array element */ @@ -816,36 +816,36 @@ extern HB_EXPORT double hb_arrayGetND( PHB_ITEM pArray, HB_SIZE ulIndex ); extern HB_EXPORT char * hb_arrayGetDS( PHB_ITEM pArray, HB_SIZE ulIndex, char * szDate ); /* retrieves the date value contained in an array element */ extern HB_EXPORT long hb_arrayGetDL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the date value contained in an array element, as a long integer */ extern HB_EXPORT double hb_arrayGetTD( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the timestamp value contained in an array element, as a double value */ -extern HB_EXPORT BOOL hb_arrayGetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long * plJulian, long * plMilliSec ); /* retrieves the timestamp value contained in an array element, as two long values */ +extern HB_EXPORT HB_BOOL hb_arrayGetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long * plJulian, long * plMilliSec ); /* retrieves the timestamp value contained in an array element, as two long values */ extern HB_EXPORT HB_TYPE hb_arrayGetType( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the type of an array item */ -extern HB_EXPORT BOOL hb_arraySet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* sets an array element */ -extern HB_EXPORT BOOL hb_arraySetForward( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* sets an array element by forwarding it's value */ -extern HB_EXPORT BOOL hb_arraySetDS( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szDate ); -extern HB_EXPORT BOOL hb_arraySetDL( PHB_ITEM pArray, HB_SIZE ulIndex, long lDate ); -extern HB_EXPORT BOOL hb_arraySetTD( PHB_ITEM pArray, HB_SIZE ulIndex, double dTimeStamp ); -extern HB_EXPORT BOOL hb_arraySetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long lJulian, long lMilliSec ); -extern HB_EXPORT BOOL hb_arraySetL( PHB_ITEM pArray, HB_SIZE ulIndex, BOOL fValue ); -extern HB_EXPORT BOOL hb_arraySetNI( PHB_ITEM pArray, HB_SIZE ulIndex, int iNumber ); -extern HB_EXPORT BOOL hb_arraySetNL( PHB_ITEM pArray, HB_SIZE ulIndex, long lNumber ); +extern HB_EXPORT HB_BOOL hb_arraySet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* sets an array element */ +extern HB_EXPORT HB_BOOL hb_arraySetForward( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); /* sets an array element by forwarding it's value */ +extern HB_EXPORT HB_BOOL hb_arraySetDS( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szDate ); +extern HB_EXPORT HB_BOOL hb_arraySetDL( PHB_ITEM pArray, HB_SIZE ulIndex, long lDate ); +extern HB_EXPORT HB_BOOL hb_arraySetTD( PHB_ITEM pArray, HB_SIZE ulIndex, double dTimeStamp ); +extern HB_EXPORT HB_BOOL hb_arraySetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long lJulian, long lMilliSec ); +extern HB_EXPORT HB_BOOL hb_arraySetL( PHB_ITEM pArray, HB_SIZE ulIndex, HB_BOOL fValue ); +extern HB_EXPORT HB_BOOL hb_arraySetNI( PHB_ITEM pArray, HB_SIZE ulIndex, int iNumber ); +extern HB_EXPORT HB_BOOL hb_arraySetNL( PHB_ITEM pArray, HB_SIZE ulIndex, long lNumber ); #ifndef HB_LONG_LONG_OFF -extern HB_EXPORT BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, LONGLONG llNumber ); +extern HB_EXPORT HB_BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, LONGLONG llNumber ); #endif -extern HB_EXPORT BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONG lNumber ); -extern HB_EXPORT BOOL hb_arraySetND( PHB_ITEM pArray, HB_SIZE ulIndex, double dNumber ); -extern HB_EXPORT BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText ); -extern HB_EXPORT BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText, HB_SIZE ulLen ); -extern HB_EXPORT BOOL hb_arraySetCLPtr( PHB_ITEM pArray, HB_SIZE ulIndex, char * szText, HB_SIZE ulLen ); -extern HB_EXPORT BOOL hb_arraySetPtr( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ); -extern HB_EXPORT BOOL hb_arraySetPtrGC( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ); -extern HB_EXPORT BOOL hb_arraySetSymbol( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount ); /* fill an array with a given item */ -extern HB_EXPORT HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, BOOL fExact ); /* scan an array for a given item, or until code-block item returns HB_TRUE */ -extern HB_EXPORT HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, BOOL fExact ); /* scan an array for a given item, or until code-block item returns HB_TRUE in reverted order */ -extern HB_EXPORT BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, HB_SIZE * pulStart, HB_SIZE * pulCount ); /* execute a code-block for every element of an array item */ -extern HB_EXPORT BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, HB_SIZE * pulStart, HB_SIZE * pulCount, HB_SIZE * pulTarget ); /* copy items from one array to another */ +extern HB_EXPORT HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONG lNumber ); +extern HB_EXPORT HB_BOOL hb_arraySetND( PHB_ITEM pArray, HB_SIZE ulIndex, double dNumber ); +extern HB_EXPORT HB_BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText ); +extern HB_EXPORT HB_BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText, HB_SIZE ulLen ); +extern HB_EXPORT HB_BOOL hb_arraySetCLPtr( PHB_ITEM pArray, HB_SIZE ulIndex, char * szText, HB_SIZE ulLen ); +extern HB_EXPORT HB_BOOL hb_arraySetPtr( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ); +extern HB_EXPORT HB_BOOL hb_arraySetPtrGC( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ); +extern HB_EXPORT HB_BOOL hb_arraySetSymbol( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount ); /* fill an array with a given item */ +extern HB_EXPORT HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, HB_BOOL fExact ); /* scan an array for a given item, or until code-block item returns HB_TRUE */ +extern HB_EXPORT HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, HB_BOOL fExact ); /* scan an array for a given item, or until code-block item returns HB_TRUE in reverted order */ +extern HB_EXPORT HB_BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, HB_SIZE * pulStart, HB_SIZE * pulCount ); /* execute a code-block for every element of an array item */ +extern HB_EXPORT HB_BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, HB_SIZE * pulStart, HB_SIZE * pulCount, HB_SIZE * pulTarget ); /* copy items from one array to another */ 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 BOOL hb_arraySort( PHB_ITEM pArray, HB_SIZE * pulStart, HB_SIZE * pulCount, PHB_ITEM pBlock ); /* sorts an array item */ +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_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. */ @@ -864,16 +864,16 @@ extern void hb_hashCloneBody( PHB_ITEM pHash, PHB_ITEM pDest, PHB_NESTED_CLONED /* hash management */ extern HB_EXPORT PHB_ITEM hb_hashNew( PHB_ITEM pItem ); extern HB_EXPORT HB_SIZE hb_hashLen( PHB_ITEM pHash ); -extern HB_EXPORT BOOL hb_hashDel( PHB_ITEM pHash, PHB_ITEM pKey ); -extern HB_EXPORT BOOL hb_hashAdd( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ); -extern HB_EXPORT BOOL hb_hashAddNew( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ); -extern HB_EXPORT BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_hashAllocNewPair( PHB_ITEM pHash, PHB_ITEM * pKeyPtr, PHB_ITEM * pValPtr ); +extern HB_EXPORT HB_BOOL hb_hashDel( PHB_ITEM pHash, PHB_ITEM pKey ); +extern HB_EXPORT HB_BOOL hb_hashAdd( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ); +extern HB_EXPORT HB_BOOL hb_hashAddNew( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ); +extern HB_EXPORT HB_BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_hashAllocNewPair( PHB_ITEM pHash, PHB_ITEM * pKeyPtr, PHB_ITEM * pValPtr ); extern HB_EXPORT void hb_hashSort( PHB_ITEM pHash ); extern HB_EXPORT PHB_ITEM hb_hashClone( PHB_ITEM pHash ); extern HB_EXPORT PHB_ITEM hb_hashCloneTo( PHB_ITEM pDest, PHB_ITEM pHash ); extern HB_EXPORT void hb_hashJoin( PHB_ITEM pDest, PHB_ITEM pSource, int iType ); -extern HB_EXPORT BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ); +extern HB_EXPORT HB_BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ); extern HB_EXPORT void hb_hashPreallocate( PHB_ITEM pHash, HB_SIZE ulNewSize ); extern HB_EXPORT PHB_ITEM hb_hashGetKeys( PHB_ITEM pHash ); extern HB_EXPORT PHB_ITEM hb_hashGetValues( PHB_ITEM pHash ); @@ -891,7 +891,7 @@ extern HB_EXPORT PHB_ITEM hb_hashGetCItemPtr( PHB_ITEM pHash, const char * pszK extern HB_EXPORT PHB_ITEM hb_hashGetKeyAt( PHB_ITEM pHash, HB_SIZE ulPos ); extern HB_EXPORT PHB_ITEM hb_hashGetValueAt( PHB_ITEM pHash, HB_SIZE ulPos ); -extern HB_EXPORT BOOL hb_hashDelAt( PHB_ITEM pHash, HB_SIZE ulPos ); +extern HB_EXPORT HB_BOOL hb_hashDelAt( PHB_ITEM pHash, HB_SIZE ulPos ); /* hash item flags */ #define HB_HASH_AUTOADD_NEVER 0x00 @@ -930,28 +930,28 @@ extern HB_EXPORT HB_SIZE hb_strlentrim( const char * pszText ); /* like strlen extern HB_EXPORT HB_SIZE hb_strnlen( const char * pszText, HB_SIZE ulLen ); /* like strlen() but result is limited to ulLen */ extern HB_EXPORT char * hb_xstrcat( char * dest, const char * src, ... ); /* Concatenates multiple strings into a single result */ extern HB_EXPORT char * hb_xstrcpy( char * szDest, const char * szSrc, ... ); /* Concatenates multiple strings into a single result */ -extern HB_EXPORT BOOL hb_compStrToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by compiler */ -extern HB_EXPORT BOOL hb_valStrnToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by VAL() */ -extern HB_EXPORT BOOL hb_strToNum( const char * szNum, HB_LONG * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */ -extern HB_EXPORT BOOL hb_strnToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */ +extern HB_EXPORT HB_BOOL hb_compStrToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by compiler */ +extern HB_EXPORT HB_BOOL hb_valStrnToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by VAL() */ +extern HB_EXPORT HB_BOOL hb_strToNum( const char * szNum, HB_LONG * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */ +extern HB_EXPORT HB_BOOL hb_strnToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */ extern HB_EXPORT int hb_snprintf( char * buffer, size_t bufsize, const char * format, ... ) HB_PRINTF_FORMAT( 3, 4 ); /* snprintf() equivalent */ extern HB_EXPORT int hb_vsnprintf( char * buffer, size_t bufsize, const char * format, va_list ap ); /* vsnprintf() equivalent */ extern HB_EXPORT int hb_printf_params( const char * format ); -extern HB_EXPORT BOOL hb_strMatchFile( const char * pszString, const char * szPattern ); /* compare two strings using platform dependent rules for file matching */ -extern HB_EXPORT BOOL hb_strMatchRegExp( const char * szString, const char * szPattern ); /* compare two strings using a regular expression pattern */ -extern HB_EXPORT BOOL hb_strMatchWild( const char * szString, const char * szPattern ); /* compare two strings using pattern with wildcard (?*) - patern have to be prefix of given string */ -extern HB_EXPORT BOOL hb_strMatchWildExact( const char * szString, const char * szPattern ); /* compare two strings using pattern with wildcard (?*) - patern have to cover whole string */ -extern HB_EXPORT BOOL hb_strMatchCaseWildExact( const char * szString, const char * szPattern ); /* compare two strings using pattern with wildcard (?*) ignoring the case of the characters - patern have to cover whole string */ -extern HB_EXPORT BOOL hb_strEmpty( const char * szText, HB_SIZE ulLen ); /* returns whether a string contains only white space */ +extern HB_EXPORT HB_BOOL hb_strMatchFile( const char * pszString, const char * szPattern ); /* compare two strings using platform dependent rules for file matching */ +extern HB_EXPORT HB_BOOL hb_strMatchRegExp( const char * szString, const char * szPattern ); /* compare two strings using a regular expression pattern */ +extern HB_EXPORT HB_BOOL hb_strMatchWild( const char * szString, const char * szPattern ); /* compare two strings using pattern with wildcard (?*) - patern have to be prefix of given string */ +extern HB_EXPORT HB_BOOL hb_strMatchWildExact( const char * szString, const char * szPattern ); /* compare two strings using pattern with wildcard (?*) - patern have to cover whole string */ +extern HB_EXPORT HB_BOOL hb_strMatchCaseWildExact( const char * szString, const char * szPattern ); /* compare two strings using pattern with wildcard (?*) ignoring the case of the characters - patern have to cover whole string */ +extern HB_EXPORT HB_BOOL hb_strEmpty( const char * szText, HB_SIZE ulLen ); /* returns whether a string contains only white space */ extern HB_EXPORT void hb_strDescend( char * szStringTo, const char * szStringFrom, HB_SIZE ulLen ); /* copy a string to a buffer, inverting each character */ extern HB_EXPORT HB_SIZE hb_strAt( const char * szSub, HB_SIZE ulSubLen, const char * szText, HB_SIZE ulLen ); /* returns an index to a sub-string within another string */ extern HB_EXPORT char * hb_strUpper( char * szText, HB_SIZE ulLen ); /* convert an existing string buffer to upper case */ extern HB_EXPORT char * hb_strLower( char * szText, HB_SIZE ulLen ); /* convert an existing string buffer to lower case */ -extern HB_EXPORT BOOL hb_charIsDigit( int iChar ); -extern HB_EXPORT BOOL hb_charIsAlpha( int iChar ); -extern HB_EXPORT BOOL hb_charIsLower( int iChar ); -extern HB_EXPORT BOOL hb_charIsUpper( int iChar ); +extern HB_EXPORT HB_BOOL hb_charIsDigit( int iChar ); +extern HB_EXPORT HB_BOOL hb_charIsAlpha( int iChar ); +extern HB_EXPORT HB_BOOL hb_charIsLower( int iChar ); +extern HB_EXPORT HB_BOOL hb_charIsUpper( int iChar ); extern HB_EXPORT int hb_charUpper( int iChar ); /* converts iChar to upper case */ extern HB_EXPORT int hb_charLower( int iChar ); /* converts iChar to lower case */ extern HB_EXPORT char * hb_strncpy( char * pDest, const char * pSource, HB_SIZE ulLen ); /* copy at most ulLen bytes from string buffer to another buffer and _always_ set 0 in destin buffer */ @@ -962,7 +962,7 @@ extern HB_EXPORT char * hb_strncpyUpper( char * pDest, const char * pSource, extern HB_EXPORT char * hb_strncpyUpperTrim( char * pDest, const char * pSource, HB_SIZE ulLen ); extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE ulLen ); /* return the numeric value of a character string representation of a number */ extern HB_EXPORT const char * hb_strLTrim( const char * szText, HB_SIZE * ulLen ); /* return a pointer to the first non-white space character */ -extern HB_EXPORT HB_SIZE hb_strRTrimLen( const char * szText, HB_SIZE ulLen, BOOL bAnySpace ); /* return length of a string, ignoring trailing white space (or true spaces) */ +extern HB_EXPORT HB_SIZE hb_strRTrimLen( const char * szText, HB_SIZE ulLen, HB_BOOL bAnySpace ); /* return length of a string, ignoring trailing white space (or true spaces) */ extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE ulLen ); extern HB_EXPORT HB_LONG hb_strValInt( const char * szText, int * iOverflow ); extern HB_EXPORT char * hb_strRemEscSeq( char * szText, HB_SIZE * ulLen ); /* remove C ESC sequences and converts them to Clipper chars */ @@ -1002,7 +1002,7 @@ extern HB_EXPORT PHB_SYMB hb_dynsymGetSymbol( const char * szName ); /* finds a extern HB_EXPORT PHB_SYMB hb_dynsymFindSymbol( const char * szName ); /* finds a dynamic symbol and return pointer to its HB_SYMB structure */ extern HB_EXPORT PHB_SYMB hb_dynsymSymbol( PHB_DYNS pDynSym ); extern HB_EXPORT const char * hb_dynsymName( PHB_DYNS pDynSym ); /* return dynamic symbol name */ -extern HB_EXPORT BOOL hb_dynsymIsFunction( PHB_DYNS pDynSym ); +extern HB_EXPORT HB_BOOL hb_dynsymIsFunction( PHB_DYNS pDynSym ); extern HB_EXPORT int hb_dynsymAreaHandle( PHB_DYNS pDynSym ); /* return work area number bound with given dynamic symbol */ extern HB_EXPORT void hb_dynsymSetAreaHandle( PHB_DYNS pDynSym, int iArea ); /* set work area number for a given dynamic symbol */ #ifdef _HB_API_INTERNAL_ @@ -1020,14 +1020,14 @@ extern void hb_cmdargUpdate( void ); /* update arguments after HVM init extern int hb_cmdargARGC( void ); /* retrieve command line argument count */ extern char ** hb_cmdargARGV( void ); /* retrieve command line argument buffer pointer */ extern const char * hb_cmdargARGVN( int argc ); /* retrieve given command line argument */ -extern BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ); /* determine if a string is an internal setting */ -extern BOOL hb_cmdargCheck( const char * pszName ); /* Check if a given internal switch (like //INFO) was set */ +extern HB_BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ); /* determine if a string is an internal setting */ +extern HB_BOOL hb_cmdargCheck( const char * pszName ); /* Check if a given internal switch (like //INFO) was set */ extern char * hb_cmdargString( const char * pszName ); /* Returns the string value of an internal switch (like //TEMPPATH:"C:\") */ extern int hb_cmdargNum( const char * pszName ); /* Returns the numeric value of an internal switch (like //F:90) */ extern ULONG hb_cmdargProcessVM( int*, int* ); /* Check for command line internal arguments */ #if defined( HB_OS_WIN ) && defined( HB_OS_WIN_USED ) -extern HB_EXPORT void hb_winmainArgInit( HANDLE hInstance, HANDLE hPrevInstance, int iCmdShow ); /* Set WinMain() parameters */ -extern HB_EXPORT BOOL hb_winmainArgGet( HANDLE * phInstance, HANDLE * phPrevInstance, int * piCmdShow ); /* Retrieve WinMain() parameters */ +extern HB_EXPORT void hb_winmainArgInit( HANDLE hInstance, HANDLE hPrevInstance, int iCmdShow ); /* Set WinMain() parameters */ +extern HB_EXPORT HB_BOOL hb_winmainArgGet( HANDLE * phInstance, HANDLE * phPrevInstance, int * piCmdShow ); /* Retrieve WinMain() parameters */ #endif /* Codeblock management */ @@ -1039,7 +1039,7 @@ extern PHB_ITEM hb_codeblockGetRef( HB_CODEBLOCK_PTR pCBlock, LONG iItem extern void hb_codeblockEvaluate( HB_ITEM_PTR pItem ); /* evaluate a codeblock */ /* memvars subsystem */ -extern void hb_memvarsClear( BOOL fAll ); /* clear all PUBLIC and PRIVATE variables optionally without GetList PUBLIC variable */ +extern void hb_memvarsClear( HB_BOOL fAll ); /* clear all PUBLIC and PRIVATE variables optionally without GetList PUBLIC variable */ extern void hb_memvarSetValue( PHB_SYMB pMemvarSymb, HB_ITEM_PTR pItem ); /* copy an item into a symbol */ extern HB_ERRCODE hb_memvarGet( HB_ITEM_PTR pItem, PHB_SYMB pMemvarSymb ); /* copy an symbol value into an item */ extern void hb_memvarGetValue( HB_ITEM_PTR pItem, PHB_SYMB pMemvarSymb ); /* copy an symbol value into an item, with error trapping */ @@ -1053,7 +1053,7 @@ extern void hb_memvarCreateFromItem( PHB_ITEM pMemvar, BYTE bScope, PHB_IT extern int hb_memvarScope( const char * szVarName, ULONG ulLength ); /* retrieve scope of a dynamic variable symbol */ extern PHB_ITEM hb_memvarDetachLocal( HB_ITEM_PTR pLocal ); /* Detach a local variable from the eval stack */ extern PHB_ITEM hb_memvarGetValueBySym( PHB_DYNS pDynSym ); -extern PHB_ITEM hb_memvarSaveInArray( int iScope, BOOL fCopy ); /* create array with visible memvar references or copies respecting given memvars scope */ +extern PHB_ITEM hb_memvarSaveInArray( int iScope, HB_BOOL fCopy ); /* create array with visible memvar references or copies respecting given memvars scope */ extern void hb_memvarRestoreFromArray( PHB_ITEM pArray ); #ifdef _HB_API_INTERNAL_ @@ -1072,7 +1072,7 @@ extern HB_EXPORT const char * hb_conNewLine( void ); /* retrieve a pointer to a extern HB_EXPORT void hb_conOutStd( const char * pStr, HB_SIZE ulLen ); /* output an string to STDOUT */ extern HB_EXPORT void hb_conOutErr( const char * pStr, HB_SIZE ulLen ); /* output an string to STDERR */ extern HB_EXPORT void hb_conOutAlt( const char * pStr, HB_SIZE ulLen ); /* output an string to the screen and/or printer and/or alternate */ -extern HB_EXPORT int hb_conSetCursor( BOOL bSetCursor, int iNewCursor ); /* retrieve and optionally set cursor shape */ +extern HB_EXPORT int hb_conSetCursor( HB_BOOL bSetCursor, int iNewCursor ); /* retrieve and optionally set cursor shape */ extern HB_EXPORT const char * hb_conSetColor( const char * szColor ); /* retrieve and optionally set console color */ /* compiler and macro compiler */ @@ -1081,8 +1081,8 @@ extern char * hb_compEncodeString( int iMethod, const char * szText, HB_SI extern char * hb_compDecodeString( int iMethod, const char * szText, HB_SIZE * pulLen ); /* misc */ -extern char * hb_procname( int iLevel, char * szName, BOOL bskipBlock ); /* retrieve a procedure name into a buffer */ -extern BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ); +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 ); /* macro compiler */ #if defined( HB_MACRO_SUPPORT ) @@ -1099,8 +1099,8 @@ extern void hb_macroPushSymbol( HB_ITEM_PTR pItem ); /* handle a macro functio extern void hb_macroRun( HB_MACRO_PTR pMacro ); /* executes pcode compiled by macro compiler */ extern HB_MACRO_PTR hb_macroCompile( const char * szString ); /* compile a string and return a pcode buffer */ extern void hb_macroDelete( HB_MACRO_PTR pMacro ); /* release all memory allocated for macro evaluation */ -extern char * hb_macroTextSymbol( const char * szString, HB_SIZE ulLength, BOOL *pfNewString ); /* substitute macro variables occurences within a given string and check if result is a valid function or variable name */ -extern char * hb_macroExpandString( const char * szString, HB_SIZE ulLength, BOOL *pfNewString ); /* expands valid '&' operator */ +extern char * hb_macroTextSymbol( const char * szString, HB_SIZE ulLength, HB_BOOL * pfNewString ); /* substitute macro variables occurences within a given string and check if result is a valid function or variable name */ +extern char * hb_macroExpandString( const char * szString, HB_SIZE ulLength, HB_BOOL * pfNewString ); /* expands valid '&' operator */ extern void hb_macroPopAliasedValue( HB_ITEM_PTR pAlias, HB_ITEM_PTR pVar, BYTE flags ); /* compiles and evaluates an aliased macro expression */ extern void hb_macroPushAliasedValue( HB_ITEM_PTR pAlias, HB_ITEM_PTR pVar, BYTE flags ); /* compiles and evaluates an aliased macro expression */ extern const char * hb_macroGetType( HB_ITEM_PTR pItem ); /* determine the type of an expression */ @@ -1144,21 +1144,21 @@ extern HB_EXPORT const char * hb_verFlagsPRG( void ); /* retrieves a stat extern HB_EXPORT const char * hb_verHB_PLAT( void ); /* retrieves a static buffer containing build time HB_PLATFORM setting */ extern HB_EXPORT const char * hb_verHB_COMP( void ); /* retrieves a static buffer containing build time HB_COMPILER setting */ -extern HB_EXPORT BOOL hb_iswinnt( void ); /* return .T. if OS == Windows NT, 2000, XP */ -extern HB_EXPORT BOOL hb_iswince( void ); /* return .T. if OS is Windows CE or Windows Mobile */ -extern HB_EXPORT BOOL hb_printerIsReady( const char * pszPrinterName ); +extern HB_EXPORT HB_BOOL hb_iswinnt( void ); /* return .T. if OS == Windows NT, 2000, XP */ +extern HB_EXPORT HB_BOOL hb_iswince( void ); /* return .T. if OS is Windows CE or Windows Mobile */ +extern HB_EXPORT HB_BOOL hb_printerIsReady( const char * pszPrinterName ); /* OS/Harbour codepage conversion */ extern HB_EXPORT const char * hb_osEncodeCP( const char * szName, char ** pszFree, HB_SIZE * pulSize ); /* Convert a string sent to a system call, from Harbour codepage. */ extern HB_EXPORT const char * hb_osDecodeCP( const char * szName, char ** pszFree, HB_SIZE * pulSize ); /* Convert a string received from a system call, to Harbour codepage. */ /* environment variables access */ -extern BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ); +extern HB_BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ); /* WARNING: This returned pointer must be freed if not NULL using hb_xfree( ( void * ) ptr ); */ -extern char * hb_getenv( const char * name ); -extern BOOL hb_setenv( const char * szName, const char * szValue ); /* set or delete (szValue==NULL) environment variable */ -extern char * hb_netname( void ); -extern char * hb_username( void ); +extern char * hb_getenv( const char * name ); +extern HB_BOOL hb_setenv( const char * szName, const char * szValue ); /* set or delete (szValue==NULL) environment variable */ +extern char * hb_netname( void ); +extern char * hb_username( void ); /* Translation related things */ diff --git a/harbour/include/hbapicdp.h b/harbour/include/hbapicdp.h index c518defa9f..561fabb988 100644 --- a/harbour/include/hbapicdp.h +++ b/harbour/include/hbapicdp.h @@ -328,8 +328,8 @@ extern HB_EXPORT void hb_vmSetCDP( PHB_CODEPAGE pCDP ); #define HB_CDP_ENDIAN_LITTLE 1 #define HB_CDP_ENDIAN_BIG 2 -extern HB_EXPORT BOOL hb_cdpRegisterRaw( PHB_CODEPAGE cdp ); -extern HB_EXPORT BOOL hb_cdpRegisterNew( const char * id, +extern HB_EXPORT HB_BOOL hb_cdpRegisterRaw( PHB_CODEPAGE cdp ); +extern HB_EXPORT HB_BOOL hb_cdpRegisterNew( const char * id, const char * info, PHB_UNITABLE uniTable, const char * pszUpper, @@ -342,12 +342,12 @@ extern HB_EXPORT const char * hb_cdpSelectID( const char * id ); extern HB_EXPORT PHB_CODEPAGE hb_cdpFind( const char * id ); extern HB_EXPORT PHB_CODEPAGE hb_cdpFindExt( const char * id ); -extern HB_EXPORT BOOL hb_cdpIsDigit( PHB_CODEPAGE cdp, int iChar ); -extern HB_EXPORT BOOL hb_cdpIsAlpha( PHB_CODEPAGE cdp, int iChar ); -extern HB_EXPORT BOOL hb_cdpIsLower( PHB_CODEPAGE cdp, int iChar ); -extern HB_EXPORT BOOL hb_cdpIsUpper( PHB_CODEPAGE cdp, int iChar ); -extern HB_EXPORT int hb_cdpcmp( const char * szFirst, HB_SIZE ulLenFirst, const char * szSecond, HB_SIZE ulLenSecond, PHB_CODEPAGE cdp, BOOL fExact ); -extern HB_EXPORT int hb_cdpicmp( const char * szFirst, HB_SIZE ulLenFirst, const char * szSecond, HB_SIZE ulLenSecond, PHB_CODEPAGE cdp, BOOL fExact ); +extern HB_EXPORT HB_BOOL hb_cdpIsDigit( PHB_CODEPAGE cdp, int iChar ); +extern HB_EXPORT HB_BOOL hb_cdpIsAlpha( PHB_CODEPAGE cdp, int iChar ); +extern HB_EXPORT HB_BOOL hb_cdpIsLower( PHB_CODEPAGE cdp, int iChar ); +extern HB_EXPORT HB_BOOL hb_cdpIsUpper( PHB_CODEPAGE cdp, int iChar ); +extern HB_EXPORT int hb_cdpcmp( const char * szFirst, HB_SIZE ulLenFirst, const char * szSecond, HB_SIZE ulLenSecond, PHB_CODEPAGE cdp, HB_BOOL fExact ); +extern HB_EXPORT int hb_cdpicmp( const char * szFirst, HB_SIZE ulLenFirst, const char * szSecond, HB_SIZE ulLenSecond, PHB_CODEPAGE cdp, HB_BOOL fExact ); extern HB_EXPORT int hb_cdpchrcmp( char cFirst, char cSecond, PHB_CODEPAGE cdp ); extern HB_EXPORT char * hb_cdpDup( const char *, PHB_CODEPAGE, PHB_CODEPAGE ); @@ -357,30 +357,30 @@ extern HB_EXPORT const char * hb_cdpnDup3( const char *, HB_SIZE, char *, HB_SIZ extern HB_EXPORT HB_SIZE hb_cdpnDupLen( const char *, HB_SIZE, PHB_CODEPAGE, PHB_CODEPAGE ); extern HB_EXPORT HB_SIZE hb_cdpnDup2Len( const char *, HB_SIZE, HB_SIZE, PHB_CODEPAGE, PHB_CODEPAGE ); -extern HB_EXPORT int hb_cdpTranslateChar( int iChar, BOOL fCtrl, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ); +extern HB_EXPORT int hb_cdpTranslateChar( int iChar, HB_BOOL fCtrl, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ); extern HB_EXPORT HB_SIZE hb_cdpTransLen( const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ); extern HB_EXPORT HB_SIZE hb_cdpTransTo( const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ); -extern HB_EXPORT HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, BOOL fCtrl, unsigned char ch ); -extern HB_EXPORT UCHAR hb_cdpGetChar( PHB_CODEPAGE cdp, BOOL fCtrl, HB_WCHAR wc ); -extern HB_EXPORT BOOL hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, unsigned char ch, int * n, HB_WCHAR * pwc ); +extern HB_EXPORT HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch ); +extern HB_EXPORT UCHAR hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ); +extern HB_EXPORT HB_BOOL hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch, int * n, HB_WCHAR * pwc ); extern HB_EXPORT HB_SIZE hb_cdpUTF8StringLength( const char * pSrc, HB_SIZE ulLen ); extern HB_EXPORT HB_SIZE hb_cdpUTF8StringPeek( const char * pSrc, HB_SIZE ulLen, HB_SIZE ulPos ); extern HB_EXPORT char * hb_cdpUTF8StringSubstr( const char * pSrc, HB_SIZE ulLen, HB_SIZE ulFrom, HB_SIZE ulCount, HB_SIZE * pulDest ); -extern HB_EXPORT HB_SIZE hb_cdpUTF8AsStrLen( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); -extern HB_EXPORT HB_SIZE hb_cdpUTF8ToStr( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ); -extern HB_EXPORT HB_SIZE hb_cdpStrAsUTF8Len( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); -extern HB_EXPORT HB_SIZE hb_cdpStrToUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ); +extern HB_EXPORT HB_SIZE hb_cdpUTF8AsStrLen( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); +extern HB_EXPORT HB_SIZE hb_cdpUTF8ToStr( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ); +extern HB_EXPORT HB_SIZE hb_cdpStrAsUTF8Len( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); +extern HB_EXPORT HB_SIZE hb_cdpStrToUTF8( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ); -extern HB_EXPORT HB_SIZE hb_cdpU16AsStrLen( PHB_CODEPAGE cdp, BOOL fCtrl, const HB_WCHAR * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); -extern HB_EXPORT HB_SIZE hb_cdpU16ToStr( PHB_CODEPAGE cdp, BOOL fCtrl, int iEndian, const HB_WCHAR * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ); -extern HB_EXPORT HB_SIZE hb_cdpStrAsU16Len( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); -extern HB_EXPORT HB_SIZE hb_cdpStrToU16( PHB_CODEPAGE cdp, BOOL fCtrl, int iEndian, const char * pSrc, HB_SIZE ulSrc, HB_WCHAR * pDst, HB_SIZE ulDst ); +extern HB_EXPORT HB_SIZE hb_cdpU16AsStrLen( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const HB_WCHAR * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); +extern HB_EXPORT HB_SIZE hb_cdpU16ToStr( PHB_CODEPAGE cdp, HB_BOOL fCtrl, int iEndian, const HB_WCHAR * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ); +extern HB_EXPORT HB_SIZE hb_cdpStrAsU16Len( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ); +extern HB_EXPORT HB_SIZE hb_cdpStrToU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, int iEndian, const char * pSrc, HB_SIZE ulSrc, HB_WCHAR * pDst, HB_SIZE ulDst ); extern HB_EXPORT PHB_ITEM hb_itemDeserializeCP( const char ** pBufferPtr, HB_SIZE * pulSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ); -extern HB_EXPORT char * hb_itemSerializeCP( PHB_ITEM pItem, BOOL fNumSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, HB_SIZE *pulSize ); +extern HB_EXPORT char * hb_itemSerializeCP( PHB_ITEM pItem, HB_BOOL fNumSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, HB_SIZE *pulSize ); #ifdef HB_LEGACY_LEVEL2 extern HB_EXPORT void hb_cdpTranslate( char *, PHB_CODEPAGE, PHB_CODEPAGE ); diff --git a/harbour/include/hbapicls.h b/harbour/include/hbapicls.h index 66651c1a59..ac99247a73 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 BOOL hb_clsHasDestructor( USHORT uiClass ); +extern HB_BOOL hb_clsHasDestructor( 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 BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, PHB_STACK_STATE pStack ); /* create object variable reference */ -extern BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ); -extern BOOL hb_objOperatorCall( USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObject, PHB_ITEM pMsgArg1, PHB_ITEM pMsgArg2 ); +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 void hb_objDestructorCall( PHB_ITEM pObject ); #ifndef HB_NO_PROFILER @@ -114,7 +114,7 @@ extern void hb_mthAddTime( ULONG ); /* profiler from classes.c */ 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 BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ); /* is a class handle inherited from szParentName Class ? */ +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 ); /* object management */ @@ -123,8 +123,8 @@ HB_EXPORT extern USHORT hb_objSetClass( PHB_ITEM pItem, const char * szClass 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 */ -HB_EXPORT extern BOOL hb_objHasMsg( PHB_ITEM pObject, const char * szString ); /* returns TRUE/FALSE whether szString is an existing message for object */ -HB_EXPORT extern BOOL hb_objHasMessage( PHB_ITEM pObject, PHB_DYNS pMessage ); +HB_EXPORT extern HB_BOOL hb_objHasMsg( PHB_ITEM pObject, const char * szString ); /* returns TRUE/FALSE whether szString is an existing message for object */ +HB_EXPORT extern HB_BOOL hb_objHasMessage( PHB_ITEM pObject, PHB_DYNS pMessage ); HB_EXPORT extern PHB_ITEM hb_objSendMsg( PHB_ITEM pObj, const char *sMsg, ULONG ulArg, ... ); HB_EXPORT extern PHB_ITEM hb_objSendMessage( PHB_ITEM pObj, PHB_DYNS pMessage, ULONG ulArg, ... ); diff --git a/harbour/include/hbapidbg.h b/harbour/include/hbapidbg.h index d1cabb1d5f..f60007de54 100644 --- a/harbour/include/hbapidbg.h +++ b/harbour/include/hbapidbg.h @@ -62,7 +62,7 @@ HB_EXTERN_BEGIN /* HVM debugger function */ typedef void (*HB_DBGENTRY_FUNC) ( int , int , const char *, int , PHB_ITEM ); extern HB_DBGENTRY_FUNC hb_dbg_SetEntry( HB_DBGENTRY_FUNC pFunDbgEntry ); -extern BOOL hb_dbg_InvokeDebug( BOOL bInvoke ); +extern HB_BOOL hb_dbg_InvokeDebug( HB_BOOL bInvoke ); extern ULONG hb_dbg_ProcLevel( void ); extern PHB_ITEM hb_dbg_vmVarSGet( PHB_ITEM pStaticsBase, int nOffset ); extern PHB_ITEM hb_dbg_vmVarLGet( int iLevel, int iLocal ); @@ -70,23 +70,23 @@ extern ULONG hb_dbg_vmVarGCount( void ); extern PHB_ITEM hb_dbg_vmVarGGet( int nGlobal, int nOffset ); /* internal debugger function */ -extern void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM pFrame ); -extern void hb_dbgAddBreak( void *handle, const char *cModule, int nLine, const char *szFunction ); -extern void hb_dbgAddWatch( void *handle, const char *szExpr, BOOL bTrace ); -extern void hb_dbgDelBreak( void *handle, int nBreak ); -extern void hb_dbgDelWatch( void *handle, int nWatch ); -extern PHB_ITEM hb_dbgGetExpressionValue( void *handle, const char *expression ); -extern PHB_ITEM hb_dbgGetSourceFiles( void *handle ); -extern PHB_ITEM hb_dbgGetWatchValue( void *handle, int nWatch ); -extern BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule, int nLine ); -extern void hb_dbgSetCBTrace( void *handle, BOOL bCBTrace ); -extern void hb_dbgSetGo( void *handle ); -extern void hb_dbgSetInvoke( void *handle, BOOL ( *pFunInvoke )( void ) ); -extern void hb_dbgSetNextRoutine( void *handle ); -extern void hb_dbgSetQuit( void *handle ); -extern void hb_dbgSetToCursor( void *handle, const char *szModule, int nLine ); -extern void hb_dbgSetTrace( void *handle ); -extern void hb_dbgSetWatch( void *handle, int nWatch, const char *szExpr, BOOL bTrace ); +extern void hb_dbgEntry( int nMode, int nLine, const char * szName, int nIndex, PHB_ITEM pFrame ); +extern void hb_dbgAddBreak( void * handle, const char * cModule, int nLine, const char * szFunction ); +extern void hb_dbgAddWatch( void * handle, const char * szExpr, HB_BOOL bTrace ); +extern void hb_dbgDelBreak( void * handle, int nBreak ); +extern void hb_dbgDelWatch( void * handle, int nWatch ); +extern PHB_ITEM hb_dbgGetExpressionValue( void * handle, const char *expression ); +extern PHB_ITEM hb_dbgGetSourceFiles( void * handle ); +extern PHB_ITEM hb_dbgGetWatchValue( void * handle, int nWatch ); +extern HB_BOOL hb_dbgIsValidStopLine( void * handle, const char *szModule, int nLine ); +extern void hb_dbgSetCBTrace( void * handle, HB_BOOL bCBTrace ); +extern void hb_dbgSetGo( void * handle ); +extern void hb_dbgSetInvoke( void * handle, HB_BOOL ( *pFunInvoke )( void ) ); +extern void hb_dbgSetNextRoutine( void * handle ); +extern void hb_dbgSetQuit( void * handle ); +extern void hb_dbgSetToCursor( void * handle, const char * szModule, int nLine ); +extern void hb_dbgSetTrace( void * handle ); +extern void hb_dbgSetWatch( void * handle, int nWatch, const char * szExpr, HB_BOOL bTrace ); HB_EXTERN_END diff --git a/harbour/include/hbapifs.h b/harbour/include/hbapifs.h index 4f0399cf13..0713dee87d 100644 --- a/harbour/include/hbapifs.h +++ b/harbour/include/hbapifs.h @@ -154,7 +154,7 @@ HB_EXTERN_BEGIN HB_FA_POSIX_USR(a) | \ HB_FA_POSIX_SID(a) ) -extern HB_EXPORT BOOL hb_fsChDir ( const char * pszDirName ); /* change working directory */ +extern HB_EXPORT HB_BOOL hb_fsChDir ( const char * pszDirName ); /* change working directory */ extern HB_EXPORT HB_ERRCODE hb_fsChDrv ( BYTE nDrive ); /* change working drive */ 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 */ @@ -166,40 +166,40 @@ extern HB_EXPORT const char * hb_fsCurDir ( USHORT uiDrive ); /* retrieve a s extern HB_EXPORT HB_ERRCODE hb_fsCurDirBuff ( USHORT uiDrive, char * pbyBuffer, HB_SIZE ulLen ); /* copy current directory for given drive into a buffer */ extern HB_EXPORT void hb_fsBaseDirBuff ( char * pbyBuffer ); /* retrieve the base dir of the executable */ extern HB_EXPORT BYTE hb_fsCurDrv ( void ); /* retrieve current drive number */ -extern HB_EXPORT BOOL hb_fsDelete ( const char * pszFileName ); /* delete a file */ -extern HB_EXPORT BOOL hb_fsEof ( HB_FHANDLE hFileHandle ); /* determine if an open file is position at end-of-file */ +extern HB_EXPORT HB_BOOL hb_fsDelete ( const char * pszFileName ); /* delete a file */ +extern HB_EXPORT HB_BOOL hb_fsEof ( HB_FHANDLE hFileHandle ); /* determine if an open file is position at end-of-file */ extern HB_EXPORT HB_ERRCODE hb_fsError ( void ); /* retrieve file system error */ extern HB_EXPORT HB_ERRCODE hb_fsOsError ( void ); /* retrieve system dependant file system error */ -extern HB_EXPORT BOOL hb_fsFile ( const char * pszFileName ); /* determine if a file exists */ -extern HB_EXPORT BOOL hb_fsIsDirectory ( const char * pszFilename ); -extern HB_EXPORT HB_FOFFSET hb_fsFSize ( const char * pszFileName, BOOL bUseDirEntry ); /* determine the size of a file */ +extern HB_EXPORT HB_BOOL hb_fsFile ( const char * pszFileName ); /* determine if a file exists */ +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 */ 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 */ extern HB_EXPORT HB_ERRCODE hb_fsIsDrv ( BYTE nDrive ); /* determine if a drive number is a valid drive */ -extern HB_EXPORT BOOL hb_fsIsDevice ( HB_FHANDLE hFileHandle ); /* determine if a file is attached to a device (console?) */ -extern HB_EXPORT BOOL hb_fsLock ( HB_FHANDLE hFileHandle, ULONG ulStart, ULONG ulLength, USHORT uiMode ); /* request a lock on a portion of a file */ -extern HB_EXPORT BOOL hb_fsLockLarge ( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, +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, ULONG ulStart, ULONG ulLength, 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 */ -extern HB_EXPORT BOOL hb_fsMkDir ( const char * pszDirName ); /* create a directory */ +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 ULONG hb_fsReadLarge ( HB_FHANDLE hFileHandle, void * pBuff, ULONG ulCount ); /* read contents of a file into a buffer (>64K) */ extern HB_EXPORT ULONG hb_fsReadAt ( HB_FHANDLE hFileHandle, void * pBuff, ULONG ulCount, HB_FOFFSET llOffset ); /* read from given offset contents of a file into a buffer (>64K) */ -extern HB_EXPORT BOOL hb_fsRmDir ( const char * pszDirName ); /* remove a directory */ -extern HB_EXPORT BOOL hb_fsRename ( const char * pszOldName, const char * pszNewName ); /* rename a file */ +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 ULONG hb_fsSeek ( HB_FHANDLE hFileHandle, LONG 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 ULONG 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 BOOL hb_fsGetFileTime ( const char * pszFileName, long * plJulian, long * plMillisec ); -extern HB_EXPORT BOOL hb_fsSetFileTime ( const char * pszFileName, long lJulian, long lMillisec ); -extern HB_EXPORT BOOL hb_fsGetAttr ( const char * pszFileName, HB_FATTR * pulAttr ); -extern HB_EXPORT BOOL hb_fsSetAttr ( const char * pszFileName, HB_FATTR ulAttr ); +extern HB_EXPORT HB_BOOL hb_fsGetFileTime ( const char * pszFileName, long * plJulian, long * plMillisec ); +extern HB_EXPORT HB_BOOL hb_fsSetFileTime ( const char * pszFileName, long lJulian, long lMillisec ); +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 ( BOOL fResult, USHORT uiOperation ); /* set the file system error number after IO operation */ -extern HB_EXPORT BOOL hb_fsTruncAt ( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset ); /* truncate file to given size */ +extern HB_EXPORT void hb_fsSetIOError ( HB_BOOL fResult, 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 ULONG hb_fsWriteLarge ( HB_FHANDLE hFileHandle, const void * pBuff, ULONG ulCount ); /* write to an open file from a buffer (>64K) */ extern HB_EXPORT ULONG hb_fsWriteAt ( HB_FHANDLE hFileHandle, const void * pBuff, ULONG ulCount, HB_FOFFSET llOffset ); /* write to an open file at given offset from a buffer (>64K) */ @@ -207,10 +207,10 @@ extern HB_EXPORT HB_FHANDLE hb_fsPOpen ( const char * pFilename, const cha extern HB_EXPORT HB_FHANDLE hb_fsGetOsHandle ( HB_FHANDLE hFileHandle ); extern HB_EXPORT HB_ERRCODE hb_fsGetFError ( void ); /* get FERROR() flag */ extern HB_EXPORT void hb_fsSetFError ( HB_ERRCODE uiError ); /* set FERROR() flag */ -extern HB_EXPORT BOOL hb_fsNameExists ( const char * pszFileName ); /* check if a name exists in the filesystem (wildcard chars not accepted). */ -extern HB_EXPORT BOOL hb_fsFileExists ( const char * pszFileName ); /* check if a file exists (wildcard chars not accepted). */ -extern HB_EXPORT BOOL hb_fsDirExists ( const char * pszDirName ); /* check if a directory exists (wildcard chars not accepted). */ -extern HB_EXPORT BOOL hb_fsCopy ( const char * pSource, const char * pDest ); +extern HB_EXPORT HB_BOOL hb_fsNameExists ( const char * pszFileName ); /* check if a name exists in the filesystem (wildcard chars not accepted). */ +extern HB_EXPORT HB_BOOL hb_fsFileExists ( const char * pszFileName ); /* check if a file exists (wildcard chars not accepted). */ +extern HB_EXPORT HB_BOOL hb_fsDirExists ( const char * pszDirName ); /* check if a directory exists (wildcard chars not accepted). */ +extern HB_EXPORT HB_BOOL hb_fsCopy ( const char * pSource, const char * pDest ); #define hb_fsFLock( h, s, l ) hb_fsLock( h, s, l, FL_LOCK ) #define hb_fsFUnlock( h, s, l ) hb_fsLock( h, s, l, FL_UNLOCK ) @@ -255,14 +255,14 @@ typedef struct _HB_PATHNAMES { char * szPath; struct _HB_PATHNAMES * pNext; - BOOL fFree; + HB_BOOL fFree; } HB_PATHNAMES; extern HB_EXPORT void hb_fsAddSearchPath( const char * szPath, HB_PATHNAMES ** pSearchList ); extern HB_EXPORT void hb_fsFreeSearchPath( HB_PATHNAMES * pSearchList ); -extern HB_EXPORT BOOL hb_spFile( const char * pFilename, char * pRetPath ); -extern HB_EXPORT BOOL hb_spFileExists( const char * pFilename, char * pRetPath ); +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_spCreate( const char * pFilename, HB_FATTR ulAttr ); extern HB_EXPORT HB_FHANDLE hb_spCreateEx( const char * pFilename, HB_FATTR ulAttr, USHORT uiFlags ); @@ -281,7 +281,7 @@ typedef struct const char * pszFileMask; HB_FATTR attrmask; - BOOL bFirst; + HB_BOOL bFirst; void * info; /* Pointer to the platform specific find info */ @@ -289,28 +289,28 @@ typedef struct /* File Find API functions */ extern HB_EXPORT PHB_FFIND hb_fsFindFirst( const char * pszFileName, HB_FATTR ulAttrMask ); -extern HB_EXPORT BOOL hb_fsFindNext( PHB_FFIND ffind ); +extern HB_EXPORT HB_BOOL hb_fsFindNext( PHB_FFIND ffind ); extern HB_EXPORT void hb_fsFindClose( PHB_FFIND ffind ); /* functions to create, wait and terminate processes */ extern HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, HB_FHANDLE *phStdin, HB_FHANDLE *phStdout, HB_FHANDLE *phStderr, - BOOL fDetach, ULONG *pulPID ); + HB_BOOL fDetach, ULONG *pulPID ); extern int hb_fsProcessRun( const char *pszFilename, const char * pStdInBuf, HB_SIZE ulStdInLen, char ** pStdOutPtr, HB_SIZE * pulStdOut, char ** pStdErrPtr, HB_SIZE * pulStdErr, - BOOL fDetach ); -extern int hb_fsProcessValue( HB_FHANDLE hProcess, BOOL fWait ); -extern BOOL hb_fsProcessClose( HB_FHANDLE hProcess, BOOL fGentle ); + HB_BOOL fDetach ); +extern int hb_fsProcessValue( HB_FHANDLE hProcess, HB_BOOL fWait ); +extern HB_BOOL hb_fsProcessClose( HB_FHANDLE hProcess, HB_BOOL fGentle ); /* Misc helper functions */ extern HB_FATTR hb_fsAttrFromRaw( HB_FATTR raw_attr ); extern HB_FATTR hb_fsAttrToRaw( HB_FATTR ulAttr ); extern HB_FATTR hb_fsAttrEncode( const char * szAttr ); extern char * hb_fsAttrDecode( HB_FATTR ulAttr, char * szAttr ); -extern HB_EXPORT BOOL hb_fsMaxFilesError( void ); +extern HB_EXPORT HB_BOOL hb_fsMaxFilesError( void ); extern HB_EXPORT const char * hb_fsNameConv( const char * szFileName, char ** pszFree ); /* Harbour file functions with shared file handles and locks @@ -323,32 +323,32 @@ extern HB_EXPORT const char * hb_fsNameConv( const char * szFileName, char ** ps typedef struct _HB_FILE_FUNCS { - BOOL (* Accept ) ( const char * pszFilename ); - BOOL (* Exists ) ( const char * pszFilename, char * pRetPath ); - BOOL (* Delete ) ( const char * pszFilename ); - BOOL (* Rename ) ( const char * pszFilename, const char * pszNewName ); + HB_BOOL (* Accept ) ( const char * pszFilename ); + HB_BOOL (* Exists ) ( const char * pszFilename, char * pRetPath ); + 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, PHB_ITEM pError ); void (* Close ) ( PHB_FILE pFile ); - BOOL (* Lock ) ( PHB_FILE, HB_FOFFSET ulStart, HB_FOFFSET ulLen, int iType ); + HB_BOOL (* Lock ) ( PHB_FILE, HB_FOFFSET ulStart, HB_FOFFSET ulLen, int iType ); ULONG (* ReadAt ) ( PHB_FILE pFile, void * buffer, ULONG ulSize, HB_FOFFSET llOffset ); ULONG (* WriteAt ) ( PHB_FILE pFile, const void * buffer, ULONG ulSize, HB_FOFFSET llOffset ); - BOOL (* TruncAt ) ( PHB_FILE pFile, HB_FOFFSET llOffset ); + HB_BOOL (* TruncAt ) ( PHB_FILE pFile, HB_FOFFSET llOffset ); HB_FOFFSET (* Size ) ( PHB_FILE pFile ); void (* Commit ) ( PHB_FILE pFile ); HB_FHANDLE (* Handle ) ( PHB_FILE pFile ); } HB_FILE_FUNCS; - extern HB_EXPORT BOOL hb_fileRegister( const HB_FILE_FUNCS * pFuncs ); + extern HB_EXPORT HB_BOOL hb_fileRegister( const HB_FILE_FUNCS * pFuncs ); #else typedef void * PHB_FILE; #endif -extern HB_EXPORT BOOL hb_fileExists( const char * pFilename, char * pRetPath ); -extern HB_EXPORT BOOL hb_fileDelete( const char * pFilename ); -extern HB_EXPORT BOOL hb_fileRename( const char * pFilename, const char * pszNewName ); +extern HB_EXPORT HB_BOOL hb_fileExists( const char * pFilename, char * pRetPath ); +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, PHB_ITEM pError ); @@ -360,10 +360,10 @@ extern HB_EXPORT PHB_FILE hb_fileCreateTempEx( char * pszName, const char * pszExt, HB_FATTR ulAttr ); extern HB_EXPORT void hb_fileClose( PHB_FILE pFile ); -extern HB_EXPORT BOOL hb_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, int iType ); +extern HB_EXPORT HB_BOOL hb_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, int iType ); extern HB_EXPORT ULONG hb_fileReadAt( PHB_FILE pFile, void * buffer, ULONG ulSize, HB_FOFFSET llOffset ); extern HB_EXPORT ULONG hb_fileWriteAt( PHB_FILE pFile, const void * buffer, ULONG ulSize, HB_FOFFSET llOffset ); -extern HB_EXPORT BOOL hb_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset ); +extern HB_EXPORT HB_BOOL hb_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset ); extern HB_EXPORT HB_FOFFSET hb_fileSize( PHB_FILE pFile ); extern HB_EXPORT void hb_fileCommit( PHB_FILE pFile ); extern HB_EXPORT HB_FHANDLE hb_fileHandle( PHB_FILE pFile ); diff --git a/harbour/include/hbapigt.h b/harbour/include/hbapigt.h index fc6cd89ed3..4a36d975cb 100644 --- a/harbour/include/hbapigt.h +++ b/harbour/include/hbapigt.h @@ -161,7 +161,7 @@ extern HB_EXPORT void * hb_gtAlloc( void * hGT ); extern HB_EXPORT void hb_gtRelease( void * hGT ); extern HB_EXPORT void hb_gtAttach( void * hGT ); extern HB_EXPORT void * hb_gtSwap( void * hGT ); -extern HB_EXPORT BOOL hb_gtReload( const char * szGtName, +extern HB_EXPORT HB_BOOL hb_gtReload( const char * szGtName, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFilenoStdout, HB_FHANDLE hFilenoStderr ); @@ -185,11 +185,11 @@ extern HB_EXPORT HB_ERRCODE hb_gtDispBegin( void ); extern HB_EXPORT int hb_gtDispCount( void ); extern HB_EXPORT HB_ERRCODE hb_gtDispEnd( void ); extern HB_EXPORT HB_ERRCODE hb_gtDrawShadow( int iTop, int iLeft, int iBottom, int iRight, int iColor ); -extern HB_EXPORT HB_ERRCODE hb_gtGetBlink( BOOL * pbBlink ); +extern HB_EXPORT HB_ERRCODE hb_gtGetBlink( HB_BOOL * pbBlink ); extern HB_EXPORT HB_ERRCODE hb_gtGetColorStr( char * pszColorString ); extern HB_EXPORT HB_ERRCODE hb_gtGetCursor( int * piCursorShape ); extern HB_EXPORT HB_ERRCODE hb_gtGetPos( int * piRow, int * piCol ); -extern HB_EXPORT BOOL hb_gtIsColor( void ); +extern HB_EXPORT HB_BOOL hb_gtIsColor( void ); extern HB_EXPORT int hb_gtMaxCol( void ); extern HB_EXPORT int hb_gtMaxRow( void ); extern HB_EXPORT HB_ERRCODE hb_gtPostExt( void ); @@ -209,12 +209,12 @@ extern HB_EXPORT HB_ERRCODE hb_gtScrDim( int * piHeight, int * piWidth ); extern HB_EXPORT HB_ERRCODE hb_gtScroll( int iTop, int iLeft, int iBottom, int iRight, int iRows, int iCols ); extern HB_EXPORT HB_ERRCODE hb_gtScrollUp( int iRows ); extern HB_EXPORT HB_ERRCODE hb_gtSetAttribute( int iTop, int iLeft, int iBottom, int iRight, int iColor ); -extern HB_EXPORT HB_ERRCODE hb_gtSetBlink( BOOL bBlink ); +extern HB_EXPORT HB_ERRCODE hb_gtSetBlink( HB_BOOL bBlink ); extern HB_EXPORT HB_ERRCODE hb_gtSetColorStr( const char * pszColorString ); extern HB_EXPORT HB_ERRCODE hb_gtSetCursor( int iCursorShape ); extern HB_EXPORT HB_ERRCODE hb_gtSetMode( int iRows, int iCols ); extern HB_EXPORT HB_ERRCODE hb_gtSetPos( int iRow, int iCol ); -extern HB_EXPORT HB_ERRCODE hb_gtSetSnowFlag( BOOL bNoSnow ); +extern HB_EXPORT HB_ERRCODE hb_gtSetSnowFlag( HB_BOOL bNoSnow ); extern HB_EXPORT HB_ERRCODE hb_gtTone( double dFrequency, double dDuration ); extern HB_EXPORT HB_ERRCODE hb_gtWrite( const char * szStr, HB_SIZE ulLen ); extern HB_EXPORT HB_ERRCODE hb_gtWriteAt( int iRow, int iCol, const char * szStr, HB_SIZE ulLen ); @@ -223,7 +223,7 @@ extern HB_EXPORT HB_ERRCODE hb_gtPutText( int iRow, int iCol, const char * szStr extern HB_EXPORT const char * hb_gtVersion( int iType ); extern HB_EXPORT HB_ERRCODE hb_gtOutStd( const char * szStr, HB_SIZE ulLen ); extern HB_EXPORT HB_ERRCODE hb_gtOutErr( const char * szStr, HB_SIZE ulLen ); -extern HB_EXPORT HB_ERRCODE hb_gtSetDispCP( const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ); +extern HB_EXPORT HB_ERRCODE hb_gtSetDispCP( const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ); extern HB_EXPORT HB_ERRCODE hb_gtSetKeyCP( const char * pszTermCDP, const char * pszHostCDP ); extern HB_EXPORT HB_ERRCODE hb_gtInfo( int iType, PHB_GT_INFO pInfo ); extern HB_EXPORT int hb_gtAlert( PHB_ITEM pMessage, PHB_ITEM pOptions, int iClrNorm, int iClrHigh, double dDelay ); @@ -242,9 +242,9 @@ extern HB_EXPORT HB_ERRCODE hb_gtBoxEx( int iTop, int iLeft, int iBottom, int iR extern HB_EXPORT int hb_gtGfxPrimitive( int iType, int iTop, int iLeft, int iBottom, int iRight, int iColor ); extern HB_EXPORT HB_ERRCODE hb_gtGfxText( int iTop, int iLeft, const char * szText, int iColor, int iSize, int iWidth ); -extern HB_EXPORT BOOL hb_mouseIsPresent( void ); -extern HB_EXPORT BOOL hb_mouseGetCursor( void ); -extern HB_EXPORT void hb_mouseSetCursor( BOOL bVisible ); +extern HB_EXPORT HB_BOOL hb_mouseIsPresent( void ); +extern HB_EXPORT HB_BOOL hb_mouseGetCursor( void ); +extern HB_EXPORT void hb_mouseSetCursor( HB_BOOL bVisible ); extern HB_EXPORT int hb_mouseCol( void ); extern HB_EXPORT int hb_mouseRow( void ); extern HB_EXPORT void hb_mouseGetPos( int * piRow, int * piCol ); @@ -257,9 +257,9 @@ extern HB_EXPORT void hb_mouseRestoreState( const void * pBuffer ); extern HB_EXPORT int hb_mouseGetDoubleClickSpeed( void ); extern HB_EXPORT void hb_mouseSetDoubleClickSpeed( int iSpeed ); extern HB_EXPORT int hb_mouseCountButton( void ); -extern HB_EXPORT BOOL hb_mouseButtonState( int iButton ); -extern HB_EXPORT BOOL hb_mouseButtonPressed( int iButton, int * piRow, int * piCol ); -extern HB_EXPORT BOOL hb_mouseButtonReleased( int iButton, int * piRow, int * piCol ); +extern HB_EXPORT HB_BOOL hb_mouseButtonState( int iButton ); +extern HB_EXPORT HB_BOOL hb_mouseButtonPressed( int iButton, int * piRow, int * piCol ); +extern HB_EXPORT HB_BOOL hb_mouseButtonReleased( int iButton, int * piRow, int * piCol ); extern HB_EXPORT int hb_mouseReadKey( int iEventMask ); typedef struct @@ -286,11 +286,11 @@ typedef HB_GT_CORD * PHB_GT_CORD; extern HB_EXPORT void hb_gtWCreate( HB_GT_RECT * rect, HB_GT_WND ** wnd ); extern HB_EXPORT void hb_gtWDestroy( HB_GT_WND * wnd ); -extern HB_EXPORT BOOL hb_gtWFlash( void ); +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 BOOL hb_gtWVis( HB_GT_WND * wnd, USHORT uiStatus ); +extern HB_EXPORT HB_BOOL hb_gtWVis( HB_GT_WND * wnd, USHORT uiStatus ); extern HB_EXPORT HB_ERRCODE hb_gtSLR( HB_GT_SLR * pSLR ); /* System Level Request */ extern HB_EXPORT HB_ERRCODE hb_gtModalRead( void * ); @@ -309,7 +309,7 @@ extern HB_EXPORT HB_ERRCODE hb_gtSetBorder( HB_GT_RGB * color ); #define INKEY_RAW 256 /* Minimally Decoded Keyboard Events */ /* Harbour keyboard support functions */ -extern HB_EXPORT int hb_inkey( BOOL bWait, double dSeconds, int iEvenMask ); /* Wait for keyboard input */ +extern HB_EXPORT int hb_inkey( HB_BOOL bWait, double dSeconds, int iEvenMask ); /* Wait for keyboard input */ extern HB_EXPORT void hb_inkeyPut( int ch ); /* Inserts an inkey code into the keyboard buffer */ extern HB_EXPORT void hb_inkeyIns( int ch ); /* Inserts an inkey code into the keyboard buffer */ extern HB_EXPORT int hb_inkeyLast( int iEvenMask ); /* Return the value of the last key that was extracted */ diff --git a/harbour/include/hbapiitm.h b/harbour/include/hbapiitm.h index 3504e44530..ecc790eb4b 100644 --- a/harbour/include/hbapiitm.h +++ b/harbour/include/hbapiitm.h @@ -66,15 +66,15 @@ typedef struct } HB_EVALINFO, * PHB_EVALINFO; extern HB_EXPORT PHB_ITEM hb_evalLaunch ( PHB_EVALINFO pEvalInfo ); -extern HB_EXPORT BOOL hb_evalNew ( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_evalPutParam ( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_evalRelease ( PHB_EVALINFO pEvalInfo ); +extern HB_EXPORT HB_BOOL hb_evalNew ( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_evalPutParam ( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_evalRelease ( PHB_EVALINFO pEvalInfo ); extern HB_EXPORT void hb_evalBlock( PHB_ITEM pCodeBlock, ... ); extern HB_EXPORT void hb_evalBlock0( PHB_ITEM pCodeBlock ); extern HB_EXPORT void hb_evalBlock1( PHB_ITEM pCodeBlock, PHB_ITEM pParam ); -extern HB_EXPORT BOOL hb_execFromArray ( PHB_ITEM pParam ); +extern HB_EXPORT HB_BOOL hb_execFromArray ( PHB_ITEM pParam ); extern HB_EXPORT PHB_ITEM hb_itemDo ( PHB_ITEM pItem, ULONG ulPCount, ... ); extern HB_EXPORT PHB_ITEM hb_itemDoC ( const char * szFunc, ULONG ulPCount, ... ); @@ -83,7 +83,7 @@ extern HB_EXPORT PHB_ITEM hb_itemArrayGet ( PHB_ITEM pArray, HB_SIZE ulInde extern HB_EXPORT PHB_ITEM hb_itemArrayNew ( HB_SIZE ulLen ); extern HB_EXPORT PHB_ITEM hb_itemArrayPut ( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); extern HB_EXPORT HB_SIZE hb_itemCopyC ( PHB_ITEM pItem, char * szBuffer, HB_SIZE ulLen ); -extern HB_EXPORT BOOL hb_itemFreeC ( char * szText ); +extern HB_EXPORT HB_BOOL hb_itemFreeC ( char * szText ); extern HB_EXPORT char * hb_itemGetC ( PHB_ITEM pItem ); extern HB_EXPORT const char * hb_itemGetCPtr ( PHB_ITEM pItem ); extern HB_EXPORT HB_SIZE hb_itemGetCLen ( PHB_ITEM pItem ); @@ -91,8 +91,8 @@ extern HB_EXPORT char * hb_itemGetDS ( PHB_ITEM pItem, char * szDate ) extern HB_EXPORT char * hb_itemGetTS ( PHB_ITEM pItem, char * szDateTime ); extern HB_EXPORT long hb_itemGetDL ( PHB_ITEM pItem ); extern HB_EXPORT double hb_itemGetTD ( PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_itemGetTDT ( PHB_ITEM pItem, long * plJulian, long * plMilliSec ); -extern HB_EXPORT BOOL hb_itemGetL ( PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_itemGetTDT ( PHB_ITEM pItem, long * plJulian, long * plMilliSec ); +extern HB_EXPORT HB_BOOL hb_itemGetL ( PHB_ITEM pItem ); extern HB_EXPORT double hb_itemGetND ( PHB_ITEM pItem ); extern HB_EXPORT double hb_itemGetNDDec ( PHB_ITEM pItem, int * piDec ); extern HB_EXPORT int hb_itemGetNI ( PHB_ITEM pItem ); @@ -119,7 +119,7 @@ extern HB_EXPORT PHB_ITEM hb_itemPutTS ( PHB_ITEM pItem, const char * sz extern HB_EXPORT PHB_ITEM hb_itemPutDL ( PHB_ITEM pItem, long lJulian ); extern HB_EXPORT PHB_ITEM hb_itemPutTD ( PHB_ITEM pItem, double dTimeStamp ); extern HB_EXPORT PHB_ITEM hb_itemPutTDT ( PHB_ITEM pItem, long lJulian, long lMilliSec ); -extern HB_EXPORT PHB_ITEM hb_itemPutL ( PHB_ITEM pItem, BOOL bValue ); +extern HB_EXPORT PHB_ITEM hb_itemPutL ( PHB_ITEM pItem, HB_BOOL bValue ); extern HB_EXPORT PHB_ITEM hb_itemPutND ( PHB_ITEM pItem, double dNumber ); extern HB_EXPORT PHB_ITEM hb_itemPutNI ( PHB_ITEM pItem, int iNumber ); extern HB_EXPORT PHB_ITEM hb_itemPutNL ( PHB_ITEM pItem, long lNumber ); @@ -134,7 +134,7 @@ extern HB_EXPORT PHB_ITEM hb_itemPutNumType( PHB_ITEM pItem, double dNumber, extern HB_EXPORT PHB_ITEM hb_itemPutPtr ( PHB_ITEM pItem, void * pValue ); extern HB_EXPORT PHB_ITEM hb_itemPutPtrGC ( PHB_ITEM pItem, void * pValue ); extern HB_EXPORT PHB_ITEM hb_itemPutSymbol ( PHB_ITEM pItem, PHB_SYMB pSym ); -extern HB_EXPORT BOOL hb_itemRelease ( PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_itemRelease ( PHB_ITEM pItem ); extern HB_EXPORT PHB_ITEM hb_itemReturn ( PHB_ITEM pItem ); extern HB_EXPORT PHB_ITEM hb_itemReturnForward( PHB_ITEM pItem ); extern HB_EXPORT void hb_itemReturnRelease( PHB_ITEM pItem ); @@ -150,10 +150,10 @@ extern HB_EXPORT PHB_ITEM hb_itemPutNLLLen ( PHB_ITEM pItem, LONGLONG lNumbe /* Non Clipper compliant internal API */ extern HB_EXPORT PHB_ITEM hb_itemParamPtr ( USHORT uiParam, long lMask ); -extern HB_EXPORT BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ); -extern HB_EXPORT int hb_itemStrCmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */ -extern HB_EXPORT int hb_itemStrICmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */ +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 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 */ extern HB_EXPORT void hb_itemCopyToRef ( PHB_ITEM pDest, PHB_ITEM pSource ); extern HB_EXPORT void hb_itemCopyFromRef( PHB_ITEM pDest, PHB_ITEM pSource ); @@ -169,17 +169,17 @@ extern HB_EXPORT PHB_ITEM hb_itemUnRefWrite( PHB_ITEM pItem, PHB_ITEM pSourc extern HB_EXPORT PHB_ITEM hb_itemUnShare ( PHB_ITEM pItem ); /* un-share given string item */ extern HB_EXPORT PHB_ITEM hb_itemUnShareString( PHB_ITEM pItem ); /* un-share given string item - the pItem have to be valid unrefed string item */ extern HB_EXPORT PHB_ITEM hb_itemReSizeString( PHB_ITEM pItem, HB_SIZE ulSize ); /* Resize string buffer of given string item - the pItem have to be valid unrefed string item */ -extern HB_EXPORT BOOL hb_itemGetWriteCL( PHB_ITEM pItem, char ** pszValue, HB_SIZE * pulLen ); +extern HB_EXPORT HB_BOOL hb_itemGetWriteCL( PHB_ITEM pItem, char ** pszValue, HB_SIZE * pulLen ); extern HB_EXPORT PHB_ITEM hb_itemClone ( PHB_ITEM pItem ); /* clone the given item */ extern HB_EXPORT PHB_ITEM hb_itemCloneTo ( PHB_ITEM pDest, PHB_ITEM pSource ); /* clone the given item */ extern HB_EXPORT char * hb_itemStr ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert a number to a string */ -extern HB_EXPORT char * hb_itemString ( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ); /* Convert any scalar to a string */ -extern HB_EXPORT BOOL hb_itemStrBuf ( char *szResult, PHB_ITEM pNumber, int iSize, int iDec ); /* convert a number to a string */ +extern HB_EXPORT char * hb_itemString ( PHB_ITEM pItem, HB_SIZE * ulLen, HB_BOOL * bFreeReq ); /* Convert any scalar to a string */ +extern HB_EXPORT HB_BOOL hb_itemStrBuf ( char *szResult, PHB_ITEM pNumber, int iSize, int iDec ); /* convert a number to a string */ extern HB_EXPORT PHB_ITEM hb_itemValToStr ( PHB_ITEM pItem ); /* Convert any scalar to a string */ -extern HB_EXPORT char * hb_itemPadConv ( PHB_ITEM pItem, HB_SIZE * pulSize, BOOL * bFreeReq ); +extern HB_EXPORT char * hb_itemPadConv ( PHB_ITEM pItem, HB_SIZE * pulSize, HB_BOOL * bFreeReq ); extern HB_EXPORT void hb_itemSwap ( PHB_ITEM pItem1, PHB_ITEM pItem2 ); -extern HB_EXPORT char * hb_itemSerialize( PHB_ITEM pItem, BOOL fNumSize, ULONG * pulSize ); +extern HB_EXPORT char * hb_itemSerialize( PHB_ITEM pItem, HB_BOOL fNumSize, ULONG * pulSize ); extern HB_EXPORT PHB_ITEM hb_itemDeserialize( const char ** pBufferPtr, ULONG * pulSize ); #if defined( _HB_API_INTERNAL_ ) diff --git a/harbour/include/hbapilng.h b/harbour/include/hbapilng.h index fbed44911a..17b9067a59 100644 --- a/harbour/include/hbapilng.h +++ b/harbour/include/hbapilng.h @@ -83,8 +83,8 @@ extern HB_EXPORT void hb_vmSetLang( PHB_LANG pLang ); /* Supported language list management */ -extern HB_EXPORT BOOL hb_langRegister ( PHB_LANG lang ); -extern HB_EXPORT BOOL hb_langDeRegister ( const char * pszID ); +extern HB_EXPORT HB_BOOL hb_langRegister ( PHB_LANG lang ); +extern HB_EXPORT HB_BOOL hb_langDeRegister ( const char * pszID ); extern HB_EXPORT PHB_LANG hb_langFind ( const char * pszID ); /* Default language selection and data query */ diff --git a/harbour/include/hbapistr.h b/harbour/include/hbapistr.h index bac5966b45..8f8b9bc80b 100644 --- a/harbour/include/hbapistr.h +++ b/harbour/include/hbapistr.h @@ -93,13 +93,13 @@ extern HB_EXPORT const char * hb_arrayGetStr( PHB_ITEM pArray, HB_SIZE ulIndex, extern HB_EXPORT const char * hb_arrayGetStrUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, void ** phString, HB_SIZE * pulLen ); extern HB_EXPORT const HB_WCHAR * hb_arrayGetStrU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, void ** phString, HB_SIZE * pulLen ); -extern HB_EXPORT BOOL hb_arraySetStrLen( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, const char * pStr, HB_SIZE ulLen ); -extern HB_EXPORT BOOL hb_arraySetStrLenUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, const char * pStr, HB_SIZE ulLen ); -extern HB_EXPORT BOOL hb_arraySetStrLenU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, const HB_WCHAR * pStr, HB_SIZE ulLen ); +extern HB_EXPORT HB_BOOL hb_arraySetStrLen( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, const char * pStr, HB_SIZE ulLen ); +extern HB_EXPORT HB_BOOL hb_arraySetStrLenUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, const char * pStr, HB_SIZE ulLen ); +extern HB_EXPORT HB_BOOL hb_arraySetStrLenU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, const HB_WCHAR * pStr, HB_SIZE ulLen ); -extern HB_EXPORT BOOL hb_arraySetStr( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, const char * pStr ); -extern HB_EXPORT BOOL hb_arraySetStrUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, const char * pStr); -extern HB_EXPORT BOOL hb_arraySetStrU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, const HB_WCHAR * pStr ); +extern HB_EXPORT HB_BOOL hb_arraySetStr( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, const char * pStr ); +extern HB_EXPORT HB_BOOL hb_arraySetStrUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, const char * pStr ); +extern HB_EXPORT HB_BOOL hb_arraySetStrU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, const HB_WCHAR * pStr ); extern HB_EXPORT const char * hb_parstr( int iParam, void * cdp, void ** phString, HB_SIZE * pulLen ); diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index 695f67bead..c5fb431033 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -140,7 +140,7 @@ extern int hb_compVariableScope( HB_COMP_DECL, const char * ); #define FUN_ATTACHED 0x0200 /* function attached to function list */ extern void hb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cScope, int iType ); /* starts a new Clipper language function definition */ -extern BOOL hb_compFunCallCheck( HB_COMP_DECL, const char *, int ); +extern HB_BOOL hb_compFunCallCheck( HB_COMP_DECL, const char *, int ); extern PINLINE hb_compInlineAdd( HB_COMP_DECL, const char * szFunName, int iLine ); extern void hb_compFunctionMarkStatic( HB_COMP_DECL, const char * szFunName ); @@ -168,7 +168,7 @@ extern void hb_compGenBreak( HB_COMP_DECL ); /* generate code for BREAK stateme extern void hb_compExternAdd( HB_COMP_DECL, const char * szExternName, HB_SYMBOLSCOPE cScope ); /* defines a new extern name */ -extern void hb_compModuleAdd( HB_COMP_DECL, const char * szModuleName, BOOL fForce ); +extern void hb_compModuleAdd( HB_COMP_DECL, const char * szModuleName, HB_BOOL fForce ); extern void hb_compRTVariableKill( HB_COMP_DECL, PFUNCTION ); extern void hb_compSwitchKill( HB_COMP_DECL, PFUNCTION ); @@ -178,7 +178,7 @@ extern void hb_compLoopKill( PFUNCTION ); extern void hb_compGenError( HB_COMP_DECL, const char * szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 ); /* generic parsing error management function */ extern void hb_compGenWarning( HB_COMP_DECL, const char * szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2); /* generic parsing warning management function */ -extern BOOL hb_compForEachVarError( HB_COMP_DECL, const char * ); /* checks if it is FOR EACH enumerator variable and generates a warning */ +extern HB_BOOL hb_compForEachVarError( HB_COMP_DECL, const char * ); /* checks if it is FOR EACH enumerator variable and generates a warning */ extern ULONG hb_compGenJump( LONG, HB_COMP_DECL ); /* generates the pcode to jump to a specific offset */ extern ULONG hb_compGenJumpFalse( LONG, HB_COMP_DECL ); /* generates the pcode to jump if false */ @@ -192,27 +192,27 @@ extern void hb_compLinePushIfDebugger( HB_COMP_DECL ); /* generates the pcode extern void hb_compLinePushIfInside( HB_COMP_DECL ); /* generates the pcode with the currently compiled source code line */ extern void hb_compStatmentStart( HB_COMP_DECL ); /* Check if we can start statement (without line pushing) */ -extern void hb_compGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL ); /* sends a message to an object */ -extern void hb_compGenMessageData( const char * szMsg, BOOL bIsObject, HB_COMP_DECL ); /* generates an underscore-symbol name for a data assignment */ -extern void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to pop a value from the virtual machine stack onto a variable */ -extern void hb_compGenPopMemvar( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to pop a value from the virtual machine stack onto a memvar variable */ -extern void hb_compGenPushDouble( double dNumber, BYTE bWidth, BYTE bDec, HB_COMP_DECL ); /* Pushes a number on the virtual machine stack */ -extern void hb_compGenPushFunCall( const char *, HB_COMP_DECL ); /* generates the pcode to push function's call */ -extern void hb_compGenPushFunSym( const char *, HB_COMP_DECL ); /* generates the pcode to push function's symbol */ -extern void hb_compGenPushFunRef( const char *, HB_COMP_DECL ); /* generates the pcode to push function's reference symbol */ -extern void hb_compGenPushVar( const char * szVarName, BOOL bMacroVar, HB_COMP_DECL ); /* generates the pcode to push a variable value to the virtual machine stack */ -extern void hb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to push a variable by reference to the virtual machine stack */ -extern void hb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to push memvar variable by reference to the virtual machine stack */ -extern void hb_compGenPushInteger( int iNumber, HB_COMP_DECL ); /* Pushes a integer number on the virtual machine stack */ -extern void hb_compGenPushLogical( int iTrueFalse, HB_COMP_DECL ); /* pushes a logical value on the virtual machine stack */ -extern void hb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL ); /* Pushes a long number on the virtual machine stack */ -extern void hb_compGenPushDate( long lDate, HB_COMP_DECL ); /* Pushes a date constant on the virtual machine stack */ -extern void hb_compGenPushTimeStamp( long lDate, long lTime, HB_COMP_DECL ); /* Pushes a timestamp constant on the virtual machine stack */ -extern void hb_compGenPushNil( HB_COMP_DECL ); /* Pushes nil on the virtual machine stack */ -extern void hb_compGenPushString( const char * szText, ULONG ulLen, HB_COMP_DECL ); /* Pushes a string on the virtual machine stack */ -extern void hb_compGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL ); /* Pushes a symbol on to the Virtual machine stack */ -extern void hb_compGenPushAliasedVar( const char *, BOOL, const char *, HB_LONG, HB_COMP_DECL ); -extern void hb_compGenPopAliasedVar( const char *, BOOL, const char *, HB_LONG, HB_COMP_DECL ); +extern void hb_compGenMessage( const char * szMsgName, HB_BOOL bIsObject, HB_COMP_DECL ); /* sends a message to an object */ +extern void hb_compGenMessageData( const char * szMsg, HB_BOOL bIsObject, HB_COMP_DECL ); /* generates an underscore-symbol name for a data assignment */ +extern void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to pop a value from the virtual machine stack onto a variable */ +extern void hb_compGenPopMemvar( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to pop a value from the virtual machine stack onto a memvar variable */ +extern void hb_compGenPushDouble( double dNumber, BYTE bWidth, BYTE bDec, HB_COMP_DECL ); /* Pushes a number on the virtual machine stack */ +extern void hb_compGenPushFunCall( const char *, HB_COMP_DECL ); /* generates the pcode to push function's call */ +extern void hb_compGenPushFunSym( const char *, HB_COMP_DECL ); /* generates the pcode to push function's symbol */ +extern void hb_compGenPushFunRef( const char *, HB_COMP_DECL ); /* generates the pcode to push function's reference symbol */ +extern void hb_compGenPushVar( const char * szVarName, HB_BOOL bMacroVar, HB_COMP_DECL ); /* generates the pcode to push a variable value to the virtual machine stack */ +extern void hb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to push a variable by reference to the virtual machine stack */ +extern void hb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to push memvar variable by reference to the virtual machine stack */ +extern void hb_compGenPushInteger( int iNumber, HB_COMP_DECL ); /* Pushes a integer number on the virtual machine stack */ +extern void hb_compGenPushLogical( int iTrueFalse, HB_COMP_DECL ); /* pushes a logical value on the virtual machine stack */ +extern void hb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL ); /* Pushes a long number on the virtual machine stack */ +extern void hb_compGenPushDate( long lDate, HB_COMP_DECL ); /* Pushes a date constant on the virtual machine stack */ +extern void hb_compGenPushTimeStamp( long lDate, long lTime, HB_COMP_DECL ); /* Pushes a timestamp constant on the virtual machine stack */ +extern void hb_compGenPushNil( HB_COMP_DECL ); /* Pushes nil on the virtual machine stack */ +extern void hb_compGenPushString( const char * szText, ULONG ulLen, HB_COMP_DECL ); /* Pushes a string on the virtual machine stack */ +extern void hb_compGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COMP_DECL ); /* Pushes a symbol on to the Virtual machine stack */ +extern void hb_compGenPushAliasedVar( const char *, HB_BOOL, const char *, HB_LONG, HB_COMP_DECL ); +extern void hb_compGenPopAliasedVar( const char *, HB_BOOL, const char *, HB_LONG, HB_COMP_DECL ); extern void hb_compGenPCode1( BYTE, HB_COMP_DECL ); /* generates 1 byte of pcode */ extern void hb_compGenPCode2( BYTE, BYTE, HB_COMP_DECL ); /* generates 2 bytes of pcode + flag for optional StrongType(). */ extern void hb_compGenPCode3( BYTE, BYTE, BYTE, HB_COMP_DECL ); /* generates 3 bytes of pcode + flag for optional StrongType() */ @@ -222,7 +222,7 @@ extern void hb_compGenPCodeN( const BYTE * pBuffer, ULONG ulSize, HB_COMP_DECL ) extern ULONG hb_compSequenceBegin( HB_COMP_DECL ); extern ULONG hb_compSequenceEnd( HB_COMP_DECL ); extern ULONG hb_compSequenceAlways( HB_COMP_DECL ); -extern void hb_compSequenceFinish( HB_COMP_DECL, ULONG, ULONG, ULONG, BOOL, BOOL, BOOL ); +extern void hb_compSequenceFinish( HB_COMP_DECL, ULONG, ULONG, ULONG, HB_BOOL, HB_BOOL, HB_BOOL ); /* support for FIELD declaration */ extern void hb_compFieldSetAlias( HB_COMP_DECL, const char *, int ); @@ -232,7 +232,7 @@ extern int hb_compFieldsCount( HB_COMP_DECL ); extern void hb_compStaticDefStart( HB_COMP_DECL ); extern void hb_compStaticDefEnd( HB_COMP_DECL, const char * ); -extern BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION ); +extern HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION ); #define HB_COMP_ERROR_TYPE( x ) HB_COMP_PARAM->funcs->ErrorType( HB_COMP_PARAM, x ) #define HB_COMP_ERROR_SYNTAX( x ) HB_COMP_PARAM->funcs->ErrorSyntax( HB_COMP_PARAM, x ) @@ -289,13 +289,13 @@ extern void hb_compErrorVParams( HB_COMP_DECL, const char * ); extern HB_EXPR_PTR hb_compErrorStatic( HB_COMP_DECL, const char *, HB_EXPR_PTR ); extern void hb_compErrorCodeblock( HB_COMP_DECL, const char * ); -extern BOOL hb_compIsValidMacroText( HB_COMP_DECL, const char *, ULONG ); +extern HB_BOOL hb_compIsValidMacroText( HB_COMP_DECL, const char *, ULONG ); /* Codeblocks */ -extern void hb_compCodeBlockStart( HB_COMP_DECL, BOOL ); /* starts a codeblock creation */ -extern void hb_compCodeBlockEnd( HB_COMP_DECL ); /* end of codeblock creation */ -extern void hb_compCodeBlockStop( HB_COMP_DECL ); /* end of fake codeblock */ -extern void hb_compCodeBlockRewind( HB_COMP_DECL ); /* restart of fake codeblock */ +extern void hb_compCodeBlockStart( HB_COMP_DECL, HB_BOOL ); /* starts a codeblock creation */ +extern void hb_compCodeBlockEnd( HB_COMP_DECL ); /* end of codeblock creation */ +extern void hb_compCodeBlockStop( HB_COMP_DECL ); /* end of fake codeblock */ +extern void hb_compCodeBlockRewind( HB_COMP_DECL ); /* restart of fake codeblock */ #endif /* HB_MACRO_SUPPORT */ @@ -313,8 +313,8 @@ extern void hb_compPrintLogo( HB_COMP_DECL ); extern void hb_compPrintModes( HB_COMP_DECL ); /* Misc functions defined in harbour.c */ -extern void hb_compNOOPfill( PFUNCTION pFunc, ULONG ulFrom, int iCount, BOOL fPop, BOOL fCheck ); -extern BOOL hb_compHasJump( PFUNCTION pFunc, ULONG ulPos ); +extern void hb_compNOOPfill( PFUNCTION pFunc, ULONG ulFrom, int iCount, HB_BOOL fPop, HB_BOOL fCheck ); +extern HB_BOOL hb_compHasJump( PFUNCTION pFunc, ULONG ulPos ); /* Misc functions defined in hbfix.c */ extern void hb_compFixFuncPCode( HB_COMP_DECL, PFUNCTION pFunc ); @@ -346,7 +346,7 @@ extern void hb_compIdentifierClose( HB_COMP_DECL ); /* release the table of iden /* compi18n.c */ extern void hb_compI18nFree( HB_COMP_DECL ); -extern BOOL hb_compI18nSave( HB_COMP_DECL, BOOL fFinal ); +extern HB_BOOL hb_compI18nSave( HB_COMP_DECL, HB_BOOL fFinal ); extern void hb_compI18nAdd( HB_COMP_DECL, const char* szText, const char* szContext, const char * szModule, UINT uiLine ); extern void hb_compI18nAddPlural( HB_COMP_DECL, const char** szTexts, ULONG ulCount, const char* szContext, const char * szModule, UINT uiLine ); diff --git a/harbour/include/hbcompdf.h b/harbour/include/hbcompdf.h index e41cf0ccf2..11178cb56e 100644 --- a/harbour/include/hbcompdf.h +++ b/harbour/include/hbcompdf.h @@ -112,7 +112,7 @@ typedef struct HB_CBVAR_ { const char * szName; BYTE bType; - BOOL bUsed; + HB_BOOL bUsed; struct HB_CBVAR_ * pNext; } HB_CBVAR, * HB_CBVAR_PTR; @@ -246,18 +246,18 @@ typedef struct HB_EXPR_ { union { - const char *asSymbol;/* variable name */ - BOOL asLogical; /* logical value */ + const char * asSymbol; /* variable name */ + HB_BOOL asLogical; /* logical value */ struct { - char *string; /* literal strings */ - BOOL dealloc; /* automatic deallocate on expresion deletion */ + char * string; /* literal strings */ + HB_BOOL dealloc; /* automatic deallocate on expresion deletion */ } asString; struct { - struct HB_EXPR_ *pMacro; /* macro variable */ - const char *szName; /* variable name */ - } asRTVar; /* PUBLIC or PRIVATE variable declaration */ + struct HB_EXPR_ * pMacro; /* macro variable */ + const char * szName; /* variable name */ + } asRTVar; /* PUBLIC or PRIVATE variable declaration */ struct { union { @@ -276,47 +276,47 @@ typedef struct HB_EXPR_ struct { const char * szMacro; /* identifier after the macro operator */ - struct HB_EXPR_ *pExprList; /* list elements if &(...) was used */ + struct HB_EXPR_ * pExprList; /* list elements if &(...) was used */ USHORT SubType; /* context in which macro is used */ unsigned char cMacroOp; /* macro operator */ } asMacro; struct { - struct HB_EXPR_ *pExprList; /* list elements */ - struct HB_EXPR_ *pIndex; /* array index, others */ - BOOL reference; /* push array item by reference or pass variable parameters to called function or method */ + struct HB_EXPR_ * pExprList; /* list elements */ + struct HB_EXPR_ * pIndex; /* array index, others */ + HB_BOOL reference; /* push array item by reference or pass variable parameters to called function or method */ } asList; struct { - struct HB_EXPR_ *pExprList; /* list elements */ + struct HB_EXPR_ * pExprList; /* list elements */ HB_CBVAR_PTR pLocals; /* list of local variables */ - char *string; /* source code of a codeblock */ + char * string; /* source code of a codeblock */ USHORT flags; /* HB_BLOCK_MACRO, HB_BLOCK_LATEEVAL, HB_BLOCK_VPARAMS */ } asCodeblock; struct { - struct HB_EXPR_ *pAlias; /* alias expression */ - struct HB_EXPR_ *pVar; /* aliased variable or macro */ - struct HB_EXPR_ *pExpList; /* aliased expression list */ + struct HB_EXPR_ * pAlias; /* alias expression */ + struct HB_EXPR_ * pVar; /* aliased variable or macro */ + struct HB_EXPR_ * pExpList; /* aliased expression list */ } asAlias; struct { - struct HB_EXPR_ *pFunName; /* function name */ - struct HB_EXPR_ *pParms; /* function call parameters */ + struct HB_EXPR_ * pFunName; /* function name */ + struct HB_EXPR_ * pParms; /* function call parameters */ } asFunCall; struct { - struct HB_EXPR_ *pObject; /* object */ - struct HB_EXPR_ *pParms; /* method parameters */ + struct HB_EXPR_ * pObject; /* object */ + struct HB_EXPR_ * pParms; /* method parameters */ const char * szMessage; /* message as string */ - struct HB_EXPR_ *pMessage; /* message as macro */ + struct HB_EXPR_ * pMessage; /* message as macro */ } asMessage; struct { - struct HB_EXPR_ *pLeft; /* object */ - struct HB_EXPR_ *pRight; /* object */ + struct HB_EXPR_ * pLeft; /* object */ + struct HB_EXPR_ * pRight; /* object */ } asOperator; - struct HB_EXPR_ *asReference; + struct HB_EXPR_ * asReference; } value; ULONG ulLength; ULONG Counter; @@ -328,7 +328,7 @@ typedef struct HB_EXPR_ typedef struct HB_ENUMERATOR_ { const char *szName; - BOOL bForEach; + HB_BOOL bForEach; struct HB_ENUMERATOR_ *pNext; } HB_ENUMERATOR, *HB_ENUMERATOR_PTR; /* support structure for FOR EACH statements */ @@ -344,7 +344,7 @@ typedef struct HB_ELSEIF_ typedef struct HB_LOOPEXIT_ { ULONG ulOffset; - BOOL fCanLoop; + HB_BOOL fCanLoop; USHORT wSeqCounter; USHORT wAlwaysCounter; USHORT wWithObjectCnt; @@ -375,7 +375,7 @@ typedef struct HB_SWITCHCMD_ typedef struct HB_RTVAR_ { HB_EXPR_PTR pVar; - BOOL bPopValue; + HB_BOOL bPopValue; struct HB_RTVAR_ *pNext; struct HB_RTVAR_ *pPrev; } HB_RTVAR, *HB_RTVAR_PTR; @@ -403,10 +403,10 @@ typedef struct __FUNC ULONG * pJumps; /* pointer to the Jumps array */ ULONG iNOOPs; /* NOOPs Counter */ ULONG iJumps; /* Jumps Counter */ - BOOL bLateEval; /* TRUE if accessing of declared (compile time) variables is allowed */ - BOOL fVParams; /* TRUE if variable number of parameters is used */ - BOOL bError; /* error during function compilation */ - BOOL bBlock; /* TRUE if simple codeblock body is compiled */ + HB_BOOL bLateEval; /* TRUE if accessing of declared (compile time) variables is allowed */ + HB_BOOL fVParams; /* TRUE if variable number of parameters is used */ + HB_BOOL bError; /* error during function compilation */ + HB_BOOL bBlock; /* TRUE if simple codeblock body is compiled */ struct __FUNC * pOwner; /* pointer to the function/procedure that owns the codeblock */ struct __FUNC * pNext; /* pointer to the next defined function */ HB_ENUMERATOR_PTR pEnum; /* pointer to FOR EACH variables */ @@ -488,7 +488,7 @@ typedef struct __EXTERN typedef struct _HB_MODULE { const char * szName; - BOOL force; + HB_BOOL force; struct _HB_MODULE * pNext; } HB_MODULE, * PHB_MODULE; @@ -505,10 +505,10 @@ typedef struct _HB_DEBUGINFO typedef struct _HB_LABEL_INFO { FILE * yyc; - BOOL fVerbose; - BOOL fSetSeqBegin; - BOOL fCondJump; - BOOL fEndRequest; + HB_BOOL fVerbose; + HB_BOOL fSetSeqBegin; + HB_BOOL fCondJump; + HB_BOOL fEndRequest; int iNestedBlock; ULONG * pulLabels; } HB_LABEL_INFO, * PHB_LABEL_INFO; @@ -539,10 +539,10 @@ HB_COMMON, * HB_COMMON_PTR; typedef struct HB_PCODE_INFO_ /* compiled pcode container for macro compiler */ { - BYTE * pCode; /* pointer to a memory block where pcode is stored */ - ULONG lPCodeSize; /* total memory size for pcode */ - ULONG lPCodePos; /* actual pcode offset */ - BOOL fVParams; /* function/codeblock with variable parameters */ + BYTE * pCode; /* pointer to a memory block where pcode is stored */ + ULONG lPCodeSize; /* total memory size for pcode */ + ULONG lPCodePos; /* actual pcode offset */ + HB_BOOL fVParams; /* function/codeblock with variable parameters */ struct HB_PCODE_INFO_ * pPrev; HB_CBVAR_PTR pLocals; } HB_PCODE_INFO, * HB_PCODE_INFO_PTR; @@ -604,7 +604,7 @@ typedef struct _HB_COMP_LEX { PHB_PP_STATE pPP; int iState; - BOOL fEol; + HB_BOOL fEol; const char * lasttok; } HB_COMP_LEX, * PHB_COMP_LEX; @@ -658,7 +658,7 @@ typedef struct _HB_COMP PHB_FNAME pPpoPath; PHB_FNAME pI18nFileName; PHB_I18NTABLE pI18n; - BOOL fI18n; + HB_BOOL fI18n; void ( * outStdFunc ) ( void *, const char* ); void ( * outErrFunc ) ( void *, const char* ); @@ -700,26 +700,26 @@ typedef struct _HB_COMP int iTraceInclude; /* trace included files and generate dependencies list */ int iSyntaxCheckOnly; /* syntax check only */ - BOOL fQuiet; /* be quiet during compilation (-q) */ - BOOL fFullQuiet; /* be quiet during compilation disable all messages */ - BOOL fExit; /* force breaking compilation process */ - BOOL fPPO; /* flag indicating, is ppo output needed */ - BOOL fPPT; /* flag indicating, is ppt output needed */ - BOOL fLineNumbers; /* holds if we need pcodes with line numbers */ - BOOL fAnyWarning; /* holds if there was any warning during the compilation process */ - BOOL fAutoMemvarAssume; /* holds if undeclared variables are automatically assumed MEMVAR (-a)*/ - BOOL fForceMemvars; /* holds if memvars are assumed when accesing undeclared variable (-v)*/ - BOOL fDebugInfo; /* holds if generate debugger required info */ - BOOL fNoStartUp; /* C code generation embed HB_FS_FIRST or not */ - BOOL fCredits; /* print credits */ - BOOL fBuildInfo; /* print build info */ - BOOL fLogo; /* print logo */ - BOOL fLongOptimize; /* optimize PCODEs generated for integers */ - BOOL fSingleModule; /* do not automatically compile DO...[WITH...] external modules (-m) */ - BOOL fError; /* error appeared during compilation */ - BOOL fNoArchDefs; /* do not define architecture dependent macros: __PLATFORM__*, __ARCH??BIT__, __*_ENDIAN__ */ - BOOL fMeaningful; /* do not generate warnings about meaningless expression usage */ - BOOL fINCLUDE; /* use INCLUDE envvar as header path (default) */ + HB_BOOL fQuiet; /* be quiet during compilation (-q) */ + HB_BOOL fFullQuiet; /* be quiet during compilation disable all messages */ + HB_BOOL fExit; /* force breaking compilation process */ + HB_BOOL fPPO; /* flag indicating, is ppo output needed */ + HB_BOOL fPPT; /* flag indicating, is ppt output needed */ + HB_BOOL fLineNumbers; /* holds if we need pcodes with line numbers */ + HB_BOOL fAnyWarning; /* holds if there was any warning during the compilation process */ + HB_BOOL fAutoMemvarAssume; /* holds if undeclared variables are automatically assumed MEMVAR (-a)*/ + HB_BOOL fForceMemvars; /* holds if memvars are assumed when accesing undeclared variable (-v)*/ + HB_BOOL fDebugInfo; /* holds if generate debugger required info */ + HB_BOOL fNoStartUp; /* C code generation embed HB_FS_FIRST or not */ + HB_BOOL fCredits; /* print credits */ + HB_BOOL fBuildInfo; /* print build info */ + HB_BOOL fLogo; /* print logo */ + HB_BOOL fLongOptimize; /* optimize PCODEs generated for integers */ + HB_BOOL fSingleModule; /* do not automatically compile DO...[WITH...] external modules (-m) */ + HB_BOOL fError; /* error appeared during compilation */ + HB_BOOL fNoArchDefs; /* do not define architecture dependent macros: __PLATFORM__*, __ARCH??BIT__, __*_ENDIAN__ */ + HB_BOOL fMeaningful; /* do not generate warnings about meaningless expression usage */ + HB_BOOL fINCLUDE; /* use INCLUDE envvar as header path (default) */ } HB_COMP, * HB_COMP_PTR; diff --git a/harbour/include/hbdate.h b/harbour/include/hbdate.h index a56f272e6b..503f6450bd 100644 --- a/harbour/include/hbdate.h +++ b/harbour/include/hbdate.h @@ -89,9 +89,9 @@ extern HB_EXPORT long hb_timeEncode( int iHour, int iMinutes, int iSeconds, in extern HB_EXPORT void hb_timeDecode( long lMilliSec, int * piHour, int * piMinutes, int * piSeconds, int * piMSec ); extern HB_EXPORT char * hb_timeStr( char * szTime, long lMilliSec ); -extern HB_EXPORT BOOL hb_timeStrGet( const char * szTime, - int * piHour, int * piMinutes, - int * piSeconds, int * piMSec ); +extern HB_EXPORT HB_BOOL hb_timeStrGet( const char * szTime, + int * piHour, int * piMinutes, + int * piSeconds, int * piMSec ); extern HB_EXPORT void hb_timeStrRawGet( const char * szTime, int * piHour, int * piMinutes, @@ -110,11 +110,11 @@ extern HB_EXPORT char * hb_timeStampStrRawPut( char * szDateTime, long lJulian, extern HB_EXPORT void hb_timeStampStrRawGet( const char * szDateTime, long * plJulian, long * plMilliSec ); extern HB_EXPORT char * hb_timeStampStr( char * szDateTime, long lJulian, long lMilliSec ); -extern HB_EXPORT BOOL hb_timeStampStrGet( const char * szDateTime, +extern HB_EXPORT HB_BOOL hb_timeStampStrGet( const char * szDateTime, int * piYear, int * piMonth, int * piDay, int * piHour, int * piMinutes, int * piSeconds, int * piMSec ); -extern HB_EXPORT BOOL hb_timeStampStrGetDT( const char * szDateTime, +extern HB_EXPORT HB_BOOL hb_timeStampStrGetDT( const char * szDateTime, long * plJulian, long * plMilliSec ); extern HB_EXPORT double hb_timeStampPackDT( long lJulian, long lMilliSec ); diff --git a/harbour/include/hbexpra.c b/harbour/include/hbexpra.c index 1823aa880a..c1aca0b0a4 100644 --- a/harbour/include/hbexpra.c +++ b/harbour/include/hbexpra.c @@ -80,8 +80,8 @@ ULONG hb_compExprListEval2( HB_COMP_DECL, HB_EXPR_PTR pExpr1, HB_EXPR_PTR pExpr2 if( !pEval ) return ulLen; - if( (pExpr1->ExprType == HB_ET_LIST || pExpr1->ExprType == HB_ET_ARGLIST) - && + if( (pExpr1->ExprType == HB_ET_LIST || pExpr1->ExprType == HB_ET_ARGLIST) + && (pExpr2->ExprType == HB_ET_LIST || pExpr2->ExprType == HB_ET_ARGLIST) ) { pExpr1 = pExpr1->value.asList.pExprList; @@ -177,7 +177,7 @@ HB_EXPR_PTR hb_compExprNewFunCall( HB_EXPR_PTR pName, HB_EXPR_PTR pParms, HB_COM if( szName ) { HB_COMP_EXPR_DELETE( pParms ); - HB_COMP_EXPR_DELETE( pName ); + HB_COMP_EXPR_DELETE( pName ); return hb_compExprNewMethodCall( hb_compExprNewSend( hb_compExprNewVar( szName, HB_COMP_PARAM ), szMessage, NULL, HB_COMP_PARAM ), NULL ); @@ -205,7 +205,7 @@ HB_EXPR_PTR hb_compExprNewFunCall( HB_EXPR_PTR pName, HB_EXPR_PTR pParms, HB_COM #endif pParms->value.asList.pExprList = NULL; HB_COMP_EXPR_DELETE( pParms ); - HB_COMP_EXPR_DELETE( pName ); + HB_COMP_EXPR_DELETE( pName ); return pEval; } else if( iLen == 5 && memcmp( "_GET_", pName->value.asSymbol, 5 ) == 0 ) @@ -554,7 +554,7 @@ static const char * s_szStaticFun[] = { #define STATIC_FUNCTIONS ( sizeof( s_szStaticFun ) / sizeof( char * ) ) -static BOOL hb_compStaticFunction( const char * szName ) +static HB_BOOL hb_compStaticFunction( const char * szName ) { unsigned int ui; for( ui = 0; ui < STATIC_FUNCTIONS; ++ui ) diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index e1761a47d3..71acc38ca0 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -131,7 +131,7 @@ static HB_EXPR_FUNC( hb_compExprUseNegate ); #if defined( HB_MACRO_SUPPORT ) static void hb_compExprCodeblockPush( HB_EXPR_PTR, HB_COMP_DECL ); #else - static void hb_compExprCodeblockPush( HB_EXPR_PTR, BOOL, HB_COMP_DECL ); + static void hb_compExprCodeblockPush( HB_EXPR_PTR, HB_BOOL, HB_COMP_DECL ); static void hb_compExprCodeblockEarly( HB_EXPR_PTR, HB_COMP_DECL ); static void hb_compExprCodeblockExtPush( HB_EXPR_PTR pSelf, HB_COMP_DECL ); #endif @@ -146,7 +146,7 @@ static void hb_compExprUsePreOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL ); static void hb_compExprUseAliasMacro( HB_EXPR_PTR pAliasedVar, BYTE bAction, HB_COMP_DECL ); static HB_EXPR_PTR hb_compExprReduceList( HB_EXPR_PTR pExpr, HB_COMP_DECL ); static HB_EXPR_PTR hb_compExprReduceAliasString( HB_EXPR_PTR pExpr, HB_EXPR_PTR pAlias, HB_COMP_DECL ); -static BOOL hb_compExprIsMemvarAlias( const char *szAlias ); +static HB_BOOL hb_compExprIsMemvarAlias( const char *szAlias ); const HB_EXPR_FUNC_PTR hb_comp_ExprTable[ HB_EXPR_COUNT ] = { @@ -587,7 +587,7 @@ static HB_EXPR_FUNC( hb_compExprUseArray ) } else { - BOOL fArgsList = pSelf->ExprType == HB_ET_MACROARGLIST; + HB_BOOL fArgsList = pSelf->ExprType == HB_ET_MACROARGLIST; if( !fArgsList ) { @@ -1381,7 +1381,7 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt ) case HB_EA_PUSH_PCODE: { - BOOL fMacroIndex = FALSE; + HB_BOOL fMacroIndex = FALSE; if( pSelf->value.asList.pIndex->ExprType == HB_ET_MACRO ) { @@ -1452,7 +1452,7 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt ) case HB_EA_POP_PCODE: { - BOOL fMacroIndex = FALSE; + HB_BOOL fMacroIndex = FALSE; if( pSelf->value.asList.pIndex->ExprType == HB_ET_MACRO ) { if( HB_SUPPORT_XBASE ) @@ -1791,7 +1791,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) { HB_EXPR_PTR pArg = pParms->value.asList.pExprList; HB_LONG lResult = 0; - BOOL fOptimize = FALSE, fBool = FALSE; + HB_BOOL fOptimize = FALSE, fBool = FALSE; if( usCount >= 2 ) { @@ -1887,7 +1887,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) else if( strncmp( "HB_I18N_", pName->value.asSymbol, 8 ) == 0 ) { HB_EXPR_PTR pArg = pParms->value.asList.pExprList, pCount = NULL; - BOOL fStrict, fNoop, fPlural, fI18nFunc; + HB_BOOL fStrict, fNoop, fPlural, fI18nFunc; ULONG ulPos = 8; fStrict = fNoop = fPlural = fI18nFunc = FALSE; @@ -2082,7 +2082,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) case HB_EA_PUSH_PCODE: { - BOOL fArgsList = FALSE; + HB_BOOL fArgsList = FALSE; USHORT usCount = 0; if( pSelf->value.asFunCall.pFunName->ExprType == HB_ET_FUNNAME ) @@ -2124,7 +2124,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) case HB_EA_PUSH_POP: case HB_EA_STATEMENT: { - BOOL fArgsList = FALSE; + HB_BOOL fArgsList = FALSE; USHORT usCount = 0; if( pSelf->value.asFunCall.pFunName->ExprType == HB_ET_FUNNAME ) @@ -2551,7 +2551,7 @@ static HB_EXPR_FUNC( hb_compExprUseSend ) case HB_EA_PUSH_PCODE: if( pSelf->value.asMessage.pParms ) /* Is it a method call ? */ { - BOOL fArgsList = FALSE; + HB_BOOL fArgsList = FALSE; int iParms = ( int ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf->value.asMessage.pParms ); hb_compExprPushSendPush( pSelf, HB_COMP_PARAM ); @@ -3117,7 +3117,7 @@ static HB_EXPR_FUNC( hb_compExprUseOr ) HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_POP ); #else { - BOOL fMeaningful = HB_COMP_PARAM->fMeaningful; + HB_BOOL fMeaningful = HB_COMP_PARAM->fMeaningful; /* do not generate warning about meaningless expression usage */ HB_COMP_PARAM->fMeaningful = TRUE; HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_POP ); @@ -3202,7 +3202,7 @@ static HB_EXPR_FUNC( hb_compExprUseAnd ) HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_POP ); #else { - BOOL fMeaningful = HB_COMP_PARAM->fMeaningful; + HB_BOOL fMeaningful = HB_COMP_PARAM->fMeaningful; /* do not generate warning about meaningless expression usage */ HB_COMP_PARAM->fMeaningful = TRUE; HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_POP ); @@ -4314,7 +4314,7 @@ static HB_EXPR_FUNC( hb_compExprUsePreDec ) #if defined( HB_MACRO_SUPPORT ) static void hb_compExprCodeblockPush( HB_EXPR_PTR pSelf, HB_COMP_DECL ) #else -static void hb_compExprCodeblockPush( HB_EXPR_PTR pSelf, BOOL bLateEval, HB_COMP_DECL ) +static void hb_compExprCodeblockPush( HB_EXPR_PTR pSelf, HB_BOOL bLateEval, HB_COMP_DECL ) #endif { HB_EXPR_PTR pExpr, pNext; @@ -4531,7 +4531,7 @@ static void hb_compExprPushSendPush( HB_EXPR_PTR pSelf, HB_COMP_DECL ) } static void hb_compExprPushSendPopPush( HB_EXPR_PTR pObj, HB_EXPR_PTR pValue, - BOOL fPreOp, BYTE bOper, HB_COMP_DECL ) + HB_BOOL fPreOp, BYTE bOper, HB_COMP_DECL ) { if( HB_SUPPORT_HARBOUR ) { @@ -5310,7 +5310,7 @@ static HB_EXPR_PTR hb_compExprReduceAliasString( HB_EXPR_PTR pExpr, HB_EXPR_PTR ULONG ulLen = pAlias->ulLength; if( ulLen <= HB_SYMBOL_NAME_LEN ) { - BOOL fLower = FALSE; + HB_BOOL fLower = FALSE; while( ulLen ) { char c = szAlias[ ulLen - 1 ]; @@ -5341,7 +5341,7 @@ static HB_EXPR_PTR hb_compExprReduceAliasString( HB_EXPR_PTR pExpr, HB_EXPR_PTR return pExpr; } -static BOOL hb_compExprIsMemvarAlias( const char *szAlias ) +static HB_BOOL hb_compExprIsMemvarAlias( const char *szAlias ) { int iLen = strlen( szAlias ); /* @M-> @MEMVAR-> or @MEMVA-> or @MEMV-> */ diff --git a/harbour/include/hbexprop.h b/harbour/include/hbexprop.h index 7e1771a317..a63898d650 100644 --- a/harbour/include/hbexprop.h +++ b/harbour/include/hbexprop.h @@ -87,7 +87,7 @@ extern HB_EXPR_PTR hb_compExprNewDouble( double, BYTE, BYTE, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewLong( HB_LONG, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewDate( long, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewTimeStamp( long, long, HB_COMP_DECL ); -extern HB_EXPR_PTR hb_compExprNewString( const char *, ULONG, BOOL, HB_COMP_DECL ); +extern HB_EXPR_PTR hb_compExprNewString( const char *, ULONG, HB_BOOL, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewLogical( int, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewSelf( HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewCodeBlock( char *, ULONG, int, HB_COMP_DECL ); @@ -151,7 +151,7 @@ extern HB_EXPR_PTR hb_compExprAssign( HB_EXPR_PTR, HB_EXPR_PTR, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprEqual( HB_EXPR_PTR, HB_EXPR_PTR ); extern HB_EXPR_PTR hb_compExprAssignStatic( HB_EXPR_PTR, HB_EXPR_PTR, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprClone( HB_EXPR_PTR pSrc ); -extern BOOL hb_compExprListTypeCheck( HB_EXPR_PTR pExpr, HB_EXPRTYPE ExprType ); +extern HB_BOOL hb_compExprListTypeCheck( HB_EXPR_PTR pExpr, HB_EXPRTYPE ExprType ); extern ULONG hb_compExprListLen( HB_EXPR_PTR ); extern ULONG hb_compExprParamListLen( HB_EXPR_PTR ); extern ULONG hb_compExprMacroListLen( HB_EXPR_PTR ); @@ -170,7 +170,7 @@ extern const char * hb_compExprAsString( HB_EXPR_PTR ); extern const char * hb_compExprAsSymbol( HB_EXPR_PTR ); extern HB_EXPR_PTR hb_compExprListStrip( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprIsValidMacro( const char *, ULONG, BOOL *, HB_COMP_DECL ); +extern HB_BOOL hb_compExprIsValidMacro( const char *, ULONG, HB_BOOL *, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprSetOperand( HB_EXPR_PTR, HB_EXPR_PTR, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprSetGetBlock( HB_EXPR_PTR pExpr, HB_COMP_DECL ); @@ -195,20 +195,20 @@ extern HB_EXPR_PTR hb_compExprReduceAnd( HB_EXPR_PTR pSelf, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprReduceOr( HB_EXPR_PTR pSelf, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprReduceIIF( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceAT( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceCHR( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceLEN( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceASC( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceINT( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceSTOT( HB_EXPR_PTR, USHORT usCount, HB_COMP_DECL ); -extern BOOL hb_compExprReduceSTOD( HB_EXPR_PTR, USHORT usCount, HB_COMP_DECL ); -extern BOOL hb_compExprReduceDTOS( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceCTOD( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceUPPER( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceMIN( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceMAX( HB_EXPR_PTR, HB_COMP_DECL ); -extern BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR, HB_LONG, BOOL, HB_COMP_DECL ); +extern HB_BOOL hb_compExprReduceAT( HB_EXPR_PTR, HB_COMP_DECL ); +extern HB_BOOL hb_compExprReduceCHR( HB_EXPR_PTR, HB_COMP_DECL ); +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_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 ); +extern HB_BOOL hb_compExprReduceMIN( HB_EXPR_PTR, HB_COMP_DECL ); +extern HB_BOOL hb_compExprReduceMAX( HB_EXPR_PTR, HB_COMP_DECL ); +extern HB_BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR, HB_LONG, HB_BOOL, HB_COMP_DECL ); HB_EXTERN_END diff --git a/harbour/include/hbgtcore.h b/harbour/include/hbgtcore.h index bf9e1eae28..0cec0d0b6e 100644 --- a/harbour/include/hbgtcore.h +++ b/harbour/include/hbgtcore.h @@ -110,15 +110,15 @@ struct _HB_GT_BASE; typedef struct { - BOOL (* Lock) ( HB_GT_PTR ); + 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 ); - BOOL (* Resize) ( HB_GT_PTR, int, int ); - BOOL (* SetMode) ( HB_GT_PTR, int, int ); + 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 ); @@ -132,10 +132,10 @@ typedef struct void (* Flush) ( HB_GT_PTR ); int (* MaxCol) ( HB_GT_PTR ); int (* MaxRow) ( HB_GT_PTR ); - BOOL (* CheckPos) ( HB_GT_PTR, int, int, long * ); + HB_BOOL (* CheckPos) ( HB_GT_PTR, int, int, long * ); void (* SetPos) ( HB_GT_PTR, int, int ); void (* GetPos) ( HB_GT_PTR, int *, int * ); - BOOL (* IsColor) ( HB_GT_PTR ); + 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 ); @@ -151,13 +151,13 @@ typedef struct int (* GetCursorStyle) ( HB_GT_PTR ); void (* SetCursorStyle) ( HB_GT_PTR, int ); void (* GetScrCursor) ( HB_GT_PTR, int *, int *, int * ); - BOOL (* GetScrChar) ( HB_GT_PTR, int, int, int *, BYTE *, USHORT * ); - BOOL (* PutScrChar) ( HB_GT_PTR, int, int, int, BYTE, USHORT ); + HB_BOOL (* GetScrChar) ( HB_GT_PTR, int, int, int *, BYTE *, USHORT * ); + HB_BOOL (* PutScrChar) ( HB_GT_PTR, int, int, int, BYTE, USHORT ); void (* DispBegin) ( HB_GT_PTR ); void (* DispEnd) ( HB_GT_PTR ); int (* DispCount) ( HB_GT_PTR ); - BOOL (* GetChar) ( HB_GT_PTR, int, int, int *, BYTE *, USHORT * ); - BOOL (* PutChar) ( HB_GT_PTR, int, int, int, BYTE, USHORT ); + HB_BOOL (* GetChar) ( HB_GT_PTR, int, int, int *, BYTE *, USHORT * ); + HB_BOOL (* PutChar) ( HB_GT_PTR, int, int, int, 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 * ); @@ -175,30 +175,30 @@ typedef struct 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 ); - BOOL (* GetBlink) ( HB_GT_PTR ); - void (* SetBlink) ( HB_GT_PTR, BOOL ); - void (* SetSnowFlag) ( HB_GT_PTR, BOOL ); + 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 ); - BOOL (* Suspend) ( HB_GT_PTR ); - BOOL (* Resume) ( HB_GT_PTR ); - BOOL (* PreExt) ( HB_GT_PTR ); - BOOL (* PostExt) ( HB_GT_PTR ); + 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 ); - BOOL (* Info) ( HB_GT_PTR, int, PHB_GT_INFO ); + 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 */ - BOOL (* SetDispCP) ( HB_GT_PTR, const char *, const char *, BOOL ); - 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 (* InkeyGet) ( HB_GT_PTR, BOOL fWait, double dSeconds, int iEventMask ); + 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 ); @@ -212,11 +212,11 @@ typedef struct /* mouse */ void (* MouseInit) ( HB_GT_PTR ); void (* MouseExit) ( HB_GT_PTR ); - BOOL (* MouseIsPresent) ( HB_GT_PTR ); + HB_BOOL (* MouseIsPresent) ( HB_GT_PTR ); void (* MouseShow) ( HB_GT_PTR ); void (* MouseHide) ( HB_GT_PTR ); - BOOL (* MouseGetCursor) ( HB_GT_PTR ); - void (* MouseSetCursor) ( HB_GT_PTR, BOOL ); + 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 * ); @@ -229,9 +229,9 @@ typedef struct int (* MouseGetDoubleClickSpeed) ( HB_GT_PTR ); void (* MouseSetDoubleClickSpeed) ( HB_GT_PTR, int ); int (* MouseCountButton) ( HB_GT_PTR ); - BOOL (* MouseButtonState) ( HB_GT_PTR, int ); - BOOL (* MouseButtonPressed) ( HB_GT_PTR, int, int *, int * ); - BOOL (* MouseButtonReleased) ( HB_GT_PTR, int, int *, int * ); + 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 */ @@ -252,7 +252,7 @@ typedef int ( * GTENTRYP_V )( void ); typedef struct _HB_GT_INIT { const char * id; - BOOL (* init) ( PHB_GT_FUNCS ); + HB_BOOL (* init) ( PHB_GT_FUNCS ); PHB_GT_FUNCS pSuperTable; int * pGtId; } HB_GT_INIT, * PHB_GT_INIT; @@ -287,14 +287,14 @@ typedef struct _HB_GT_BASE PHB_SCREENCELL screenBuffer; /* window foreground (board) current buffer */ PHB_SCREENCELL prevBuffer; /* window foreground (board) previous buffer */ - BOOL * pLines; /* Touched Window lines */ - BOOL fRefresh; /* Should Window be refreshed */ + HB_BOOL * pLines; /* Touched Window lines */ + HB_BOOL fRefresh; /* Should Window be refreshed */ - BOOL fVgaCell; - BOOL fIsColor; - BOOL fBlinking; - BOOL fStdOutCon; - BOOL fStdErrCon; + HB_BOOL fVgaCell; + HB_BOOL fIsColor; + HB_BOOL fBlinking; + HB_BOOL fStdOutCon; + HB_BOOL fStdErrCon; int iCursorShape; int iDispCount; int iExtCount; @@ -304,7 +304,7 @@ typedef struct _HB_GT_BASE HB_FHANDLE hStdOut; HB_FHANDLE hStdErr; - BOOL fDispTrans; + HB_BOOL fDispTrans; PHB_CODEPAGE cdpTerm; PHB_CODEPAGE cdpHost; @@ -313,7 +313,7 @@ typedef struct _HB_GT_BASE int * pColor; int iDoubleClickSpeed; /* In milliseconds */ - BOOL fMouseVisible; + HB_BOOL fMouseVisible; int iMouseLastRow; int iMouseLastCol; HB_LONG iMouseLeftTimer; @@ -590,19 +590,19 @@ extern void hb_gt_gcMark( void ); #define HB_GTSUPER_GFXTEXT(g,t,l,s,c,h,w) (HB_GTSUPERTABLE(g))->GfxText(g,t,l,s,c,h,w) #define HB_GTSUPER_WHOCARES(g,p) (HB_GTSUPERTABLE(g))->WhoCares(g,p) -extern HB_EXPORT BOOL hb_gtRegister( const HB_GT_INIT * gtInit ); -extern HB_EXPORT PHB_GT hb_gtLoad( const char * szGtName, PHB_GT pGT, PHB_GT_FUNCS pSuperTable ); +extern HB_EXPORT HB_BOOL hb_gtRegister( const HB_GT_INIT * gtInit ); +extern HB_EXPORT PHB_GT hb_gtLoad( const char * szGtName, PHB_GT pGT, PHB_GT_FUNCS pSuperTable ); /* low level GT functions common to different GTs supported by RTL */ -extern int hb_gt_chrmapinit( int * piTransTbl, const char * pszTerm, BOOL fSetACSC ); -extern BOOL hb_gt_setClipboard( const char * szClipData, HB_SIZE ulLen ); -extern BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE * pulLen ); +extern int hb_gt_chrmapinit( int * piTransTbl, const char * pszTerm, HB_BOOL fSetACSC ); +extern HB_BOOL hb_gt_setClipboard( const char * szClipData, HB_SIZE ulLen ); +extern HB_BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE * pulLen ); #if defined( HB_OS_WIN ) -extern BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE ulLen ); -extern BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, HB_SIZE * pulLen ); -extern int hb_gt_winapi_getKbdState( void ); -extern void hb_gt_winapi_setKbdState( int kbdShifts ); -extern void hb_gt_winapi_tone( double dFrequency, double dDuration ); +extern HB_BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE ulLen ); +extern HB_BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, HB_SIZE * pulLen ); +extern int hb_gt_winapi_getKbdState( void ); +extern void hb_gt_winapi_setKbdState( int kbdShifts ); +extern void hb_gt_winapi_tone( double dFrequency, double dDuration ); #endif /* HB_OS_WIN */ #if defined( HB_OS_DOS ) || defined( HB_OS_WIN ) || defined( HB_OS_OS2 ) extern int hb_gt_dos_keyCodeTranslate( int iKey ); diff --git a/harbour/include/hbhash.h b/harbour/include/hbhash.h index f6c4614a9c..1869663fc7 100644 --- a/harbour/include/hbhash.h +++ b/harbour/include/hbhash.h @@ -88,8 +88,8 @@ extern HB_HASH_TABLE_PTR hb_hashTableCreate( HB_SIZE ulSize, HB_HASH_FUNC_PTR pDelete, HB_HASH_FUNC_PTR pComp ); extern void hb_hashTableKill( HB_HASH_TABLE_PTR pTable ); /* release all items and the hash table */ -extern BOOL hb_hashTableAdd( HB_HASH_TABLE_PTR pTable, const void * pKey, const void * pValue ); /* add a new item into the table */ -extern BOOL hb_hashTableDel( HB_HASH_TABLE_PTR pTable, const void * pKey ); /* delete an item from the table */ +extern HB_BOOL hb_hashTableAdd( HB_HASH_TABLE_PTR pTable, const void * pKey, const void * pValue ); /* add a new item into the table */ +extern HB_BOOL hb_hashTableDel( HB_HASH_TABLE_PTR pTable, const void * pKey ); /* delete an item from the table */ extern const void * hb_hashTableFind( HB_HASH_TABLE_PTR pTable, const void * pKey ); /* return the pointer to item's value or NULL if not found */ extern HB_HASH_TABLE_PTR hb_hashTableResize( HB_HASH_TABLE_PTR pTable, HB_SIZE ulNewSize ); /* resize the hash table */ extern HB_SIZE hb_hashTableSize( HB_HASH_TABLE_PTR pTable ); /* return the hash table size */ diff --git a/harbour/include/hbmacro.h b/harbour/include/hbmacro.h index 3b1e637bb6..55a31fcb7c 100644 --- a/harbour/include/hbmacro.h +++ b/harbour/include/hbmacro.h @@ -98,9 +98,9 @@ HB_EXTERN_BEGIN */ extern void hb_macroError( int iError, HB_COMP_DECL ); extern int hb_macroYYParse( HB_MACRO_PTR pMacro ); -extern ULONG hb_macroSetMacro( BOOL bSet, ULONG ulFlag ); +extern ULONG hb_macroSetMacro( HB_BOOL bSet, ULONG ulFlag ); extern ULONG hb_macroAutoSetMacro( ULONG ulFlag ); -extern BOOL hb_macroLexNew( HB_MACRO_PTR pMacro ); +extern HB_BOOL hb_macroLexNew( HB_MACRO_PTR pMacro ); extern void hb_macroLexDelete( HB_MACRO_PTR pMacro ); extern char * hb_macroIdentNew( HB_COMP_DECL, char * ); @@ -130,23 +130,23 @@ extern void hb_macroGenJumpThere( ULONG ulFrom, ULONG ulTo, HB_COMP_DECL ); extern void hb_macroGenJumpHere( ULONG ulOffset, HB_COMP_DECL ); extern ULONG hb_macroGenJumpTrue( LONG lOffset, HB_COMP_DECL ); -extern void hb_macroGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL ); +extern void hb_macroGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COMP_DECL ); extern void hb_macroGenPushLong( HB_LONG lNumber, HB_COMP_DECL ); extern void hb_macroGenPushDate( long lDate, HB_COMP_DECL ); extern void hb_macroGenPushTimeStamp( long lDate, long lTime, HB_COMP_DECL ); -extern void hb_macroGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL ); -extern void hb_macroGenMessageData( const char * szMsg, BOOL bIsObject, HB_COMP_DECL ); +extern void hb_macroGenMessage( const char * szMsgName, HB_BOOL bIsObject, HB_COMP_DECL ); +extern void hb_macroGenMessageData( const char * szMsg, HB_BOOL bIsObject, HB_COMP_DECL ); extern void hb_macroGenPopVar( const char * szVarName, HB_COMP_DECL ); extern void hb_macroGenPopMemvar( const char * szVarName, HB_COMP_DECL ); extern void hb_macroGenPopAliasedVar( const char * szVarName, - BOOL bPushAliasValue, + HB_BOOL bPushAliasValue, const char * szAlias, HB_LONG lWorkarea, HB_COMP_DECL ); -extern void hb_macroGenPushVar( const char * szVarName, BOOL bMacroVar, HB_COMP_DECL ); +extern void hb_macroGenPushVar( const char * szVarName, HB_BOOL bMacroVar, HB_COMP_DECL ); extern void hb_macroGenPushVarRef( const char * szVarName, HB_COMP_DECL ); extern void hb_macroGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ); extern void hb_macroGenPushAliasedVar( const char * szVarName, - BOOL bPushAliasValue, + HB_BOOL bPushAliasValue, const char * szAlias, HB_LONG lWorkarea, HB_COMP_DECL ); extern void hb_macroGenPushLogical( int iTrueFalse, HB_COMP_DECL ); @@ -160,7 +160,7 @@ extern void hb_macroCodeBlockStart( HB_COMP_DECL ); extern void hb_macroCodeBlockEnd( HB_COMP_DECL ); extern int hb_macroLocalVarGetPos( const char * szVarName, HB_COMP_DECL ); -extern BOOL hb_macroIsValidMacroText( const char *, ULONG ); +extern HB_BOOL hb_macroIsValidMacroText( const char *, ULONG ); #endif /* HB_MACRO_SUPPORT */ diff --git a/harbour/include/hbmather.h b/harbour/include/hbmather.h index a2700c7a5e..b6fe1bcea4 100644 --- a/harbour/include/hbmather.h +++ b/harbour/include/hbmather.h @@ -113,7 +113,7 @@ typedef struct _HB_MATH_EXCEPTION typedef int ( * HB_MATH_HANDLERPROC )( HB_MATH_EXCEPTION * err ); extern HB_EXPORT void hb_mathResetError( HB_MATH_EXCEPTION * phb_exc ); -extern HB_EXPORT BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, double arg1, double arg2, double dResult ); +extern HB_EXPORT HB_BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, double arg1, double arg2, double dResult ); extern HB_EXPORT int hb_mathSetErrMode( int imode ); extern HB_EXPORT int hb_mathGetErrMode( void ); diff --git a/harbour/include/hbregex.h b/harbour/include/hbregex.h index 01fe0a8347..37911f9093 100644 --- a/harbour/include/hbregex.h +++ b/harbour/include/hbregex.h @@ -73,7 +73,7 @@ typedef struct { - BOOL fFree; + HB_BOOL fFree; int iFlags; int iEFlags; #if defined( HB_HAS_PCRE ) @@ -106,7 +106,7 @@ typedef int ( * HB_REG_COMP )( PHB_REGEX, const char * ); typedef int ( * HB_REG_EXEC )( PHB_REGEX, const char *, ULONG, int, HB_REGMATCH * ); extern void hb_regexInit( HB_REG_FREE pFree, HB_REG_COMP pComp, HB_REG_EXEC pExec ); -extern BOOL hb_regexIs( PHB_ITEM pItem ); +extern HB_BOOL hb_regexIs( PHB_ITEM pItem ); #ifndef REG_EXTENDED # define REG_EXTENDED 0x00 @@ -138,7 +138,7 @@ HB_EXTERN_BEGIN extern HB_EXPORT PHB_REGEX hb_regexCompile( const char * szRegEx, ULONG ulLen, int iFlags ); extern HB_EXPORT PHB_REGEX hb_regexGet( PHB_ITEM pRegExItm, int iFlags ); extern HB_EXPORT void hb_regexFree( PHB_REGEX pRegEx ); -extern HB_EXPORT BOOL hb_regexMatch( PHB_REGEX pRegEx, const char * szString, ULONG UlLen, BOOL fFull ); +extern HB_EXPORT HB_BOOL hb_regexMatch( PHB_REGEX pRegEx, const char * szString, ULONG UlLen, HB_BOOL fFull ); HB_EXTERN_END diff --git a/harbour/include/hbset.h b/harbour/include/hbset.h index 667f9c17cf..8d16dc7a22 100644 --- a/harbour/include/hbset.h +++ b/harbour/include/hbset.h @@ -146,8 +146,8 @@ typedef enum typedef struct { /* Lower case members are indirectly related to a SET */ - BOOL hb_set_century; - BOOL hb_set_prndevice; + HB_BOOL hb_set_century; + HB_BOOL hb_set_prndevice; HB_FHANDLE hb_set_althan; HB_FHANDLE hb_set_extrahan; HB_FHANDLE hb_set_printhan; @@ -156,63 +156,63 @@ typedef struct void * hb_set_listener; /* Upper case members are directly related to a SET */ - BOOL HB_SET_ALTERNATE; + HB_BOOL HB_SET_ALTERNATE; char * HB_SET_ALTFILE; - BOOL HB_SET_AUTOPEN; + HB_BOOL HB_SET_AUTOPEN; int HB_SET_AUTORDER; int HB_SET_AUTOSHARE; - BOOL HB_SET_BELL; - BOOL HB_SET_CANCEL; + HB_BOOL HB_SET_BELL; + HB_BOOL HB_SET_CANCEL; char * HB_SET_COLOR; - BOOL HB_SET_CONFIRM; - BOOL HB_SET_CONSOLE; + HB_BOOL HB_SET_CONFIRM; + HB_BOOL HB_SET_CONSOLE; char * HB_SET_DATEFORMAT; - BOOL HB_SET_DEBUG; + HB_BOOL HB_SET_DEBUG; int HB_SET_DECIMALS; char * HB_SET_DEFAULT; - BOOL HB_SET_DELETED; + HB_BOOL HB_SET_DELETED; char * HB_SET_DELIMCHARS; - BOOL HB_SET_DELIMITERS; + HB_BOOL HB_SET_DELIMITERS; char * HB_SET_DEVICE; - BOOL HB_SET_EOF; + HB_BOOL HB_SET_EOF; int HB_SET_EPOCH; - BOOL HB_SET_ESCAPE; + HB_BOOL HB_SET_ESCAPE; int HB_SET_EVENTMASK; - BOOL HB_SET_EXACT; - BOOL HB_SET_EXCLUSIVE; - BOOL HB_SET_EXIT; - BOOL HB_SET_EXTRA; + HB_BOOL HB_SET_EXACT; + HB_BOOL HB_SET_EXCLUSIVE; + HB_BOOL HB_SET_EXIT; + HB_BOOL HB_SET_EXTRA; char * HB_SET_EXTRAFILE; - BOOL HB_SET_FIXED; - BOOL HB_SET_IDLEREPEAT; - BOOL HB_SET_INSERT; - BOOL HB_SET_INTENSITY; + HB_BOOL HB_SET_FIXED; + HB_BOOL HB_SET_IDLEREPEAT; + HB_BOOL HB_SET_INSERT; + HB_BOOL HB_SET_INTENSITY; char * HB_SET_PATH; int HB_SET_MARGIN; int HB_SET_MBLOCKSIZE; - BOOL HB_SET_MCENTER; + HB_BOOL HB_SET_MCENTER; int HB_SET_MESSAGE; char * HB_SET_MFILEEXT; - BOOL HB_SET_OPTIMIZE; - BOOL HB_SET_PRINTER; + HB_BOOL HB_SET_OPTIMIZE; + HB_BOOL HB_SET_PRINTER; char * HB_SET_PRINTFILE; - BOOL HB_SET_SCOREBOARD; - BOOL HB_SET_SCROLLBREAK; - BOOL HB_SET_SOFTSEEK; - BOOL HB_SET_STRICTREAD; + HB_BOOL HB_SET_SCOREBOARD; + HB_BOOL HB_SET_SCROLLBREAK; + HB_BOOL HB_SET_SOFTSEEK; + HB_BOOL HB_SET_STRICTREAD; int HB_SET_TYPEAHEAD; - BOOL HB_SET_UNIQUE; + HB_BOOL HB_SET_UNIQUE; int HB_SET_FILECASE; int HB_SET_DIRCASE; int HB_SET_DIRSEPARATOR; int HB_SET_VIDEOMODE; - BOOL HB_SET_WRAP; + HB_BOOL HB_SET_WRAP; int HB_SET_DBFLOCKSCHEME; - BOOL HB_SET_HARDCOMMIT; - BOOL HB_SET_FORCEOPT; - BOOL HB_SET_DEFEXTENSIONS; + HB_BOOL HB_SET_HARDCOMMIT; + HB_BOOL HB_SET_FORCEOPT; + HB_BOOL HB_SET_DEFEXTENSIONS; char * HB_SET_EOL; - BOOL HB_SET_TRIMFILENAME; + HB_BOOL HB_SET_TRIMFILENAME; char * HB_SET_HBOUTLOG; char * HB_SET_HBOUTLOGINFO; char * HB_SET_OSCODEPAGE; @@ -255,81 +255,81 @@ extern int hb_setListenerAdd( HB_SET_LISTENER_CALLBACK * ); extern void hb_setListenerNotify( HB_set_enum, HB_set_listener_enum ); extern int hb_setListenerRemove( int ); -extern HB_EXPORT BOOL hb_setGetL( HB_set_enum set_specifier ); +extern HB_EXPORT HB_BOOL hb_setGetL( HB_set_enum set_specifier ); extern HB_EXPORT const char * hb_setGetCPtr( HB_set_enum set_specifier ); extern HB_EXPORT int hb_setGetNI( HB_set_enum set_specifier ); extern HB_EXPORT long hb_setGetNL( HB_set_enum set_specifier ); -extern HB_EXPORT BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_setSetItem2( HB_set_enum set_specifier, PHB_ITEM pItem1, PHB_ITEM pItem2 ); +extern HB_EXPORT HB_BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ); +extern HB_EXPORT HB_BOOL hb_setSetItem2( HB_set_enum set_specifier, PHB_ITEM pItem1, PHB_ITEM pItem2 ); extern HB_EXPORT HB_PATHNAMES * hb_setGetFirstSetPath( void ); -extern HB_EXPORT BOOL hb_setGetCentury( void ); -extern HB_EXPORT BOOL hb_setSetCentury( BOOL ); +extern HB_EXPORT HB_BOOL hb_setGetCentury( void ); +extern HB_EXPORT HB_BOOL hb_setSetCentury( HB_BOOL ); extern HB_EXPORT HB_FHANDLE hb_setGetAltHan( void ); extern HB_EXPORT HB_FHANDLE hb_setGetExtraHan( void ); extern HB_EXPORT HB_FHANDLE hb_setGetPrintHan( void ); extern HB_EXPORT HB_FHANDLE hb_setGetPrinterHandle( int ); -extern HB_EXPORT BOOL hb_setGetAlternate( void ); +extern HB_EXPORT HB_BOOL hb_setGetAlternate( void ); extern HB_EXPORT const char * hb_setGetAltFile( void ); -extern HB_EXPORT BOOL hb_setGetAutOpen( void ); +extern HB_EXPORT HB_BOOL hb_setGetAutOpen( void ); extern HB_EXPORT int hb_setGetAutOrder( void ); extern HB_EXPORT int hb_setGetAutoShare( void ); -extern HB_EXPORT BOOL hb_setGetBell( void ); -extern HB_EXPORT BOOL hb_setGetCancel( void ); +extern HB_EXPORT HB_BOOL hb_setGetBell( void ); +extern HB_EXPORT HB_BOOL hb_setGetCancel( void ); extern HB_EXPORT char * hb_setGetColor( void ); -extern HB_EXPORT BOOL hb_setGetConfirm( void ); -extern HB_EXPORT BOOL hb_setGetConsole( void ); +extern HB_EXPORT HB_BOOL hb_setGetConfirm( void ); +extern HB_EXPORT HB_BOOL hb_setGetConsole( void ); extern HB_EXPORT const char * hb_setGetDateFormat( void ); extern HB_EXPORT const char * hb_setGetTimeFormat( void ); -extern HB_EXPORT BOOL hb_setGetDebug( void ); +extern HB_EXPORT HB_BOOL hb_setGetDebug( void ); extern HB_EXPORT int hb_setGetDecimals( void ); extern HB_EXPORT const char * hb_setGetDefault( void ); -extern HB_EXPORT BOOL hb_setGetDeleted( void ); +extern HB_EXPORT HB_BOOL hb_setGetDeleted( void ); extern HB_EXPORT const char * hb_setGetDelimChars( void ); -extern HB_EXPORT BOOL hb_setGetDelimiters( void ); +extern HB_EXPORT HB_BOOL hb_setGetDelimiters( void ); extern HB_EXPORT const char * hb_setGetDevice( void ); -extern HB_EXPORT BOOL hb_setGetEOF( void ); +extern HB_EXPORT HB_BOOL hb_setGetEOF( void ); extern HB_EXPORT int hb_setGetEpoch( void ); -extern HB_EXPORT BOOL hb_setGetEscape( void ); +extern HB_EXPORT HB_BOOL hb_setGetEscape( void ); extern HB_EXPORT int hb_setGetEventMask( void ); -extern HB_EXPORT BOOL hb_setGetExact( void ); -extern HB_EXPORT BOOL hb_setGetExclusive( void ); -extern HB_EXPORT BOOL hb_setGetExit( void ); -extern HB_EXPORT BOOL hb_setGetExtra( void ); +extern HB_EXPORT HB_BOOL hb_setGetExact( void ); +extern HB_EXPORT HB_BOOL hb_setGetExclusive( void ); +extern HB_EXPORT HB_BOOL hb_setGetExit( void ); +extern HB_EXPORT HB_BOOL hb_setGetExtra( void ); extern HB_EXPORT const char * hb_setGetExtraFile( void ); -extern HB_EXPORT BOOL hb_setGetFixed( void ); -extern HB_EXPORT BOOL hb_setGetIdleRepeat( void ); -extern HB_EXPORT BOOL hb_setGetInsert( void ); -extern HB_EXPORT BOOL hb_setGetIntensity( void ); +extern HB_EXPORT HB_BOOL hb_setGetFixed( void ); +extern HB_EXPORT HB_BOOL hb_setGetIdleRepeat( void ); +extern HB_EXPORT HB_BOOL hb_setGetInsert( void ); +extern HB_EXPORT HB_BOOL hb_setGetIntensity( void ); extern HB_EXPORT const char * hb_setGetPath( void ); extern HB_EXPORT int hb_setGetMargin( void ); extern HB_EXPORT int hb_setGetMBlockSize( void ); -extern HB_EXPORT BOOL hb_setGetMCenter( void ); +extern HB_EXPORT HB_BOOL hb_setGetMCenter( void ); extern HB_EXPORT int hb_setGetMessage( void ); extern HB_EXPORT const char * hb_setGetMFileExt( void ); -extern HB_EXPORT BOOL hb_setGetOptimize( void ); -extern HB_EXPORT BOOL hb_setGetPrinter( void ); +extern HB_EXPORT HB_BOOL hb_setGetOptimize( void ); +extern HB_EXPORT HB_BOOL hb_setGetPrinter( void ); extern HB_EXPORT const char * hb_setGetPrintFile( void ); -extern HB_EXPORT BOOL hb_setGetScoreBoard( void ); -extern HB_EXPORT BOOL hb_setGetScrollBreak( void ); -extern HB_EXPORT BOOL hb_setGetSoftSeek( void ); -extern HB_EXPORT BOOL hb_setGetStrictRead( void ); +extern HB_EXPORT HB_BOOL hb_setGetScoreBoard( void ); +extern HB_EXPORT HB_BOOL hb_setGetScrollBreak( void ); +extern HB_EXPORT HB_BOOL hb_setGetSoftSeek( void ); +extern HB_EXPORT HB_BOOL hb_setGetStrictRead( void ); extern HB_EXPORT int hb_setGetTypeAhead( void ); -extern HB_EXPORT BOOL hb_setGetUnique( void ); +extern HB_EXPORT HB_BOOL hb_setGetUnique( void ); extern HB_EXPORT int hb_setGetFileCase( void ); extern HB_EXPORT int hb_setGetDirCase( void ); extern HB_EXPORT int hb_setGetDirSeparator( void ); extern HB_EXPORT int hb_setGetVideoMode( void ); -extern HB_EXPORT BOOL hb_setGetWrap( void ); +extern HB_EXPORT HB_BOOL hb_setGetWrap( void ); extern HB_EXPORT int hb_setGetDBFLockScheme( void ); -extern HB_EXPORT BOOL hb_setGetHardCommit( void ); -extern HB_EXPORT BOOL hb_setGetForceOpt( void ); -extern HB_EXPORT BOOL hb_setGetDefExtension( void ); +extern HB_EXPORT HB_BOOL hb_setGetHardCommit( void ); +extern HB_EXPORT HB_BOOL hb_setGetForceOpt( void ); +extern HB_EXPORT HB_BOOL hb_setGetDefExtension( void ); extern HB_EXPORT const char * hb_setGetEOL( void ); -extern HB_EXPORT BOOL hb_setGetTrimFileName( void ); +extern HB_EXPORT HB_BOOL hb_setGetTrimFileName( void ); extern HB_EXPORT const char * hb_setGetHBOUTLOG( void ); extern HB_EXPORT const char * hb_setGetHBOUTLOGINFO( void ); extern HB_EXPORT const char * hb_setGetOSCODEPAGE( void ); diff --git a/harbour/include/hbsocket.h b/harbour/include/hbsocket.h index cad19ace66..053dfe151a 100644 --- a/harbour/include/hbsocket.h +++ b/harbour/include/hbsocket.h @@ -74,16 +74,16 @@ HB_EXPORT extern int hb_socketGetError( void ); HB_EXPORT extern int hb_socketGetOsError( void ); HB_EXPORT extern const char * hb_socketErrorStr( int iError ); HB_EXPORT extern int hb_socketGetAddrFamilly( const void * pSockAddr, unsigned len ); -HB_EXPORT extern BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr ); -HB_EXPORT extern BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ); -HB_EXPORT extern BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ); +HB_EXPORT extern HB_BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr ); +HB_EXPORT extern HB_BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ); +HB_EXPORT extern HB_BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ); HB_EXPORT extern char * hb_socketAddrGetName( const void * pSockAddr, unsigned len ); -HB_EXPORT extern BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ); +HB_EXPORT extern HB_BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ); HB_EXPORT extern char * hb_socketResolveAddr( const char * szAddr, int af ); HB_EXPORT extern PHB_ITEM hb_socketGetHosts( const char * szAddr, int af ); HB_EXPORT extern PHB_ITEM hb_socketGetAliases( const char * szAddr, int af ); HB_EXPORT extern int hb_socketAddrGetPort( const void * pSockAddr, unsigned len ); -HB_EXPORT extern BOOL hb_socketAddrFromItem( void ** pSockAddr, unsigned * puiLen, PHB_ITEM pAddrItm ); +HB_EXPORT extern HB_BOOL hb_socketAddrFromItem( void ** pSockAddr, unsigned * puiLen, PHB_ITEM pAddrItm ); HB_EXPORT extern PHB_ITEM hb_socketAddrToItem( const void * pSockAddr, unsigned len ); HB_EXPORT extern int hb_socketGetSockName( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen ); HB_EXPORT extern int hb_socketGetPeerName( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen ); @@ -98,11 +98,11 @@ HB_EXPORT extern long hb_socketSend( HB_SOCKET sd, const void * data, lo HB_EXPORT extern long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags, const void * pSockAddr, unsigned uiSockLen, HB_LONG timeout ); HB_EXPORT extern long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_LONG timeout ); HB_EXPORT extern long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_LONG timeout ); -HB_EXPORT extern int hb_socketSetBlockingIO( HB_SOCKET sd, BOOL fBlocking ); -HB_EXPORT extern int hb_socketSetNoDelay( HB_SOCKET sd, BOOL fNoDelay ); -HB_EXPORT extern int hb_socketSetReuseAddr( HB_SOCKET sd, BOOL fReuse ); -HB_EXPORT extern int hb_socketSetKeepAlive( HB_SOCKET sd, BOOL fKeepAlive ); -HB_EXPORT extern int hb_socketSetBroadcast( HB_SOCKET sd, BOOL fBroadcast ); +HB_EXPORT extern int hb_socketSetBlockingIO( HB_SOCKET sd, HB_BOOL fBlocking ); +HB_EXPORT extern int hb_socketSetNoDelay( HB_SOCKET sd, HB_BOOL fNoDelay ); +HB_EXPORT extern int hb_socketSetReuseAddr( HB_SOCKET sd, HB_BOOL fReuse ); +HB_EXPORT extern int hb_socketSetKeepAlive( HB_SOCKET sd, HB_BOOL fKeepAlive ); +HB_EXPORT extern int hb_socketSetBroadcast( HB_SOCKET sd, HB_BOOL fBroadcast ); HB_EXPORT extern int hb_socketSetSndBufSize( HB_SOCKET sd, int iSize ); HB_EXPORT extern int hb_socketSetRcvBufSize( HB_SOCKET sd, int iSize ); HB_EXPORT extern int hb_socketGetRcvBufSize( HB_SOCKET sd, int * piSize ); @@ -111,9 +111,9 @@ HB_EXPORT extern int hb_socketSetMulticast( HB_SOCKET sd, int af, const HB_EXPORT extern int hb_socketSelectRead( HB_SOCKET sd, HB_LONG timeout ); HB_EXPORT extern int hb_socketSelectWrite( HB_SOCKET sd, HB_LONG timeout ); HB_EXPORT extern int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout ); -HB_EXPORT extern int hb_socketSelect( PHB_ITEM pArrayRD, BOOL fSetRD, - PHB_ITEM pArrayWR, BOOL fSetWR, - PHB_ITEM pArrayEX, BOOL fSetEX, +HB_EXPORT extern int hb_socketSelect( PHB_ITEM pArrayRD, HB_BOOL fSetRD, + PHB_ITEM pArrayWR, HB_BOOL fSetWR, + PHB_ITEM pArrayEX, HB_BOOL fSetEX, HB_LONG timeout, HB_SOCKET_FUNC pFunc ); HB_EXTERN_END diff --git a/harbour/include/hbstack.h b/harbour/include/hbstack.h index a0d268036c..327183ede8 100644 --- a/harbour/include/hbstack.h +++ b/harbour/include/hbstack.h @@ -101,7 +101,7 @@ HB_IOERRORS, * PHB_IOERRORS; typedef struct { const char * szDefaultRDD; /* default RDD */ - BOOL fNetError; /* current NETERR() flag */ + HB_BOOL fNetError; /* current NETERR() flag */ void ** waList; /* Allocated WorkAreas */ USHORT uiWaMax; /* Number of allocated WA */ @@ -177,7 +177,7 @@ typedef struct HB_PRIVATE_STACK privates; /* private variables stack */ HB_SET_STRUCT set; int iKeyPoll; /* counter for GT/keyboard polling */ - BOOL fDebugRequest; /* request debugger activation */ + HB_BOOL fDebugRequest; /* request debugger activation */ void * pDebugInfo; /* internal debugger structure */ #if defined( HB_MT_VM ) int iUnlocked; /* counter for nested hb_vmUnlock() calls */ @@ -332,7 +332,7 @@ extern LONG hb_stackWithObjectOffset( void ); extern void hb_stackWithObjectSetOffset( LONG ); extern int * hb_stackKeyPolls( void ); -extern BOOL * hb_stackDebugRequest( void ); +extern HB_BOOL * hb_stackDebugRequest( void ); extern void hb_stackDestroyTSD( void ); @@ -354,7 +354,7 @@ extern void hb_stackUpdateAllocator( void *, PHB_ALLOCUPDT_FUNC, int ); extern PHB_DYN_HANDLES hb_stackGetDynHandle( PHB_DYNS pDynSym ); extern int hb_stackDynHandlesCount( void ); extern void hb_stackClearMemvars( int ); - extern BOOL hb_stackQuitState( void ); + extern HB_BOOL hb_stackQuitState( void ); extern void hb_stackSetQuitState( USHORT uiState ); extern int hb_stackUnlock( void ); extern int hb_stackLock( void ); diff --git a/harbour/include/hbsxfunc.h b/harbour/include/hbsxfunc.h index 189afd31b2..98379ec99e 100644 --- a/harbour/include/hbsxfunc.h +++ b/harbour/include/hbsxfunc.h @@ -68,10 +68,10 @@ LONG hb_sxPtoD( const char * pDate ); void hb_sxEnCrypt( const char * pSrc, char * pDst, const char * pKeyVal, HB_SIZE ulLen ); void hb_sxDeCrypt( const char * pSrc, char * pDst, const char * pKeyVal, HB_SIZE ulLen ); -BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, char * pDstBuf, HB_SIZE ulDstLen ); -BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, char * pDstBuf, HB_SIZE ulDstLen, HB_SIZE * pulSize ); -BOOL hb_LZSSxCompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput, HB_SIZE * pulSize ); -BOOL hb_LZSSxDecompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput ); +HB_BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, char * pDstBuf, HB_SIZE ulDstLen ); +HB_BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, char * pDstBuf, HB_SIZE ulDstLen, HB_SIZE * pulSize ); +HB_BOOL hb_LZSSxCompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput, HB_SIZE * pulSize ); +HB_BOOL hb_LZSSxDecompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput ); HB_EXTERN_END diff --git a/harbour/include/hbthread.h b/harbour/include/hbthread.h index 96a8cc68c7..615c22375f 100644 --- a/harbour/include/hbthread.h +++ b/harbour/include/hbthread.h @@ -284,7 +284,7 @@ HB_EXTERN_BEGIN struct _HB_WAIT_LIST * prev; struct _HB_WAIT_LIST * next; HB_OSCOND_T cond; - BOOL signaled; + HB_BOOL signaled; } HB_WAIT_LIST, * PHB_WAIT_LIST; typedef struct @@ -304,7 +304,7 @@ HB_EXTERN_BEGIN #ifdef HB_CRITICAL_NEED_INIT typedef struct { - BOOL fInit; + HB_BOOL fInit; union { int dummy; @@ -318,7 +318,7 @@ HB_EXTERN_BEGIN # if defined( HB_COND_OS_SUPPORT ) typedef struct { - BOOL fInit; + HB_BOOL fInit; union { int dummy; @@ -329,7 +329,7 @@ HB_EXTERN_BEGIN # else typedef struct { - BOOL fInit; + HB_BOOL fInit; int waiters; union { @@ -369,8 +369,8 @@ typedef struct _HB_THREADSTATE void * pI18N; void * hGT; void * pStackId; - BOOL fActive; - BOOL fFinished; + HB_BOOL fActive; + HB_BOOL fFinished; PHB_ITEM pParams; PHB_ITEM pMemvars; PHB_ITEM pResult; @@ -396,36 +396,36 @@ extern void hb_threadReleaseCPU( void ); void hb_atomic_set( volatile HB_COUNTER * pCounter, HB_COUNTER value ); HB_COUNTER hb_atomic_get( volatile HB_COUNTER * pCounter ); void hb_atomic_inc( volatile HB_COUNTER * pCounter ); -BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ); /* returns TRUE when counter reach after decrementation */ +HB_BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ); /* returns TRUE when counter reach after decrementation */ /* Critical sections or fast non recursive MUTEXes */ extern void hb_threadEnterCriticalSection( HB_CRITICAL_T * critical ); extern void hb_threadLeaveCriticalSection( HB_CRITICAL_T * critical ); /* conditional variables */ -extern BOOL hb_threadCondSignal( HB_COND_T * cond ); -extern BOOL hb_threadCondBroadcast( HB_COND_T * cond ); -extern BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ); -extern BOOL hb_threadCondTimedWait( HB_COND_T * cond, HB_CRITICAL_T * mutex, ULONG ulMilliSec ); +extern HB_BOOL hb_threadCondSignal( HB_COND_T * cond ); +extern HB_BOOL hb_threadCondBroadcast( HB_COND_T * cond ); +extern HB_BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ); +extern HB_BOOL hb_threadCondTimedWait( HB_COND_T * cond, HB_CRITICAL_T * mutex, ULONG ulMilliSec ); extern HB_THREAD_HANDLE hb_threadCreate( HB_THREAD_ID * th_id, PHB_THREAD_STARTFUNC start_func, void * Cargo ); -extern BOOL hb_threadJoin( HB_THREAD_HANDLE th_h ); -extern BOOL hb_threadDetach( HB_THREAD_HANDLE th_h ); +extern HB_BOOL hb_threadJoin( HB_THREAD_HANDLE th_h ); +extern HB_BOOL hb_threadDetach( HB_THREAD_HANDLE th_h ); /* used by .prg code */ extern PHB_ITEM hb_threadMutexCreate( void ); -extern BOOL hb_threadMutexLock( PHB_ITEM pItem ); -extern BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ); -extern BOOL hb_threadMutexUnlock( PHB_ITEM pItem ); -extern void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, BOOL fWaiting ); -extern PHB_ITEM hb_threadMutexSubscribe( PHB_ITEM pItem, BOOL fClear ); -extern PHB_ITEM hb_threadMutexTimedSubscribe( PHB_ITEM pItem, ULONG ulMilliSec, BOOL fClear ); +extern HB_BOOL hb_threadMutexLock( PHB_ITEM pItem ); +extern HB_BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ); +extern HB_BOOL hb_threadMutexUnlock( PHB_ITEM pItem ); +extern void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, HB_BOOL fWaiting ); +extern PHB_ITEM hb_threadMutexSubscribe( PHB_ITEM pItem, HB_BOOL fClear ); +extern PHB_ITEM hb_threadMutexTimedSubscribe( PHB_ITEM pItem, ULONG ulMilliSec, HB_BOOL fClear ); #if defined( HB_MT_VM ) && defined( _HB_API_INTERNAL_ ) -extern void hb_threadMutexUnlockAll( void ); -extern void hb_threadMutexSyncSignal( PHB_ITEM pItemMtx ); -extern BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, PHB_ITEM pItemSync ); +extern void hb_threadMutexUnlockAll( void ); +extern void hb_threadMutexSyncSignal( PHB_ITEM pItemMtx ); +extern HB_BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, PHB_ITEM pItemSync ); #if defined( HB_NO_TLS ) || defined( HB_TASK_THREAD ) # undef HB_USE_TLS diff --git a/harbour/include/hbtypes.h b/harbour/include/hbtypes.h index f55237c156..1f2118b7c9 100644 --- a/harbour/include/hbtypes.h +++ b/harbour/include/hbtypes.h @@ -66,7 +66,7 @@ typedef PHB_SYMB ( * VM_PROCESS_SYMBOLS ) typedef void ( * VM_EXECUTE ) ( const BYTE * pCode, PHB_SYMB pSymbols ); -typedef BOOL ( * EXT_IS_ARRAY ) ( int iParam ); +typedef HB_BOOL ( * EXT_IS_ARRAY ) ( int iParam ); typedef char * ( * EXT_PARC1 ) ( int iParam ); typedef char * ( * EXT_PARC2 ) ( int iParam, HB_SIZE ulArrayIndex ); typedef PHB_ITEM ( * HB_PARAM )( int iParam, long lMask ); @@ -119,16 +119,16 @@ typedef int ( * HB_STORL2 )( int iLogical, int iParam , HB_SIZE ulArrayInde typedef int ( * HB_STORNI2 )( int iValue, int iParam , HB_SIZE ulArrayIndex ); typedef int ( * HB_STORNL2 )( long lValue, int iParam , HB_SIZE ulArrayIndex ); typedef int ( * HB_STORND2 )( double dValue, int iParam , HB_SIZE ulArrayIndex ); -typedef BOOL ( * HB_ARRAYNEW )( PHB_ITEM pItem, HB_SIZE ulLen ); +typedef HB_BOOL ( * HB_ARRAYNEW )( PHB_ITEM pItem, HB_SIZE ulLen ); typedef HB_SIZE ( * HB_ARRAYLEN )( PHB_ITEM pArray ); -typedef BOOL ( * HB_ARRAYISOBJECT )( PHB_ITEM pArray ); -typedef BOOL ( * HB_ARRAYADD )( PHB_ITEM pArray, PHB_ITEM pItemValue ); -typedef BOOL ( * HB_ARRAYINS )( PHB_ITEM pArray, HB_SIZE ulIndex ); -typedef BOOL ( * HB_ARRAYDEL )( PHB_ITEM pArray, HB_SIZE ulIndex ); -typedef BOOL ( * HB_ARRAYSIZE )( PHB_ITEM pArray, HB_SIZE ulLen ); -typedef BOOL ( * HB_ARRAYLAST )( PHB_ITEM pArray, PHB_ITEM pResult ); -typedef BOOL ( * HB_ARRAYSET )( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); -typedef BOOL ( * HB_ARRAYGET )( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); +typedef HB_BOOL ( * HB_ARRAYISOBJECT )( PHB_ITEM pArray ); +typedef HB_BOOL ( * HB_ARRAYADD )( PHB_ITEM pArray, PHB_ITEM pItemValue ); +typedef HB_BOOL ( * HB_ARRAYINS )( PHB_ITEM pArray, HB_SIZE ulIndex ); +typedef HB_BOOL ( * HB_ARRAYDEL )( PHB_ITEM pArray, HB_SIZE ulIndex ); +typedef HB_BOOL ( * HB_ARRAYSIZE )( PHB_ITEM pArray, HB_SIZE ulLen ); +typedef HB_BOOL ( * HB_ARRAYLAST )( PHB_ITEM pArray, PHB_ITEM pResult ); +typedef HB_BOOL ( * HB_ARRAYSET )( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); +typedef HB_BOOL ( * HB_ARRAYGET )( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ); typedef void ( * HB_XINIT )( void ); /* Initialize fixed memory subsystem */ typedef void ( * HB_XEXIT )( void ); /* Deinitialize fixed memory subsystem */ typedef void * ( * HB_XALLOC )( ULONG ulSize ); /* allocates memory, returns NULL on failure */ diff --git a/harbour/include/hbvm.h b/harbour/include/hbvm.h index a9b6c65e83..a662ca6801 100644 --- a/harbour/include/hbvm.h +++ b/harbour/include/hbvm.h @@ -58,7 +58,7 @@ HB_EXTERN_BEGIN /* Harbour virtual machine init/exit functions */ -extern HB_EXPORT void hb_vmInit( BOOL bStartMainProc ); +extern HB_EXPORT void hb_vmInit( HB_BOOL bStartMainProc ); extern HB_EXPORT int hb_vmQuit( void ); /* Immediately quits the virtual machine, return ERRORLEVEL code */ /* registration AtInit, AtExit and AtQuit functions. @@ -87,27 +87,27 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, USHORT u 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 */ - BOOL fAllocated; /* the symbol table is dynamically allocated and should be freed on HVM exit */ - BOOL fActive; /* the symbol table is currently active */ - BOOL fInitStatics; /* static initialization should be executed */ + 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, BOOL fDynLib, BOOL fClone ); - extern BOOL hb_vmLockModuleSymbols( void ); + extern PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, 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 ); - extern void hb_vmBeginSymbolGroup( void * hDynLib, BOOL fClone ); + extern void hb_vmBeginSymbolGroup( void * hDynLib, HB_BOOL fClone ); 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 BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, USHORT * puiSymbols ); + extern HB_BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, USHORT * puiSymbols ); extern PHB_SYMB hb_vmGetRealFuncSym( PHB_SYMB pSym ); extern void hb_vmSetFunction( PHB_SYMB pOldSym, PHB_SYMB pNewSym ); extern void hb_vmEnumRelease( PHB_ITEM pBase, PHB_ITEM pValue ); - extern BOOL hb_vmMsgReference( PHB_ITEM pObject, PHB_DYNS pMessage, PHB_DYNS pAccMsg ); /* create extended message reference */ + extern HB_BOOL hb_vmMsgReference( PHB_ITEM pObject, PHB_DYNS pMessage, PHB_DYNS pAccMsg ); /* create extended message reference */ extern void hb_vmUpdateAllocator( PHB_ALLOCUPDT_FUNC pFunc, int iCount ); @@ -125,7 +125,7 @@ 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 BOOL hb_vmRequestReenter( void ); +extern HB_EXPORT HB_BOOL hb_vmRequestReenter( void ); extern HB_EXPORT void hb_vmRequestRestore( void ); /* Return values of hb_vmRequestQuery() */ @@ -154,7 +154,7 @@ extern HB_EXPORT void hb_vmPushInteger( int iNumber ); /* pushes a integer n extern HB_EXPORT void hb_vmPushLong( long lNumber ); /* pushes a long number onto the stack */ extern HB_EXPORT void hb_vmPushDouble( double lNumber, int iDec ); /* pushes a double number onto the stack */ extern HB_EXPORT void hb_vmPushNumInt( HB_LONG lNumber ); /* pushes a number on to the stack and decides if it is integer or HB_LONG */ -extern HB_EXPORT void hb_vmPushLogical( BOOL bValue ); /* pushes a logical value onto the stack */ +extern HB_EXPORT void hb_vmPushLogical( HB_BOOL bValue ); /* pushes a logical value onto the stack */ extern HB_EXPORT void hb_vmPushString( const char * szText, HB_SIZE length ); /* pushes a string on to the stack */ extern HB_EXPORT void hb_vmPushStringPcode( const char * szText, HB_SIZE length ); /* pushes a string from pcode on to the stack */ extern HB_EXPORT void hb_vmPushDate( long lDate ); /* pushes a long date onto the stack */ @@ -167,14 +167,14 @@ extern HB_EXPORT void hb_vmPushState( void ); /* push current VM state on st extern HB_EXPORT void hb_vmPopState( void ); /* pop current VM state from stack */ extern HB_EXPORT void hb_vmPushItemRef( PHB_ITEM pItem ); /* push item reference */ -extern HB_EXPORT BOOL hb_vmIsMt( void ); /* return TRUE if HVM is compiled with thread support */ +extern HB_EXPORT HB_BOOL hb_vmIsMt( void ); /* return TRUE if HVM is compiled with thread support */ extern HB_EXPORT void hb_vmLock( void ); /* lock VM blocking GC execution by other threads */ extern HB_EXPORT void hb_vmUnlock( void ); /* unlock VM, allow GC execution */ #ifdef _HB_API_INTERNAL_ -extern HB_EXPORT BOOL hb_vmSuspendThreads( BOOL fWait ); /* (try to) stop all threads except current one */ +extern HB_EXPORT HB_BOOL hb_vmSuspendThreads( HB_BOOL fWait ); /* (try to) stop all threads except current one */ extern HB_EXPORT void hb_vmResumeThreads( void ); /* unblock execution of threads stopped by hb_vmSuspendThreads() */ #endif -extern HB_EXPORT BOOL hb_vmThreadRegister( void * ); /* Register new thread without local thread HVM stack */ +extern HB_EXPORT HB_BOOL hb_vmThreadRegister( void * ); /* Register new thread without local thread HVM stack */ extern HB_EXPORT void hb_vmThreadRelease( void * ); /* Remove registered thread which does not have local thread HVM stack yet */ extern HB_EXPORT void hb_vmThreadInit( void * ); /* allocate local thread HVM stack */ extern HB_EXPORT void hb_vmThreadQuit( void ); /* destroy local thread HVM stack */ diff --git a/harbour/include/hbvmpub.h b/harbour/include/hbvmpub.h index a62af4c90b..726e5f172a 100644 --- a/harbour/include/hbvmpub.h +++ b/harbour/include/hbvmpub.h @@ -222,7 +222,7 @@ typedef struct _HB_SYMB PHB_DYNS pDynSym; /* pointer to its dynamic symbol if defined */ } HB_SYMB, * PHB_SYMB; -#define HB_DYNS_FUNC( hbfunc ) BOOL hbfunc( PHB_DYNS pDynSymbol, void * Cargo ) +#define HB_DYNS_FUNC( hbfunc ) HB_BOOL hbfunc( PHB_DYNS pDynSymbol, void * Cargo ) typedef HB_DYNS_FUNC( PHB_DYNS_FUNC ); typedef void * ( * PHB_ALLOCUPDT_FUNC )( void *, int ); diff --git a/harbour/include/hbwmain.c b/harbour/include/hbwmain.c index 6c7b0ad69c..be9b9ae001 100644 --- a/harbour/include/hbwmain.c +++ b/harbour/include/hbwmain.c @@ -69,7 +69,7 @@ int WINAPI WinMain( HINSTANCE hInstance, /* handle to current instance */ int iCmdShow ) /* show state of window */ { LPSTR pArgs, pArg, pDst, pSrc, pFree; - BOOL fQuoted; + HB_BOOL fQuoted; int iErrorCode; HANDLE hHeap; diff --git a/harbour/include/hbxvm.h b/harbour/include/hbxvm.h index a6ec9f1ec7..887a906dca 100644 --- a/harbour/include/hbxvm.h +++ b/harbour/include/hbxvm.h @@ -73,148 +73,148 @@ HB_EXTERN_BEGIN * to check HVM state so they are simply declared as void. */ -extern HB_EXPORT void hb_xvmExitProc( void ); -extern HB_EXPORT void hb_xvmEndProc( void ); -extern HB_EXPORT void hb_xvmSeqBegin( void ); -extern HB_EXPORT BOOL hb_xvmSeqEnd( void ); -extern HB_EXPORT BOOL hb_xvmSeqEndTest( void ); -extern HB_EXPORT BOOL hb_xvmSeqRecover( void ); -extern HB_EXPORT void hb_xvmSeqAlways( void ); -extern HB_EXPORT BOOL hb_xvmAlwaysBegin( void ); -extern HB_EXPORT BOOL hb_xvmAlwaysEnd( void ); -extern HB_EXPORT BOOL hb_xvmSeqBlock( void ); +extern HB_EXPORT void hb_xvmExitProc( void ); +extern HB_EXPORT void hb_xvmEndProc( void ); +extern HB_EXPORT void hb_xvmSeqBegin( void ); +extern HB_EXPORT HB_BOOL hb_xvmSeqEnd( void ); +extern HB_EXPORT HB_BOOL hb_xvmSeqEndTest( void ); +extern HB_EXPORT HB_BOOL hb_xvmSeqRecover( void ); +extern HB_EXPORT void hb_xvmSeqAlways( void ); +extern HB_EXPORT HB_BOOL hb_xvmAlwaysBegin( void ); +extern HB_EXPORT HB_BOOL hb_xvmAlwaysEnd( void ); +extern HB_EXPORT HB_BOOL hb_xvmSeqBlock( void ); -extern HB_EXPORT BOOL hb_xvmEnumStart( BYTE, BYTE ); /* prepare FOR EACH loop */ -extern HB_EXPORT BOOL hb_xvmEnumNext( void ); /* increment FOR EACH loop counter */ -extern HB_EXPORT BOOL hb_xvmEnumPrev( void ); /* decrement FOR EACH loop counter */ -extern HB_EXPORT void hb_xvmEnumEnd( void ); /* rewind the stack after FOR EACH loop counter */ +extern HB_EXPORT HB_BOOL hb_xvmEnumStart( BYTE, BYTE ); /* prepare FOR EACH loop */ +extern HB_EXPORT HB_BOOL hb_xvmEnumNext( void ); /* increment FOR EACH loop counter */ +extern HB_EXPORT HB_BOOL hb_xvmEnumPrev( void ); /* decrement FOR EACH loop counter */ +extern HB_EXPORT void hb_xvmEnumEnd( void ); /* rewind the stack after FOR EACH loop counter */ -extern HB_EXPORT void hb_xvmWithObjectStart( void ); /* prepare WITH OBJECT statement */ -extern HB_EXPORT void hb_xvmWithObjectEnd( void ); /* rewind the stack after normal WITH OBJECT */ -extern HB_EXPORT void hb_xvmWithObjectMessage( PHB_SYMB ); /* send WITH OBJECT message to current WITH OBJECT control variable */ +extern HB_EXPORT void hb_xvmWithObjectStart( void ); /* prepare WITH OBJECT statement */ +extern HB_EXPORT void hb_xvmWithObjectEnd( void ); /* rewind the stack after normal WITH OBJECT */ +extern HB_EXPORT void hb_xvmWithObjectMessage( PHB_SYMB ); /* send WITH OBJECT message to current WITH OBJECT control variable */ -extern HB_EXPORT BOOL hb_xvmSwitchGet( PHB_ITEM * ); +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( 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 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 BOOL hb_xvmDo( USHORT uiParams ); -extern HB_EXPORT BOOL hb_xvmFunction( USHORT uiParams ); -extern HB_EXPORT BOOL hb_xvmSend( USHORT uiParams ); -extern HB_EXPORT 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 BOOL hb_xvmPushVariable( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPopVariable( PHB_SYMB pSymbol ); -extern HB_EXPORT void hb_xvmPushBlock( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ -extern HB_EXPORT void hb_xvmPushBlockShort( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ -extern HB_EXPORT void hb_xvmPushBlockLarge( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ -extern HB_EXPORT void hb_xvmPushSelf( void ); -extern HB_EXPORT void hb_xvmPushVParams( void ); -extern HB_EXPORT void hb_xvmPushLocal( SHORT iLocal ); /* pushes the containts of a local onto the stack */ -extern HB_EXPORT void hb_xvmPushLocalByRef( SHORT iLocal ); /* pushes a local by refrence onto the stack */ -extern HB_EXPORT void hb_xvmPopLocal( SHORT iLocal ); /* pops the stack latest value onto a local */ -extern HB_EXPORT BOOL hb_xvmPushField( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPopField( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPushMemvar( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPushMemvarByRef( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPopMemvar( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPushAliasedField( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPopAliasedField( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPushAliasedVar( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPopAliasedVar( PHB_SYMB pSymbol ); -extern HB_EXPORT BOOL hb_xvmPushAlias( void ); -extern HB_EXPORT BOOL hb_xvmPopAlias( void ); /* select the workarea using a given item or a substituted value */ -extern HB_EXPORT BOOL hb_xvmPopLogical( BOOL * ); /* pops the stack latest value and returns its logical value */ -extern HB_EXPORT BOOL hb_xvmSwapAlias( void ); /* swaps items on the eval stack and pops the workarea number */ -extern HB_EXPORT BOOL hb_xvmLocalAddInt( int iLocal, LONG lAdd ); /* add integer to given local variable */ -extern HB_EXPORT BOOL hb_xvmLocalInc( int iLocal ); /* increment given local variable */ -extern HB_EXPORT BOOL hb_xvmLocalDec( int iLocal ); /* decrement given local variable */ -extern HB_EXPORT BOOL hb_xvmLocalIncPush( int iLocal ); /* increment given local variable and pussh it on HVM stack */ +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 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_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 HB_BOOL hb_xvmPushVariable( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPopVariable( PHB_SYMB pSymbol ); +extern HB_EXPORT void hb_xvmPushBlock( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ +extern HB_EXPORT void hb_xvmPushBlockShort( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ +extern HB_EXPORT void hb_xvmPushBlockLarge( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */ +extern HB_EXPORT void hb_xvmPushSelf( void ); +extern HB_EXPORT void hb_xvmPushVParams( void ); +extern HB_EXPORT void hb_xvmPushLocal( SHORT iLocal ); /* pushes the containts of a local onto the stack */ +extern HB_EXPORT void hb_xvmPushLocalByRef( SHORT iLocal ); /* pushes a local by refrence onto the stack */ +extern HB_EXPORT void hb_xvmPopLocal( SHORT iLocal ); /* pops the stack latest value onto a local */ +extern HB_EXPORT HB_BOOL hb_xvmPushField( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPopField( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPushMemvar( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPushMemvarByRef( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPopMemvar( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPushAliasedField( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPopAliasedField( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPushAliasedVar( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPopAliasedVar( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmPushAlias( void ); +extern HB_EXPORT HB_BOOL hb_xvmPopAlias( void ); /* select the workarea using a given item or a substituted value */ +extern HB_EXPORT HB_BOOL hb_xvmPopLogical( HB_BOOL * ); /* pops the stack latest value and returns its logical value */ +extern HB_EXPORT HB_BOOL hb_xvmSwapAlias( void ); /* swaps items on the eval stack and pops the workarea number */ +extern HB_EXPORT HB_BOOL hb_xvmLocalAddInt( int iLocal, LONG lAdd ); /* add integer to given local variable */ +extern HB_EXPORT HB_BOOL hb_xvmLocalInc( int iLocal ); /* increment given local variable */ +extern HB_EXPORT HB_BOOL hb_xvmLocalDec( int iLocal ); /* decrement given local variable */ +extern HB_EXPORT HB_BOOL hb_xvmLocalIncPush( int iLocal ); /* increment given local variable and pussh it on HVM stack */ -extern HB_EXPORT BOOL hb_xvmAnd( void ); -extern HB_EXPORT BOOL hb_xvmOr( void ); -extern HB_EXPORT BOOL hb_xvmNot( void ); -extern HB_EXPORT BOOL hb_xvmNegate( void ); -extern HB_EXPORT void hb_xvmDuplicate( void ); -extern HB_EXPORT void hb_xvmDuplUnRef( void ); -extern HB_EXPORT void hb_xvmPushUnRef( void ); -extern HB_EXPORT void hb_xvmSwap( int iCount ); -extern HB_EXPORT BOOL hb_xvmForTest( void ); -extern HB_EXPORT void hb_xvmFuncPtr( void ); -extern HB_EXPORT BOOL hb_xvmEqual( void ); /* checks if the two latest values on the stack are equal, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmExactlyEqual( void ); /* checks if the two latest values on the stack are exactly equal, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmNotEqual( void ); /* checks if the two latest values on the stack are not equal, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmLess( void ); /* checks if the latest - 1 value is less than the latest, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmLessEqual( void ); /* checks if the latest - 1 value is less than or equal the latest, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmGreater( void ); /* checks if the latest - 1 value is greater than the latest, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmGreaterEqual( void ); /* checks if the latest - 1 value is greater than or equal the latest, removes both and leaves result */ -extern HB_EXPORT BOOL hb_xvmInstring( void ); /* check whether string 1 is contained in string 2 */ -extern HB_EXPORT BOOL hb_xvmPlus( void ); /* sums the latest two values on the stack, removes them and leaves the result */ -extern HB_EXPORT BOOL hb_xvmPlusEq( void ); -extern HB_EXPORT BOOL hb_xvmPlusEqPop( void ); -extern HB_EXPORT BOOL hb_xvmMinus( void ); /* substracts the latest two values on the stack, removes them and leaves the result */ -extern HB_EXPORT BOOL hb_xvmMinusEq( void ); -extern HB_EXPORT BOOL hb_xvmMinusEqPop( void ); -extern HB_EXPORT BOOL hb_xvmMult( void ); /* multiplies the latest two values on the stack, removes them and leaves the result */ -extern HB_EXPORT BOOL hb_xvmMultEq( void ); -extern HB_EXPORT BOOL hb_xvmMultEqPop( void ); -extern HB_EXPORT BOOL hb_xvmDivide( void ); /* divides the latest two values on the stack, removes them and leaves the result */ -extern HB_EXPORT BOOL hb_xvmDivEq( void ); -extern HB_EXPORT BOOL hb_xvmDivEqPop( void ); -extern HB_EXPORT BOOL hb_xvmModulus( void ); /* calculates the modulus of latest two values on the stack, removes them and leaves the result */ -extern HB_EXPORT BOOL hb_xvmModEq( void ); -extern HB_EXPORT BOOL hb_xvmModEqPop( void ); -extern HB_EXPORT BOOL hb_xvmPower( void ); -extern HB_EXPORT BOOL hb_xvmExpEq( void ); -extern HB_EXPORT BOOL hb_xvmExpEqPop( void ); -extern HB_EXPORT BOOL hb_xvmInc( void ); -extern HB_EXPORT BOOL hb_xvmIncEq( void ); -extern HB_EXPORT BOOL hb_xvmIncEqPop( void ); -extern HB_EXPORT BOOL hb_xvmDec( void ); -extern HB_EXPORT BOOL hb_xvmDecEq( void ); -extern HB_EXPORT BOOL hb_xvmDecEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmAnd( void ); +extern HB_EXPORT HB_BOOL hb_xvmOr( void ); +extern HB_EXPORT HB_BOOL hb_xvmNot( void ); +extern HB_EXPORT HB_BOOL hb_xvmNegate( void ); +extern HB_EXPORT void hb_xvmDuplicate( void ); +extern HB_EXPORT void hb_xvmDuplUnRef( void ); +extern HB_EXPORT void hb_xvmPushUnRef( void ); +extern HB_EXPORT void hb_xvmSwap( int iCount ); +extern HB_EXPORT HB_BOOL hb_xvmForTest( void ); +extern HB_EXPORT void hb_xvmFuncPtr( void ); +extern HB_EXPORT HB_BOOL hb_xvmEqual( void ); /* checks if the two latest values on the stack are equal, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmExactlyEqual( void ); /* checks if the two latest values on the stack are exactly equal, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmNotEqual( void ); /* checks if the two latest values on the stack are not equal, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmLess( void ); /* checks if the latest - 1 value is less than the latest, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmLessEqual( void ); /* checks if the latest - 1 value is less than or equal the latest, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmGreater( void ); /* checks if the latest - 1 value is greater than the latest, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmGreaterEqual( void ); /* checks if the latest - 1 value is greater than or equal the latest, removes both and leaves result */ +extern HB_EXPORT HB_BOOL hb_xvmInstring( void ); /* check whether string 1 is contained in string 2 */ +extern HB_EXPORT HB_BOOL hb_xvmPlus( void ); /* sums the latest two values on the stack, removes them and leaves the result */ +extern HB_EXPORT HB_BOOL hb_xvmPlusEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmPlusEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmMinus( void ); /* substracts the latest two values on the stack, removes them and leaves the result */ +extern HB_EXPORT HB_BOOL hb_xvmMinusEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmMinusEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmMult( void ); /* multiplies the latest two values on the stack, removes them and leaves the result */ +extern HB_EXPORT HB_BOOL hb_xvmMultEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmMultEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmDivide( void ); /* divides the latest two values on the stack, removes them and leaves the result */ +extern HB_EXPORT HB_BOOL hb_xvmDivEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmDivEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmModulus( void ); /* calculates the modulus of latest two values on the stack, removes them and leaves the result */ +extern HB_EXPORT HB_BOOL hb_xvmModEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmModEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmPower( void ); +extern HB_EXPORT HB_BOOL hb_xvmExpEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmExpEqPop( void ); +extern HB_EXPORT HB_BOOL hb_xvmInc( void ); +extern HB_EXPORT HB_BOOL hb_xvmIncEq( void ); +extern HB_EXPORT HB_BOOL hb_xvmIncEqPop( void ); +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_xvmArrayGen( HB_SIZE ulElements ); /* generates an ulElements Array and fills it from the stack values */ -extern HB_EXPORT BOOL hb_xvmArrayPush( void ); /* pushes an array element to the stack, removing the array and the index from the stack */ -extern HB_EXPORT 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 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_xvmArrayDim( 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, char * szLocalName ); -extern HB_EXPORT void hb_xvmStaticName( BYTE bIsGlobal, USHORT uiStatic, char * szStaticName ); -extern HB_EXPORT void hb_xvmModuleName( char * szModuleName ); +extern HB_EXPORT void hb_xvmLocalName( USHORT uiLocal, char * szLocalName ); +extern HB_EXPORT void hb_xvmStaticName( BYTE bIsGlobal, USHORT uiStatic, char * szStaticName ); +extern HB_EXPORT void hb_xvmModuleName( char * szModuleName ); -extern HB_EXPORT BOOL hb_xvmMacroDo( USHORT uiArgSets ); -extern HB_EXPORT BOOL hb_xvmMacroFunc( USHORT uiArgSets ); -extern HB_EXPORT BOOL hb_xvmMacroSend( USHORT uiArgSets ); -extern HB_EXPORT BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ); -extern HB_EXPORT BOOL hb_xvmMacroPush( BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroPushRef( void ); -extern HB_EXPORT BOOL hb_xvmMacroPushIndex( void ); -extern HB_EXPORT BOOL hb_xvmMacroPushArg( PHB_SYMB pSymbol, BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroPushList( BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroPushAliased( BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroPushPare( BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroPop( BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroPopAliased( BYTE bFlags ); -extern HB_EXPORT BOOL hb_xvmMacroSymbol( void ); -extern HB_EXPORT BOOL hb_xvmMacroText( void ); +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_xvmMacroPush( BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPushRef( void ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPushIndex( void ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPushArg( PHB_SYMB pSymbol, BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPushList( BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPushAliased( BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPushPare( BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPop( BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroPopAliased( BYTE bFlags ); +extern HB_EXPORT HB_BOOL hb_xvmMacroSymbol( void ); +extern HB_EXPORT HB_BOOL hb_xvmMacroText( void ); -extern HB_EXPORT void hb_xvmPushStringHidden( int iMethod, const char * szText, HB_SIZE ulSize ); -extern HB_EXPORT void hb_xvmPushDouble( double dNumber, int iWidth, int iDec ); +extern HB_EXPORT void hb_xvmPushStringHidden( int iMethod, const char * szText, HB_SIZE ulSize ); +extern HB_EXPORT void hb_xvmPushDouble( double dNumber, int iWidth, int iDec ); #ifdef HB_LONG_LONG_OFF -extern HB_EXPORT void hb_xvmPushLongLong( double dNumber ); +extern HB_EXPORT void hb_xvmPushLongLong( double dNumber ); #else -extern HB_EXPORT void hb_xvmPushLongLong( LONGLONG llNumber ); +extern HB_EXPORT void hb_xvmPushLongLong( LONGLONG llNumber ); #endif #define hb_xvmPushLogical( f ) hb_vmPushLogical( f ) @@ -230,31 +230,31 @@ extern HB_EXPORT void hb_xvmPushLongLong( LONGLONG llNumber ); /* * additional multi PCODE operations */ -extern HB_EXPORT BOOL hb_xvmArrayItemPush( HB_SIZE ulIndex ); -extern HB_EXPORT BOOL hb_xvmArrayItemPop( HB_SIZE ulIndex ); -extern HB_EXPORT BOOL hb_xvmMultByInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmDivideByInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmAddInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmArrayItemPush( HB_SIZE ulIndex ); +extern HB_EXPORT HB_BOOL hb_xvmArrayItemPop( HB_SIZE ulIndex ); +extern HB_EXPORT HB_BOOL hb_xvmMultByInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmDivideByInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmAddInt( LONG lValue ); extern HB_EXPORT void hb_xvmLocalSetInt( int iLocal, LONG lValue ); /*extern HB_EXPORT void hb_xvmLocalSetStr( int iLocal, const char * pValue, HB_SIZE ulLen );*/ extern HB_EXPORT void hb_xvmPushFuncSymbol( PHB_SYMB pSym ); -extern HB_EXPORT BOOL hb_xvmLessThenInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmLessThenIntIs( LONG lValue, BOOL *fValue ); -extern HB_EXPORT BOOL hb_xvmLessEqualThenInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmLessEqualThenIntIs( LONG lValue, BOOL *fValue ); -extern HB_EXPORT BOOL hb_xvmGreaterThenInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmGreaterThenIntIs( LONG lValue, BOOL *fValue ); -extern HB_EXPORT BOOL hb_xvmGreaterEqualThenInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmGreaterEqualThenIntIs( LONG lValue, BOOL *fValue ); -extern HB_EXPORT BOOL hb_xvmEqualInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmEqualIntIs( LONG lValue, BOOL *fValue ); -extern HB_EXPORT BOOL hb_xvmNotEqualInt( LONG lValue ); -extern HB_EXPORT BOOL hb_xvmNotEqualIntIs( LONG lValue, BOOL *fValue ); +extern HB_EXPORT HB_BOOL hb_xvmLessThenInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmLessThenIntIs( LONG lValue, HB_BOOL * fValue ); +extern HB_EXPORT HB_BOOL hb_xvmLessEqualThenInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmLessEqualThenIntIs( LONG lValue, HB_BOOL * fValue ); +extern HB_EXPORT HB_BOOL hb_xvmGreaterThenInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmGreaterThenIntIs( LONG lValue, HB_BOOL * fValue ); +extern HB_EXPORT HB_BOOL hb_xvmGreaterEqualThenInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmGreaterEqualThenIntIs( LONG lValue, HB_BOOL * fValue ); +extern HB_EXPORT HB_BOOL hb_xvmEqualInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmEqualIntIs( LONG lValue, HB_BOOL * fValue ); +extern HB_EXPORT HB_BOOL hb_xvmNotEqualInt( LONG lValue ); +extern HB_EXPORT HB_BOOL hb_xvmNotEqualIntIs( LONG lValue, HB_BOOL * fValue ); -extern HB_EXPORT BOOL hb_xvmLocalAdd( int iLocal ); -extern HB_EXPORT BOOL hb_xvmStaticAdd( USHORT uiStatic ); -extern HB_EXPORT BOOL hb_xvmMemvarAdd( PHB_SYMB pSymbol ); +extern HB_EXPORT HB_BOOL hb_xvmLocalAdd( int iLocal ); +extern HB_EXPORT HB_BOOL hb_xvmStaticAdd( 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/include/hbznet.h b/harbour/include/hbznet.h index 26acd0ab5c..cd4afbe3a5 100644 --- a/harbour/include/hbznet.h +++ b/harbour/include/hbznet.h @@ -72,18 +72,18 @@ typedef void ( * HB_INET_CFUNC ) ( PHB_ZNETSTREAM ); extern HB_EXPORT int hb_znetError( PHB_ZNETSTREAM pStream ); extern HB_EXPORT PHB_ZNETSTREAM hb_znetOpen( int level, int strategy ); -extern HB_EXPORT void hb_znetEncryptKey( PHB_ZNETSTREAM pStream, const void * keydata, int keylen ); -extern HB_EXPORT void hb_znetClose( PHB_ZNETSTREAM pStream ); -extern HB_EXPORT int hb_znetError( PHB_ZNETSTREAM pStream ); -extern HB_EXPORT long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, HB_LONG timeout ); -extern HB_EXPORT long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG timeout ); -extern HB_EXPORT long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_LONG timeout, long * plast ); +extern HB_EXPORT void hb_znetEncryptKey( PHB_ZNETSTREAM pStream, const void * keydata, int keylen ); +extern HB_EXPORT void hb_znetClose( PHB_ZNETSTREAM pStream ); +extern HB_EXPORT int hb_znetError( PHB_ZNETSTREAM pStream ); +extern HB_EXPORT long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, HB_LONG timeout ); +extern HB_EXPORT long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG timeout ); +extern HB_EXPORT long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_LONG timeout, long * plast ); -extern HB_EXPORT BOOL hb_znetInetInitialize( PHB_ITEM, PHB_ZNETSTREAM, - HB_INET_RFUNC, - HB_INET_SFUNC, - HB_INET_FFUNC, - HB_INET_CFUNC ); +extern HB_EXPORT HB_BOOL hb_znetInetInitialize( PHB_ITEM, PHB_ZNETSTREAM, + HB_INET_RFUNC, + HB_INET_SFUNC, + HB_INET_FFUNC, + HB_INET_CFUNC ); HB_EXTERN_END diff --git a/harbour/src/common/expropt1.c b/harbour/src/common/expropt1.c index 5128aa4f1a..eeabe94ee0 100644 --- a/harbour/src/common/expropt1.c +++ b/harbour/src/common/expropt1.c @@ -367,7 +367,7 @@ HB_EXPR_PTR hb_compExprNewTimeStamp( long lDate, long lTime, HB_COMP_DECL ) return pExpr; } -HB_EXPR_PTR hb_compExprNewString( const char *szValue, ULONG ulLen, BOOL fDealloc, HB_COMP_DECL ) +HB_EXPR_PTR hb_compExprNewString( const char *szValue, ULONG ulLen, HB_BOOL fDealloc, HB_COMP_DECL ) { HB_EXPR_PTR pExpr; @@ -395,7 +395,7 @@ HB_EXPR_PTR hb_compExprNewArray( HB_EXPR_PTR pArrList, HB_COMP_DECL ) pArrList->ExprType = HB_ET_ARRAY; /* change type from ET_LIST */ pArrList->ValType = HB_EV_ARRAY; pArrList->ulLength = 0; - pArrList->value.asList.reference = FALSE; + pArrList->value.asList.reference = HB_FALSE; pExpr = pArrList->value.asList.pExprList; /* get first element on the list */ /* Now we need to replace all EO_NONE expressions with ET_NIL expressions @@ -443,7 +443,7 @@ HB_EXPR_PTR hb_compExprNewHash( HB_EXPR_PTR pHashList, HB_COMP_DECL ) } pHashList->ValType = HB_EV_HASH; pHashList->ulLength = 0; - pHashList->value.asList.reference = FALSE; + pHashList->value.asList.reference = HB_FALSE; pHashList->value.asList.pIndex = NULL; /* @@ -708,7 +708,7 @@ HB_EXPR_PTR hb_compExprNewList( HB_EXPR_PTR pFirstItem, HB_COMP_DECL ) pExpr = HB_COMP_EXPR_NEW( HB_ET_LIST ); pExpr->value.asList.pExprList = pFirstItem; - pExpr->value.asList.reference = FALSE; + pExpr->value.asList.reference = HB_FALSE; return pExpr; } @@ -722,7 +722,7 @@ HB_EXPR_PTR hb_compExprNewArgList( HB_EXPR_PTR pFirstItem, HB_COMP_DECL ) pExpr = HB_COMP_EXPR_NEW( HB_ET_ARGLIST ); pExpr->value.asList.pExprList = pFirstItem; - pExpr->value.asList.reference = FALSE; + pExpr->value.asList.reference = HB_FALSE; return pExpr; } @@ -736,7 +736,7 @@ HB_EXPR_PTR hb_compExprNewArgRef( HB_COMP_DECL ) pExpr = HB_COMP_EXPR_NEW( HB_ET_ARGLIST ); pExpr->value.asList.pExprList = NULL; - pExpr->value.asList.reference = TRUE; + pExpr->value.asList.reference = HB_TRUE; return pExpr; } @@ -1219,7 +1219,7 @@ ULONG hb_compExprListLen( HB_EXPR_PTR pExpr ) return ulLen; } -BOOL hb_compExprListTypeCheck( HB_EXPR_PTR pExpr, HB_EXPRTYPE ExprType ) +HB_BOOL hb_compExprListTypeCheck( HB_EXPR_PTR pExpr, HB_EXPRTYPE ExprType ) { pExpr = pExpr->value.asList.pExprList; if( pExpr ) @@ -1234,7 +1234,7 @@ BOOL hb_compExprListTypeCheck( HB_EXPR_PTR pExpr, HB_EXPRTYPE ExprType ) return pExpr == NULL; } - return FALSE; + return HB_FALSE; } /* Return a number of parameters passed to function or method @@ -1359,7 +1359,7 @@ static HB_CBVAR_PTR hb_compExprCBVarNew( const char * szVarName, BYTE bType ) pVar->szName = szVarName; pVar->bType = bType; pVar->pNext = NULL; - pVar->bUsed = FALSE; + pVar->bUsed = HB_FALSE; return pVar; } diff --git a/harbour/src/common/expropt2.c b/harbour/src/common/expropt2.c index 96adfe3035..29f8a807d5 100644 --- a/harbour/src/common/expropt2.c +++ b/harbour/src/common/expropt2.c @@ -60,7 +60,7 @@ #include "hbdate.h" #include "hbmath.h" -static BOOL hb_compExprHasMacro( const char * szText, ULONG ulLen, HB_COMP_DECL ) +static HB_BOOL hb_compExprHasMacro( const char * szText, ULONG ulLen, HB_COMP_DECL ) { while( ulLen-- ) { @@ -70,11 +70,11 @@ static BOOL hb_compExprHasMacro( const char * szText, ULONG ulLen, HB_COMP_DECL ( *szText >= 'A' && *szText <= 'Z' ) || ( *szText >= 'a' && *szText <= 'z' ) ) ) ) { - return TRUE; + return HB_TRUE; } } } - return FALSE; + return HB_FALSE; } static HB_EXPR_PTR hb_compExprReducePlusStrings( HB_EXPR_PTR pLeft, HB_EXPR_PTR pRight, HB_COMP_DECL ) @@ -96,7 +96,7 @@ static HB_EXPR_PTR hb_compExprReducePlusStrings( HB_EXPR_PTR pLeft, HB_EXPR_PTR pLeft->ulLength += pRight->ulLength; szString[ pLeft->ulLength ] = '\0'; pLeft->value.asString.string = szString; - pLeft->value.asString.dealloc = TRUE; + pLeft->value.asString.dealloc = HB_TRUE; } HB_COMP_EXPR_FREE( pRight ); return pLeft; @@ -130,7 +130,7 @@ static HB_EXPR_PTR hb_compExprReduceMinusStrings( HB_EXPR_PTR pLeft, HB_EXPR_PTR pLeft->ulLength += pRight->ulLength; szString[ pLeft->ulLength ] = '\0'; pLeft->value.asString.string = szString; - pLeft->value.asString.dealloc = TRUE; + pLeft->value.asString.dealloc = HB_TRUE; } HB_COMP_EXPR_FREE( pRight ); return pLeft; @@ -591,7 +591,7 @@ HB_EXPR_PTR hb_compExprReduceMinus( HB_EXPR_PTR pSelf, HB_COMP_DECL ) } else { - BOOL fReduce = TRUE; + HB_BOOL fReduce = HB_TRUE; /* Do not reduce strings with the macro operator '&' */ @@ -610,7 +610,7 @@ HB_EXPR_PTR hb_compExprReduceMinus( HB_EXPR_PTR pSelf, HB_COMP_DECL ) ( ch >= 'a' && ch <= 'z' ) || ch == '_' || ! HB_SUPPORT_HARBOUR ) { - fReduce = FALSE; + fReduce = HB_FALSE; break; } } @@ -633,7 +633,7 @@ HB_EXPR_PTR hb_compExprReduceMinus( HB_EXPR_PTR pSelf, HB_COMP_DECL ) return pSelf; } -static BOOL hb_compExprReducePlusNums( HB_EXPR_PTR pSelf, HB_EXPR_PTR pAdd ) +static HB_BOOL hb_compExprReducePlusNums( HB_EXPR_PTR pSelf, HB_EXPR_PTR pAdd ) { HB_EXPR_PTR pLeft, pRight, pNum; @@ -649,7 +649,7 @@ static BOOL hb_compExprReducePlusNums( HB_EXPR_PTR pSelf, HB_EXPR_PTR pAdd ) else if( pRight->ExprType == HB_EO_PLUS ) return hb_compExprReducePlusNums( pRight, pAdd ); else - return FALSE; + return HB_FALSE; switch( pNum->value.asNum.NumType & pAdd->value.asNum.NumType ) { @@ -688,7 +688,7 @@ static BOOL hb_compExprReducePlusNums( HB_EXPR_PTR pSelf, HB_EXPR_PTR pAdd ) break; } - return TRUE; + return HB_TRUE; } HB_EXPR_PTR hb_compExprReducePlus( HB_EXPR_PTR pSelf, HB_COMP_DECL ) @@ -896,7 +896,7 @@ HB_EXPR_PTR hb_compExprReducePlus( HB_EXPR_PTR pSelf, HB_COMP_DECL ) } else { - BOOL fReduce = TRUE; + HB_BOOL fReduce = HB_TRUE; /* Do not reduce strings with the macro operator '&' */ @@ -914,7 +914,7 @@ HB_EXPR_PTR hb_compExprReducePlus( HB_EXPR_PTR pSelf, HB_COMP_DECL ) ( ch >= 'a' && ch <= 'z' ) || ch == '_' || ! HB_SUPPORT_HARBOUR ) { - fReduce = FALSE; + fReduce = HB_FALSE; break; } } @@ -1006,7 +1006,7 @@ HB_EXPR_PTR hb_compExprReduceIN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) !hb_compExprHasMacro( pRight->value.asString.string, pRight->ulLength, HB_COMP_PARAM ) ) ) { - BOOL bResult; + HB_BOOL bResult; /* NOTE: CA-Cl*pper has a bug where the $ operator returns .T. * when an empty string is searched [vszakats] @@ -1054,7 +1054,7 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) * .F. != .F. = .F. * .T. != .F. = .T. */ - BOOL bResult = ( pLeft->value.asLogical != pRight->value.asLogical ); + HB_BOOL bResult = ( pLeft->value.asLogical != pRight->value.asLogical ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1066,7 +1066,7 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_STRING: /* NOTE: the result depends on SET EXACT setting then it * cannot be optimized except the case when NULL string are - * compared - "" != "" is always FALSE regardless of EXACT + * compared - "" != "" is always HB_FALSE regardless of EXACT * setting */ if( ( pLeft->ulLength | pRight->ulLength ) == 0 ) @@ -1075,7 +1075,7 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = FALSE; + pSelf->value.asLogical = HB_FALSE; /* NOTE: COMPATIBILITY: Clipper doesn't optimize this */ } @@ -1083,7 +1083,7 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_NUMERIC: { - BOOL bResult; + HB_BOOL bResult; switch( pLeft->value.asNum.NumType & pRight->value.asNum.NumType ) { @@ -1113,8 +1113,8 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_DATE: case HB_ET_TIMESTAMP: { - BOOL bResult = pLeft->value.asDate.lDate != pRight->value.asDate.lDate || - pLeft->value.asDate.lTime != pRight->value.asDate.lTime; + HB_BOOL bResult = pLeft->value.asDate.lDate != pRight->value.asDate.lDate || + pLeft->value.asDate.lTime != pRight->value.asDate.lTime; HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1128,7 +1128,7 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = FALSE; + pSelf->value.asLogical = HB_FALSE; break; } } @@ -1168,7 +1168,7 @@ HB_EXPR_PTR hb_compExprReduceNE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = TRUE; + pSelf->value.asLogical = HB_TRUE; } /* TODO: add checking of incompatible types else @@ -1195,7 +1195,7 @@ HB_EXPR_PTR hb_compExprReduceGE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) * .F. >= .F. = .T. * .F. >= .T. = .f. */ - BOOL bResult = ! ( ! pLeft->value.asLogical && pRight->value.asLogical ); + HB_BOOL bResult = ! ( ! pLeft->value.asLogical && pRight->value.asLogical ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1206,7 +1206,7 @@ HB_EXPR_PTR hb_compExprReduceGE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_NUMERIC: { - BOOL bResult; + HB_BOOL bResult; switch( pLeft->value.asNum.NumType & pRight->value.asNum.NumType ) { @@ -1236,9 +1236,9 @@ HB_EXPR_PTR hb_compExprReduceGE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_DATE: case HB_ET_TIMESTAMP: { - BOOL bResult = ( pLeft->value.asDate.lDate > pRight->value.asDate.lDate ) || - ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && - pLeft->value.asDate.lTime >= pRight->value.asDate.lTime ); + HB_BOOL bResult = ( pLeft->value.asDate.lDate > pRight->value.asDate.lDate ) || + ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && + pLeft->value.asDate.lTime >= pRight->value.asDate.lTime ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1284,7 +1284,7 @@ HB_EXPR_PTR hb_compExprReduceLE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) * .F. <= .F. = .T. * .F. <= .T. = .T. */ - BOOL bResult = ! ( pLeft->value.asLogical && ! pRight->value.asLogical ); + HB_BOOL bResult = ! ( pLeft->value.asLogical && ! pRight->value.asLogical ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1295,7 +1295,7 @@ HB_EXPR_PTR hb_compExprReduceLE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_NUMERIC: { - BOOL bResult; + HB_BOOL bResult; switch( pLeft->value.asNum.NumType & pRight->value.asNum.NumType ) { @@ -1325,9 +1325,9 @@ HB_EXPR_PTR hb_compExprReduceLE( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_DATE: case HB_ET_TIMESTAMP: { - BOOL bResult = ( pLeft->value.asDate.lDate < pRight->value.asDate.lDate ) || - ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && - pLeft->value.asDate.lTime <= pRight->value.asDate.lTime ); + HB_BOOL bResult = ( pLeft->value.asDate.lDate < pRight->value.asDate.lDate ) || + ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && + pLeft->value.asDate.lTime <= pRight->value.asDate.lTime ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1373,7 +1373,7 @@ HB_EXPR_PTR hb_compExprReduceGT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) * .F. > .F. = .F. * .F. > .T. = .F. */ - BOOL bResult = ( pLeft->value.asLogical && ! pRight->value.asLogical ); + HB_BOOL bResult = ( pLeft->value.asLogical && ! pRight->value.asLogical ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1384,7 +1384,7 @@ HB_EXPR_PTR hb_compExprReduceGT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_NUMERIC: { - BOOL bResult; + HB_BOOL bResult; switch( pLeft->value.asNum.NumType & pRight->value.asNum.NumType ) { @@ -1414,9 +1414,9 @@ HB_EXPR_PTR hb_compExprReduceGT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_DATE: case HB_ET_TIMESTAMP: { - BOOL bResult = ( pLeft->value.asDate.lDate > pRight->value.asDate.lDate ) || - ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && - pLeft->value.asDate.lTime > pRight->value.asDate.lTime ); + HB_BOOL bResult = ( pLeft->value.asDate.lDate > pRight->value.asDate.lDate ) || + ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && + pLeft->value.asDate.lTime > pRight->value.asDate.lTime ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1462,7 +1462,7 @@ HB_EXPR_PTR hb_compExprReduceLT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) * .F. < .F. = .F. * .T. < .F. = .F. */ - BOOL bResult = ( ! pLeft->value.asLogical && pRight->value.asLogical ); + HB_BOOL bResult = ( ! pLeft->value.asLogical && pRight->value.asLogical ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1473,7 +1473,7 @@ HB_EXPR_PTR hb_compExprReduceLT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_NUMERIC: { - BOOL bResult; + HB_BOOL bResult; switch( pLeft->value.asNum.NumType & pRight->value.asNum.NumType ) { @@ -1503,9 +1503,9 @@ HB_EXPR_PTR hb_compExprReduceLT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_DATE: case HB_ET_TIMESTAMP: { - BOOL bResult = ( pLeft->value.asDate.lDate < pRight->value.asDate.lDate ) || - ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && - pLeft->value.asDate.lTime < pRight->value.asDate.lTime ); + HB_BOOL bResult = ( pLeft->value.asDate.lDate < pRight->value.asDate.lDate ) || + ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate && + pLeft->value.asDate.lTime < pRight->value.asDate.lTime ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1547,7 +1547,7 @@ HB_EXPR_PTR hb_compExprReduceEQ( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { case HB_ET_LOGICAL: { - BOOL bResult = ( pLeft->value.asLogical == pRight->value.asLogical ); + HB_BOOL bResult = ( pLeft->value.asLogical == pRight->value.asLogical ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1574,10 +1574,10 @@ HB_EXPR_PTR hb_compExprReduceEQ( HB_EXPR_PTR pSelf, HB_COMP_DECL ) !hb_compExprHasMacro( pRight->value.asString.string, pRight->ulLength, HB_COMP_PARAM ) ) ) ) ) { - BOOL bResult = pLeft->ulLength == pRight->ulLength && - memcmp( pLeft->value.asString.string, - pRight->value.asString.string, - pLeft->ulLength ) == 0; + HB_BOOL bResult = pLeft->ulLength == pRight->ulLength && + memcmp( pLeft->value.asString.string, + pRight->value.asString.string, + pLeft->ulLength ) == 0; HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1588,7 +1588,7 @@ HB_EXPR_PTR hb_compExprReduceEQ( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_NUMERIC: { - BOOL bResult; + HB_BOOL bResult; switch( pLeft->value.asNum.NumType & pRight->value.asNum.NumType ) { @@ -1616,8 +1616,8 @@ HB_EXPR_PTR hb_compExprReduceEQ( HB_EXPR_PTR pSelf, HB_COMP_DECL ) case HB_ET_DATE: case HB_ET_TIMESTAMP: { - BOOL bResult = ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate ) && - ( pLeft->value.asDate.lTime == pRight->value.asDate.lTime ); + HB_BOOL bResult = ( pLeft->value.asDate.lDate == pRight->value.asDate.lDate ) && + ( pLeft->value.asDate.lTime == pRight->value.asDate.lTime ); HB_COMP_EXPR_FREE( pLeft ); HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; @@ -1631,7 +1631,7 @@ HB_EXPR_PTR hb_compExprReduceEQ( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = TRUE; + pSelf->value.asLogical = HB_TRUE; break; } } @@ -1673,7 +1673,7 @@ HB_EXPR_PTR hb_compExprReduceEQ( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = FALSE; + pSelf->value.asLogical = HB_FALSE; } /* TODO: add checking of incompatible types else @@ -1692,7 +1692,7 @@ HB_EXPR_PTR hb_compExprReduceAnd( HB_EXPR_PTR pSelf, HB_COMP_DECL ) if( pLeft->ExprType == HB_ET_LOGICAL && pRight->ExprType == HB_ET_LOGICAL ) { - BOOL bResult; + HB_BOOL bResult; bResult = pLeft->value.asLogical && pRight->value.asLogical; HB_COMP_EXPR_FREE( pLeft ); @@ -1721,7 +1721,7 @@ HB_EXPR_PTR hb_compExprReduceAnd( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); /* discard expression */ pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = FALSE; + pSelf->value.asLogical = HB_FALSE; } } else if( pRight->ExprType == HB_ET_LOGICAL && @@ -1744,7 +1744,7 @@ HB_EXPR_PTR hb_compExprReduceAnd( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = FALSE; + pSelf->value.asLogical = HB_FALSE; } } return pSelf; @@ -1759,7 +1759,7 @@ HB_EXPR_PTR hb_compExprReduceOr( HB_EXPR_PTR pSelf, HB_COMP_DECL ) if( pLeft->ExprType == HB_ET_LOGICAL && pRight->ExprType == HB_ET_LOGICAL ) { - BOOL bResult; + HB_BOOL bResult; bResult = pLeft->value.asLogical || pRight->value.asLogical; HB_COMP_EXPR_FREE( pLeft ); @@ -1779,7 +1779,7 @@ HB_EXPR_PTR hb_compExprReduceOr( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); /* discard expression */ pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = TRUE; + pSelf->value.asLogical = HB_TRUE; } else { @@ -1802,7 +1802,7 @@ HB_EXPR_PTR hb_compExprReduceOr( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pRight ); pSelf->ExprType = HB_ET_LOGICAL; pSelf->ValType = HB_EV_LOGICAL; - pSelf->value.asLogical = TRUE; + pSelf->value.asLogical = HB_TRUE; } else { @@ -1845,8 +1845,8 @@ HB_EXPR_PTR hb_compExprReduceIIF( HB_EXPR_PTR pSelf, HB_COMP_DECL ) /* store the TRUE expression as a result of reduction */ pSelf = pExpr; - pExpr = pExpr->pNext; /* skip to FALSE expression */ - HB_COMP_EXPR_FREE( pExpr ); /* delete FALSE expr */ + pExpr = pExpr->pNext; /* skip to HB_FALSE expression */ + HB_COMP_EXPR_FREE( pExpr ); /* delete HB_FALSE expr */ pSelf->pNext = NULL; } else @@ -1863,7 +1863,7 @@ HB_EXPR_PTR hb_compExprReduceIIF( HB_EXPR_PTR pSelf, HB_COMP_DECL ) */ pSelf->value.asList.pExprList = NULL; HB_COMP_EXPR_FREE( pSelf ); - /* store the FALSE expression as a result of reduction + /* store the HB_FALSE expression as a result of reduction */ pSelf = pExpr->pNext; HB_COMP_EXPR_FREE( pExpr ); /* delete TRUE expr */ @@ -1921,7 +1921,7 @@ HB_EXPR_PTR hb_compExprListStrip( HB_EXPR_PTR pSelf, HB_COMP_DECL ) return pSelf; } -BOOL hb_compExprReduceAT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceAT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pSub = pParms->value.asList.pExprList; @@ -1955,13 +1955,13 @@ BOOL hb_compExprReduceAT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) memcpy( pSelf, pReduced, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pReduced ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -1992,20 +1992,20 @@ BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_COMP_DECL ) pArg->value.asNum.val.l != 0 ) { pExpr->value.asString.string = ( char * ) ""; - pExpr->value.asString.dealloc = FALSE; + pExpr->value.asString.dealloc = HB_FALSE; pExpr->ulLength = 0; } else { pExpr->value.asString.string = ( char * ) hb_szAscii[ ( int ) pArg->value.asNum.val.l & 0xff ]; - pExpr->value.asString.dealloc = FALSE; + pExpr->value.asString.dealloc = HB_FALSE; pExpr->ulLength = 1; } } else { pExpr->value.asString.string = ( char * ) hb_szAscii[ ( unsigned int ) pArg->value.asNum.val.d & 0xff ]; - pExpr->value.asString.dealloc = FALSE; + pExpr->value.asString.dealloc = HB_FALSE; pExpr->ulLength = 1; } @@ -2013,13 +2013,13 @@ BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceLEN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceLEN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -2035,16 +2035,16 @@ BOOL hb_compExprReduceLEN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; - BOOL fReduced = TRUE, fResult = FALSE; + HB_BOOL fReduced = HB_TRUE, fResult = HB_FALSE; switch( pArg->ExprType ) { @@ -2070,7 +2070,7 @@ BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR pSelf, HB_COMP_DECL ) break; case HB_ET_NIL: - fResult = TRUE; + fResult = HB_TRUE; break; case HB_ET_DATE: @@ -2087,7 +2087,7 @@ BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR pSelf, HB_COMP_DECL ) /* case HB_ET_FUNREF: */ default: - fReduced = FALSE; + fReduced = HB_FALSE; } if( fReduced ) @@ -2098,12 +2098,12 @@ BOOL hb_compExprReduceEMPTY( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -2117,12 +2117,12 @@ BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceINT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceINT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -2147,12 +2147,12 @@ BOOL hb_compExprReduceINT( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceSTOT( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceSTOT( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms ? pParms->value.asList.pExprList : NULL; @@ -2177,13 +2177,13 @@ BOOL hb_compExprReduceSTOT( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceSTOD( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceSTOD( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms ? pParms->value.asList.pExprList : NULL; @@ -2208,13 +2208,13 @@ BOOL hb_compExprReduceSTOD( HB_EXPR_PTR pSelf, USHORT usCount, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceDTOS( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceDTOS( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -2226,19 +2226,19 @@ BOOL hb_compExprReduceDTOS( HB_EXPR_PTR pSelf, HB_COMP_DECL ) szDate = ( char * ) memcpy( hb_xgrab( 9 ), hb_dateDecStr( szBuffer, ( long ) pArg->value.asDate.lDate ), 9 ); - pExpr = hb_compExprNewString( szDate, 8, TRUE, HB_COMP_PARAM ); + pExpr = hb_compExprNewString( szDate, 8, HB_TRUE, HB_COMP_PARAM ); HB_COMP_EXPR_FREE( pParms ); HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceCTOD( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceCTOD( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -2251,13 +2251,13 @@ BOOL hb_compExprReduceCTOD( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pArg = pParms->value.asList.pExprList; @@ -2265,7 +2265,7 @@ BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) if( pArg->ExprType == HB_ET_STRING ) { ULONG ulLen = pArg->ulLength; - BOOL fLower = FALSE; + HB_BOOL fLower = HB_FALSE; if( ulLen ) { @@ -2274,7 +2274,7 @@ BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { char c = * szValue++; if( c >= 'a' && c <= 'z' ) - fLower = TRUE; + fLower = HB_TRUE; else if( !( ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) || c == ' ' ) ) break; @@ -2286,7 +2286,7 @@ BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pExpr; char * szValue; - BOOL fDealloc; + HB_BOOL fDealloc; if( fLower ) { @@ -2294,21 +2294,21 @@ BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { szValue = ( char * ) hb_szAscii[ HB_TOUPPER( ( unsigned char ) pArg->value.asString.string[ 0 ] ) ]; - fDealloc = FALSE; + fDealloc = HB_FALSE; } else { if( pArg->value.asString.dealloc ) { szValue = pArg->value.asString.string; - pArg->value.asString.dealloc = FALSE; - fDealloc = TRUE; + pArg->value.asString.dealloc = HB_FALSE; + fDealloc = HB_TRUE; } else { szValue = ( char * ) hb_xgrab( pArg->ulLength + 1 ); memcpy( szValue, pArg->value.asString.string, pArg->ulLength + 1 ); - fDealloc = TRUE; + fDealloc = HB_TRUE; } do szValue[ ulLen ] = ( char ) HB_TOUPPER( ( unsigned char ) szValue[ ulLen ] ); @@ -2319,7 +2319,7 @@ BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { szValue = pArg->value.asString.string; fDealloc = pArg->value.asString.dealloc; - pArg->value.asString.dealloc = FALSE; + pArg->value.asString.dealloc = HB_FALSE; } pExpr = HB_COMP_EXPR_NEW( HB_ET_STRING ); @@ -2333,14 +2333,14 @@ BOOL hb_compExprReduceUPPER( HB_EXPR_PTR pSelf, HB_COMP_DECL ) memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceMIN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceMIN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pFirst = pParms->value.asList.pExprList; @@ -2420,13 +2420,13 @@ BOOL hb_compExprReduceMIN( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceMAX( HB_EXPR_PTR pSelf, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceMAX( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pFirst = pParms->value.asList.pExprList; @@ -2507,13 +2507,13 @@ BOOL hb_compExprReduceMAX( HB_EXPR_PTR pSelf, HB_COMP_DECL ) HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR pSelf, HB_LONG lResult, BOOL fBool, HB_COMP_DECL ) +HB_BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR pSelf, HB_LONG lResult, HB_BOOL fBool, HB_COMP_DECL ) { HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms; HB_EXPR_PTR pExpr = fBool ? hb_compExprNewLogical( lResult != 0, HB_COMP_PARAM ) : @@ -2523,5 +2523,5 @@ BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR pSelf, HB_LONG lResult, BOOL fBool, H HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); HB_COMP_EXPR_CLEAR( pExpr ); - return TRUE; + return HB_TRUE; } diff --git a/harbour/src/common/hbdate.c b/harbour/src/common/hbdate.c index 27be6ecc61..4b23a87733 100644 --- a/harbour/src/common/hbdate.c +++ b/harbour/src/common/hbdate.c @@ -473,17 +473,17 @@ char * hb_timeStr( char * szTime, long lMilliSec ) return szTime; } -BOOL hb_timeStrGet( const char * szTime, - int * piHour, int * piMinutes, - int * piSeconds, int * piMSec ) +HB_BOOL hb_timeStrGet( const char * szTime, + int * piHour, int * piMinutes, + int * piSeconds, int * piMSec ) { int iHour, iMinutes, iSeconds, iMSec, iBlocks; - BOOL fValid; + HB_BOOL fValid; HB_TRACE(HB_TR_DEBUG, ("hb_timeStrGet(%s, %p, %p, %p, %p)", szTime, piHour, piMinutes, piSeconds, piMSec)); iHour = iMinutes = iSeconds = iMSec = iBlocks = 0; - fValid = FALSE; + fValid = HB_FALSE; if( szTime ) { @@ -551,7 +551,7 @@ BOOL hb_timeStrGet( const char * szTime, ++szTime; if( *szTime == 0 && iBlocks > 0 && iHour < 24 && iMinutes < 60 && iSeconds < 60 ) - fValid = TRUE; + fValid = HB_TRUE; else iHour = iMinutes = iSeconds = iMSec = 0; } @@ -687,18 +687,18 @@ char * hb_timeStampStr( char * szDateTime, long lJulian, long lMilliSec ) return szDateTime; } -BOOL hb_timeStampStrGet( const char * szDateTime, - int * piYear, int * piMonth, int * piDay, - int * piHour, int * piMinutes, int * piSeconds, - int * piMSec ) +HB_BOOL hb_timeStampStrGet( const char * szDateTime, + int * piYear, int * piMonth, int * piDay, + int * piHour, int * piMinutes, int * piSeconds, + int * piMSec ) { int iYear, iMonth, iDay; - BOOL fValid; + HB_BOOL fValid; HB_TRACE(HB_TR_DEBUG, ("hb_timeStampStrGet(%s, %p, %p, %p, %p, %p, %p, %p)", szDateTime, piYear, piMonth, piDay, piHour, piMinutes, piSeconds, piMSec)); iYear = iMonth = iDay = 0; - fValid = FALSE; + fValid = HB_FALSE; if( szDateTime ) { @@ -735,7 +735,7 @@ BOOL hb_timeStampStrGet( const char * szDateTime, ++szDateTime; if( *szDateTime == '\0' ) szDateTime = NULL; - fValid = TRUE; + fValid = HB_TRUE; } } else @@ -751,13 +751,13 @@ BOOL hb_timeStampStrGet( const char * szDateTime, if( !hb_timeStrGet( szDateTime, piHour, piMinutes, piSeconds, piMSec ) ) { if( szDateTime ) - fValid = FALSE; + fValid = HB_FALSE; } else - fValid = TRUE; + fValid = HB_TRUE; } else if( szDateTime ) - fValid = FALSE; + fValid = HB_FALSE; if( piYear ) *piYear = iYear; @@ -769,11 +769,11 @@ BOOL hb_timeStampStrGet( const char * szDateTime, return fValid; } -BOOL hb_timeStampStrGetDT( const char * szDateTime, - long * plJulian, long * plMilliSec ) +HB_BOOL hb_timeStampStrGetDT( const char * szDateTime, + long * plJulian, long * plMilliSec ) { int iYear, iMonth, iDay, iHour, iMinutes, iSeconds, iMSec; - BOOL fValid; + HB_BOOL fValid; HB_TRACE(HB_TR_DEBUG, ("hb_timeStampStrGetDT(%s, %p, %p)", szDateTime, plJulian, plMilliSec)); diff --git a/harbour/src/common/hbffind.c b/harbour/src/common/hbffind.c index 8f2eeab823..4dbb38a7b1 100644 --- a/harbour/src/common/hbffind.c +++ b/harbour/src/common/hbffind.c @@ -381,9 +381,9 @@ char * hb_fsAttrDecode( HB_FATTR ulAttr, char * szAttr ) each call. Does low-level (platform dependent filtering if needed. */ -static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) +static HB_BOOL hb_fsFindNextLow( PHB_FFIND ffind ) { - BOOL bFound; + HB_BOOL bFound; int iYear = 0; int iMonth = 0; @@ -415,7 +415,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) if( ffind->bFirst ) { - ffind->bFirst = FALSE; + ffind->bFirst = HB_FALSE; /* tzset(); */ @@ -474,7 +474,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) if( ffind->bFirst ) { - ffind->bFirst = FALSE; + ffind->bFirst = HB_FALSE; /* tzset(); */ @@ -520,7 +520,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) { PHB_FFIND_INFO info = ( PHB_FFIND_INFO ) ffind->info; - bFound = FALSE; + bFound = HB_FALSE; if( ffind->attrmask & HB_FA_LABEL ) { @@ -530,7 +530,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) LPTSTR lpFileMask = HB_TCHAR_CONVTO( ffind->pszFileMask ); TCHAR szName[ HB_PATH_MAX ]; - ffind->bFirst = FALSE; + ffind->bFirst = HB_FALSE; ffind->szName[ 0 ] = '\0'; bFound = GetVolumeInformation( lpFileMask, szName, sizeof( szName ), NULL, NULL, NULL, NULL, 0 ); @@ -547,13 +547,13 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) { LPTSTR lpFileMask = HB_TCHAR_CONVTO( ffind->pszFileMask ); - ffind->bFirst = FALSE; + ffind->bFirst = HB_FALSE; info->hFindFile = FindFirstFile( lpFileMask, &info->pFindFileData ); info->dwAttr = ( DWORD ) hb_fsAttrToRaw( ffind->attrmask ); if( ( info->hFindFile != INVALID_HANDLE_VALUE ) && HB_WIN_MATCH() ) - bFound = TRUE; + bFound = HB_TRUE; HB_TCHAR_FREE( lpFileMask ); } @@ -564,7 +564,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) { if( HB_WIN_MATCH() ) { - bFound = TRUE; + bFound = HB_TRUE; break; } } @@ -623,7 +623,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) char dirname[ HB_PATH_MAX ]; - bFound = FALSE; + bFound = HB_FALSE; /* TODO: HB_FA_LABEL handling */ @@ -631,7 +631,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) { char * pos; - ffind->bFirst = FALSE; + ffind->bFirst = HB_FALSE; hb_strncpy( dirname, ffind->pszFileMask, sizeof( dirname ) - 1 ); pos = strrchr( dirname, HB_OS_PATH_DELIM_CHR ); @@ -660,7 +660,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) { if( hb_strMatchFile( info->entry->d_name, info->pattern ) ) { - bFound = TRUE; + bFound = HB_TRUE; break; } } @@ -703,7 +703,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) iSec = lt.tm_sec; } else - bFound = FALSE; + bFound = HB_FALSE; } } hb_fsSetIOError( bFound, 0 ); @@ -724,7 +724,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) HB_SYMBOL_UNUSED( iSec ); HB_SYMBOL_UNUSED( raw_attr ); - bFound = FALSE; + bFound = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); } @@ -778,7 +778,7 @@ PHB_FFIND hb_fsFindFirst( const char * pszFileMask, HB_FATTR attrmask ) /* Store search parameters */ ffind->pszFileMask = pszFileMask; ffind->attrmask = attrmask; - ffind->bFirst = TRUE; + ffind->bFirst = HB_TRUE; /* Find first/next matching file */ @@ -795,7 +795,7 @@ PHB_FFIND hb_fsFindFirst( const char * pszFileMask, HB_FATTR attrmask ) /* Finds next matching file, and applies a filter which makes searching CA-Cl*pper/MS-DOS compatible. */ -BOOL hb_fsFindNext( PHB_FFIND ffind ) +HB_BOOL hb_fsFindNext( PHB_FFIND ffind ) { while( hb_fsFindNextLow( ffind ) ) { @@ -806,11 +806,11 @@ BOOL hb_fsFindNext( PHB_FFIND ffind ) ( ( ffind->attrmask & HB_FA_LABEL ) == 0 && ( ffind->attr & HB_FA_LABEL ) != 0 ) || ( ( ffind->attrmask & HB_FA_DIRECTORY ) == 0 && ( ffind->attr & HB_FA_DIRECTORY ) != 0 ) ) ) { - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } void hb_fsFindClose( PHB_FFIND ffind ) diff --git a/harbour/src/common/hbfsapi.c b/harbour/src/common/hbfsapi.c index 2c3c57df5b..ec3920208d 100644 --- a/harbour/src/common/hbfsapi.c +++ b/harbour/src/common/hbfsapi.c @@ -87,7 +87,7 @@ void hb_fsAddSearchPath( const char * szPath, HB_PATHNAMES ** pSearchList ) { char * pPath; char * pDelim; - BOOL fFree = TRUE; + HB_BOOL fFree = HB_TRUE; while( *pSearchList ) { @@ -103,7 +103,7 @@ void hb_fsAddSearchPath( const char * szPath, HB_PATHNAMES ** pSearchList ) (*pSearchList)->fFree = fFree; pSearchList = &(*pSearchList)->pNext; pPath = pDelim + 1; - fFree = FALSE; + fFree = HB_FALSE; } *pSearchList = ( HB_PATHNAMES * ) hb_xgrab( sizeof( HB_PATHNAMES ) ); (*pSearchList)->szPath = pPath; @@ -287,15 +287,15 @@ char * hb_fsFNameMerge( char * pszFileName, PHB_FNAME pFileName ) return pszFileName; } -BOOL hb_fsNameExists( const char * pszFileName ) +HB_BOOL hb_fsNameExists( const char * pszFileName ) { - BOOL fExist; + HB_BOOL fExist; char * pszFree = NULL; HB_TRACE(HB_TR_DEBUG, ("hb_fsNameExists(%p)", pszFileName)); if( pszFileName == NULL ) - return FALSE; + return HB_FALSE; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); @@ -332,7 +332,7 @@ BOOL hb_fsNameExists( const char * pszFileName ) { int iTODO; /* To force warning */ - fExist = FALSE; + fExist = HB_FALSE; } #endif @@ -342,15 +342,15 @@ BOOL hb_fsNameExists( const char * pszFileName ) return fExist; } -BOOL hb_fsFileExists( const char * pszFileName ) +HB_BOOL hb_fsFileExists( const char * pszFileName ) { - BOOL fExist; + HB_BOOL fExist; char * pszFree = NULL; HB_TRACE(HB_TR_DEBUG, ("hb_fsFileExists(%p)", pszFileName)); if( pszFileName == NULL ) - return FALSE; + return HB_FALSE; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); @@ -395,7 +395,7 @@ BOOL hb_fsFileExists( const char * pszFileName ) { int iTODO; /* To force warning */ - fExist = FALSE; + fExist = HB_FALSE; } #endif @@ -405,15 +405,15 @@ BOOL hb_fsFileExists( const char * pszFileName ) return fExist; } -BOOL hb_fsDirExists( const char * pszDirName ) +HB_BOOL hb_fsDirExists( const char * pszDirName ) { - BOOL fExist; + HB_BOOL fExist; char * pszFree = NULL; HB_TRACE(HB_TR_DEBUG, ("hb_fsDirExists(%p)", pszDirName)); if( pszDirName == NULL ) - return FALSE; + return HB_FALSE; pszDirName = hb_fsNameConv( pszDirName, &pszFree ); @@ -457,7 +457,7 @@ BOOL hb_fsDirExists( const char * pszDirName ) { int iTODO; /* To force warning */ - fExist = FALSE; + fExist = HB_FALSE; } #endif @@ -467,7 +467,7 @@ BOOL hb_fsDirExists( const char * pszDirName ) return fExist; } -BOOL hb_fsMaxFilesError( void ) +HB_BOOL hb_fsMaxFilesError( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_fsMaxFilesError()")); diff --git a/harbour/src/common/hbgete.c b/harbour/src/common/hbgete.c index 048adfdf01..5113141a1f 100644 --- a/harbour/src/common/hbgete.c +++ b/harbour/src/common/hbgete.c @@ -113,9 +113,9 @@ char * hb_getenv( const char * szName ) } -BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ) +HB_BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ) { - BOOL fRetVal; + HB_BOOL fRetVal; #if defined( HB_OS_WIN ) { @@ -156,12 +156,12 @@ BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ) if( DosScanEnv( ( PCSZ ) szName, &EnvValue ) == NO_ERROR ) { - fRetVal = TRUE; + fRetVal = HB_TRUE; if( szBuffer != NULL && nSize != 0 ) hb_strncpy( szBuffer, ( char * ) EnvValue, nSize - 1 ); } else - fRetVal = FALSE; + fRetVal = HB_FALSE; } #else { @@ -169,12 +169,12 @@ BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ) if( pszTemp != NULL ) { - fRetVal = TRUE; + fRetVal = HB_TRUE; if( szBuffer != NULL && nSize != 0 ) hb_strncpy( szBuffer, pszTemp, nSize - 1 ); } else - fRetVal = FALSE; + fRetVal = HB_FALSE; } #endif @@ -187,13 +187,13 @@ BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ) /* set current process environment variable, if szValue is NULL delete * environment variable */ -BOOL hb_setenv( const char * szName, const char * szValue ) +HB_BOOL hb_setenv( const char * szName, const char * szValue ) { #if defined( HB_OS_WIN ) { LPTSTR lpName = HB_TCHAR_CONVTO( szName ); LPTSTR lpValue = HB_TCHAR_CONVTO( szValue ); - BOOL bResult = ( SetEnvironmentVariable( lpName, lpValue ) != 0 ); + HB_BOOL bResult = ( SetEnvironmentVariable( lpName, lpValue ) != 0 ); HB_TCHAR_FREE( lpValue ); HB_TCHAR_FREE( lpName ); return bResult; @@ -216,10 +216,10 @@ BOOL hb_setenv( const char * szName, const char * szValue ) if( szValue && *szValue ) return setenv( szName, "", 1 ) == 0; else - return TRUE; + return HB_TRUE; # elif defined( __OpenBSD__ ) unsetenv( szName ); - return TRUE; + return HB_TRUE; # else return unsetenv( szName ) == 0; # endif @@ -230,7 +230,7 @@ BOOL hb_setenv( const char * szName, const char * szValue ) HB_SYMBOL_UNUSED( szName ); HB_SYMBOL_UNUSED( szValue ); - return FALSE; + return HB_FALSE; #else /* please add support for other C compilers @@ -244,7 +244,7 @@ BOOL hb_setenv( const char * szName, const char * szValue ) HB_SYMBOL_UNUSED( szName ); HB_SYMBOL_UNUSED( szValue ); - return FALSE; + return HB_FALSE; #endif } diff --git a/harbour/src/common/hbhash.c b/harbour/src/common/hbhash.c index b7bfd7370c..e73729adcd 100644 --- a/harbour/src/common/hbhash.c +++ b/harbour/src/common/hbhash.c @@ -179,7 +179,7 @@ HB_HASH_TABLE_PTR hb_hashTableResize( HB_HASH_TABLE_PTR pTable, HB_SIZE ulNewSiz } /* add a new value into th ehash table */ -BOOL hb_hashTableAdd( HB_HASH_TABLE_PTR pTable, const void * pKey, const void * pValue ) +HB_BOOL hb_hashTableAdd( HB_HASH_TABLE_PTR pTable, const void * pKey, const void * pValue ) { ULONG ulKey; HB_HASH_ITEM_PTR pItem; @@ -199,7 +199,7 @@ BOOL hb_hashTableAdd( HB_HASH_TABLE_PTR pTable, const void * pKey, const void * } ++pTable->ulCount; - return TRUE; + return HB_TRUE; } /* return the pointer to item's value or NULL if not found @@ -225,19 +225,19 @@ const void * hb_hashTableFind( HB_HASH_TABLE_PTR pTable, const void * pKey ) } /* Delete an item from the table -* Returns TRUE if item was found and returns FALSE when passed item +* Returns HB_TRUE if item was found and returns HB_FALSE when passed item * is not stored in the table */ -BOOL hb_hashTableDel( HB_HASH_TABLE_PTR pTable, const void *pKey ) +HB_BOOL hb_hashTableDel( HB_HASH_TABLE_PTR pTable, const void *pKey ) { ULONG ulKey; HB_HASH_ITEM_PTR pItem; HB_HASH_ITEM_PTR pPrev = NULL; - BOOL bFound = FALSE; + HB_BOOL bFound = HB_FALSE; ulKey = ( pTable->pKeyFunc )( pTable, pKey, NULL ); if( ulKey > pTable->ulTableSize ) - return FALSE; + return HB_FALSE; pItem = pTable->pItems[ ulKey ]; while( pItem && ! bFound ) @@ -259,7 +259,7 @@ BOOL hb_hashTableDel( HB_HASH_TABLE_PTR pTable, const void *pKey ) } --pTable->ulCount; hb_hashItemDelete( pTable, pItem ); - bFound = TRUE; + bFound = HB_TRUE; } else { diff --git a/harbour/src/common/hbprintf.c b/harbour/src/common/hbprintf.c index 62f29e06e9..d802559185 100644 --- a/harbour/src/common/hbprintf.c +++ b/harbour/src/common/hbprintf.c @@ -236,7 +236,7 @@ typedef struct { typedef struct { int maxarg; int size; - BOOL repeat; + HB_BOOL repeat; v_param * arglst; } v_paramlst; @@ -286,7 +286,7 @@ static v_param * va_arg_get( int iArg, v_paramlst * plst, int iType ) { if( plst->maxarg == 0 ) { - plst->repeat = TRUE; + plst->repeat = HB_TRUE; memset( plst->arglst, 0, plst->size * sizeof( v_param ) ); } if( plst->repeat ) @@ -928,7 +928,7 @@ int hb_vsnprintf( char * buffer, size_t bufsize, const char * format, va_list ap #ifndef __NO_ARGPOS__ do { - params.repeat = FALSE; + params.repeat = HB_FALSE; if( params.maxarg > 0 ) { va_copy( args, ap ); diff --git a/harbour/src/common/hbstr.c b/harbour/src/common/hbstr.c index f2286755b5..fd3573f5d7 100644 --- a/harbour/src/common/hbstr.c +++ b/harbour/src/common/hbstr.c @@ -114,7 +114,7 @@ HB_SIZE hb_strAt( const char * szSub, HB_SIZE ulSubLen, const char * szText, HB_ return 0; } -BOOL hb_strEmpty( const char * szText, HB_SIZE ulLen ) +HB_BOOL hb_strEmpty( const char * szText, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_strEmpty(%s, %lu)", szText, ulLen)); @@ -123,10 +123,10 @@ BOOL hb_strEmpty( const char * szText, HB_SIZE ulLen ) char c = szText[ ulLen ]; if( !HB_ISSPACE( c ) ) - return FALSE; + return HB_FALSE; } - return TRUE; + return HB_TRUE; } char * hb_strupr( char * pszText ) @@ -439,15 +439,15 @@ double hb_numRound( double dNum, int iDec ) */ { int iDecR, iPrec; - BOOL fNeg; + HB_BOOL fNeg; if( dNum < 0 ) { - fNeg = TRUE; + fNeg = HB_TRUE; dNum = -dNum; } else - fNeg = FALSE; + fNeg = HB_FALSE; iDecR = ( int ) log10( dNum ); iPrec = iDecR + iDec; @@ -535,9 +535,9 @@ double hb_numDecConv( double dNum, int iDec ) return hb_numRound( dNum, 0 ); } -static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LONG * lVal, double * dVal, int * piDec, int * piWidth ) +static HB_BOOL hb_str2number( HB_BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LONG * lVal, double * dVal, int * piDec, int * piWidth ) { - BOOL fDbl = FALSE, fDec = FALSE, fNeg, fHex = FALSE; + HB_BOOL fDbl = HB_FALSE, fDec = HB_FALSE, fNeg, fHex = HB_FALSE; HB_SIZE ulPos = 0; int c, iWidth, iDec = 0, iDecR = 0; @@ -548,16 +548,16 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LON if( ulPos >= ulLen ) { - fNeg = FALSE; + fNeg = HB_FALSE; } else if( szNum[ ulPos ] == '-' ) { - fNeg = TRUE; + fNeg = HB_TRUE; ulPos++; } else { - fNeg = FALSE; + fNeg = HB_FALSE; if( szNum[ ulPos ] == '+' ) ulPos++; } @@ -570,7 +570,7 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LON { ulPos += 2; iWidth = HB_DEFAULT_WIDTH; - fHex = TRUE; + fHex = HB_TRUE; for( ; ulPos < ulLen; ulPos++ ) { c = szNum[ ulPos ]; @@ -611,7 +611,7 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LON else { *dVal = ( double ) *lVal * 10.0 + ( c - '0' ); - fDbl = TRUE; + fDbl = HB_TRUE; } if( fDec ) iDec++; @@ -620,14 +620,14 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LON } else if( c == '.' && !fDec ) { - fDec = TRUE; + fDec = HB_TRUE; } else { while( !fDec && ulPos < ulLen ) { if( szNum[ ulPos++ ] == '.' ) - fDec = TRUE; + fDec = HB_TRUE; else iWidth++; } @@ -652,7 +652,7 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LON fDec ) ) { *dVal = ( double ) *lVal; - fDbl = TRUE; + fDbl = HB_TRUE; } if( iDec ) { @@ -700,28 +700,28 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LON return fDbl; } -BOOL hb_compStrToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ) +HB_BOOL hb_compStrToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ) { HB_TRACE(HB_TR_DEBUG, ("hb_compStrToNum( %s, %lu, %p, %p, %p, %p)", szNum, ulLen, plVal, pdVal, piDec, piWidth )); - return hb_str2number( TRUE, szNum, ulLen, plVal, pdVal, piDec, piWidth ); + return hb_str2number( HB_TRUE, szNum, ulLen, plVal, pdVal, piDec, piWidth ); } -BOOL hb_valStrnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ) +HB_BOOL hb_valStrnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ) { HB_TRACE(HB_TR_DEBUG, ("hb_valStrToNum( %s, %lu, %p, %p, %p, %p)", szNum, ulLen, plVal, pdVal, piDec, piWidth )); - return hb_str2number( FALSE, szNum, ulLen, plVal, pdVal, piDec, piWidth ); + return hb_str2number( HB_FALSE, szNum, ulLen, plVal, pdVal, piDec, piWidth ); } -BOOL hb_strToNum( const char* szNum, HB_LONG * plVal, double * pdVal ) +HB_BOOL hb_strToNum( const char* szNum, HB_LONG * plVal, double * pdVal ) { HB_TRACE(HB_TR_DEBUG, ("hb_strToNum(%s, %p, %p)", szNum, plVal, pdVal )); - return hb_str2number( FALSE, szNum, strlen( szNum ), plVal, pdVal, NULL, NULL ); + return hb_str2number( HB_FALSE, szNum, strlen( szNum ), plVal, pdVal, NULL, NULL ); } -BOOL hb_strnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal ) +HB_BOOL hb_strnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal ) { HB_TRACE(HB_TR_DEBUG, ("hb_strToNum(%s, %lu, %p, %p)", szNum, ulLen, plVal, pdVal )); - return hb_str2number( FALSE, szNum, ulLen, plVal, pdVal, NULL, NULL ); + return hb_str2number( HB_FALSE, szNum, ulLen, plVal, pdVal, NULL, NULL ); } /* returns the numeric value of a character string representation of a number */ @@ -732,7 +732,7 @@ double hb_strVal( const char * szText, HB_SIZE ulLen ) HB_TRACE(HB_TR_DEBUG, ("hb_strVal(%s, %lu)", szText, ulLen)); - if( ! hb_str2number( FALSE, szText, ulLen, &lVal, &dVal, NULL, NULL ) ) + if( ! hb_str2number( HB_FALSE, szText, ulLen, &lVal, &dVal, NULL, NULL ) ) dVal = ( double ) lVal; return dVal; } @@ -744,7 +744,7 @@ HB_LONG hb_strValInt( const char * szText, int * iOverflow ) HB_TRACE(HB_TR_DEBUG, ("hb_strValInt(%s)", szText)); - if( hb_str2number( TRUE, szText, strlen( szText ), &lVal, &dVal, NULL, NULL ) ) + if( hb_str2number( HB_TRUE, szText, strlen( szText ), &lVal, &dVal, NULL, NULL ) ) { *iOverflow = 1; return 0; @@ -756,14 +756,14 @@ HB_LONG hb_strValInt( const char * szText, int * iOverflow ) char * hb_numToStr( char * szBuf, HB_SIZE ulSize, HB_LONG lNumber ) { int iPos = ( int ) ulSize; - BOOL fNeg = FALSE; + HB_BOOL fNeg = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("hb_numToStr(%p, %lu, %" PFHL "i)", szBuf, ulSize, lNumber)); szBuf[ --iPos ] = '\0'; if( lNumber < 0 ) { - fNeg = TRUE; + fNeg = HB_TRUE; lNumber = -lNumber; } diff --git a/harbour/src/common/hbver.c b/harbour/src/common/hbver.c index c78550c45b..025ecba655 100644 --- a/harbour/src/common/hbver.c +++ b/harbour/src/common/hbver.c @@ -393,11 +393,11 @@ char * hb_verPlatform( void ) return pszPlatform; } -BOOL hb_iswinnt( void ) +HB_BOOL hb_iswinnt( void ) { #if defined( HB_OS_WIN ) - static BOOL s_fWinNT = FALSE; - static BOOL s_fInited = FALSE; + static HB_BOOL s_fWinNT = HB_FALSE; + static HB_BOOL s_fInited = HB_FALSE; if( ! s_fInited ) { @@ -405,20 +405,20 @@ BOOL hb_iswinnt( void ) osvi.dwOSVersionInfoSize = sizeof( osvi ); if( GetVersionEx( &osvi ) ) s_fWinNT = osvi.dwPlatformId == VER_PLATFORM_WIN32_NT; /* && osvi.dwMajorVersion >= 4); */ - s_fInited = TRUE; + s_fInited = HB_TRUE; } return s_fWinNT; #else - return FALSE; + return HB_FALSE; #endif } -BOOL hb_iswince( void ) +HB_BOOL hb_iswince( void ) { #if defined( HB_OS_WIN_CE ) - return TRUE; + return HB_TRUE; #else - return FALSE; + return HB_FALSE; #endif } diff --git a/harbour/src/common/strwild.c b/harbour/src/common/strwild.c index beac72a5dc..26c84bb6a6 100644 --- a/harbour/src/common/strwild.c +++ b/harbour/src/common/strwild.c @@ -58,9 +58,9 @@ #define HB_MAX_WILDPATTERN 256 -BOOL hb_strMatchWild( const char *szString, const char *szPattern ) +HB_BOOL hb_strMatchWild( const char *szString, const char *szPattern ) { - BOOL fMatch = TRUE, fAny = FALSE; + HB_BOOL fMatch = HB_TRUE, fAny = HB_FALSE; HB_SIZE pulBufPosP[ HB_MAX_WILDPATTERN ], pulBufPosV[ HB_MAX_WILDPATTERN ], ulBufSize = HB_MAX_WILDPATTERN; HB_SIZE * ulAnyPosP = pulBufPosP, * ulAnyPosV = pulBufPosV, @@ -73,7 +73,7 @@ BOOL hb_strMatchWild( const char *szString, const char *szPattern ) { if( szPattern[i] == '*' ) { - fAny = TRUE; + fAny = HB_TRUE; i++; } else if( j < ulLen && ( szPattern[i] == '?' || szPattern[i] == szString[j] ) ) @@ -98,7 +98,7 @@ BOOL hb_strMatchWild( const char *szString, const char *szPattern ) ulAnyPosP[ ulAny ] = i; ulAnyPosV[ ulAny ] = j; ulAny++; - fAny = FALSE; + fAny = HB_FALSE; } j++; i++; @@ -112,11 +112,11 @@ BOOL hb_strMatchWild( const char *szString, const char *szPattern ) ulAny--; i = ulAnyPosP[ ulAny ]; j = ulAnyPosV[ ulAny ] + 1; - fAny = TRUE; + fAny = HB_TRUE; } else { - fMatch = FALSE; + fMatch = HB_FALSE; break; } } @@ -128,9 +128,9 @@ BOOL hb_strMatchWild( const char *szString, const char *szPattern ) return fMatch; } -BOOL hb_strMatchWildExact( const char *szString, const char *szPattern ) +HB_BOOL hb_strMatchWildExact( const char *szString, const char *szPattern ) { - BOOL fMatch = TRUE, fAny = FALSE; + HB_BOOL fMatch = HB_TRUE, fAny = HB_FALSE; HB_SIZE pulBufPosP[ HB_MAX_WILDPATTERN ], pulBufPosV[ HB_MAX_WILDPATTERN ], ulBufSize = HB_MAX_WILDPATTERN; HB_SIZE * ulAnyPosP = pulBufPosP, * ulAnyPosV = pulBufPosV, @@ -143,7 +143,7 @@ BOOL hb_strMatchWildExact( const char *szString, const char *szPattern ) { if( i < ulSize && szPattern[i] == '*' ) { - fAny = TRUE; + fAny = HB_TRUE; i++; } else if( j < ulLen && i < ulSize && @@ -169,7 +169,7 @@ BOOL hb_strMatchWildExact( const char *szString, const char *szPattern ) ulAnyPosP[ ulAny ] = i; ulAnyPosV[ ulAny ] = j; ulAny++; - fAny = FALSE; + fAny = HB_FALSE; } j++; i++; @@ -183,11 +183,11 @@ BOOL hb_strMatchWildExact( const char *szString, const char *szPattern ) ulAny--; i = ulAnyPosP[ ulAny ]; j = ulAnyPosV[ ulAny ] + 1; - fAny = TRUE; + fAny = HB_TRUE; } else { - fMatch = FALSE; + fMatch = HB_FALSE; break; } } @@ -199,9 +199,9 @@ BOOL hb_strMatchWildExact( const char *szString, const char *szPattern ) return fMatch; } -BOOL hb_strMatchCaseWildExact( const char *szString, const char *szPattern ) +HB_BOOL hb_strMatchCaseWildExact( const char *szString, const char *szPattern ) { - BOOL fMatch = TRUE, fAny = FALSE; + HB_BOOL fMatch = HB_TRUE, fAny = HB_FALSE; HB_SIZE pulBufPosP[ HB_MAX_WILDPATTERN ], pulBufPosV[ HB_MAX_WILDPATTERN ], ulBufSize = HB_MAX_WILDPATTERN; HB_SIZE * ulAnyPosP = pulBufPosP, * ulAnyPosV = pulBufPosV, @@ -214,7 +214,7 @@ BOOL hb_strMatchCaseWildExact( const char *szString, const char *szPattern ) { if( i < ulSize && szPattern[i] == '*' ) { - fAny = TRUE; + fAny = HB_TRUE; i++; } else if( j < ulLen && i < ulSize && @@ -241,7 +241,7 @@ BOOL hb_strMatchCaseWildExact( const char *szString, const char *szPattern ) ulAnyPosP[ ulAny ] = i; ulAnyPosV[ ulAny ] = j; ulAny++; - fAny = FALSE; + fAny = HB_FALSE; } j++; i++; @@ -255,11 +255,11 @@ BOOL hb_strMatchCaseWildExact( const char *szString, const char *szPattern ) ulAny--; i = ulAnyPosP[ ulAny ]; j = ulAnyPosV[ ulAny ] + 1; - fAny = TRUE; + fAny = HB_TRUE; } else { - fMatch = FALSE; + fMatch = HB_FALSE; break; } } @@ -271,7 +271,7 @@ BOOL hb_strMatchCaseWildExact( const char *szString, const char *szPattern ) return fMatch; } -BOOL hb_strMatchFile( const char * szString, const char * szPattern ) +HB_BOOL hb_strMatchFile( const char * szString, const char * szPattern ) { #if defined( HB_OS_UNIX ) # if defined( HB_NO_FNMATCH ) diff --git a/harbour/src/debug/dbgentry.c b/harbour/src/debug/dbgentry.c index 968b15b315..6a3eddc658 100644 --- a/harbour/src/debug/dbgentry.c +++ b/harbour/src/debug/dbgentry.c @@ -60,7 +60,7 @@ #include "hbmacro.ch" /* dummy function declaration */ -static BOOL hb_clsSetScope( BOOL fScope ) { return fScope; } +static HB_BOOL hb_clsSetScope( HB_BOOL fScope ) { return fScope; } #define HB_DBGINFO_DISABLE ( ( HB_DEBUGINFO * ) ( HB_PTRDIFF ) 0x01 ) @@ -141,20 +141,20 @@ typedef struct typedef struct { - BOOL bQuit; - BOOL bGo; - BOOL bInside; + HB_BOOL bQuit; + HB_BOOL bGo; + HB_BOOL bInside; int nBreakPoints; HB_BREAKPOINT *aBreak; int nTracePoints; HB_TRACEPOINT *aTrace; int nWatchPoints; HB_WATCHPOINT *aWatch; - BOOL bTraceOver; + HB_BOOL bTraceOver; int nTraceLevel; - BOOL bNextRoutine; - BOOL bCodeBlock; - BOOL bToCursor; + HB_BOOL bNextRoutine; + HB_BOOL bCodeBlock; + HB_BOOL bToCursor; int nToCursorLine; char *szToCursorModule; int nProcLevel; @@ -162,11 +162,11 @@ typedef struct HB_CALLSTACKINFO *aCallStack; int nModules; HB_MODULEINFO *aModules; - BOOL bCBTrace; - BOOL ( *pFunInvoke )( void ); - BOOL bInitGlobals; - BOOL bInitStatics; - BOOL bInitLines; + HB_BOOL bCBTrace; + HB_BOOL ( *pFunInvoke )( void ); + HB_BOOL bInitGlobals; + HB_BOOL bInitStatics; + HB_BOOL bInitLines; PHB_ITEM pStopLines; } HB_DEBUGINFO; @@ -185,9 +185,9 @@ static PHB_ITEM hb_dbgEval( HB_DEBUGINFO *info, HB_WATCHPOINT *watch ); static PHB_ITEM hb_dbgEvalMacro( const char *szExpr, PHB_ITEM pItem ); static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ); static PHB_ITEM hb_dbgEvalResolve( HB_DEBUGINFO *info, HB_WATCHPOINT *watch ); -static BOOL hb_dbgIsAltD( void ); -static BOOL hb_dbgIsBreakPoint( HB_DEBUGINFO *info, const char *szModule, int nLine ); -static BOOL hb_dbgEqual( PHB_ITEM pItem1, PHB_ITEM pItem2 ); +static HB_BOOL hb_dbgIsAltD( void ); +static HB_BOOL hb_dbgIsBreakPoint( HB_DEBUGINFO *info, const char *szModule, int nLine ); +static HB_BOOL hb_dbgEqual( PHB_ITEM pItem1, PHB_ITEM pItem2 ); static void hb_dbgQuit( HB_DEBUGINFO *info ); static PHB_ITEM hb_dbgVarGet( HB_VARINFO *scope ); static void hb_dbgVarSet( HB_VARINFO *scope, PHB_ITEM xNewValue ); @@ -347,7 +347,7 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM { info = *infoPtr = ( HB_DEBUGINFO * ) hb_xgrab( sizeof( HB_DEBUGINFO ) ); memset( info, 0, sizeof( HB_DEBUGINFO ) ); - info->bCBTrace = TRUE; + info->bCBTrace = HB_TRUE; } else if( info->bInside || info->bQuit ) return; @@ -363,18 +363,18 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM hb_procinfo( 0, szProcName, NULL, NULL ); if( !strncmp( szProcName, "(_INITSTATICS", 13 ) ) - info->bInitStatics = TRUE; + info->bInitStatics = HB_TRUE; else if( !strncmp( szProcName, "(_INITGLOBALS", 13 ) ) - info->bInitGlobals = TRUE; + info->bInitGlobals = HB_TRUE; else if( !strncmp( szProcName, "(_INITLINES", 11 ) ) - info->bInitLines = TRUE; + info->bInitLines = HB_TRUE; if( info->bInitStatics || info->bInitGlobals ) hb_dbgAddModule( info, szName ); else if( !strncmp( szProcName, "(b)", 3 ) ) - info->bCodeBlock = TRUE; + info->bCodeBlock = HB_TRUE; else if( info->bNextRoutine ) - info->bNextRoutine = FALSE; + info->bNextRoutine = HB_FALSE; hb_dbgAddStack( info, szName, hb_dbg_ProcLevel() ); for( i = 0; i < info->nBreakPoints; i++ ) @@ -382,7 +382,7 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM if( info->aBreak[ i ].szFunction && !strcmp( info->aBreak[ i ].szFunction, szProcName ) ) { - hb_dbg_InvokeDebug( TRUE ); + hb_dbg_InvokeDebug( HB_TRUE ); break; } } @@ -403,14 +403,14 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM case HB_DBG_SHOWLINE: { HB_CALLSTACKINFO *pTop = &info->aCallStack[ info->nCallStackLen - 1 ]; - BOOL bOldClsScope; + HB_BOOL bOldClsScope; HB_TRACE( HB_TR_DEBUG, ( "SHOWLINE %d", nLine ) ); nProcLevel = hb_dbg_ProcLevel(); /* Check if we've hit a tracepoint */ - bOldClsScope = hb_clsSetScope( FALSE ); + bOldClsScope = hb_clsSetScope( HB_FALSE ); for( i = 0; i < info->nTracePoints; i++ ) { HB_TRACEPOINT *tp = &info->aTrace[ i ]; @@ -428,15 +428,15 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM pTop->nLine = nLine; info->nProcLevel = nProcLevel - ( hb_dbgIsAltD() ? 2 : 0 ); - info->bTraceOver = FALSE; - info->bCodeBlock = FALSE; - info->bGo = FALSE; + info->bTraceOver = HB_FALSE; + info->bCodeBlock = HB_FALSE; + info->bGo = HB_FALSE; if( info->bToCursor ) { - info->bToCursor = FALSE; + info->bToCursor = HB_FALSE; hb_xfree( info->szToCursorModule ); } - info->bNextRoutine = FALSE; + info->bNextRoutine = HB_FALSE; hb_dbgActivate( info ); return; @@ -446,17 +446,17 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM hb_clsSetScope( bOldClsScope ); if( hb_dbgIsBreakPoint( info, pTop->szModule, nLine ) - || hb_dbg_InvokeDebug( FALSE ) + || hb_dbg_InvokeDebug( HB_FALSE ) || ( info->pFunInvoke && info->pFunInvoke() ) ) { - info->bTraceOver = FALSE; + info->bTraceOver = HB_FALSE; if( info->bToCursor ) { - info->bToCursor = FALSE; + info->bToCursor = HB_FALSE; hb_xfree( info->szToCursorModule ); } - info->bNextRoutine = FALSE; - info->bGo = FALSE; + info->bNextRoutine = HB_FALSE; + info->bGo = HB_FALSE; } /* Check if we must skip every level above info->nTraceLevel */ @@ -464,7 +464,7 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM { if( info->nTraceLevel < info->nCallStackLen ) return; - info->bTraceOver = FALSE; + info->bTraceOver = HB_FALSE; } /* Check if we're skipping to a specific line of source */ @@ -474,7 +474,7 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM && FILENAME_EQUAL( pTop->szModule, info->szToCursorModule ) ) { hb_xfree( info->szToCursorModule ); - info->bToCursor = FALSE; + info->bToCursor = HB_FALSE; } else { @@ -488,7 +488,7 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM if( info->bCodeBlock ) { - info->bCodeBlock = FALSE; + info->bCodeBlock = HB_FALSE; if( !info->bCBTrace ) return; } @@ -512,10 +512,10 @@ void hb_dbgEntry( int nMode, int nLine, const char *szName, int nIndex, PHB_ITEM { hb_dbgAddStopLines( info, hb_stackReturnItem() ); } - info->bCodeBlock = FALSE; - info->bInitStatics = FALSE; - info->bInitGlobals = FALSE; - info->bInitLines = FALSE; + info->bCodeBlock = HB_FALSE; + info->bInitStatics = HB_FALSE; + info->bInitGlobals = HB_FALSE; + info->bInitLines = HB_FALSE; hb_dbgEndProc( info ); return; @@ -701,7 +701,7 @@ static void hb_dbgAddStopLines( HB_DEBUGINFO *info, PHB_ITEM pItem ) { PHB_ITEM pEntry = hb_arrayGetItemPtr( pItem, i ); const char *szModule = hb_arrayGetCPtr( pEntry, 1 ); - BOOL bFound = FALSE; + HB_BOOL bFound = HB_FALSE; szModule = hb_dbgStripModuleName( szModule ); for( j = 1; j <= nLinesLen; j++ ) @@ -733,7 +733,7 @@ static void hb_dbgAddStopLines( HB_DEBUGINFO *info, PHB_ITEM pItem ) hb_arraySetNL( pLines, 2, nMin ); if( !hb_arraySetCLPtr( pLines, 3, pBuffer, nLen - 1 ) ) hb_xfree( pBuffer ); - bFound = TRUE; + bFound = HB_TRUE; break; } } @@ -778,7 +778,7 @@ static void hb_dbgAddVar( int *nVars, HB_VARINFO **aVars, const char *szName, ch } -void hb_dbgAddWatch( void *handle, const char *szExpr, BOOL bTrace ) +void hb_dbgAddWatch( void *handle, const char *szExpr, HB_BOOL bTrace ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; HB_WATCHPOINT *pWatch; @@ -888,10 +888,10 @@ static void hb_dbgEndProc( HB_DEBUGINFO *info ) } -static BOOL hb_dbgEqual( PHB_ITEM pItem1, PHB_ITEM pItem2 ) +static HB_BOOL hb_dbgEqual( PHB_ITEM pItem1, PHB_ITEM pItem2 ) { if( HB_ITEM_TYPE( pItem1 ) != HB_ITEM_TYPE( pItem2 ) ) - return FALSE; + return HB_FALSE; if( HB_IS_NIL( pItem1 ) ) return HB_IS_NIL( pItem2 ); if( HB_IS_LOGICAL( pItem1 ) ) @@ -899,7 +899,7 @@ static BOOL hb_dbgEqual( PHB_ITEM pItem1, PHB_ITEM pItem2 ) if( HB_IS_POINTER( pItem1 ) ) return ( hb_itemGetPtr( pItem1 ) == hb_itemGetPtr( pItem2 ) ); if( HB_IS_STRING( pItem1 ) ) - return !hb_itemStrCmp( pItem1, pItem2, TRUE ); + return !hb_itemStrCmp( pItem1, pItem2, HB_TRUE ); if( HB_IS_NUMINT( pItem1 ) ) return ( hb_itemGetNInt( pItem1 ) == hb_itemGetNInt( pItem2 ) ); if( HB_IS_NUMERIC( pItem1 ) ) @@ -908,7 +908,7 @@ static BOOL hb_dbgEqual( PHB_ITEM pItem1, PHB_ITEM pItem2 ) return ( hb_arrayId( pItem1 ) == hb_arrayId( pItem2 ) ); if( HB_IS_HASH( pItem1 ) ) return ( hb_hashId( pItem1 ) == hb_hashId( pItem2 ) ); - return FALSE; + return HB_FALSE; } @@ -932,9 +932,9 @@ static PHB_ITEM hb_dbgEval( HB_DEBUGINFO *info, HB_WATCHPOINT *watch ) hb_arrayCopy( aVars, aNewVars, NULL, NULL, NULL ); - info->bInside = TRUE; + info->bInside = HB_TRUE; xResult = hb_itemDo( watch->pBlock, 1, aNewVars ); - info->bInside = FALSE; + info->bInside = HB_FALSE; for( i = 0; i < watch->nVars; i++ ) { @@ -1028,7 +1028,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) { int i = 0; PHB_ITEM pBlock; - BOOL bAfterId = FALSE; + HB_BOOL bAfterId = HB_FALSE; char *s; int buffsize; @@ -1075,7 +1075,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) } hb_strupr( szWord ); i = hb_dbgEvalSubstituteVar( watch, szWord, nStart, nLen ); - bAfterId = TRUE; + bAfterId = HB_TRUE; continue; } if( c == '.' ) @@ -1099,7 +1099,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) { i++; } - bAfterId = FALSE; + bAfterId = HB_FALSE; continue; } if( c == ':' @@ -1109,7 +1109,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) if( c == ':' && watch->szExpr[ i + 1 ] == ':' ) { i = hb_dbgEvalSubstituteVar( watch, hb_strdup( "SELF" ), i, 1 ); - bAfterId = TRUE; + bAfterId = HB_TRUE; continue; } if( c == '-' ) @@ -1121,13 +1121,13 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) { i++; } - bAfterId = TRUE; + bAfterId = HB_TRUE; continue; } if( strchr( " !#$=<>(+-*/%^|,{&", c ) ) { i++; - bAfterId = FALSE; + bAfterId = HB_FALSE; continue; } if( c == '\'' || c == '\"' ) @@ -1141,7 +1141,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) { i++; } - bAfterId = TRUE; + bAfterId = HB_TRUE; continue; } if( c == '[' ) @@ -1149,7 +1149,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) i++; if( bAfterId ) { - bAfterId = FALSE; + bAfterId = HB_FALSE; } else { @@ -1161,7 +1161,7 @@ static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) { i++; } - bAfterId = TRUE; + bAfterId = HB_TRUE; } continue; } @@ -1356,7 +1356,7 @@ PHB_ITEM hb_dbgGetWatchValue( void *handle, int nWatch ) } -static BOOL hb_dbgIsAltD( void ) +static HB_BOOL hb_dbgIsAltD( void ) { char szName[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5]; @@ -1365,7 +1365,7 @@ static BOOL hb_dbgIsAltD( void ) } -static BOOL hb_dbgIsBreakPoint( HB_DEBUGINFO *info, const char *szModule, int nLine ) +static HB_BOOL hb_dbgIsBreakPoint( HB_DEBUGINFO *info, const char *szModule, int nLine ) { int i; @@ -1375,13 +1375,13 @@ static BOOL hb_dbgIsBreakPoint( HB_DEBUGINFO *info, const char *szModule, int nL if( point->nLine == nLine && FILENAME_EQUAL( szModule, point->szModule ) ) - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule, int nLine ) +HB_BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule, int nLine ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; int nModules = hb_itemSize( info->pStopLines ); @@ -1398,12 +1398,12 @@ BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule, int nLine ) if( nLine < nMin || ( HB_SIZE )( nOfs / 8 ) > hb_arrayGetCLen( pEntry, 3 ) ) { - return FALSE; + return HB_FALSE; } return ( hb_arrayGetCPtr( pEntry, 3 )[ nOfs / 8 ] & ( 1 << ( nOfs % 8 ) ) ) != 0; } } - return FALSE; + return HB_FALSE; } @@ -1441,13 +1441,13 @@ static void hb_dbgQuit( HB_DEBUGINFO *info ) } if( info->bToCursor ) { - info->bToCursor = FALSE; + info->bToCursor = HB_FALSE; hb_xfree( info->szToCursorModule ); } } -void hb_dbgSetCBTrace( void *handle, BOOL bCBTrace ) +void hb_dbgSetCBTrace( void *handle, HB_BOOL bCBTrace ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; @@ -1459,11 +1459,11 @@ void hb_dbgSetGo( void *handle ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; - info->bGo = TRUE; + info->bGo = HB_TRUE; } -void hb_dbgSetInvoke( void *handle, BOOL ( *pFunInvoke )( void ) ) +void hb_dbgSetInvoke( void *handle, HB_BOOL ( *pFunInvoke )( void ) ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; @@ -1475,7 +1475,7 @@ void hb_dbgSetNextRoutine( void *handle ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; - info->bNextRoutine = TRUE; + info->bNextRoutine = HB_TRUE; } @@ -1483,7 +1483,7 @@ void hb_dbgSetQuit( void *handle ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; - info->bQuit = TRUE; + info->bQuit = HB_TRUE; } @@ -1491,7 +1491,7 @@ void hb_dbgSetToCursor( void *handle, const char *szModule, int nLine ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; - info->bToCursor = TRUE; + info->bToCursor = HB_TRUE; info->szToCursorModule = hb_strdup( szModule ); info->nToCursorLine = nLine; } @@ -1501,12 +1501,12 @@ void hb_dbgSetTrace( void *handle ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; - info->bTraceOver = TRUE; + info->bTraceOver = HB_TRUE; info->nTraceLevel = info->nCallStackLen; } -void hb_dbgSetWatch( void *handle, int nWatch, const char *szExpr, BOOL bTrace ) +void hb_dbgSetWatch( void *handle, int nWatch, const char *szExpr, HB_BOOL bTrace ) { HB_DEBUGINFO *info = (HB_DEBUGINFO *)handle; HB_WATCHPOINT *pWatch = &info->aWatch[ nWatch ]; @@ -1668,11 +1668,11 @@ HB_FUNC( __DBGGETEXPRVALUE ) if( pItem ) { - hb_storl( TRUE, 3 ); + hb_storl( HB_TRUE, 3 ); hb_itemReturnRelease( pItem ); } else - hb_storl( FALSE, 3 ); + hb_storl( HB_FALSE, 3 ); } } diff --git a/harbour/src/rdd/hbsix/sxcompr.c b/harbour/src/rdd/hbsix/sxcompr.c index c24142932e..d7d1ea4138 100644 --- a/harbour/src/rdd/hbsix/sxcompr.c +++ b/harbour/src/rdd/hbsix/sxcompr.c @@ -177,18 +177,18 @@ typedef struct _HB_LZSSX_COMPR ULONG inBuffSize; ULONG inBuffPos; ULONG inBuffRead; - BOOL fInFree; + HB_BOOL fInFree; HB_FHANDLE hOutput; BYTE * outBuffer; ULONG outBuffSize; ULONG outBuffPos; - BOOL fOutFree; + HB_BOOL fOutFree; ULONG ulMaxSize; ULONG ulOutSize; - BOOL fResult; - BOOL fContinue; + HB_BOOL fResult; + HB_BOOL fContinue; UCHAR ring_buffer[ RBUFLENGTH + MAXLENGTH - 1 ]; @@ -251,7 +251,7 @@ static PHB_LZSSX_COMPR hb_LZSSxInit( return pCompr; } -static BOOL hb_LZSSxFlush( PHB_LZSSX_COMPR pCompr ) +static HB_BOOL hb_LZSSxFlush( PHB_LZSSX_COMPR pCompr ) { if( pCompr->fResult && pCompr->hOutput != FS_ERROR ) { @@ -269,7 +269,7 @@ static BOOL hb_LZSSxFlush( PHB_LZSSX_COMPR pCompr ) return pCompr->fResult; } -static BOOL hb_LZSSxWrite( PHB_LZSSX_COMPR pCompr, UCHAR ucVal ) +static HB_BOOL hb_LZSSxWrite( PHB_LZSSX_COMPR pCompr, UCHAR ucVal ) { if( pCompr->fResult ) { @@ -300,9 +300,9 @@ static int hb_LZSSxRead( PHB_LZSSX_COMPR pCompr ) return -1; } -static BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) +static HB_BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) { - BOOL fResult = TRUE; + HB_BOOL fResult = TRUE; USHORT itemMask; int offset, length, index, c, h; @@ -560,9 +560,9 @@ static HB_SIZE hb_LZSSxEncode( PHB_LZSSX_COMPR pCompr ) } -BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, - char * pDstBuf, HB_SIZE ulDstLen, - HB_SIZE * pulSize ) +HB_BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, + char * pDstBuf, HB_SIZE ulDstLen, + HB_SIZE * pulSize ) { PHB_LZSSX_COMPR pCompr; HB_SIZE ulSize; @@ -576,11 +576,11 @@ BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, return ( ulSize <= ulDstLen ); } -BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, - char * pDstBuf, HB_SIZE ulDstLen ) +HB_BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, + char * pDstBuf, HB_SIZE ulDstLen ) { PHB_LZSSX_COMPR pCompr; - BOOL fResult; + HB_BOOL fResult; pCompr = hb_LZSSxInit( FS_ERROR, ( BYTE * ) pSrcBuf, ulSrcLen, FS_ERROR, ( BYTE * ) pDstBuf, ulDstLen ); @@ -589,7 +589,7 @@ BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE ulSrcLen, return fResult; } -BOOL hb_LZSSxCompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput, HB_SIZE * pulSize ) +HB_BOOL hb_LZSSxCompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput, HB_SIZE * pulSize ) { PHB_LZSSX_COMPR pCompr; HB_SIZE ulSize; @@ -602,10 +602,10 @@ BOOL hb_LZSSxCompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput, HB_SIZE * pulS return ulSize != ( HB_SIZE ) -1; } -BOOL hb_LZSSxDecompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput ) +HB_BOOL hb_LZSSxDecompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput ) { PHB_LZSSX_COMPR pCompr; - BOOL fResult; + HB_BOOL fResult; pCompr = hb_LZSSxInit( hInput, NULL, 0, hOutput, NULL, 0 ); fResult = hb_LZSSxDecode( pCompr ); @@ -615,7 +615,7 @@ BOOL hb_LZSSxDecompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput ) HB_FUNC( SX_FCOMPRESS ) { - BOOL fRet = FALSE; + HB_BOOL fRet = FALSE; HB_FHANDLE hInput, hOutput; const char * szSource = hb_parc( 1 ), * szDestin = hb_parc( 2 ); BYTE buf[ 4 ]; @@ -652,7 +652,7 @@ HB_FUNC( SX_FCOMPRESS ) HB_FUNC( SX_FDECOMPRESS ) { - BOOL fRet = FALSE; + HB_BOOL fRet = FALSE; HB_FHANDLE hInput, hOutput; const char * szSource = hb_parc( 1 ), * szDestin = hb_parc( 2 ); @@ -707,7 +707,7 @@ HB_FUNC( _SX_STRCOMPRESS ) HB_FUNC( _SX_STRDECOMPRESS ) { - BOOL fOK = FALSE; + HB_BOOL fOK = FALSE; const char * pStr = hb_parc( 1 ); char * pBuf; diff --git a/harbour/src/rtl/accept.c b/harbour/src/rtl/accept.c index cb315d5e78..8ae7e0cf53 100644 --- a/harbour/src/rtl/accept.c +++ b/harbour/src/rtl/accept.c @@ -102,7 +102,7 @@ HB_FUNC( __ACCEPT ) while( input != K_ENTER && hb_vmRequestQuery() == 0 ) { /* Wait forever, for keyboard events only */ - input = hb_inkey( TRUE, 0.0, INKEY_KEYBOARD ); + input = hb_inkey( HB_TRUE, 0.0, INKEY_KEYBOARD ); switch( input ) { case K_BS: diff --git a/harbour/src/rtl/cdpapi.c b/harbour/src/rtl/cdpapi.c index e85dab694c..6a5eb30177 100644 --- a/harbour/src/rtl/cdpapi.c +++ b/harbour/src/rtl/cdpapi.c @@ -141,7 +141,7 @@ static PHB_CODEPAGE s_cdpList = NULL; /* * basic CP functions */ -BOOL hb_cdpIsDigit( PHB_CODEPAGE cdp, int iChar ) +HB_BOOL hb_cdpIsDigit( PHB_CODEPAGE cdp, int iChar ) { if( cdp ) return ( cdp->flags[ iChar & 0x0ff ] & HB_CDP_DIGIT ) != 0; @@ -149,7 +149,7 @@ BOOL hb_cdpIsDigit( PHB_CODEPAGE cdp, int iChar ) return HB_ISDIGIT( iChar ); } -BOOL hb_cdpIsAlpha( PHB_CODEPAGE cdp, int iChar ) +HB_BOOL hb_cdpIsAlpha( PHB_CODEPAGE cdp, int iChar ) { if( cdp ) return ( cdp->flags[ iChar & 0x0ff ] & HB_CDP_ALPHA ) != 0; @@ -157,7 +157,7 @@ BOOL hb_cdpIsAlpha( PHB_CODEPAGE cdp, int iChar ) return HB_ISALPHA( iChar ); } -BOOL hb_cdpIsLower( PHB_CODEPAGE cdp, int iChar ) +HB_BOOL hb_cdpIsLower( PHB_CODEPAGE cdp, int iChar ) { if( cdp ) return ( cdp->flags[ iChar & 0x0ff ] & HB_CDP_LOWER ) != 0; @@ -165,7 +165,7 @@ BOOL hb_cdpIsLower( PHB_CODEPAGE cdp, int iChar ) return HB_ISLOWER( iChar ); } -BOOL hb_cdpIsUpper( PHB_CODEPAGE cdp, int iChar ) +HB_BOOL hb_cdpIsUpper( PHB_CODEPAGE cdp, int iChar ) { if( cdp ) return ( cdp->flags[ iChar & 0x0ff ] & HB_CDP_UPPER ) != 0; @@ -173,7 +173,7 @@ BOOL hb_cdpIsUpper( PHB_CODEPAGE cdp, int iChar ) return HB_ISUPPER( iChar ); } -BOOL hb_charIsDigit( int iChar ) +HB_BOOL hb_charIsDigit( int iChar ) { PHB_CODEPAGE cdp = hb_vmCDP(); @@ -183,7 +183,7 @@ BOOL hb_charIsDigit( int iChar ) return HB_ISDIGIT( iChar ); } -BOOL hb_charIsAlpha( int iChar ) +HB_BOOL hb_charIsAlpha( int iChar ) { PHB_CODEPAGE cdp = hb_vmCDP(); @@ -193,7 +193,7 @@ BOOL hb_charIsAlpha( int iChar ) return HB_ISALPHA( iChar ); } -BOOL hb_charIsLower( int iChar ) +HB_BOOL hb_charIsLower( int iChar ) { PHB_CODEPAGE cdp = hb_vmCDP(); @@ -203,7 +203,7 @@ BOOL hb_charIsLower( int iChar ) return HB_ISLOWER( iChar ); } -BOOL hb_charIsUpper( int iChar ) +HB_BOOL hb_charIsUpper( int iChar ) { PHB_CODEPAGE cdp = hb_vmCDP(); @@ -325,7 +325,7 @@ static int hb_cdpMultiWeight( PHB_CODEPAGE cdp, const char * szChar ) int hb_cdpcmp( const char * szFirst, HB_SIZE ulLenFirst, const char * szSecond, HB_SIZE ulLenSecond, - PHB_CODEPAGE cdp, BOOL fExact ) + PHB_CODEPAGE cdp, HB_BOOL fExact ) { int iRet = 0, iAcc = 0, n, n1, n2; HB_SIZE ul, ulLen; @@ -455,7 +455,7 @@ static int hb_cdpMultiWeightI( PHB_CODEPAGE cdp, const char * szChar ) int hb_cdpicmp( const char * szFirst, HB_SIZE ulLenFirst, const char * szSecond, HB_SIZE ulLenSecond, - PHB_CODEPAGE cdp, BOOL fExact ) + PHB_CODEPAGE cdp, HB_BOOL fExact ) { int iRet = 0, iAcc = 0, n, n1, n2, u1, u2; HB_SIZE ul, ulLen; @@ -658,15 +658,15 @@ static int u16toutf8( char * szUTF8, HB_WCHAR wc ) return n; } -static BOOL utf8tou16nextchar( unsigned char ucChar, int *n, HB_WCHAR * pwc ) +static HB_BOOL utf8tou16nextchar( unsigned char ucChar, int *n, HB_WCHAR * pwc ) { if( *n > 0 ) { if( ( ucChar & 0xc0 ) != 0x80 ) - return FALSE; + return HB_FALSE; *pwc = ( *pwc << 6 ) | ( ucChar & 0x3f ); ( *n )--; - return TRUE; + return HB_TRUE; } *n = 0; @@ -699,7 +699,7 @@ static BOOL utf8tou16nextchar( unsigned char ucChar, int *n, HB_WCHAR * pwc ) *n = 5; } } - return TRUE; + return HB_TRUE; } static HB_SIZE utf8pos( const char * szUTF8, HB_SIZE ulLen, HB_SIZE ulUTF8Pos ) @@ -828,8 +828,8 @@ char * hb_cdpUTF8StringSubstr( const char * pSrc, HB_SIZE ulLen, return pDst; } -BOOL hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, unsigned char ch, - int * n, HB_WCHAR * pwc ) +HB_BOOL hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch, + int * n, HB_WCHAR * pwc ) { if( utf8tou16nextchar( ch, n, pwc ) ) { @@ -845,12 +845,12 @@ BOOL hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, unsigned char ch, *pwc = uc; } } - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -HB_SIZE hb_cdpStrAsUTF8Len( PHB_CODEPAGE cdp, BOOL fCtrl, +HB_SIZE hb_cdpStrAsUTF8Len( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ) { @@ -904,7 +904,7 @@ HB_SIZE hb_cdpStrAsUTF8Len( PHB_CODEPAGE cdp, BOOL fCtrl, return ulD; } -HB_SIZE hb_cdpStrToUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, +HB_SIZE hb_cdpStrToUTF8( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ) { @@ -964,7 +964,7 @@ HB_SIZE hb_cdpStrToUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, return ulD; } -HB_SIZE hb_cdpUTF8AsStrLen( PHB_CODEPAGE cdp, BOOL fCtrl, +HB_SIZE hb_cdpUTF8AsStrLen( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ) { @@ -1009,7 +1009,7 @@ HB_SIZE hb_cdpUTF8AsStrLen( PHB_CODEPAGE cdp, BOOL fCtrl, return ulD; } -HB_SIZE hb_cdpUTF8ToStr( PHB_CODEPAGE cdp, BOOL fCtrl, +HB_SIZE hb_cdpUTF8ToStr( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ) { @@ -1072,7 +1072,7 @@ HB_SIZE hb_cdpUTF8ToStr( PHB_CODEPAGE cdp, BOOL fCtrl, /* * U16 (hb wide char) conversions */ -HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, BOOL fCtrl, unsigned char ch ) +HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch ) { if( cdp && ( fCtrl || ch >= 32 ) ) return cdp->uniTable->uniCodes[ ch ]; @@ -1080,7 +1080,7 @@ HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, BOOL fCtrl, unsigned char ch ) return ch; } -unsigned char hb_cdpGetChar( PHB_CODEPAGE cdp, BOOL fCtrl, HB_WCHAR wc ) +unsigned char hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ) { if( cdp && ( fCtrl || wc >= 32 ) ) { @@ -1097,7 +1097,7 @@ unsigned char hb_cdpGetChar( PHB_CODEPAGE cdp, BOOL fCtrl, HB_WCHAR wc ) return wc >= 0x100 ? '?' : ( UCHAR ) wc; } -HB_SIZE hb_cdpStrAsU16Len( PHB_CODEPAGE cdp, BOOL fCtrl, +HB_SIZE hb_cdpStrAsU16Len( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ) { @@ -1145,7 +1145,7 @@ HB_SIZE hb_cdpStrAsU16Len( PHB_CODEPAGE cdp, BOOL fCtrl, return ulSrc; } -HB_SIZE hb_cdpStrToU16( PHB_CODEPAGE cdp, BOOL fCtrl, int iEndian, +HB_SIZE hb_cdpStrToU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, int iEndian, const char * pSrc, HB_SIZE ulSrc, HB_WCHAR * pDst, HB_SIZE ulDst ) { @@ -1214,7 +1214,7 @@ HB_SIZE hb_cdpStrToU16( PHB_CODEPAGE cdp, BOOL fCtrl, int iEndian, return ulD; } -HB_SIZE hb_cdpU16AsStrLen( PHB_CODEPAGE cdp, BOOL fCtrl, +HB_SIZE hb_cdpU16AsStrLen( PHB_CODEPAGE cdp, HB_BOOL fCtrl, const HB_WCHAR * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax ) { @@ -1254,7 +1254,7 @@ HB_SIZE hb_cdpU16AsStrLen( PHB_CODEPAGE cdp, BOOL fCtrl, return ulD; } -HB_SIZE hb_cdpU16ToStr( PHB_CODEPAGE cdp, BOOL fCtrl, int iEndian, +HB_SIZE hb_cdpU16ToStr( PHB_CODEPAGE cdp, HB_BOOL fCtrl, int iEndian, const HB_WCHAR * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst ) { @@ -1336,9 +1336,9 @@ HB_SIZE hb_cdpTransLen( const char * pSrc, HB_SIZE ulSrc, HB_SIZE ulMax, if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable ) { if( cdpIn == &s_utf8_codepage ) - return hb_cdpUTF8AsStrLen( cdpOut, FALSE, pSrc, ulSrc, ulMax ); + return hb_cdpUTF8AsStrLen( cdpOut, HB_FALSE, pSrc, ulSrc, ulMax ); else if( cdpOut == &s_utf8_codepage ) - return hb_cdpStrAsUTF8Len( cdpIn, FALSE, pSrc, ulSrc, ulMax ); + return hb_cdpStrAsUTF8Len( cdpIn, HB_FALSE, pSrc, ulSrc, ulMax ); else { unsigned char * uniTrans; @@ -1419,9 +1419,9 @@ HB_SIZE hb_cdpTransTo( const char * pSrc, HB_SIZE ulSrc, if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable ) { if( cdpIn == &s_utf8_codepage ) - return hb_cdpUTF8ToStr( cdpOut, FALSE, pSrc, ulSrc, pDst, ulDst ); + return hb_cdpUTF8ToStr( cdpOut, HB_FALSE, pSrc, ulSrc, pDst, ulDst ); else if( cdpOut == &s_utf8_codepage ) - return hb_cdpStrToUTF8( cdpIn, FALSE, pSrc, ulSrc, pDst, ulDst ); + return hb_cdpStrToUTF8( cdpIn, HB_FALSE, pSrc, ulSrc, pDst, ulDst ); else { unsigned char * uniTrans; @@ -1532,7 +1532,7 @@ HB_SIZE hb_cdpTransTo( const char * pSrc, HB_SIZE ulSrc, return ulSize; } -int hb_cdpTranslateChar( int iChar, BOOL fCtrl, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) +int hb_cdpTranslateChar( int iChar, HB_BOOL fCtrl, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) { if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable && iChar >= ( fCtrl ? 32 : 0 ) && iChar < 256 ) @@ -1641,7 +1641,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, const char * pszLower, unsigned int nACSort ) { - BOOL lSort, fError; + HB_BOOL lSort, fError; int iMulti, iAcc, iAccUp, iAccLo, iSortUp, iSortLo, i; const char * pup, * plo; unsigned char ucUp, ucLo, ucUp2, ucLo2; @@ -1654,7 +1654,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, memset( used, '\0', sizeof( used ) ); iMulti = iAcc = iSortUp = iSortLo = 0; - fError = lSort = FALSE; + fError = lSort = HB_FALSE; ucUp2 = ucLo2 = 0; pup = pszUpper; @@ -1666,7 +1666,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, if( ucUp == 0 || ucLo == 0 ) { if( ucUp || ucLo ) - fError = TRUE; + fError = HB_TRUE; break; } if( ucUp == '.' ) @@ -1702,7 +1702,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, } if( *pup == '.' && *plo == '.' ) { - lSort = TRUE; + lSort = HB_TRUE; iMulti++; pup++; plo++; @@ -1710,14 +1710,14 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, } } } - fError = TRUE; + fError = HB_TRUE; break; } if( ucUp == '~' ) { if( ucLo != '~' || *pup == '\0' || *plo == '\0' ) { - fError = TRUE; + fError = HB_TRUE; break; } ucUp = ( unsigned char ) *pup++; @@ -1730,7 +1730,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, ucLo = ' '; if( ucUp == ' ' && ucLo == ' ' ) { - fError = TRUE; + fError = HB_TRUE; break; } if( ucUp != ' ' ) @@ -1738,20 +1738,20 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, used[ ucUp ] = 1; ++iSortLo; if( ucUp < ucUp2 ) - lSort = TRUE; + lSort = HB_TRUE; ucUp2 = ucUp; } if( ucLo != ' ' ) { used[ ucLo ] = 1; if( ucLo < ucLo2 ) - lSort = TRUE; + lSort = HB_TRUE; ucLo2 = ucLo; } } if( iMulti > 64 ) - fError = TRUE; + fError = HB_TRUE; if( fError || nACSort > HB_CDP_ACSORT_INTERLEAVED ) hb_errInternal( 9994, "Harbour CP (%s) initialization failure", id, NULL ); @@ -1759,7 +1759,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, if( iAcc == 0 ) nACSort = HB_CDP_ACSORT_NONE; else if( nACSort != HB_CDP_ACSORT_NONE ) - lSort = TRUE; + lSort = HB_TRUE; ulSize = 0x300; if( lSort ) @@ -2028,7 +2028,7 @@ static PHB_CODEPAGE * hb_cdpFindPos( const char * id ) return cdp_ptr; } -BOOL hb_cdpRegisterRaw( PHB_CODEPAGE cdp ) +HB_BOOL hb_cdpRegisterRaw( PHB_CODEPAGE cdp ) { PHB_CODEPAGE * cdp_ptr; @@ -2038,15 +2038,15 @@ BOOL hb_cdpRegisterRaw( PHB_CODEPAGE cdp ) if( *cdp_ptr == NULL ) { *cdp_ptr = cdp; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_cdpRegisterNew( const char * id, const char * info, - PHB_UNITABLE uniTable, - const char * pszUpper, const char * pszLower, - unsigned int nACSort ) +HB_BOOL hb_cdpRegisterNew( const char * id, const char * info, + PHB_UNITABLE uniTable, + const char * pszUpper, const char * pszLower, + unsigned int nACSort ) { PHB_CODEPAGE * cdp_ptr; @@ -2058,7 +2058,7 @@ BOOL hb_cdpRegisterNew( const char * id, const char * info, *cdp_ptr = hb_buildCodePage( id, info, uniTable, pszUpper, pszLower, nACSort ); return *cdp_ptr != NULL; } - return FALSE; + return HB_FALSE; } void hb_cdpReleaseAll( void ) @@ -2281,9 +2281,9 @@ HB_FUNC( HB_STRTOUTF8 ) if( cdp ) { szString = hb_parc( 1 ); - ulDest = hb_cdpStrAsUTF8Len( cdp, FALSE, szString, ulLen, 0 ); + ulDest = hb_cdpStrAsUTF8Len( cdp, HB_FALSE, szString, ulLen, 0 ); szDest = ( char * ) hb_xgrab( ulDest + 1 ); - hb_cdpStrToUTF8( cdp, FALSE, szString, ulLen, szDest, ulDest + 1 ); + hb_cdpStrToUTF8( cdp, HB_FALSE, szString, ulLen, szDest, ulDest + 1 ); } } if( szDest ) @@ -2308,9 +2308,9 @@ HB_FUNC( HB_UTF8TOSTR ) if( cdp ) { szString = hb_parc( 1 ); - ulDest = hb_cdpUTF8AsStrLen( cdp, FALSE, szString, ulLen, 0 ); + ulDest = hb_cdpUTF8AsStrLen( cdp, HB_FALSE, szString, ulLen, 0 ); szDest = ( char * ) hb_xgrab( ulDest + 1 ); - hb_cdpUTF8ToStr( cdp, FALSE, szString, ulLen, szDest, ulDest + 1 ); + hb_cdpUTF8ToStr( cdp, HB_FALSE, szString, ulLen, szDest, ulDest + 1 ); } } diff --git a/harbour/src/rtl/console.c b/harbour/src/rtl/console.c index 49489ae10b..fca7c0fe49 100644 --- a/harbour/src/rtl/console.c +++ b/harbour/src/rtl/console.c @@ -273,14 +273,14 @@ static void hb_conOutDev( const char * szStr, HB_SIZE ulLen ) hb_gtWrite( szStr, ulLen ); } -static char * hb_itemStringCon( PHB_ITEM pItem, HB_SIZE * pulLen, BOOL * pfFreeReq ) +static char * hb_itemStringCon( PHB_ITEM pItem, HB_SIZE * pulLen, HB_BOOL * pfFreeReq ) { /* logical values in device output (not console, stdout or stderr) are shown as single letter */ if( HB_IS_LOGICAL( pItem ) ) { *pulLen = 1; - *pfFreeReq = FALSE; + *pfFreeReq = HB_FALSE; return ( char * ) ( hb_itemGetL( pItem ) ? "T" : "F" ); } return hb_itemString( pItem, pulLen, pfFreeReq ); @@ -294,7 +294,7 @@ HB_FUNC( OUTSTD ) /* writes a list of values to the standard output device */ { char * pszString; HB_SIZE ulLen; - BOOL fFree; + HB_BOOL fFree; if( iParam > 1 ) hb_conOutStd( " ", 1 ); @@ -314,7 +314,7 @@ HB_FUNC( OUTERR ) /* writes a list of values to the standard error device */ { char * pszString; HB_SIZE ulLen; - BOOL fFree; + HB_BOOL fFree; if( iParam > 1 ) hb_conOutErr( " ", 1 ); @@ -334,7 +334,7 @@ HB_FUNC( QQOUT ) /* writes a list of values to the current device (screen or pri { char * pszString; HB_SIZE ulLen; - BOOL fFree; + HB_BOOL fFree; if( iParam > 1 ) hb_conOutAlt( " ", 1 ); @@ -499,7 +499,7 @@ HB_FUNC( DEVOUT ) /* writes a single value to the current device (screen or prin { char * pszString; HB_SIZE ulLen; - BOOL fFree; + HB_BOOL fFree; if( HB_ISCHAR( 2 ) ) { @@ -530,7 +530,7 @@ HB_FUNC( DISPOUT ) /* writes a single value to the screen, but is not affected b { char * pszString; HB_SIZE ulLen; - BOOL bFreeReq; + HB_BOOL bFreeReq; if( HB_ISCHAR( 2 ) ) { @@ -567,7 +567,7 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position { char * pszString; HB_SIZE ulLen; - BOOL bFreeReq; + HB_BOOL bFreeReq; if( HB_ISCHAR( 4 ) ) { @@ -604,7 +604,7 @@ HB_FUNC( HB_DISPOUTAT ) { char * pszString; HB_SIZE ulLen; - BOOL bFreeReq; + HB_BOOL bFreeReq; int iColor; pszString = hb_itemStringCon( hb_param( 3, HB_IT_ANY ), &ulLen, &bFreeReq ); diff --git a/harbour/src/rtl/copyfile.c b/harbour/src/rtl/copyfile.c index 8858f57a70..6f90801380 100644 --- a/harbour/src/rtl/copyfile.c +++ b/harbour/src/rtl/copyfile.c @@ -62,9 +62,9 @@ #define BUFFER_SIZE 8192 -static BOOL hb_copyfile( const char * szSource, const char * szDest ) +static HB_BOOL hb_copyfile( const char * szSource, const char * szDest ) { - BOOL bRetVal = FALSE; + HB_BOOL bRetVal = HB_FALSE; HB_FHANDLE fhndSource; PHB_ITEM pError = NULL; @@ -114,7 +114,7 @@ static BOOL hb_copyfile( const char * szSource, const char * szDest ) buffer = hb_xgrab( BUFFER_SIZE ); - bRetVal = TRUE; + bRetVal = HB_TRUE; while( ( usRead = hb_fsRead( fhndSource, buffer, BUFFER_SIZE ) ) != 0 ) { @@ -123,7 +123,7 @@ static BOOL hb_copyfile( const char * szSource, const char * szDest ) pError = hb_errRT_FileError( pError, NULL, EG_WRITE, 2016, szDest ); if( hb_errLaunch( pError ) != E_RETRY ) { - bRetVal = FALSE; + bRetVal = HB_FALSE; break; } } @@ -155,7 +155,7 @@ HB_FUNC( __COPYFILE ) if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) { if( ! hb_copyfile( hb_parc( 1 ), hb_parc( 2 ) ) ) - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); /* NOTE: Undocumented but existing Clipper Run-time error */ diff --git a/harbour/src/rtl/dates.c b/harbour/src/rtl/dates.c index d8e3ce46b5..85f9d19db3 100644 --- a/harbour/src/rtl/dates.c +++ b/harbour/src/rtl/dates.c @@ -88,10 +88,10 @@ char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * { const char * szPtr; int digit; - BOOL used_d, used_m, used_y; + HB_BOOL used_d, used_m, used_y; format_count = 0; - used_d = used_m = used_y = FALSE; + used_d = used_m = used_y = HB_FALSE; szPtr = szDateFormat; while( format_count < size ) @@ -139,7 +139,7 @@ char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = ( char ) digit; } - used_d = TRUE; + used_d = HB_TRUE; break; case 'M': @@ -174,7 +174,7 @@ char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = ( char ) digit; } - used_m = TRUE; + used_m = HB_TRUE; break; case 'Y': @@ -210,7 +210,7 @@ char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = ( char ) digit; } - used_y = TRUE; + used_y = HB_TRUE; break; default: diff --git a/harbour/src/rtl/dirdrive.c b/harbour/src/rtl/dirdrive.c index 343054e3aa..7054f15aa5 100644 --- a/harbour/src/rtl/dirdrive.c +++ b/harbour/src/rtl/dirdrive.c @@ -90,7 +90,7 @@ HB_FUNC( DIRREMOVE ) HB_FUNC( ISDISK ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; const char * szDrive = hb_parc( 1 ); if( szDrive ) @@ -105,7 +105,7 @@ HB_FUNC( ISDISK ) HB_FUNC( DISKCHANGE ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; const char * szDrive = hb_parc( 1 ); if( szDrive ) diff --git a/harbour/src/rtl/diskspac.c b/harbour/src/rtl/diskspac.c index bb19138e6c..47ab935e8f 100644 --- a/harbour/src/rtl/diskspac.c +++ b/harbour/src/rtl/diskspac.c @@ -80,7 +80,7 @@ HB_FUNC( DISKSPACE ) { double dSpace = 0.0; - BOOL bError; + HB_BOOL bError; #if defined( HB_OS_DOS ) { @@ -149,10 +149,10 @@ HB_FUNC( DISKSPACE ) if( pGetDiskFreeSpaceEx ) { - bError = ! pGetDiskFreeSpaceEx( lpPath, - ( PULARGE_INTEGER ) &i64FreeBytesToCaller, - ( PULARGE_INTEGER ) &i64TotalBytes, - ( PULARGE_INTEGER ) &i64FreeBytes ); + bError = pGetDiskFreeSpaceEx( lpPath, + ( PULARGE_INTEGER ) &i64FreeBytesToCaller, + ( PULARGE_INTEGER ) &i64TotalBytes, + ( PULARGE_INTEGER ) &i64FreeBytes ) ? HB_FALSE : HB_TRUE; if( ! bError ) dSpace = HB_GET_LARGE_UINT( i64FreeBytesToCaller ); } @@ -163,12 +163,12 @@ HB_FUNC( DISKSPACE ) DWORD dwNumberOfFreeClusters; DWORD dwTotalNumberOfClusters; - bError = ! GetDiskFreeSpace( lpPath, - &dwSectorsPerCluster, - &dwBytesPerSector, - &dwNumberOfFreeClusters, - &dwTotalNumberOfClusters ); - if( !bError ) + bError = GetDiskFreeSpace( lpPath, + &dwSectorsPerCluster, + &dwBytesPerSector, + &dwNumberOfFreeClusters, + &dwTotalNumberOfClusters ) ? HB_FALSE : HB_TRUE; + if( ! bError ) dSpace = ( double ) dwNumberOfFreeClusters * ( double ) dwSectorsPerCluster * ( double ) dwBytesPerSector; @@ -203,7 +203,7 @@ HB_FUNC( DISKSPACE ) #if defined( __WATCOMC__ ) || defined( __CEGCC__ ) int iTODO; - bError = FALSE; + bError = HB_FALSE; #else #if defined( HB_OS_DARWIN ) struct statfs st; @@ -226,7 +226,7 @@ HB_FUNC( DISKSPACE ) hb_xfree( pszFree ); } #else - bError = FALSE; + bError = HB_FALSE; #endif if( bError ) diff --git a/harbour/src/rtl/disksphb.c b/harbour/src/rtl/disksphb.c index 7bebf3e2e2..3976caacab 100644 --- a/harbour/src/rtl/disksphb.c +++ b/harbour/src/rtl/disksphb.c @@ -170,7 +170,7 @@ HB_FUNC( HB_DISKSPACE ) { ULARGE_INTEGER i64FreeBytesToCaller, i64TotalBytes, i64FreeBytes; UINT uiErrMode = SetErrorMode( SEM_FAILCRITICALERRORS ); - BOOL fResult; + HB_BOOL fResult; LPTSTR lpPath = HB_TCHAR_CONVTO( szPath ); @@ -223,7 +223,7 @@ HB_FUNC( HB_DISKSPACE ) fResult = pGetDiskFreeSpaceEx( lpPath, ( PULARGE_INTEGER ) &i64FreeBytesToCaller, ( PULARGE_INTEGER ) &i64TotalBytes, - ( PULARGE_INTEGER ) &i64FreeBytes ); + ( PULARGE_INTEGER ) &i64FreeBytes ) ? HB_TRUE : HB_FALSE; hb_fsSetIOError( fResult, 0 ); if( fResult ) { @@ -259,7 +259,7 @@ HB_FUNC( HB_DISKSPACE ) &dwSectorsPerCluster, &dwBytesPerSector, &dwNumberOfFreeClusters, - &dwTotalNumberOfClusters ); + &dwTotalNumberOfClusters ) ? HB_TRUE : HB_FALSE; hb_fsSetIOError( fResult, 0 ); if( fResult ) @@ -334,10 +334,10 @@ HB_FUNC( HB_DISKSPACE ) ( double ) fsa.cbSector; break; } - hb_fsSetIOError( TRUE, 0 ); + hb_fsSetIOError( HB_TRUE, 0 ); } else - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); } #elif defined( HB_OS_UNIX ) && !( defined( __WATCOMC__ ) || defined( __CEGCC__ ) ) { @@ -375,10 +375,10 @@ HB_FUNC( HB_DISKSPACE ) dSpace = ( double ) sf.f_blocks * ( double ) sf.f_bsize; break; } - hb_fsSetIOError( TRUE, 0 ); + hb_fsSetIOError( HB_TRUE, 0 ); } else - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); if( pszFree ) hb_xfree( pszFree ); diff --git a/harbour/src/rtl/empty.c b/harbour/src/rtl/empty.c index 88dc4afec3..74ee83675e 100644 --- a/harbour/src/rtl/empty.c +++ b/harbour/src/rtl/empty.c @@ -100,7 +100,7 @@ HB_FUNC( EMPTY ) break; case HB_IT_BLOCK: - hb_retl( FALSE ); + hb_retl( HB_FALSE ); break; case HB_IT_POINTER: @@ -113,7 +113,7 @@ HB_FUNC( EMPTY ) break; default: - hb_retl( TRUE ); + hb_retl( HB_TRUE ); break; } } diff --git a/harbour/src/rtl/errapi.c b/harbour/src/rtl/errapi.c index b269634c85..ac6b09ac6e 100644 --- a/harbour/src/rtl/errapi.c +++ b/harbour/src/rtl/errapi.c @@ -134,7 +134,7 @@ static void hb_errorDataRelease( void * Cargo ) static HB_TSD_NEW( s_errData, sizeof( HB_ERRDATA ), NULL, hb_errorDataRelease ); -static BOOL hb_errGetNumCode( int * piValue, const char * szOperation ) +static HB_BOOL hb_errGetNumCode( int * piValue, const char * szOperation ) { PHB_ITEM pItem = hb_param( 1, HB_IT_NUMERIC ); @@ -147,7 +147,7 @@ static BOOL hb_errGetNumCode( int * piValue, const char * szOperation ) if( ! pItem ) { *piValue = 0; - return FALSE; + return HB_FALSE; } if( ! HB_IS_NUMERIC( pItem ) ) @@ -157,7 +157,7 @@ static BOOL hb_errGetNumCode( int * piValue, const char * szOperation ) hb_itemRelease( pItem ); } - return TRUE; + return HB_TRUE; } @@ -203,7 +203,7 @@ HB_FUNC_STATIC( _CANDEFAULT ) if( HB_ISLOG( 1 ) ) { PHB_ITEM pError = hb_stackSelfItem(); - BOOL fCan = hb_parl( 1 ); + HB_BOOL fCan = hb_parl( 1 ); if( fCan ) hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) | EF_CANDEFAULT ) ); @@ -225,7 +225,7 @@ HB_FUNC_STATIC( _CANRETRY ) if( HB_ISLOG( 1 ) ) { PHB_ITEM pError = hb_stackSelfItem(); - BOOL fCan = hb_parl( 1 ); + HB_BOOL fCan = hb_parl( 1 ); if( fCan ) hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) | EF_CANRETRY ) ); @@ -247,7 +247,7 @@ HB_FUNC_STATIC( _CANSUBST ) if( HB_ISLOG( 1 ) ) { PHB_ITEM pError = hb_stackSelfItem(); - BOOL fCan = hb_parl( 1 ); + HB_BOOL fCan = hb_parl( 1 ); if( fCan ) hb_errPutFlags( pError, ( USHORT ) ( hb_errGetFlags( pError ) | EF_CANSUBSTITUTE ) ); @@ -590,19 +590,19 @@ USHORT hb_errLaunch( PHB_ITEM pError ) } else if( pResult ) { - BOOL bFailure = FALSE; + HB_BOOL bFailure = HB_FALSE; /* If the error block didn't return a logical value, */ /* or the canSubstitute flag has been set, consider it as a failure */ if( hb_itemType( pResult ) != HB_IT_LOGICAL || ( uiFlags & EF_CANSUBSTITUTE ) ) - bFailure = TRUE; + bFailure = HB_TRUE; else { uiAction = hb_itemGetL( pResult ) ? E_RETRY : E_DEFAULT; if( ( uiAction == E_DEFAULT && !( uiFlags & EF_CANDEFAULT ) ) || ( uiAction == E_RETRY && !( uiFlags & EF_CANRETRY ) ) ) - bFailure = TRUE; + bFailure = HB_TRUE; } hb_itemRelease( pResult ); diff --git a/harbour/src/rtl/errintlo.c b/harbour/src/rtl/errintlo.c index 828f912e7b..a4d5a5e87e 100644 --- a/harbour/src/rtl/errintlo.c +++ b/harbour/src/rtl/errintlo.c @@ -65,7 +65,7 @@ void hb_errInternalRaw( HB_ERRCODE errCode, const char * szText, const char * sz char buffer[ 8192 ]; char file[ HB_PATH_MAX ]; const char * szFile, * szInfo; - BOOL fStack, fLang; + HB_BOOL fStack, fLang; USHORT uiLine; int iLevel; FILE * hLog; diff --git a/harbour/src/rtl/file.c b/harbour/src/rtl/file.c index b362821170..c868d6a809 100644 --- a/harbour/src/rtl/file.c +++ b/harbour/src/rtl/file.c @@ -53,7 +53,7 @@ #include "hbapi.h" #include "hbapifs.h" -BOOL hb_fsFile( const char * pszFilename ) +HB_BOOL hb_fsFile( const char * pszFilename ) { PHB_FFIND ffind; char * pszFree; @@ -67,18 +67,18 @@ BOOL hb_fsFile( const char * pszFilename ) hb_fsFindClose( ffind ); if( pszFree ) hb_xfree( pszFree ); - return TRUE; + return HB_TRUE; } if( pszFree ) hb_xfree( pszFree ); - return FALSE; + return HB_FALSE; } -BOOL hb_fsIsDirectory( const char * pszFilename ) +HB_BOOL hb_fsIsDirectory( const char * pszFilename ) { - BOOL bResult = FALSE; + HB_BOOL bResult = HB_FALSE; PHB_FFIND ffind; char * pszFree = NULL; int iLen; @@ -104,7 +104,7 @@ BOOL hb_fsIsDirectory( const char * pszFilename ) if( ( ffind = hb_fsFindFirst( pszFilename, HB_FA_DIRECTORY ) ) != NULL ) { if( ( ffind->attr & HB_FA_DIRECTORY ) == HB_FA_DIRECTORY ) - bResult = TRUE; + bResult = HB_TRUE; hb_fsFindClose( ffind ); } } diff --git a/harbour/src/rtl/filebuf.c b/harbour/src/rtl/filebuf.c index af68361ecc..cc2b82c6f1 100644 --- a/harbour/src/rtl/filebuf.c +++ b/harbour/src/rtl/filebuf.c @@ -81,8 +81,8 @@ typedef struct _HB_FILE ULONG device; ULONG inode; int used; - BOOL shared; - BOOL readonly; + HB_BOOL shared; + HB_BOOL readonly; HB_FHANDLE hFile; HB_FHANDLE hFileRO; PHB_FLOCK pLocks; @@ -131,8 +131,8 @@ static PHB_FILE hb_fileFind( ULONG device, ULONG inode ) return NULL; } -static PHB_FILE hb_fileNew( HB_FHANDLE hFile, BOOL fShared, BOOL fReadonly, - ULONG device, ULONG inode, BOOL fBind ) +static PHB_FILE hb_fileNew( HB_FHANDLE hFile, HB_BOOL fShared, HB_BOOL fReadonly, + ULONG device, ULONG inode, HB_BOOL fBind ) { PHB_FILE pFile = hb_fileFind( device, inode ); @@ -219,27 +219,27 @@ static void hb_fileDeleteLock( PHB_FILE pFile, UINT uiPos ) } } -static BOOL hb_fileSetLock( PHB_FILE pFile, BOOL * pfLockFS, - HB_FOFFSET ulStart, HB_FOFFSET ulLen ) +static HB_BOOL hb_fileSetLock( PHB_FILE pFile, HB_BOOL * pfLockFS, + HB_FOFFSET ulStart, HB_FOFFSET ulLen ) { - BOOL fLJoin, fRJoin; + HB_BOOL fLJoin, fRJoin; UINT uiPos; uiPos = hb_fileFindOffset( pFile, ulStart ); - fLJoin = fRJoin = FALSE; + fLJoin = fRJoin = HB_FALSE; if( uiPos < pFile->uiLocks ) { PHB_FLOCK pLock = &pFile->pLocks[ uiPos ]; if( ulStart + ulLen > pLock->start ) - return FALSE; + return HB_FALSE; if( ulStart + ulLen == pLock->start ) - fRJoin = TRUE; + fRJoin = HB_TRUE; } if( uiPos > 0 ) { PHB_FLOCK pLock = &pFile->pLocks[ uiPos - 1 ]; if( pLock->start + pLock->len == ulStart ) - fLJoin = TRUE; + fLJoin = HB_TRUE; } if( fLJoin ) { @@ -260,14 +260,14 @@ static BOOL hb_fileSetLock( PHB_FILE pFile, BOOL * pfLockFS, hb_fileInsertLock( pFile, uiPos, ulStart, ulLen ); if( pFile->shared ) - * pfLockFS = TRUE; - return TRUE; + * pfLockFS = HB_TRUE; + return HB_TRUE; } -static BOOL hb_fileUnlock( PHB_FILE pFile, BOOL * pfLockFS, - HB_FOFFSET ulStart, HB_FOFFSET ulLen ) +static HB_BOOL hb_fileUnlock( PHB_FILE pFile, HB_BOOL * pfLockFS, + HB_FOFFSET ulStart, HB_FOFFSET ulLen ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; UINT uiPos; uiPos = hb_fileFindOffset( pFile, ulStart ); @@ -296,8 +296,8 @@ static BOOL hb_fileUnlock( PHB_FILE pFile, BOOL * pfLockFS, pLock->len = ulStart - pLock->start; } if( pFile->shared ) - * pfLockFS = TRUE; - fResult = TRUE; + * pfLockFS = HB_TRUE; + fResult = HB_TRUE; } } return fResult; @@ -308,7 +308,7 @@ static BOOL hb_fileUnlock( PHB_FILE pFile, BOOL * pfLockFS, * file methods */ -static BOOL s_fileAccept( const char * pFilename ) +static HB_BOOL s_fileAccept( const char * pFilename ) { return pFilename && *pFilename; } @@ -320,9 +320,9 @@ static PHB_FILE s_fileExtOpen( const char * pFilename, const char * pDefExt, PHB_FILE pFile = NULL; #if defined( HB_OS_UNIX ) struct stat statbuf; - BOOL fResult; + HB_BOOL fResult; #endif - BOOL fShared, fReadonly; + HB_BOOL fShared, fReadonly; HB_FHANDLE hFile; char * pszFile; @@ -343,7 +343,7 @@ static PHB_FILE s_fileExtOpen( const char * pFilename, const char * pDefExt, if( pFile ) { if( !fShared || ! pFile->shared || ( uiExFlags & FXO_TRUNCATE ) != 0 ) - fResult = FALSE; + fResult = HB_FALSE; else if( !fReadonly && pFile->readonly ) pFile = NULL; else @@ -390,14 +390,14 @@ static PHB_FILE s_fileExtOpen( const char * pFilename, const char * pDefExt, #endif hb_threadEnterCriticalSection( &s_fileMtx ); - pFile = hb_fileNew( hFile, fShared, fReadonly, device, inode, TRUE ); + pFile = hb_fileNew( hFile, fShared, fReadonly, device, inode, HB_TRUE ); if( pFile->hFile != hFile ) { if( pFile->hFileRO == FS_ERROR && !fReadonly && pFile->readonly ) { pFile->hFileRO = pFile->hFile; pFile->hFile = hFile; - pFile->readonly = FALSE; + pFile->readonly = HB_FALSE; hFile = FS_ERROR; } if( pFile->uiLocks == 0 ) @@ -479,10 +479,10 @@ static void s_fileClose( PHB_FILE pFile ) hb_fsClose( hFileRO ); } -static BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, - int iType ) +static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, + int iType ) { - BOOL fResult, fLockFS = FALSE; + HB_BOOL fResult, fLockFS = HB_FALSE; if( ( iType & FL_MASK ) == FL_UNLOCK ) { @@ -528,7 +528,7 @@ static ULONG s_fileWriteAt( PHB_FILE pFile, const void * buffer, ULONG ulSize, return hb_fsWriteAt( pFile->hFile, buffer, ulSize, llOffset ); } -static BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset ) +static HB_BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset ) { return hb_fsTruncAt( pFile->hFile, llOffset ); } @@ -583,9 +583,9 @@ static int s_iFileTypes = 0; * public API functions */ -BOOL hb_fileRegister( const HB_FILE_FUNCS * pFuncs ) +HB_BOOL hb_fileRegister( const HB_FILE_FUNCS * pFuncs ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; hb_threadEnterCriticalSection( &s_fileMtx ); @@ -593,7 +593,7 @@ BOOL hb_fileRegister( const HB_FILE_FUNCS * pFuncs ) { s_pFileTypes[ s_iFileTypes ] = pFuncs; s_iFileTypes++; - fResult = TRUE; + fResult = HB_TRUE; } hb_threadLeaveCriticalSection( &s_fileMtx ); @@ -601,7 +601,7 @@ BOOL hb_fileRegister( const HB_FILE_FUNCS * pFuncs ) return fResult; } -BOOL hb_fileDelete( const char * pFilename ) +HB_BOOL hb_fileDelete( const char * pFilename ) { int i = s_iFileTypes; @@ -613,7 +613,7 @@ BOOL hb_fileDelete( const char * pFilename ) return hb_fsDelete( pFilename ); } -BOOL hb_fileExists( const char * pFilename, char * pRetPath ) +HB_BOOL hb_fileExists( const char * pFilename, char * pRetPath ) { int i = s_iFileTypes; @@ -625,7 +625,7 @@ BOOL hb_fileExists( const char * pFilename, char * pRetPath ) return hb_spFileExists( pFilename, pRetPath ); } -BOOL hb_fileRename( const char * pFilename, const char * pszNewName ) +HB_BOOL hb_fileRename( const char * pFilename, const char * pszNewName ) { int i = s_iFileTypes; @@ -656,8 +656,8 @@ void hb_fileClose( PHB_FILE pFile ) pFile->pFuncs->Close( pFile ); } -BOOL hb_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, - int iType ) +HB_BOOL hb_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, + int iType ) { return pFile->pFuncs->Lock( pFile, ulStart, ulLen, iType ); } @@ -674,7 +674,7 @@ ULONG hb_fileWriteAt( PHB_FILE pFile, const void * buffer, ULONG ulSize, return pFile->pFuncs->WriteAt( pFile, buffer, ulSize, llOffset ); } -BOOL hb_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset ) +HB_BOOL hb_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset ) { return pFile->pFuncs->TruncAt( pFile, llOffset ); } @@ -704,7 +704,7 @@ PHB_FILE hb_fileCreateTemp( const char * pszDir, const char * pszPrefix, hFile = hb_fsCreateTemp( pszDir, pszPrefix, ulAttr, pszName ); if( hFile != FS_ERROR ) - pFile = hb_fileNew( hFile, FALSE, FALSE, 0, 0, FALSE ); + pFile = hb_fileNew( hFile, HB_FALSE, HB_FALSE, 0, 0, HB_FALSE ); return pFile; } @@ -720,7 +720,7 @@ PHB_FILE hb_fileCreateTempEx( char * pszName, hFile = hb_fsCreateTempEx( pszName, pszDir, pszPrefix, pszExt, ulAttr ); if( hFile != FS_ERROR ) - pFile = hb_fileNew( hFile, FALSE, FALSE, 0, 0, FALSE ); + pFile = hb_fileNew( hFile, HB_FALSE, HB_FALSE, 0, 0, HB_FALSE ); return pFile; } diff --git a/harbour/src/rtl/filehb.c b/harbour/src/rtl/filehb.c index 0e8c642585..3392381d5a 100644 --- a/harbour/src/rtl/filehb.c +++ b/harbour/src/rtl/filehb.c @@ -68,5 +68,5 @@ HB_FUNC( FILE ) { const char * szFile = hb_parc( 1 ); - hb_retl( szFile ? hb_spFile( szFile, NULL ) : FALSE ); + hb_retl( szFile ? hb_spFile( szFile, NULL ) : HB_FALSE ); } diff --git a/harbour/src/rtl/filesys.c b/harbour/src/rtl/filesys.c index 804d7862d2..d0d28ec4d0 100644 --- a/harbour/src/rtl/filesys.c +++ b/harbour/src/rtl/filesys.c @@ -293,7 +293,7 @@ #define HB_FS_LARGE_OPTIMIZED #endif -static BOOL s_fUseWaitLocks = TRUE; +static HB_BOOL s_fUseWaitLocks = HB_TRUE; #if defined( HB_FS_FILE_IO ) @@ -314,7 +314,7 @@ static HANDLE DosToWinHandle( HB_FHANDLE fHandle ) return ( HANDLE ) fHandle; } -static void convert_open_flags( BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, +static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, DWORD *dwMode, DWORD *dwShare, DWORD *dwCreat, DWORD *dwAttr ) { @@ -390,7 +390,7 @@ static void convert_open_flags( BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, #else -static void convert_open_flags( BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, +static void convert_open_flags( HB_BOOL fCreate, HB_FATTR ulAttr, USHORT uiFlags, int *flags, unsigned *mode, int *share, int *attr ) { @@ -549,7 +549,7 @@ HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode ) HB_FHANDLE hPipeHandle[2], hNullHandle; pid_t pid; char * pszTmp; - BOOL bRead; + HB_BOOL bRead; HB_SIZE ulLen; int iMaxFD; @@ -559,11 +559,11 @@ HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode ) else { if( pFilename[0] == '|' ) - bRead = FALSE; + bRead = HB_FALSE; else if( pFilename[ ulLen - 1 ] == '|' ) - bRead = TRUE; + bRead = HB_TRUE; else - bRead = FALSE; + bRead = HB_FALSE; } if( pFilename[0] == '|' ) @@ -662,7 +662,7 @@ HB_FHANDLE hb_fsOpen( const char * pFilename, USHORT uiFlags ) DWORD dwMode, dwShare, dwCreat, dwAttr; HANDLE hFile; - convert_open_flags( FALSE, FC_NORMAL, uiFlags, &dwMode, &dwShare, &dwCreat, &dwAttr ); + convert_open_flags( HB_FALSE, FC_NORMAL, uiFlags, &dwMode, &dwShare, &dwCreat, &dwAttr ); hb_vmUnlock(); hFile = CreateFile( lpFilename, dwMode, dwShare, NULL, dwCreat, dwAttr, NULL ); @@ -678,7 +678,7 @@ HB_FHANDLE hb_fsOpen( const char * pFilename, USHORT uiFlags ) int flags, share, attr; unsigned mode; - convert_open_flags( FALSE, FC_NORMAL, uiFlags, &flags, &mode, &share, &attr ); + convert_open_flags( HB_FALSE, FC_NORMAL, uiFlags, &flags, &mode, &share, &attr ); hb_vmUnlock(); #if defined( _MSC_VER ) || defined( __DMC__ ) if( share ) @@ -724,7 +724,7 @@ HB_FHANDLE hb_fsCreate( const char * pFilename, HB_FATTR ulAttr ) DWORD dwMode, dwShare, dwCreat, dwAttr; HANDLE hFile; - convert_open_flags( TRUE, ulAttr, FO_EXCLUSIVE, &dwMode, &dwShare, &dwCreat, &dwAttr ); + convert_open_flags( HB_TRUE, ulAttr, FO_EXCLUSIVE, &dwMode, &dwShare, &dwCreat, &dwAttr ); hb_vmUnlock(); hFile = CreateFile( lpFilename, dwMode, dwShare, NULL, dwCreat, dwAttr, NULL ); @@ -739,7 +739,7 @@ HB_FHANDLE hb_fsCreate( const char * pFilename, HB_FATTR ulAttr ) { int flags, share, attr; unsigned mode; - convert_open_flags( TRUE, ulAttr, FO_EXCLUSIVE, &flags, &mode, &share, &attr ); + convert_open_flags( HB_TRUE, ulAttr, FO_EXCLUSIVE, &flags, &mode, &share, &attr ); hb_vmUnlock(); #if defined( HB_FS_DOSCREAT ) @@ -786,7 +786,7 @@ HB_FHANDLE hb_fsCreateEx( const char * pFilename, HB_FATTR ulAttr, USHORT uiFlag DWORD dwMode, dwShare, dwCreat, dwAttr; HANDLE hFile; - convert_open_flags( TRUE, ulAttr, uiFlags, &dwMode, &dwShare, &dwCreat, &dwAttr ); + convert_open_flags( HB_TRUE, ulAttr, uiFlags, &dwMode, &dwShare, &dwCreat, &dwAttr ); hb_vmUnlock(); hFile = CreateFile( lpFilename, dwMode, dwShare, NULL, dwCreat, dwAttr, NULL ); @@ -801,7 +801,7 @@ HB_FHANDLE hb_fsCreateEx( const char * pFilename, HB_FATTR ulAttr, USHORT uiFlag { int flags, share, attr; unsigned mode; - convert_open_flags( TRUE, ulAttr, uiFlags, &flags, &mode, &share, &attr ); + convert_open_flags( HB_TRUE, ulAttr, uiFlags, &flags, &mode, &share, &attr ); hb_vmUnlock(); #if defined( HB_FS_SOPEN ) @@ -931,13 +931,13 @@ int hb_fsSetDevMode( HB_FHANDLE hFileHandle, int iDevMode ) #endif } -BOOL hb_fsGetFileTime( const char * pszFileName, long * plJulian, long * plMillisec ) +HB_BOOL hb_fsGetFileTime( const char * pszFileName, long * plJulian, long * plMillisec ) { - BOOL fResult; + HB_BOOL fResult; HB_TRACE(HB_TR_DEBUG, ("hb_fsGetFileTime(%s, %p, %p)", pszFileName, plJulian, plMillisec)); - fResult = FALSE; + fResult = HB_FALSE; #if defined( HB_IO_WIN ) { @@ -956,7 +956,7 @@ BOOL hb_fsGetFileTime( const char * pszFileName, long * plJulian, long * plMilli *plJulian = hb_dateEncode( st.wYear, st.wMonth, st.wDay ); *plMillisec = hb_timeEncode( st.wHour, st.wMinute, st.wSecond, st.wMilliseconds ); - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); hb_vmLock(); @@ -991,7 +991,7 @@ BOOL hb_fsGetFileTime( const char * pszFileName, long * plJulian, long * plMilli #else *plMillisec = hb_timeEncode( ft.tm_hour, ft.tm_min, ft.tm_sec, 0 ); #endif - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); hb_vmLock(); @@ -1012,15 +1012,15 @@ BOOL hb_fsGetFileTime( const char * pszFileName, long * plJulian, long * plMilli return fResult; } -BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) +HB_BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) { - BOOL fResult; + HB_BOOL fResult; char * pszFree; HB_TRACE(HB_TR_DEBUG, ("hb_fsGetAttr(%s, %p)", pszFileName, pulAttr)); *pulAttr = 0; - fResult = FALSE; + fResult = HB_FALSE; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); #if defined( HB_OS_WIN ) @@ -1034,7 +1034,7 @@ BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) if( dwAttr != INVALID_FILE_ATTRIBUTES ) { *pulAttr = hb_fsAttrFromRaw( dwAttr ); - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); hb_vmLock(); @@ -1053,7 +1053,7 @@ BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) #endif { *pulAttr = hb_fsAttrFromRaw( attr ); - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); } @@ -1068,7 +1068,7 @@ BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) if( ulrc == NO_ERROR ) { *pulAttr = hb_fsAttrFromRaw( fs3.attrFile ); - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); hb_vmLock(); @@ -1081,7 +1081,7 @@ BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) if( stat( pszFileName, &sStat ) == 0 ) { *pulAttr = hb_fsAttrFromRaw( sStat.st_mode ); - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); hb_vmLock(); @@ -1101,9 +1101,9 @@ BOOL hb_fsGetAttr( const char * pszFileName, HB_FATTR * pulAttr ) return fResult; } -BOOL hb_fsSetFileTime( const char * pszFileName, long lJulian, long lMillisec ) +HB_BOOL hb_fsSetFileTime( const char * pszFileName, long lJulian, long lMillisec ) { - BOOL fResult; + HB_BOOL fResult; int iYear, iMonth, iDay; int iHour, iMinute, iSecond, iMSec; @@ -1274,7 +1274,7 @@ BOOL hb_fsSetFileTime( const char * pszFileName, long lJulian, long lMillisec ) { int iTODO; /* To force warning */ - fResult = FALSE; + fResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); } #endif @@ -1282,9 +1282,9 @@ BOOL hb_fsSetFileTime( const char * pszFileName, long lJulian, long lMillisec ) return fResult; } -BOOL hb_fsSetAttr( const char * pszFileName, HB_FATTR ulAttr ) +HB_BOOL hb_fsSetAttr( const char * pszFileName, HB_FATTR ulAttr ) { - BOOL fResult; + HB_BOOL fResult; char * pszFree; HB_TRACE(HB_TR_DEBUG, ("hb_fsSetAttr(%s, %lu)", pszFileName, ulAttr)); @@ -1378,7 +1378,7 @@ BOOL hb_fsSetAttr( const char * pszFileName, HB_FATTR ulAttr ) { int iTODO; /* To force warning */ - fResult = FALSE; + fResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); } #endif @@ -1715,7 +1715,7 @@ ULONG hb_fsReadAt( HB_FHANDLE hFileHandle, void * pBuff, ULONG ulCount, HB_FOFFS SEEK_SET ); llPos = ( ( HB_FOFFSET ) ulOffsetHigh << 32 ) | ulOffsetLow; if( llPos == ( HB_FOFFSET ) INVALID_SET_FILE_POINTER ) - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); else hb_fsSetIOError( ReadFile( DosToWinHandle( hFileHandle ), pBuff, ulCount, &ulRead, NULL ), 0 ); @@ -1739,7 +1739,7 @@ ULONG hb_fsReadAt( HB_FHANDLE hFileHandle, void * pBuff, ULONG ulCount, HB_FOFFS llPos = lseek( hFileHandle, llOffset, SEEK_SET ); # endif if( llPos == ( HB_FOFFSET ) -1 ) - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); else { ulRead = read( hFileHandle, pBuff, ulCount ); @@ -1809,7 +1809,7 @@ ULONG hb_fsWriteAt( HB_FHANDLE hFileHandle, const void * pBuff, ULONG ulCount, H SEEK_SET ); llPos = ( ( HB_FOFFSET ) ulOffsetHigh << 32 ) | ulOffsetLow; if( llPos == ( HB_FOFFSET ) INVALID_SET_FILE_POINTER ) - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); else hb_fsSetIOError( WriteFile( DosToWinHandle( hFileHandle ), pBuff, ulCount, &ulWritten, NULL ), 0 ); @@ -1833,7 +1833,7 @@ ULONG hb_fsWriteAt( HB_FHANDLE hFileHandle, const void * pBuff, ULONG ulCount, H llPos = lseek( hFileHandle, llOffset, SEEK_SET ); # endif if( llPos == ( HB_FOFFSET ) -1 ) - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); else { ulWritten = write( hFileHandle, pBuff, ulCount ); @@ -1859,9 +1859,9 @@ ULONG hb_fsWriteAt( HB_FHANDLE hFileHandle, const void * pBuff, ULONG ulCount, H return ulWritten; } -BOOL hb_fsTruncAt( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset ) +HB_BOOL hb_fsTruncAt( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset ) { - BOOL fResult; + HB_BOOL fResult; HB_TRACE(HB_TR_DEBUG, ("hb_fsReadAt(%p, %" PFHL "i)", ( void * ) ( HB_PTRDIFF ) hFileHandle, llOffset)); @@ -1884,7 +1884,7 @@ BOOL hb_fsTruncAt( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset ) if( ( ( ( HB_FOFFSET ) ulOffsetHigh << 32 ) | ulOffsetLow ) == llOffset ) fResult = SetEndOfFile( DosToWinHandle( hFileHandle ) ); else - fResult = FALSE; + fResult = HB_FALSE; } #elif defined( HB_USE_LARGEFILE64 ) fResult = ftruncate64( hFileHandle, llOffset ) != -1; @@ -1896,7 +1896,7 @@ BOOL hb_fsTruncAt( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset ) #else - fResult = FALSE; + fResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -1972,14 +1972,14 @@ void hb_fsCommit( HB_FHANDLE hFileHandle ) */ { int dup_handle; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; hb_vmUnlock(); dup_handle = dup( hFileHandle ); if( dup_handle != -1 ) { close( dup_handle ); - fResult = TRUE; + fResult = HB_TRUE; } hb_fsSetIOError( fResult, 0 ); hb_vmLock(); @@ -1992,10 +1992,10 @@ void hb_fsCommit( HB_FHANDLE hFileHandle ) #endif } -BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, +HB_BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, ULONG ulLength, USHORT uiMode ) { - BOOL bResult; + HB_BOOL bResult; HB_TRACE(HB_TR_DEBUG, ("hb_fsLock(%p, %lu, %lu, %hu)", ( void * ) ( HB_PTRDIFF ) hFileHandle, ulStart, ulLength, uiMode)); @@ -2041,7 +2041,7 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, } default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2075,7 +2075,7 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2098,7 +2098,7 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2122,7 +2122,7 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2162,7 +2162,7 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2181,14 +2181,14 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2196,10 +2196,10 @@ BOOL hb_fsLock( HB_FHANDLE hFileHandle, ULONG ulStart, return bResult; } -BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, - HB_FOFFSET ulLength, USHORT uiMode ) +HB_BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, + HB_FOFFSET ulLength, USHORT uiMode ) { - BOOL bResult; + HB_BOOL bResult; HB_TRACE(HB_TR_DEBUG, ("hb_fsLockLarge(%p, %" PFHL "u, %" PFHL "i, %hu)", ( void * ) ( HB_PTRDIFF ) hFileHandle, ulStart, ulLength, uiMode)); @@ -2261,7 +2261,7 @@ BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2298,7 +2298,7 @@ BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, break; default: - bResult = FALSE; + bResult = HB_FALSE; } hb_fsSetIOError( bResult, 0 ); hb_vmLock(); @@ -2469,9 +2469,9 @@ ULONG hb_fsTell( HB_FHANDLE hFileHandle ) return hb_fsSeek( hFileHandle, 0, FS_RELATIVE ); } -BOOL hb_fsDelete( const char * pFilename ) +HB_BOOL hb_fsDelete( const char * pFilename ) { - BOOL bResult; + HB_BOOL bResult; char * pszFree; HB_TRACE(HB_TR_DEBUG, ("hb_fsDelete(%s)", pFilename)); @@ -2500,7 +2500,7 @@ BOOL hb_fsDelete( const char * pFilename ) #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2511,9 +2511,9 @@ BOOL hb_fsDelete( const char * pFilename ) return bResult; } -BOOL hb_fsRename( const char * pOldName, const char * pNewName ) +HB_BOOL hb_fsRename( const char * pOldName, const char * pNewName ) { - BOOL bResult; + HB_BOOL bResult; char * pszFreeOld, * pszFreeNew; HB_TRACE(HB_TR_DEBUG, ("hb_fsRename(%s, %s)", pOldName, pNewName)); @@ -2545,7 +2545,7 @@ BOOL hb_fsRename( const char * pOldName, const char * pNewName ) #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2558,9 +2558,9 @@ BOOL hb_fsRename( const char * pOldName, const char * pNewName ) return bResult; } -BOOL hb_fsMkDir( const char * pDirname ) +HB_BOOL hb_fsMkDir( const char * pDirname ) { - BOOL bResult; + HB_BOOL bResult; char * pszFree; HB_TRACE(HB_TR_DEBUG, ("hb_fsMkDir(%s)", pDirname)); @@ -2597,7 +2597,7 @@ BOOL hb_fsMkDir( const char * pDirname ) #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2608,9 +2608,9 @@ BOOL hb_fsMkDir( const char * pDirname ) return bResult; } -BOOL hb_fsChDir( const char * pDirname ) +HB_BOOL hb_fsChDir( const char * pDirname ) { - BOOL bResult; + HB_BOOL bResult; char * pszFree; HB_TRACE(HB_TR_DEBUG, ("hb_fsChDir(%s)", pDirname)); @@ -2639,7 +2639,7 @@ BOOL hb_fsChDir( const char * pDirname ) #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2650,9 +2650,9 @@ BOOL hb_fsChDir( const char * pDirname ) return bResult; } -BOOL hb_fsRmDir( const char * pDirname ) +HB_BOOL hb_fsRmDir( const char * pDirname ) { - BOOL bResult; + HB_BOOL bResult; char * pszFree; HB_TRACE(HB_TR_DEBUG, ("hb_fsRmDir(%s)", pDirname)); @@ -2681,7 +2681,7 @@ BOOL hb_fsRmDir( const char * pDirname ) #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2716,7 +2716,7 @@ HB_ERRCODE hb_fsCurDirBuff( USHORT uiDrive, char * pszBuffer, HB_SIZE ulSize ) HB_ERRCODE usError; char * pszStart; HB_SIZE ulLen; - BOOL fResult; + HB_BOOL fResult; HB_TRACE(HB_TR_DEBUG, ("hb_fsCurDirBuff(%hu)", uiDrive)); @@ -2778,7 +2778,7 @@ HB_ERRCODE hb_fsCurDirBuff( USHORT uiDrive, char * pszBuffer, HB_SIZE ulSize ) #else - fResult = FALSE; + fResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); #endif @@ -2960,9 +2960,9 @@ HB_ERRCODE hb_fsIsDrv( BYTE nDrive ) return uiResult; } -BOOL hb_fsIsDevice( HB_FHANDLE hFileHandle ) +HB_BOOL hb_fsIsDevice( HB_FHANDLE hFileHandle ) { - BOOL bResult; + HB_BOOL bResult; HB_TRACE(HB_TR_DEBUG, ("hb_fsIsDevice(%p)", ( void * ) ( HB_PTRDIFF ) hFileHandle)); @@ -2986,7 +2986,7 @@ BOOL hb_fsIsDevice( HB_FHANDLE hFileHandle ) #else - bResult = FALSE; + bResult = HB_FALSE; hb_fsSetError( ( HB_ERRCODE ) FS_ERROR ); HB_SYMBOL_UNUSED( hFileHandle ); @@ -3003,7 +3003,7 @@ char * hb_fsExtName( const char * pFilename, const char * pDefExt, { HB_PATHNAMES * pNextPath; PHB_FNAME pFilepath; - BOOL fIsFile = FALSE; + HB_BOOL fIsFile = HB_FALSE; char * szPath; szPath = ( char * ) hb_xgrab( HB_PATH_MAX ); @@ -3190,9 +3190,9 @@ HB_FHANDLE hb_fsExtOpen( const char * pFilename, const char * pDefExt, return hFile; } -BOOL hb_fsEof( HB_FHANDLE hFileHandle ) +HB_BOOL hb_fsEof( HB_FHANDLE hFileHandle ) { - BOOL fResult; + HB_BOOL fResult; hb_vmUnlock(); @@ -3214,7 +3214,7 @@ BOOL hb_fsEof( HB_FHANDLE hFileHandle ) else { endPos = -1; - fResult = FALSE; + fResult = HB_FALSE; } hb_fsSetIOError( fResult, 0 ); fResult = !fResult || curPos == endPos; @@ -3234,7 +3234,7 @@ const char * hb_fsNameConv( const char * szFileName, char ** pszFree ) int iFileCase, iDirCase; const char * pszCP; char cDirSep; - BOOL fTrim; + HB_BOOL fTrim; /* Convert file and dir case. The allowed SET options are: @@ -3297,14 +3297,14 @@ const char * hb_fsNameConv( const char * szFileName, char ** pszFree ) if( pFileName->szName ) { ulLen = strlen( pFileName->szName ); - ulLen = hb_strRTrimLen( pFileName->szName, ulLen, FALSE ); + ulLen = hb_strRTrimLen( pFileName->szName, ulLen, HB_FALSE ); pFileName->szName = hb_strLTrim( pFileName->szName, &ulLen ); ( ( char * ) pFileName->szName )[ ulLen ] = '\0'; } if( pFileName->szExtension ) { ulLen = strlen( pFileName->szExtension ); - ulLen = hb_strRTrimLen( pFileName->szExtension, ulLen, FALSE ); + ulLen = hb_strRTrimLen( pFileName->szExtension, ulLen, HB_FALSE ); pFileName->szExtension = hb_strLTrim( pFileName->szExtension, &ulLen ); ( ( char * ) pFileName->szExtension )[ ulLen ] = '\0'; } @@ -3381,9 +3381,9 @@ void hb_fsBaseDirBuff( char * pszBuffer ) } } -static BOOL hb_fsDisableWaitLocks( int iSet ) +static HB_BOOL hb_fsDisableWaitLocks( int iSet ) { - BOOL fRetVal = s_fUseWaitLocks; + HB_BOOL fRetVal = s_fUseWaitLocks; if( iSet >= 0 ) s_fUseWaitLocks = ( iSet == 0 ); diff --git a/harbour/src/rtl/fscopy.c b/harbour/src/rtl/fscopy.c index 49133df5d9..b6e091fb72 100644 --- a/harbour/src/rtl/fscopy.c +++ b/harbour/src/rtl/fscopy.c @@ -60,9 +60,9 @@ #define HB_FSCOPY_BUFFERSIZE 16384 -BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) +HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) { - BOOL bRetVal = TRUE; + HB_BOOL bRetVal = HB_TRUE; HB_FHANDLE fhndSource; HB_FHANDLE fhndDest; @@ -81,7 +81,7 @@ BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) { if( nBytesRead != hb_fsWrite( fhndDest, pbyBuffer, nBytesRead ) ) { - bRetVal = FALSE; + bRetVal = HB_FALSE; break; } } @@ -96,12 +96,12 @@ BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) hb_fsClose( fhndDest ); } else - bRetVal = FALSE; + bRetVal = HB_FALSE; hb_fsClose( fhndSource ); } else - bRetVal = FALSE; + bRetVal = HB_FALSE; return bRetVal; } diff --git a/harbour/src/rtl/fserr.c b/harbour/src/rtl/fserr.c index dbb8a9b7f9..3f48e0a588 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( BOOL fResult, USHORT uiOperation ) +void hb_fsSetIOError( HB_BOOL fResult, USHORT uiOperation ) { HB_ERRCODE uiOsErrorLast, uiErrorLast; PHB_IOERRORS pIOErrors; diff --git a/harbour/src/rtl/fssize.c b/harbour/src/rtl/fssize.c index c45708e447..bb2aa9fc18 100644 --- a/harbour/src/rtl/fssize.c +++ b/harbour/src/rtl/fssize.c @@ -78,7 +78,7 @@ #endif -HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry ) +HB_FOFFSET hb_fsFSize( const char * pszFileName, HB_BOOL bUseDirEntry ) { if( bUseDirEntry ) { @@ -98,7 +98,7 @@ HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry ) } #elif defined( HB_USE_LARGEFILE64 ) char * pszFree; - BOOL fResult; + HB_BOOL fResult; struct stat64 statbuf; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); statbuf.st_size = 0; @@ -112,7 +112,7 @@ HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry ) return ( HB_FOFFSET ) statbuf.st_size; #else char * pszFree; - BOOL fResult; + HB_BOOL fResult; struct stat statbuf; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); statbuf.st_size = 0; diff --git a/harbour/src/rtl/fstemp.c b/harbour/src/rtl/fstemp.c index f0356e223e..1fb66a7159 100644 --- a/harbour/src/rtl/fstemp.c +++ b/harbour/src/rtl/fstemp.c @@ -96,9 +96,9 @@ #endif #if !defined( HB_OS_WIN ) -static BOOL fsGetTempDirByCase( char * pszName, const char * pszTempDir ) +static HB_BOOL fsGetTempDirByCase( char * pszName, const char * pszTempDir ) { - BOOL fOK = FALSE; + HB_BOOL fOK = HB_FALSE; if( pszTempDir && *pszTempDir != '\0' ) { @@ -114,7 +114,7 @@ static BOOL fsGetTempDirByCase( char * pszName, const char * pszTempDir ) fOK = strcmp( pszName, pszTempDir ) == 0; break; default: - fOK = TRUE; + fOK = HB_TRUE; break; } } @@ -257,9 +257,9 @@ static HB_FHANDLE hb_fsCreateTempLow( const char * pszDir, const char * pszPrefi /* NOTE: The buffer must be at least HB_PATH_MAX chars long */ #if !defined( HB_OS_UNIX ) -static BOOL hb_fsTempName( char * pszBuffer, const char * pszDir, const char * pszPrefix ) +static HB_BOOL hb_fsTempName( char * pszBuffer, const char * pszDir, const char * pszPrefix ) { - BOOL fResult; + HB_BOOL fResult; hb_vmUnlock(); @@ -275,8 +275,8 @@ static BOOL hb_fsTempName( char * pszBuffer, const char * pszDir, const char * p { if( ! GetTempPath( HB_PATH_MAX, lpTempDir ) ) { - hb_fsSetIOError( FALSE, 0 ); - return FALSE; + hb_fsSetIOError( HB_FALSE, 0 ); + return HB_FALSE; } } lpTempDir[ HB_PATH_MAX - 1 ] = L'\0'; diff --git a/harbour/src/rtl/gete.c b/harbour/src/rtl/gete.c index 608315a7dc..fe05e93aef 100644 --- a/harbour/src/rtl/gete.c +++ b/harbour/src/rtl/gete.c @@ -189,7 +189,7 @@ HB_FUNC( HB_GETENV ) HB_FUNC( HB_SETENV ) { const char * pszName = hb_parc( 1 ); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pszName ) { diff --git a/harbour/src/rtl/gt_tpl/gt_tpl.c b/harbour/src/rtl/gt_tpl/gt_tpl.c index 8d9d44e4ba..de50f5ff79 100644 --- a/harbour/src/rtl/gt_tpl/gt_tpl.c +++ b/harbour/src/rtl/gt_tpl/gt_tpl.c @@ -105,7 +105,7 @@ static const char * hb_gt_tpl_Version( PHB_GT pGT, int iType ) return "Harbour Terminal: (template)"; } -static BOOL hb_gt_tpl_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_tpl_SetMode( PHB_GT pGT, int iRows, int iCols ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_tpl_SetMode(%p,%d,%d)", pGT, iRows, iCols)); @@ -113,9 +113,9 @@ static BOOL hb_gt_tpl_SetMode( PHB_GT pGT, int iRows, int iCols ) HB_SYMBOL_UNUSED( iRows ); HB_SYMBOL_UNUSED( iCols ); - /* TODO: if possible change the size of the screen and return TRUE */ + /* TODO: if possible change the size of the screen and return HB_TRUE */ - return FALSE; + return HB_FALSE; } static void hb_gt_tpl_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) @@ -149,7 +149,7 @@ static void hb_gt_tpl_Refresh( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -161,7 +161,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->Redraw = hb_gt_tpl_Redraw; pFuncTable->Refresh = hb_gt_tpl_Refresh; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtapi.c b/harbour/src/rtl/gtapi.c index e56100acc3..d98ecb558c 100644 --- a/harbour/src/rtl/gtapi.c +++ b/harbour/src/rtl/gtapi.c @@ -535,7 +535,7 @@ HB_ERRCODE hb_gtScrDim( int * piHeight, int * piWidth ) return HB_FAILURE; } -HB_ERRCODE hb_gtSetSnowFlag( BOOL fNoSnow ) +HB_ERRCODE hb_gtSetSnowFlag( HB_BOOL fNoSnow ) { PHB_GT pGT; @@ -568,9 +568,9 @@ HB_ERRCODE hb_gtRectSize( int iTop, int iLeft, int iBottom, int iRight, HB_SIZE return HB_FAILURE; } -BOOL hb_gtIsColor( void ) +HB_BOOL hb_gtIsColor( void ) { - BOOL fColor = TRUE; + HB_BOOL fColor = HB_TRUE; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_gtIsColor()")); @@ -704,7 +704,7 @@ HB_ERRCODE hb_gtEndWrite( void ) return HB_FAILURE; } -HB_ERRCODE hb_gtGetBlink( BOOL * bpBlink ) +HB_ERRCODE hb_gtGetBlink( HB_BOOL * bpBlink ) { PHB_GT pGT; @@ -721,7 +721,7 @@ HB_ERRCODE hb_gtGetBlink( BOOL * bpBlink ) return HB_FAILURE; } -HB_ERRCODE hb_gtSetBlink( BOOL fBlink ) +HB_ERRCODE hb_gtSetBlink( HB_BOOL fBlink ) { PHB_GT pGT; @@ -999,7 +999,7 @@ HB_ERRCODE hb_gtOutErr( const char * szStr, HB_SIZE ulLen ) return HB_SUCCESS; } -HB_ERRCODE hb_gtSetDispCP( const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +HB_ERRCODE hb_gtSetDispCP( const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { HB_ERRCODE errCode = HB_FAILURE; PHB_GT pGT; diff --git a/harbour/src/rtl/gtapiu.c b/harbour/src/rtl/gtapiu.c index feb259f2f0..866ad41f00 100644 --- a/harbour/src/rtl/gtapiu.c +++ b/harbour/src/rtl/gtapiu.c @@ -67,11 +67,11 @@ void hb_gtWDestroy( HB_GT_WND * wnd ) HB_SYMBOL_UNUSED( wnd ); } -BOOL hb_gtWFlash( void ) +HB_BOOL hb_gtWFlash( void ) { /* TODO: */ - return FALSE; + return HB_FALSE; } void hb_gtWApp( HB_GT_WND ** wnd ) @@ -96,14 +96,14 @@ void hb_gtWPos( HB_GT_WND * wnd, HB_GT_RECT * rect ) HB_SYMBOL_UNUSED( rect ); } -BOOL hb_gtWVis( HB_GT_WND * wnd, int iStatus ) /* USHORT in CA-Cl*pper [vszakats] */ +HB_BOOL hb_gtWVis( HB_GT_WND * wnd, int iStatus ) /* USHORT in CA-Cl*pper [vszakats] */ { /* TODO: */ HB_SYMBOL_UNUSED( wnd ); HB_SYMBOL_UNUSED( iStatus ); - return FALSE; + return HB_FALSE; } HB_ERRCODE hb_gtSLR( HB_GT_SLR * pSLR ) /* System Level Request */ diff --git a/harbour/src/rtl/gtcgi/gtcgi.c b/harbour/src/rtl/gtcgi/gtcgi.c index 0a575ce32b..6b48b49a8d 100644 --- a/harbour/src/rtl/gtcgi/gtcgi.c +++ b/harbour/src/rtl/gtcgi/gtcgi.c @@ -93,7 +93,7 @@ typedef struct _HB_GTCGI char * sLineBuf; char * szCrLf; ULONG ulCrLf; - BOOL fDispTrans; + HB_BOOL fDispTrans; PHB_CODEPAGE cdpTerm; PHB_CODEPAGE cdpHost; } HB_GTCGI, * PHB_GTCGI; @@ -126,7 +126,7 @@ static void hb_gt_cgi_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil hb_fsSetDevMode( pGTCGI->hStdout, FD_BINARY ); HB_GTSUPER_INIT( pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr ); - HB_GTSELF_SETFLAG( pGT, HB_GTI_STDOUTCON, TRUE ); + HB_GTSELF_SETFLAG( pGT, HB_GTI_STDOUTCON, HB_TRUE ); } static void hb_gt_cgi_Exit( PHB_GT pGT ) @@ -165,13 +165,13 @@ static int hb_gt_cgi_ReadKey( PHB_GT pGT, int iEventMask ) return 13; } -static BOOL hb_gt_cgi_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_cgi_IsColor( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_cgi_IsColor(%p)", pGT)); HB_SYMBOL_UNUSED( pGT ); - return FALSE; + return HB_FALSE; } static void hb_gt_cgi_Bell( PHB_GT pGT ) @@ -225,7 +225,7 @@ static void hb_gt_cgi_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int HB_GTSUPER_SCROLL( pGT, iTop, iLeft, iBottom, iRight, iColor, usChar, iRows, iCols ); } -static BOOL hb_gt_cgi_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_cgi_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_cgi_SetDispCP(%p,%s,%s,%d)", pGT, pszTermCDP, pszHostCDP, (int) fBox ) ); @@ -246,7 +246,7 @@ static BOOL hb_gt_cgi_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char pGTCGI->cdpTerm != pGTCGI->cdpHost; } - return TRUE; + return HB_TRUE; } #ifdef HB_GT_CGI_RAWOUTPUT @@ -427,7 +427,7 @@ static void hb_gt_cgi_Refresh( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -449,7 +449,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->ReadKey = hb_gt_cgi_ReadKey; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtchrmap.c b/harbour/src/rtl/gtchrmap.c index f7b457d1a4..7dd660d91c 100644 --- a/harbour/src/rtl/gtchrmap.c +++ b/harbour/src/rtl/gtchrmap.c @@ -401,7 +401,7 @@ static int hb_gt_chrmapread( const char *pszFile, const char *pszTerm, int *nTra return isTerm; } -int hb_gt_chrmapinit( int *piTransTbl, const char *pszTerm, BOOL fSetACSC ) +int hb_gt_chrmapinit( int *piTransTbl, const char *pszTerm, HB_BOOL fSetACSC ) { char *pszFree = NULL, *pszFile, szFile[ HB_PATH_MAX ]; int nRet = -1; diff --git a/harbour/src/rtl/gtclip.c b/harbour/src/rtl/gtclip.c index 5753957891..02e142d666 100644 --- a/harbour/src/rtl/gtclip.c +++ b/harbour/src/rtl/gtclip.c @@ -71,7 +71,7 @@ static HB_CRITICAL_NEW( s_clipMtx ); static char * s_szClipboardData; static HB_SIZE s_ulClipboardLen; -BOOL hb_gt_setClipboard( const char * szClipData, HB_SIZE ulLen ) +HB_BOOL hb_gt_setClipboard( const char * szClipData, HB_SIZE ulLen ) { hb_threadEnterCriticalSection( &s_clipMtx ); @@ -87,10 +87,10 @@ BOOL hb_gt_setClipboard( const char * szClipData, HB_SIZE ulLen ) hb_threadLeaveCriticalSection( &s_clipMtx ); - return TRUE; + return HB_TRUE; } -BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE *pulLen ) +HB_BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE *pulLen ) { hb_threadEnterCriticalSection( &s_clipMtx ); @@ -110,9 +110,9 @@ BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE *pulLen ) #if defined( HB_OS_WIN ) -BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE ulLen ) +HB_BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE ulLen ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( OpenClipboard( NULL ) ) { @@ -138,7 +138,7 @@ BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE u memcpy( lptstrCopy, szClipData, ulLen ); lptstrCopy[ ulLen ] = '\0'; } - fResult = TRUE; + fResult = HB_TRUE; } ( void ) GlobalUnlock( hglbCopy ); /* Place the handle on the clipboard. */ @@ -149,7 +149,7 @@ BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE u return fResult; } -BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, HB_SIZE * pulLen ) +HB_BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, HB_SIZE * pulLen ) { *pulLen = 0; *pszClipData = NULL; diff --git a/harbour/src/rtl/gtcrs/gtcrs.c b/harbour/src/rtl/gtcrs/gtcrs.c index a1b5db0bf4..600fd6ea9c 100644 --- a/harbour/src/rtl/gtcrs/gtcrs.c +++ b/harbour/src/rtl/gtcrs/gtcrs.c @@ -60,14 +60,14 @@ static HB_GT_FUNCS SuperTable; #define HB_GTSUPER (&SuperTable) #define HB_GTID_PTR (&s_GtId) -static volatile BOOL s_SignalTable[MAX_SIGNO]; +static volatile HB_BOOL s_SignalTable[ MAX_SIGNO ]; #if defined( SA_NOCLDSTOP ) && defined( SA_RESTART ) && defined( SIGCHLD ) -static volatile BOOL s_SignalFlag = FALSE; +static volatile HB_BOOL s_SignalFlag = HB_FALSE; /* this variable should be global and checked in main VM loop */ -static volatile BOOL s_BreakFlag = FALSE; -static volatile BOOL s_InetrruptFlag = FALSE; +static volatile HB_BOOL s_BreakFlag = HB_FALSE; +static volatile HB_BOOL s_InetrruptFlag = HB_FALSE; #endif -static volatile BOOL s_WinSizeChangeFlag = FALSE; +static volatile HB_BOOL s_WinSizeChangeFlag = HB_FALSE; static int s_iStdIn, s_iStdOut, s_iStdErr; @@ -386,8 +386,8 @@ static void sig_handler( int signo ) if ( signo < MAX_SIGNO ) { - s_SignalTable[signo] = TRUE; - s_SignalFlag = TRUE; + s_SignalTable[signo] = HB_TRUE; + s_SignalFlag = HB_TRUE; } switch ( signo ) @@ -400,13 +400,13 @@ static void sig_handler( int signo ) break; } case SIGWINCH: - s_WinSizeChangeFlag = TRUE; + s_WinSizeChangeFlag = HB_TRUE; break; case SIGINT: - s_InetrruptFlag = TRUE; + s_InetrruptFlag = HB_TRUE; break; case SIGQUIT: - s_BreakFlag = TRUE; + s_BreakFlag = HB_TRUE; break; case SIGTSTP: break; @@ -422,10 +422,10 @@ static void set_signals( void ) { int i, sigs[] = { SIGINT, SIGQUIT, SIGTSTP, SIGWINCH, SIGCHLD, 0 }; - s_SignalFlag = FALSE; + s_SignalFlag = HB_FALSE; for ( i = 1; i < MAX_SIGNO; ++i ) { - s_SignalTable[i] = FALSE; + s_SignalTable[i] = HB_FALSE; } /* Ignore SIGPIPEs so they don't kill us. */ @@ -493,10 +493,10 @@ static void set_signals( void ) { int i; - s_SignalFlag = FALSE; + s_SignalFlag = HB_FALSE; for ( i = 1; i < MAX_SIGNO; ++i ) { - s_SignalTable[i] = FALSE; + s_SignalTable[i] = HB_FALSE; set_sig_handler( i ); } } @@ -771,7 +771,7 @@ static int wait_key( InOutBase * ioBase, int milisec ) if ( s_WinSizeChangeFlag ) { - s_WinSizeChangeFlag = FALSE; + s_WinSizeChangeFlag = HB_FALSE; return K_RESIZE; } @@ -898,9 +898,9 @@ static int wait_key( InOutBase * ioBase, int milisec ) return nKey; } -static BOOL write_ttyseq( InOutBase * ioBase, const char *seq ) +static HB_BOOL write_ttyseq( InOutBase * ioBase, const char *seq ) { - BOOL success; + HB_BOOL success; if ( ioBase->baseout != NULL ) { @@ -1375,9 +1375,9 @@ static void gt_refresh( InOutBase * ioBase ) { /* if (ioBase->cursor == SC_NONE) - leaveok( ioBase->stdscr, TRUE ); + leaveok( ioBase->stdscr, HB_TRUE ); else - leaveok( ioBase->stdscr, FALSE ); + leaveok( ioBase->stdscr, HB_FALSE ); */ /* if (ioBase->cursor != SC_NONE) */ wmove( ioBase->stdscr, ioBase->row, ioBase->col ); @@ -1399,12 +1399,12 @@ static void gt_ttyrestore( InOutBase * ioBase ) tcsetattr( ioBase->base_infd, TCSANOW, &ioBase->saved_TIO ); } -static BOOL gt_outstr( InOutBase * ioBase, int fd, const char *str, +static HB_BOOL gt_outstr( InOutBase * ioBase, int fd, const char *str, int len ) { unsigned char *buf, c; int i; - BOOL success; + HB_BOOL success; if ( ioBase->out_transtbl != NULL ) { @@ -1822,7 +1822,7 @@ static int gt_setsize( InOutBase * ioBase, int rows, int cols ) if ( s_WinSizeChangeFlag ) { - s_WinSizeChangeFlag = FALSE; + s_WinSizeChangeFlag = HB_FALSE; ret = gt_resize( ioBase ); } #if defined( TIOCGWINSZ ) @@ -1854,7 +1854,7 @@ static void setKeyTrans( InOutBase * ioBase, PHB_CODEPAGE cdpTerm, PHB_CODEPAGE ioBase->in_transtbl = ( unsigned char * ) hb_xgrab( 256 ); for ( i = 0; i < 256; ++i ) - ioBase->in_transtbl[i] = hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + ioBase->in_transtbl[i] = hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); } else if ( ioBase->in_transtbl != NULL ) { @@ -1919,7 +1919,7 @@ static void setDispTrans( InOutBase * ioBase, PHB_CODEPAGE cdpHost, PHB_CODEPAGE if( hb_cdpIsAlpha( cdpHost, i ) ) { unsigned char uc = ( unsigned char ) - hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); ioBase->std_chmap[i] = uc | A_NORMAL; if( box ) @@ -2137,11 +2137,11 @@ static InOutBase *create_ioBase( char *term, int infd, int outfd, int errfd, } getmaxyx( ioBase->stdscr, ioBase->maxrow, ioBase->maxcol ); - scrollok( ioBase->stdscr, FALSE ); + scrollok( ioBase->stdscr, HB_FALSE ); /* - idlok( ioBase->stdscr, FALSE ); - idcok( ioBase->stdscr, FALSE ); - leaveok( ioBase->stdscr, FALSE ); + idlok( ioBase->stdscr, HB_FALSE ); + idcok( ioBase->stdscr, HB_FALSE ); + leaveok( ioBase->stdscr, HB_FALSE ); */ /* * curses keyboard initialization @@ -2151,13 +2151,13 @@ static InOutBase *create_ioBase( char *term, int infd, int outfd, int errfd, */ raw(); - leaveok( ioBase->stdscr, FALSE ); + leaveok( ioBase->stdscr, HB_FALSE ); curs_set( 0 ); /* nonl(); - nodelay( ioBase->stdscr, TRUE); - keypad( ioBase->stdscr, FALSE); + nodelay( ioBase->stdscr, HB_TRUE); + keypad( ioBase->stdscr, HB_FALSE); timeout( 0 ); noecho(); curs_set( 0 ); @@ -2379,7 +2379,7 @@ static void del_all_ioBase( void ) /* *********************************************************************** */ -BOOL HB_GT_FUNC( gt_AddEventHandle( int iFile, int iMode, +HB_BOOL HB_GT_FUNC( gt_AddEventHandle( int iFile, int iMode, int ( *eventFunc ) ( int, int, void * ), void *data ) ) { @@ -2450,14 +2450,14 @@ void HB_GT_FUNC( gt_SetDebugKey( int iDebug ) ) set_sig_keys( s_ioBase, -1, iDebug, -1 ); } -BOOL HB_GT_FUNC( gt_GetSignalFlag( int iSig ) ) +HB_BOOL HB_GT_FUNC( gt_GetSignalFlag( int iSig ) ) { - BOOL bRetVal = FALSE; + HB_BOOL bRetVal = HB_FALSE; if ( iSig > 0 && iSig < MAX_SIGNO && s_SignalTable[iSig] ) { - bRetVal = TRUE; - s_SignalTable[iSig] = FALSE; + bRetVal = HB_TRUE; + s_SignalTable[iSig] = HB_FALSE; } return bRetVal; @@ -2498,8 +2498,8 @@ static void hb_gt_crs_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil add_new_ioBase( ioBase ); HB_GTSUPER_INIT( pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr ); HB_GTSELF_RESIZE( pGT, s_ioBase->maxrow, s_ioBase->maxcol ); - HB_GTSELF_SETFLAG( pGT, HB_GTI_COMPATBUFFER, FALSE ); - HB_GTSELF_SETBLINK( pGT, TRUE ); + HB_GTSELF_SETFLAG( pGT, HB_GTI_COMPATBUFFER, HB_FALSE ); + HB_GTSELF_SETBLINK( pGT, HB_TRUE ); } } @@ -2520,7 +2520,7 @@ static void hb_gt_crs_Exit( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_crs_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_crs_IsColor( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_IsColor(%p)", pGT ) ); @@ -2531,21 +2531,21 @@ static BOOL hb_gt_crs_IsColor( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_crs_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_crs_SetMode( PHB_GT pGT, int iRows, int iCols ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_SetMode(%p,%d,%d)", pGT, iRows, iCols ) ); if( gt_setsize( s_ioBase, iRows, iCols ) == 0 ) { HB_GTSELF_RESIZE( pGT, iRows, iCols ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ -static void hb_gt_crs_SetBlink( PHB_GT pGT, BOOL fBlink ) +static void hb_gt_crs_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_SetBlink(%p, %d)", pGT, ( int ) fBlink ) ); @@ -2623,7 +2623,7 @@ static void hb_gt_crs_OutErr( PHB_GT pGT, const char * szStr, HB_SIZE ulLen ) /* *********************************************************************** */ -static BOOL hb_gt_crs_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_crs_Suspend( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_Suspend(%p)", pGT ) ); @@ -2635,12 +2635,12 @@ static BOOL hb_gt_crs_Suspend( PHB_GT pGT ) endwin(); gt_ttyrestore( s_ioBase ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_crs_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_crs_Resume( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_Resume(%p)", pGT ) ); @@ -2654,12 +2654,12 @@ static BOOL hb_gt_crs_Resume( PHB_GT pGT ) /* redrawwin( s_ioBase->stdscr ); */ gt_refresh( s_ioBase ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_crs_PreExt( PHB_GT pGT ) +static HB_BOOL hb_gt_crs_PreExt( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_PreExt(%p)", pGT ) ); @@ -2669,23 +2669,23 @@ static BOOL hb_gt_crs_PreExt( PHB_GT pGT ) { gt_refresh( s_ioBase ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_crs_PostExt( PHB_GT pGT ) +static HB_BOOL hb_gt_crs_PostExt( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_PostExt(%p)", pGT ) ); HB_SYMBOL_UNUSED( pGT ); - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_crs_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_crs_mouse_IsPresent( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_mouse_IsPresent(%p)", pGT ) ); @@ -2753,9 +2753,9 @@ static void hb_gt_crs_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ) /* *********************************************************************** */ -static BOOL hb_gt_crs_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_crs_mouse_ButtonState( PHB_GT pGT, int iButton ) { - BOOL ret = FALSE; + HB_BOOL ret = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_mouse_ButtonState(%p,%i)", pGT, iButton ) ); @@ -2823,7 +2823,7 @@ static int hb_gt_crs_ReadKey( PHB_GT pGT, int iEventMask ) /* *********************************************************************** */ -static BOOL hb_gt_crs_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_crs_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_SetDispCP(%p,%s,%s,%d)", pGT, pszTermCDP, pszHostCDP, (int) fBox ) ); @@ -2836,12 +2836,12 @@ static BOOL hb_gt_crs_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char setDispTrans( s_ioBase, hb_cdpFind( pszHostCDP ), hb_cdpFind( pszTermCDP ), fBox ? 1 : 0 ); - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_crs_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) +static HB_BOOL hb_gt_crs_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_SetKeyCP(%p,%s,%s)", pGT, pszTermCDP, pszHostCDP ) ); @@ -2854,12 +2854,12 @@ static BOOL hb_gt_crs_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char * setKeyTrans( s_ioBase, hb_cdpFind( pszTermCDP ), hb_cdpFind( pszHostCDP ) ); - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_crs_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_crs_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_crs_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -2869,7 +2869,7 @@ static BOOL hb_gt_crs_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ESCDELAY: @@ -2883,7 +2883,7 @@ static BOOL hb_gt_crs_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } } - return TRUE; + return HB_TRUE; } @@ -2934,7 +2934,7 @@ static void hb_gt_crs_Refresh( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -2968,7 +2968,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseCountButton = hb_gt_crs_mouse_CountButton; pFuncTable->MouseSetDoubleClickSpeed = hb_gt_crs_mouse_SetDoubleClickSpeed; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ @@ -2981,7 +2981,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) #include static void curs_wrkaround( void ) { - back_color_erase = FALSE; + back_color_erase = HB_FALSE; /* cur_term->type.Booleans[28] = 0; */ } #else diff --git a/harbour/src/rtl/gtdos/gtdos.c b/harbour/src/rtl/gtdos/gtdos.c index bfd4d46e52..103399661c 100644 --- a/harbour/src/rtl/gtdos/gtdos.c +++ b/harbour/src/rtl/gtdos/gtdos.c @@ -160,7 +160,7 @@ static int s_iCurCol; static int s_iCursorStyle; static int s_iScreenMode; -static BOOL s_bBreak; /* Used to signal Ctrl+Break to hb_inkeyPoll() */ +static HB_BOOL s_bBreak; /* Used to signal Ctrl+Break to hb_inkeyPoll() */ static BYTE s_charTransRev[ 256 ]; static BYTE s_charTrans[ 256 ]; @@ -186,14 +186,14 @@ static void hb_gt_dos_CtrlBreak_Handler( int iSignal ) /* NOTE: the layout of this function is forced by the compiler */ HB_SYMBOL_UNUSED( iSignal ); - s_bBreak = TRUE; + s_bBreak = HB_TRUE; } #else static int s_iOldCtrlBreak = 0; static int hb_gt_dos_CtrlBrkHandler( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_dos_CtrlBrkHandler()")); - s_bBreak = TRUE; + s_bBreak = HB_TRUE; return 1; } #endif @@ -429,16 +429,16 @@ static void hb_gt_dos_SetCursorStyle( int iStyle ) /* *********************************************************************** */ -static BOOL s_fMousePresent = FALSE; /* Is there a mouse ? */ -static BOOL s_fMouseVisible = FALSE; /* Is mouse cursor visible ? */ -static int s_iMouseButtons = 0; /* Mouse buttons */ -static int s_iMouseInitCol = 0; /* Init mouse pos */ -static int s_iMouseInitRow = 0; /* Init mouse pos */ -static BOOL s_fMouseBound; -static int s_iMouseTop; -static int s_iMouseLeft; -static int s_iMouseBottom; -static int s_iMouseRight; +static HB_BOOL s_fMousePresent = HB_FALSE; /* Is there a mouse ? */ +static HB_BOOL s_fMouseVisible = HB_FALSE; /* Is mouse cursor visible ? */ +static int s_iMouseButtons = 0; /* Mouse buttons */ +static int s_iMouseInitCol = 0; /* Init mouse pos */ +static int s_iMouseInitRow = 0; /* Init mouse pos */ +static HB_BOOL s_fMouseBound; +static int s_iMouseTop; +static int s_iMouseLeft; +static int s_iMouseBottom; +static int s_iMouseRight; #ifdef HB_MOUSE_SAVE static int s_iMouseStorageSize = 0; /* size of mouse storage buffer */ @@ -473,11 +473,11 @@ static void hb_gt_dos_mouse_Exit( PHB_GT pGT ) HB_GTSELF_GETSIZE( pGT, &iHeight, &iWidth ); HB_GTSELF_MOUSESETPOS( pGT, s_iMouseInitRow, s_iMouseInitCol ); HB_GTSELF_MOUSESETBOUNDS( pGT, 0, 0, iHeight - 1, iWidth - 1 ); - s_fMousePresent = FALSE; + s_fMousePresent = HB_FALSE; } } -static BOOL hb_gt_dos_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_dos_mouse_IsPresent( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -495,7 +495,7 @@ static void hb_gt_dos_mouse_Show( PHB_GT pGT ) regs.HB_XREGS.ax = 1; HB_DOS_INT86( 0x33, ®s, ®s ); - s_fMouseVisible = TRUE; + s_fMouseVisible = HB_TRUE; } } @@ -510,7 +510,7 @@ static void hb_gt_dos_mouse_Hide( PHB_GT pGT ) regs.HB_XREGS.ax = 2; HB_DOS_INT86( 0x33, ®s, ®s ); - s_fMouseVisible = FALSE; + s_fMouseVisible = HB_FALSE; } } @@ -557,7 +557,7 @@ static int hb_gt_dos_mouse_CountButton( PHB_GT pGT ) return 0; } -static BOOL hb_gt_dos_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_dos_mouse_ButtonState( PHB_GT pGT, int iButton ) { HB_SYMBOL_UNUSED( pGT ); @@ -569,13 +569,13 @@ static BOOL hb_gt_dos_mouse_ButtonState( PHB_GT pGT, int iButton ) HB_DOS_INT86( 0x33, ®s, ®s ); if( regs.HB_XREGS.bx & ( 1 << iButton ) ) - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_dos_mouse_ButtonPressed( PHB_GT pGT, int iButton, int * piRow, int * piCol ) +static HB_BOOL hb_gt_dos_mouse_ButtonPressed( PHB_GT pGT, int iButton, int * piRow, int * piCol ) { HB_SYMBOL_UNUSED( pGT ); @@ -591,15 +591,15 @@ static BOOL hb_gt_dos_mouse_ButtonPressed( PHB_GT pGT, int iButton, int * piRow, { *piRow = regs.HB_XREGS.dx >> 3; *piCol = regs.HB_XREGS.cx >> 3; - return TRUE; + return HB_TRUE; } } *piRow = *piCol = 0; - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_dos_mouse_ButtonReleased( PHB_GT pGT, int iButton, int * piRow, int * piCol ) +static HB_BOOL hb_gt_dos_mouse_ButtonReleased( PHB_GT pGT, int iButton, int * piRow, int * piCol ) { HB_SYMBOL_UNUSED( pGT ); @@ -615,12 +615,12 @@ static BOOL hb_gt_dos_mouse_ButtonReleased( PHB_GT pGT, int iButton, int * piRow { *piRow = regs.HB_XREGS.dx >> 3; *piCol = regs.HB_XREGS.cx >> 3; - return TRUE; + return HB_TRUE; } } *piRow = *piCol = 0; - return FALSE; + return HB_FALSE; } #ifdef HB_MOUSE_SAVE @@ -747,7 +747,7 @@ static void hb_gt_dos_mouse_SetBounds( PHB_GT pGT, int iTop, int iLeft, int iBot s_iMouseLeft = iLeft; s_iMouseBottom = iBottom; s_iMouseRight = iRight; - s_fMouseBound = TRUE; + s_fMouseBound = HB_TRUE; } } @@ -775,7 +775,7 @@ static void hb_gt_dos_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil { HB_TRACE(HB_TR_DEBUG, ("hb_gt_dos_Init(%p,%p,%p,%p)", pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr)); - s_bBreak = FALSE; + s_bBreak = HB_FALSE; /* Set the Ctrl+Break handler [vszakats] */ @@ -810,7 +810,7 @@ static void hb_gt_dos_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil #endif /* initialize code page translation */ - HB_GTSELF_SETDISPCP( pGT, NULL, NULL, FALSE ); + HB_GTSELF_SETDISPCP( pGT, NULL, NULL, HB_FALSE ); HB_GTSELF_SETKEYCP( pGT, NULL, NULL ); s_iScreenMode = hb_gt_dos_GetScreenMode(); @@ -853,7 +853,7 @@ static int hb_gt_dos_ReadKey( PHB_GT pGT, int iEventMask ) with the exception of the DJGPP compiler */ if( s_bBreak ) { - s_bBreak = FALSE; /* Indicate that Ctrl+Break has been handled */ + s_bBreak = HB_FALSE; /* Indicate that Ctrl+Break has been handled */ ch = HB_BREAK_FLAG; /* Note that Ctrl+Break was pressed */ } #endif @@ -899,7 +899,7 @@ static int hb_gt_dos_ReadKey( PHB_GT pGT, int iEventMask ) return ch; } -static BOOL hb_gt_dos_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_dos_IsColor( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_dos_IsColor(%p)", pGT)); @@ -908,7 +908,7 @@ static BOOL hb_gt_dos_IsColor( PHB_GT pGT ) return s_iScreenMode != 7; } -static BOOL hb_gt_dos_GetBlink( PHB_GT pGT ) +static HB_BOOL hb_gt_dos_GetBlink( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_dos_GetBlink(%p)", pGT)); @@ -923,7 +923,7 @@ static BOOL hb_gt_dos_GetBlink( PHB_GT pGT ) #endif } -static void hb_gt_dos_SetBlink( PHB_GT pGT, BOOL fBlink ) +static void hb_gt_dos_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) { union REGS regs; @@ -1133,15 +1133,15 @@ static USHORT hb_gt_dos_GetDisplay( void ) return ( regs.h.al == 0x1A ) ? regs.h.bl : 0xFF; } -static BOOL hb_gt_dos_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_dos_SetMode( PHB_GT pGT, int iRows, int iCols ) { /* HB_GTSELF_ISCOLOR( pGT ) test for color card, we need to know if it is a VGA board...*/ - BOOL bIsVGA, bIsVesa, bSuccess; + HB_BOOL bIsVGA, bIsVesa, bSuccess; HB_TRACE( HB_TR_DEBUG, ("hb_gt_dos_SetMode(%p,%d,%d)", pGT, iRows, iCols) ); bIsVGA = ( hb_gt_dos_GetDisplay() == 8 ); - bIsVesa = FALSE; + bIsVesa = HB_FALSE; /* Available modes in B&N and color screens */ if( iCols == 40 ) @@ -1185,11 +1185,11 @@ static BOOL hb_gt_dos_SetMode( PHB_GT pGT, int iRows, int iCols ) /* Check for succesful */ if( s_iRows == iRows && s_iCols == iCols ) { - bSuccess = TRUE; + bSuccess = HB_TRUE; } else { - bSuccess = FALSE; + bSuccess = HB_FALSE; vmode25x80(); hb_gt_dos_GetScreenSize( &s_iRows, &s_iCols ); } @@ -1208,7 +1208,7 @@ static BOOL hb_gt_dos_SetMode( PHB_GT pGT, int iRows, int iCols ) return bSuccess; } -static BOOL hb_gt_dos_PostExt( PHB_GT pGT ) +static HB_BOOL hb_gt_dos_PostExt( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_dos_PostExt(%p)", pGT)); @@ -1219,7 +1219,7 @@ static BOOL hb_gt_dos_PostExt( PHB_GT pGT ) return HB_GTSUPER_POSTEXT( pGT ); } -static BOOL hb_gt_dos_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_dos_Resume( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_dos_Resume(%p)", pGT)); @@ -1239,7 +1239,7 @@ static BOOL hb_gt_dos_Resume( PHB_GT pGT ) return HB_GTSUPER_RESUME( pGT ); } -static BOOL hb_gt_dos_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_dos_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { PHB_CODEPAGE cdpTerm, cdpHost; int i; @@ -1260,17 +1260,17 @@ static BOOL hb_gt_dos_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char for( i = 0; i < 256; i++ ) { s_charTrans[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_FALSE, cdpHost, cdpTerm ); s_charTransRev[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_dos_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) +static HB_BOOL hb_gt_dos_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) { PHB_CODEPAGE cdpTerm, cdpHost; int i; @@ -1291,10 +1291,10 @@ static BOOL hb_gt_dos_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char * for( i = 0; i < 256; i++ ) { s_keyTrans[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ @@ -1395,7 +1395,7 @@ static void hb_gt_dos_setKbdState( int iKbdState ) HB_POKE_BYTE( 0x0040, 0x0017, ucStat ); } -static BOOL hb_gt_dos_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_dos_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_dos_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -1403,7 +1403,7 @@ static BOOL hb_gt_dos_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_KBDSHIFTS: @@ -1416,12 +1416,12 @@ static BOOL hb_gt_dos_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -1462,7 +1462,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseRestoreState = hb_gt_dos_mouse_RestoreState; #endif - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtgui/gtgui.c b/harbour/src/rtl/gtgui/gtgui.c index f155218d35..773e3048c8 100644 --- a/harbour/src/rtl/gtgui/gtgui.c +++ b/harbour/src/rtl/gtgui/gtgui.c @@ -98,7 +98,7 @@ static void hb_gt_gui_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* *********************************************************************** */ -static BOOL hb_gt_gui_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_gui_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_gui_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -139,12 +139,12 @@ static BOOL hb_gt_gui_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -152,7 +152,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->Tone = hb_gt_gui_Tone; pFuncTable->Info = hb_gt_gui_Info; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtos2/gtos2.c b/harbour/src/rtl/gtos2/gtos2.c index 00424ecb82..e7de399a77 100644 --- a/harbour/src/rtl/gtos2/gtos2.c +++ b/harbour/src/rtl/gtos2/gtos2.c @@ -178,7 +178,7 @@ static void hb_gt_os2_mouse_Exit( PHB_GT pGT ) } } -static BOOL hb_gt_os2_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_os2_mouse_IsPresent( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -249,7 +249,7 @@ static void hb_gt_os2_mouse_SetPos( PHB_GT pGT, int row, int col ) typedef struct { - BOOL fDown; + HB_BOOL fDown; int iPressed; int iPressRow; int iPressCol; @@ -285,7 +285,7 @@ static void hb_gt_os2_mouse_ReadMouseState( void ) { if( s_ulMouseLastState & s_ButtonMask[ i ] ) { - s_ButtonState[ i ].fDown = TRUE; + s_ButtonState[ i ].fDown = HB_TRUE; s_ButtonState[ i ].iPressed++; s_ButtonState[ i ].iPressRow = MouEvent.row; s_ButtonState[ i ].iPressCol = MouEvent.col; @@ -293,7 +293,7 @@ static void hb_gt_os2_mouse_ReadMouseState( void ) } else { - s_ButtonState[ i ].fDown = FALSE; + s_ButtonState[ i ].fDown = HB_FALSE; s_ButtonState[ i ].iReleased++; s_ButtonState[ i ].iReleaseRow = MouEvent.row; s_ButtonState[ i ].iReleaseCol = MouEvent.col; @@ -305,7 +305,7 @@ static void hb_gt_os2_mouse_ReadMouseState( void ) } } -static BOOL hb_gt_os2_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_os2_mouse_ButtonState( PHB_GT pGT, int iButton ) { HB_SYMBOL_UNUSED( pGT ); @@ -314,10 +314,10 @@ static BOOL hb_gt_os2_mouse_ButtonState( PHB_GT pGT, int iButton ) if( s_uMouHandle && iButton >= 0 && iButton < 3 ) return s_ButtonState[ iButton ].fDown; else - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_os2_mouse_ButtonPressed( PHB_GT pGT, int iButton, int * piRow, int * piCol ) +static HB_BOOL hb_gt_os2_mouse_ButtonPressed( PHB_GT pGT, int iButton, int * piRow, int * piCol ) { HB_SYMBOL_UNUSED( pGT ); @@ -330,14 +330,14 @@ static BOOL hb_gt_os2_mouse_ButtonPressed( PHB_GT pGT, int iButton, int * piRow, s_ButtonState[ iButton ].iPressed = 0; *piRow = s_ButtonState[ iButton ].iPressRow; *piCol = s_ButtonState[ iButton ].iPressCol; - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_os2_mouse_ButtonReleased( PHB_GT pGT, int iButton, int * piRow, int * piCol ) +static HB_BOOL hb_gt_os2_mouse_ButtonReleased( PHB_GT pGT, int iButton, int * piRow, int * piCol ) { HB_SYMBOL_UNUSED( pGT ); @@ -350,11 +350,11 @@ static BOOL hb_gt_os2_mouse_ButtonReleased( PHB_GT pGT, int iButton, int * piRow s_ButtonState[ iButton ].iReleased = 0; *piRow = s_ButtonState[ iButton ].iReleaseRow; *piCol = s_ButtonState[ iButton ].iReleaseCol; - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } static int hb_gt_os2_mouse_CountButton( PHB_GT pGT ) @@ -626,7 +626,7 @@ static int hb_gt_os2_ReadKey( PHB_GT pGT, int iEventMask ) return ch; } -static BOOL hb_gt_os2_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_os2_IsColor( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_IsColor(%p)", pGT)); @@ -635,7 +635,7 @@ static BOOL hb_gt_os2_IsColor( PHB_GT pGT ) return s_vi.fbType != 0; /* 0 = monochrom-compatible mode */ } -static BOOL hb_gt_os2_GetBlink( PHB_GT pGT ) +static HB_BOOL hb_gt_os2_GetBlink( PHB_GT pGT ) { VIOINTENSITY vi; @@ -650,7 +650,7 @@ static BOOL hb_gt_os2_GetBlink( PHB_GT pGT ) return vi.fs == 0; /* 0 = blink, 1 = intens */ } -static void hb_gt_os2_SetBlink( PHB_GT pGT, BOOL fBlink ) +static void hb_gt_os2_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) { VIOINTENSITY vi; @@ -706,7 +706,7 @@ static const char * hb_gt_os2_Version( PHB_GT pGT, int iType ) return "Harbour Terminal: OS/2 console"; } -static BOOL hb_gt_os2_Resize( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_os2_Resize( PHB_GT pGT, int iRows, int iCols ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_Resize(%p,%d,%d)", pGT, iRows, iCols)); @@ -722,14 +722,14 @@ static BOOL hb_gt_os2_Resize( PHB_GT pGT, int iRows, int iCols ) s_sLineBuf = ( char * ) hb_gt_os2_allocMem( iRows ); s_iLineBufSize = iRows; } - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_os2_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_os2_SetMode( PHB_GT pGT, int iRows, int iCols ) { - BOOL fResult; + HB_BOOL fResult; HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_SetMode(%p,%d,%d)", pGT, iRows, iCols)); @@ -756,7 +756,7 @@ static BOOL hb_gt_os2_SetMode( PHB_GT pGT, int iRows, int iCols ) return fResult; } -static BOOL hb_gt_os2_PostExt( PHB_GT pGT ) +static HB_BOOL hb_gt_os2_PostExt( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_PostExt(%p)", pGT)); @@ -767,7 +767,7 @@ static BOOL hb_gt_os2_PostExt( PHB_GT pGT ) return HB_GTSUPER_POSTEXT( pGT ); } -static BOOL hb_gt_os2_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_os2_Resume( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_Resume(%p)", pGT)); @@ -826,7 +826,7 @@ static void hb_gt_os2_Refresh( PHB_GT pGT ) hb_gt_os2_SetCursorStyle( iStyle ); } -static BOOL hb_gt_os2_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_os2_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_os2_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -834,20 +834,20 @@ static BOOL hb_gt_os2_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; default: return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -880,7 +880,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseButtonReleased = hb_gt_os2_mouse_ButtonReleased; pFuncTable->MouseCountButton = hb_gt_os2_mouse_CountButton; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtpca/gtpca.c b/harbour/src/rtl/gtpca/gtpca.c index 5af4c64639..5f3f90c995 100644 --- a/harbour/src/rtl/gtpca/gtpca.c +++ b/harbour/src/rtl/gtpca/gtpca.c @@ -109,10 +109,10 @@ static const char * s_szCrLf; static ULONG s_ulCrLf; static int s_iCurrentSGR, s_iFgColor, s_iBgColor, s_iBold, s_iBlink, s_iAM; static int s_iCursorStyle; -static BOOL s_bStdinConsole; -static BOOL s_bStdoutConsole; -static BOOL s_bStderrConsole; -static BOOL s_fDispTrans; +static HB_BOOL s_bStdinConsole; +static HB_BOOL s_bStdoutConsole; +static HB_BOOL s_bStderrConsole; +static HB_BOOL s_fDispTrans; static PHB_CODEPAGE s_cdpTerm; static PHB_CODEPAGE s_cdpHost; static BYTE s_keyTransTbl[ 256 ]; @@ -123,7 +123,7 @@ static char * s_sOutBuf; #if defined( HB_OS_UNIX ) || defined( __DJGPP__ ) -static volatile BOOL s_fRestTTY = FALSE; +static volatile HB_BOOL s_fRestTTY = HB_FALSE; static struct termios s_saved_TIO, s_curr_TIO; #if defined( SIGTTOU ) @@ -145,27 +145,27 @@ static void sig_handler( int iSigNo ) #endif #ifdef SIGWINCH case SIGWINCH: - /* s_WinSizeChangeFlag = TRUE; */ + /* s_WinSizeChangeFlag = HB_TRUE; */ break; #endif #ifdef SIGINT case SIGINT: - /* s_InetrruptFlag = TRUE; */ + /* s_InetrruptFlag = HB_TRUE; */ break; #endif #ifdef SIGQUIT case SIGQUIT: - /* s_BreakFlag = TRUE; */ + /* s_BreakFlag = HB_TRUE; */ break; #endif #ifdef SIGTSTP case SIGTSTP: - /* s_DebugFlag = TRUE; */ + /* s_DebugFlag = HB_TRUE; */ break; #endif #ifdef SIGTTOU case SIGTTOU: - s_fRestTTY = FALSE; + s_fRestTTY = HB_FALSE; break; #endif } @@ -225,7 +225,7 @@ static void hb_gt_pca_AnsiSetAutoMargin( int iAM ) static void hb_gt_pca_AnsiGetCurPos( int * iRow, int * iCol ) { - static BOOL s_fIsAnswer = TRUE; + static HB_BOOL s_fIsAnswer = HB_TRUE; HB_TRACE(HB_TR_DEBUG, ("hb_gt_pca_AnsiGetCurPos(%p, %p)", iRow, iCol)); @@ -264,7 +264,7 @@ static void hb_gt_pca_AnsiGetCurPos( int * iRow, int * iCol ) x = x * 10 + ( rdbuf[ i++ ] - '0' ); if( i < n && i > d && rdbuf[ i ] == 'R' ) { - s_fIsAnswer = TRUE; + s_fIsAnswer = HB_TRUE; break; } } @@ -455,7 +455,7 @@ static void hb_gt_pca_setKeyTrans( PHB_CODEPAGE cdpTerm, PHB_CODEPAGE cdpHost ) for( i = 0; i < 256; ++i ) s_keyTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); } static void hb_gt_pca_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFilenoStdout, HB_FHANDLE hFilenoStderr ) @@ -473,7 +473,7 @@ static void hb_gt_pca_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil s_bStderrConsole = hb_fsIsDevice( s_hFilenoStderr ); s_cdpTerm = s_cdpHost = NULL; - s_fDispTrans = FALSE; + s_fDispTrans = HB_FALSE; hb_gt_pca_setKeyTrans( NULL, NULL ); s_szCrLf = hb_conNewLine(); @@ -486,7 +486,7 @@ static void hb_gt_pca_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil /* SA_NOCLDSTOP in #if is a hack to detect POSIX compatible environment */ #if ( defined( HB_OS_UNIX ) || defined( __DJGPP__ ) ) && \ defined( SA_NOCLDSTOP ) - s_fRestTTY = FALSE; + s_fRestTTY = HB_FALSE; if( s_bStdinConsole ) { #if defined( SIGTTOU ) @@ -507,7 +507,7 @@ static void hb_gt_pca_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil sigaction( SIGTTOU, &act, 0 ); #endif - s_fRestTTY = TRUE; + s_fRestTTY = HB_TRUE; tcgetattr( hFilenoStdin, &s_saved_TIO ); memcpy( &s_curr_TIO, &s_saved_TIO, sizeof( struct termios ) ); @@ -585,7 +585,7 @@ static void hb_gt_pca_Exit( PHB_GT pGT ) hb_xfree( s_sOutBuf ); s_iOutBufSize = s_iOutBufIndex = 0; } - s_bStdinConsole = s_bStdoutConsole = s_bStderrConsole = FALSE; + s_bStdinConsole = s_bStdoutConsole = s_bStderrConsole = HB_FALSE; } static int hb_gt_pca_ReadKey( PHB_GT pGT, int iEventMask ) @@ -693,7 +693,7 @@ static int hb_gt_pca_ReadKey( PHB_GT pGT, int iEventMask ) static void hb_gt_pca_Tone( PHB_GT pGT, double dFrequency, double dDuration ) { - static double dLastSeconds = 0; + static double s_dLastSeconds = 0; double dCurrentSeconds; HB_TRACE(HB_TR_DEBUG, ("hb_gt_pca_Tone(%p, %lf, %lf)", pGT, dFrequency, dDuration)); @@ -706,10 +706,10 @@ static void hb_gt_pca_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* succession leading to BEL hell on the terminal */ dCurrentSeconds = hb_dateSeconds(); - if( dCurrentSeconds < dLastSeconds || dCurrentSeconds - dLastSeconds > 0.5 ) + if( dCurrentSeconds < s_dLastSeconds || dCurrentSeconds - s_dLastSeconds > 0.5 ) { hb_gt_pca_termOut( s_szBell, 1 ); - dLastSeconds = dCurrentSeconds; + s_dLastSeconds = dCurrentSeconds; hb_gt_pca_termFlush(); } @@ -741,7 +741,7 @@ static const char * hb_gt_pca_Version( PHB_GT pGT, int iType ) return "Harbour Terminal: PC ANSI"; } -static BOOL hb_gt_pca_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_pca_Suspend( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_Suspend(%p)", pGT ) ); @@ -754,10 +754,10 @@ static BOOL hb_gt_pca_Suspend( PHB_GT pGT ) #endif /* Enable line wrap when cursor set after last column */ hb_gt_pca_AnsiSetAutoMargin( 1 ); - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_pca_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_pca_Resume( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_Resume(%p)", pGT ) ); @@ -770,10 +770,10 @@ static BOOL hb_gt_pca_Resume( PHB_GT pGT ) #endif hb_gt_pca_AnsiInit(); - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_pca_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_pca_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_SetDispCP(%p,%s,%s,%d)", pGT, pszTermCDP, pszHostCDP, (int) fBox ) ); @@ -791,10 +791,10 @@ static BOOL hb_gt_pca_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char s_fDispTrans = s_cdpTerm && s_cdpHost && s_cdpTerm != s_cdpHost; } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_pca_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) +static HB_BOOL hb_gt_pca_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_SetKeyCP(%p,%s,%s)", pGT, pszTermCDP, pszHostCDP ) ); @@ -807,7 +807,7 @@ static BOOL hb_gt_pca_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char * hb_gt_pca_setKeyTrans( hb_cdpFind( pszTermCDP ), hb_cdpFind( pszHostCDP ) ); - return TRUE; + return HB_TRUE; } static void hb_gt_pca_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) @@ -897,7 +897,7 @@ static void hb_gt_pca_Refresh( PHB_GT pGT ) hb_gt_pca_termFlush(); } -static BOOL hb_gt_pca_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_pca_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -905,18 +905,18 @@ static BOOL hb_gt_pca_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; default: return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -935,7 +935,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->ReadKey = hb_gt_pca_ReadKey; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtsln/gtsln.c b/harbour/src/rtl/gtsln/gtsln.c index cfe0c42614..9b67de913c 100644 --- a/harbour/src/rtl/gtsln/gtsln.c +++ b/harbour/src/rtl/gtsln/gtsln.c @@ -62,10 +62,10 @@ static HB_GT_FUNCS SuperTable; #define HB_GTID_PTR (&s_GtId) static HB_FHANDLE s_hStdIn, s_hStdOut, s_hStdErr; -static BOOL s_fStdInTTY = FALSE, s_fStdOutTTY = FALSE, s_fStdErrTTY = FALSE; +static HB_BOOL s_fStdInTTY = HB_FALSE, s_fStdOutTTY = HB_FALSE, s_fStdErrTTY = HB_FALSE; /* does terminal works in Unicode (UTF-8) mode? */ -BOOL hb_sln_Is_Unicode = FALSE; +HB_BOOL hb_sln_Is_Unicode = HB_FALSE; /* Slang color names */ static const char * s_colorNames[] = @@ -105,12 +105,12 @@ static SLsmg_Char_Type s_outboxTab[ 256 ]; unsigned char hb_sln_inputTab[ 256 ]; PHB_CODEPAGE hb_sln_cdpIN; -static BOOL s_fActive = FALSE; +static HB_BOOL s_fActive = HB_FALSE; static int s_iCursorStyle = SC_NORMAL; /* indicate if we are currently running a command from system */ -static BOOL s_bSuspended = FALSE; +static HB_BOOL s_bSuspended = HB_FALSE; /* the name of an environmet variable containig a definition of nation chars.*/ /* A definition is a list of pairs of chars. The first char in each pair is */ @@ -122,14 +122,14 @@ static const char * hb_NationCharsEnvName = "HRBNATIONCHARS"; /* *********************************************************************** */ -volatile BOOL hb_sln_bScreen_Size_Changed = FALSE; +volatile HB_BOOL hb_sln_bScreen_Size_Changed = HB_FALSE; /* window's resize handler */ static void sigwinch_handler( int iSig ) { HB_SYMBOL_UNUSED( iSig ); - hb_sln_bScreen_Size_Changed = TRUE; + hb_sln_bScreen_Size_Changed = HB_TRUE; SLsignal( SIGWINCH, sigwinch_handler ); } @@ -344,7 +344,7 @@ static void hb_sln_setACSCtrans( void ) /* *********************************************************************** */ -static void hb_sln_setCharTrans( PHB_CODEPAGE cdpHost, PHB_CODEPAGE cdpTerm, BOOL fBox ) +static void hb_sln_setCharTrans( PHB_CODEPAGE cdpHost, PHB_CODEPAGE cdpTerm, HB_BOOL fBox ) { int i, iDst; @@ -356,7 +356,7 @@ static void hb_sln_setCharTrans( PHB_CODEPAGE cdpHost, PHB_CODEPAGE cdpTerm, BOO for( i = 0; i < 256; i++ ) { if( hb_sln_Is_Unicode ) - iDst = hb_cdpGetU16( cdpHost, TRUE, ( BYTE ) i ); + iDst = hb_cdpGetU16( cdpHost, HB_TRUE, ( BYTE ) i ); else iDst = i; @@ -391,12 +391,12 @@ static void hb_sln_setCharTrans( PHB_CODEPAGE cdpHost, PHB_CODEPAGE cdpTerm, BOO if( hb_cdpIsAlpha( cdpHost, i ) ) { #ifdef HB_SLN_UNICODE - iDst = hb_cdpGetU16( cdpHost, TRUE, ( BYTE ) i ); + iDst = hb_cdpGetU16( cdpHost, HB_TRUE, ( BYTE ) i ); #else if( hb_sln_Is_Unicode ) - iDst = hb_cdpGetU16( cdpHost, TRUE, ( BYTE ) i ); + iDst = hb_cdpGetU16( cdpHost, HB_TRUE, ( BYTE ) i ); else - iDst = hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + iDst = hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); #endif HB_SLN_BUILD_RAWCHAR( s_outputTab[ i ], iDst, 0 ); if( fBox ) @@ -415,7 +415,7 @@ static void hb_sln_setKeyTrans( PHB_CODEPAGE cdpHost, PHB_CODEPAGE cdpTerm ) for ( i = 0; i < 256; i++ ) hb_sln_inputTab[ i ] = ( unsigned char ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); hb_sln_cdpIN = cdpTerm ? cdpTerm : cdpHost; /* init national chars */ @@ -573,10 +573,10 @@ static int hb_sln_isUTF8( int iStdOut, int iStdIn ) #endif /* *********************************************************************** */ -/* I think this function should not be void. It should be BOOL */ +/* I think this function should not be void. It should be HB_BOOL */ static void hb_gt_sln_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFilenoStdout, HB_FHANDLE hFilenoStderr ) { - BOOL gt_Inited = FALSE; + HB_BOOL gt_Inited = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("hb_gt_sln_Init(%p,%p,%p,%p)", pGT, ( void * ) ( HB_PTRDIFF ) hFilenoStdin, ( void * ) ( HB_PTRDIFF ) hFilenoStdout, ( void * ) ( HB_PTRDIFF ) hFilenoStderr)); @@ -671,7 +671,7 @@ static void hb_gt_sln_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil /* initialize conversion tables */ hb_sln_colorTrans(); - hb_sln_setCharTrans( hb_vmCDP(), NULL, TRUE ); + hb_sln_setCharTrans( hb_vmCDP(), NULL, HB_TRUE ); hb_sln_setKeyTrans( hb_vmCDP(), NULL ); /* ensure we are in a normal chars set */ @@ -688,7 +688,7 @@ static void hb_gt_sln_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil SLsmg_gotorc( 0, 0 ); SLsmg_refresh(); - gt_Inited = TRUE; + gt_Inited = HB_TRUE; } } } @@ -700,15 +700,15 @@ static void hb_gt_sln_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil hb_errInternal( 9997, "Internal error: screen driver initialization failure", NULL, NULL ); } - s_fActive = TRUE; + s_fActive = HB_TRUE; hb_gt_sln_mouse_Init(); HB_GTSUPER_INIT( pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr ); HB_GTSELF_RESIZE( pGT, SLtt_Screen_Rows, SLtt_Screen_Cols ); - HB_GTSELF_SETFLAG( pGT, HB_GTI_COMPATBUFFER, FALSE ); + HB_GTSELF_SETFLAG( pGT, HB_GTI_COMPATBUFFER, HB_FALSE ); HB_GTSELF_SETFLAG( pGT, HB_GTI_STDOUTCON, s_fStdOutTTY ); HB_GTSELF_SETFLAG( pGT, HB_GTI_STDERRCON, s_fStdErrTTY ); - HB_GTSELF_SETBLINK( pGT, TRUE ); + HB_GTSELF_SETBLINK( pGT, HB_TRUE ); HB_GTSELF_SETPOS( pGT, SLsmg_get_row(), SLsmg_get_column() ); } @@ -735,14 +735,14 @@ static void hb_gt_sln_Exit( PHB_GT pGT ) SLsmg_reset_smg(); SLang_reset_tty(); - s_fStdInTTY = s_fStdOutTTY = s_fStdErrTTY = s_fActive = FALSE; + s_fStdInTTY = s_fStdOutTTY = s_fStdErrTTY = s_fActive = HB_FALSE; HB_GTSUPER_EXIT( pGT ); } /* *********************************************************************** */ -static BOOL hb_gt_sln_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_sln_SetMode( PHB_GT pGT, int iRows, int iCols ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_sln_SetMode(%p,%d,%d)", pGT, iRows, iCols)); @@ -751,12 +751,12 @@ static BOOL hb_gt_sln_SetMode( PHB_GT pGT, int iRows, int iCols ) HB_SYMBOL_UNUSED( iCols ); /* TODO: How to change the size of the screen? */ - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ -static BOOL hb_gt_sln_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_sln_IsColor( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_sln_IsColor(%p)", pGT)); @@ -767,7 +767,7 @@ static BOOL hb_gt_sln_IsColor( PHB_GT pGT ) /* *********************************************************************** */ -static void hb_gt_sln_SetBlink( PHB_GT pGT, BOOL fBlink ) +static void hb_gt_sln_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_sln_SetBlink(%p,%d)", pGT, (int) fBlink)); @@ -844,7 +844,7 @@ static const char * hb_gt_sln_Version( PHB_GT pGT, int iType ) /* *********************************************************************** */ -static BOOL hb_gt_sln_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_sln_Suspend( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -853,7 +853,7 @@ static BOOL hb_gt_sln_Suspend( PHB_GT pGT ) if( SLsmg_suspend_smg() != -1 ) { SLang_reset_tty(); - s_bSuspended = TRUE; + s_bSuspended = HB_TRUE; } } @@ -862,7 +862,7 @@ static BOOL hb_gt_sln_Suspend( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_sln_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_sln_Resume( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -873,7 +873,7 @@ static BOOL hb_gt_sln_Resume( PHB_GT pGT ) #if defined( HB_HAS_GPM ) hb_gt_sln_mouse_FixTrash(); #endif - s_bSuspended = FALSE; + s_bSuspended = HB_FALSE; } return !s_bSuspended; @@ -881,7 +881,7 @@ static BOOL hb_gt_sln_Resume( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_sln_PreExt( PHB_GT pGT ) +static HB_BOOL hb_gt_sln_PreExt( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -889,21 +889,21 @@ static BOOL hb_gt_sln_PreExt( PHB_GT pGT ) #if defined( HB_HAS_GPM ) hb_gt_sln_mouse_FixTrash(); #endif - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_sln_PostExt( PHB_GT pGT ) +static HB_BOOL hb_gt_sln_PostExt( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_sln_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_sln_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_sln_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -911,7 +911,7 @@ static BOOL hb_gt_sln_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ISUNICODE: @@ -928,13 +928,13 @@ static BOOL hb_gt_sln_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_sln_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_sln_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox ); @@ -952,12 +952,12 @@ static BOOL hb_gt_sln_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char hb_sln_setCharTrans( cdpHost, cdpTerm, fBox ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_sln_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) +static HB_BOOL hb_gt_sln_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) { HB_GTSUPER_SETKEYCP( pGT, pszTermCDP, pszHostCDP ); @@ -975,7 +975,7 @@ static BOOL hb_gt_sln_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char hb_sln_setKeyTrans( cdpHost, cdpTerm ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ @@ -1026,7 +1026,7 @@ static void hb_gt_sln_Refresh( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -1057,7 +1057,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseButtonState = hb_gt_sln_mouse_ButtonState; pFuncTable->MouseCountButton = hb_gt_sln_mouse_CountButton; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtsln/gtsln.h b/harbour/src/rtl/gtsln/gtsln.h index de7d05ab08..3b606b25ef 100644 --- a/harbour/src/rtl/gtsln/gtsln.h +++ b/harbour/src/rtl/gtsln/gtsln.h @@ -210,9 +210,9 @@ /* *********************************************************************** */ -extern BOOL hb_sln_Is_Unicode; -extern BOOL hb_sln_UnderLinuxConsole; -extern BOOL hb_sln_UnderXterm; +extern HB_BOOL hb_sln_Is_Unicode; +extern HB_BOOL hb_sln_UnderLinuxConsole; +extern HB_BOOL hb_sln_UnderXterm; extern unsigned char hb_sln_inputTab[ 256 ]; extern PHB_CODEPAGE hb_sln_cdpIN; @@ -225,24 +225,24 @@ extern int hb_sln_escDelay; extern unsigned char hb_sln_convKDeadKeys[]; /* indicates that screen size has changed */ -extern volatile BOOL hb_sln_bScreen_Size_Changed; +extern volatile HB_BOOL hb_sln_bScreen_Size_Changed; extern int hb_sln_Init_Terminal( int phase ); extern int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ); -extern void hb_gt_sln_mouse_Init( void ); -extern void hb_gt_sln_mouse_Exit( void ); -extern BOOL hb_gt_sln_mouse_IsPresent( PHB_GT pGT ); -extern void hb_gt_sln_mouse_Show( PHB_GT pGT ); -extern void hb_gt_sln_mouse_Hide( PHB_GT pGT ); -extern void hb_gt_sln_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ); -extern void hb_gt_sln_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ); -extern int hb_gt_sln_mouse_CountButton( PHB_GT pGT ); -extern BOOL hb_gt_sln_mouse_ButtonState( PHB_GT pGT, int iButton ); +extern void hb_gt_sln_mouse_Init( void ); +extern void hb_gt_sln_mouse_Exit( void ); +extern HB_BOOL hb_gt_sln_mouse_IsPresent( PHB_GT pGT ); +extern void hb_gt_sln_mouse_Show( PHB_GT pGT ); +extern void hb_gt_sln_mouse_Hide( PHB_GT pGT ); +extern void hb_gt_sln_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ); +extern void hb_gt_sln_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ); +extern int hb_gt_sln_mouse_CountButton( PHB_GT pGT ); +extern HB_BOOL hb_gt_sln_mouse_ButtonState( PHB_GT pGT, int iButton ); -extern void hb_gt_sln_mouse_FixTrash( void ); -extern int hb_gt_sln_mouse_Inkey( int iEventMask, BOOL fCheckNew ); -extern void hb_gt_sln_mouse_ProcessTerminalEvent( void ); +extern void hb_gt_sln_mouse_FixTrash( void ); +extern int hb_gt_sln_mouse_Inkey( int iEventMask, HB_BOOL fCheckNew ); +extern void hb_gt_sln_mouse_ProcessTerminalEvent( void ); /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtsln/kbsln.c b/harbour/src/rtl/gtsln/kbsln.c index cba91bff0b..4ac5bdf16e 100644 --- a/harbour/src/rtl/gtsln/kbsln.c +++ b/harbour/src/rtl/gtsln/kbsln.c @@ -125,8 +125,8 @@ int hb_DeadKey = -1; int hb_sln_escDelay = 0; #endif -BOOL hb_sln_UnderLinuxConsole = FALSE; -BOOL hb_sln_UnderXterm = FALSE; +HB_BOOL hb_sln_UnderLinuxConsole = HB_FALSE; +HB_BOOL hb_sln_UnderXterm = HB_FALSE; static int hb_sln_try_get_Kbd_State( void ); @@ -309,9 +309,9 @@ int hb_sln_Init_Terminal( int phase ) int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) { - static int InDeadState = FALSE; + static int InDeadState = HB_FALSE; unsigned int ch, tmp, kbdflags; - BOOL fInput; + HB_BOOL fInput; int iKey; HB_TRACE(HB_TR_DEBUG, ("hb_gt_sln_ReadKey(%p,%d)", pGT, (int) iEventMask)); @@ -323,7 +323,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) /* has screen size changed ? */ if( hb_sln_bScreen_Size_Changed ) { - hb_sln_bScreen_Size_Changed = FALSE; + hb_sln_bScreen_Size_Changed = HB_FALSE; SLtt_get_screen_size(); #if SLANG_VERSION > 10202 SLsmg_reinit_smg(); @@ -381,7 +381,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) /* Dead key handling */ if( InDeadState ) { - InDeadState = FALSE; + InDeadState = HB_FALSE; if( (int) ch == hb_DeadKey ) /* double press Dead key */ return ch; if( ch < 256 ) /* is this needed ??? */ @@ -396,7 +396,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) else if( (int) ch == hb_DeadKey ) { /* entering Dead key state */ - InDeadState = TRUE; + InDeadState = HB_TRUE; return 0; } @@ -406,7 +406,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) if( tmp == SL_KEY_MOU ) { hb_gt_sln_mouse_ProcessTerminalEvent(); - return hb_gt_sln_mouse_Inkey( iEventMask, FALSE ); + return hb_gt_sln_mouse_Inkey( iEventMask, HB_FALSE ); } if( ( iEventMask & INKEY_RAW ) != 0 ) @@ -428,7 +428,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) int n = 0; USHORT uc = 0; - if ( hb_cdpGetFromUTF8( hb_sln_cdpIN, FALSE, (BYTE) ch, &n, &uc ) ) + if ( hb_cdpGetFromUTF8( hb_sln_cdpIN, HB_FALSE, (BYTE) ch, &n, &uc ) ) { unsigned int buf[ 10 ], i = 0; @@ -438,7 +438,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) - HB_MAX( hb_sln_escDelay, 0 ) ) == 0 ) break; buf[ i++ ] = SLang_getkey(); - if ( !hb_cdpGetFromUTF8( hb_sln_cdpIN, FALSE, (BYTE) buf[ i - 1 ], &n, &uc ) ) + if ( !hb_cdpGetFromUTF8( hb_sln_cdpIN, HB_FALSE, (BYTE) buf[ i - 1 ], &n, &uc ) ) break; } if ( n > 0 ) diff --git a/harbour/src/rtl/gtsln/mousesln.c b/harbour/src/rtl/gtsln/mousesln.c index 3fcd99fb20..b3fd37df8e 100644 --- a/harbour/src/rtl/gtsln/mousesln.c +++ b/harbour/src/rtl/gtsln/mousesln.c @@ -67,8 +67,8 @@ static int s_iMouseRow = 0; static int s_iMouseCol = 0; -static BOOL s_bMousePresent = FALSE; -static int s_iMouseButtons = -1; +static HB_BOOL s_bMousePresent = HB_FALSE; +static int s_iMouseButtons = -1; static USHORT s_usMouseState = 0; static USHORT s_usLastMouseState = 0; @@ -81,7 +81,7 @@ static struct timeval mRightDblckTime; /* *********************************************************************** */ #if defined( HB_HAS_GPM ) -static BOOL GetGpmEvent( Gpm_Event *Evt ) +static HB_BOOL GetGpmEvent( Gpm_Event *Evt ) { if( s_bMousePresent && gpm_fd >= 0 ) { @@ -96,13 +96,13 @@ static BOOL GetGpmEvent( Gpm_Event *Evt ) return Gpm_GetEvent( Evt ) > 0; } - return FALSE; + return HB_FALSE; } #endif /* *********************************************************************** */ -static BOOL GetXtermEvent( int *Btn, int *Col, int *Row ) +static HB_BOOL GetXtermEvent( int *Btn, int *Col, int *Row ) { /* Xterm mouse event consists of three chars */ if( SLang_input_pending( 0 ) > 0 ) @@ -115,12 +115,12 @@ static BOOL GetXtermEvent( int *Btn, int *Col, int *Row ) if( SLang_input_pending( 0 ) > 0 ) { *Row = SLang_getkey() - 0x21; - return TRUE; + return HB_TRUE; } } } - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ @@ -196,7 +196,7 @@ void hb_gt_sln_mouse_ProcessTerminalEvent( void ) /* *********************************************************************** */ -int hb_gt_sln_mouse_Inkey( int iEventMask, BOOL fCheckNew ) +int hb_gt_sln_mouse_Inkey( int iEventMask, HB_BOOL fCheckNew ) { if( s_usMouseState != s_usLastMouseState ) { @@ -346,7 +346,7 @@ void hb_gt_sln_mouse_Init( void ) if( s_iMouseButtons < 1 ) s_iMouseButtons = 3; - s_bMousePresent = TRUE; + s_bMousePresent = HB_TRUE; } #if defined( HB_HAS_GPM ) else if( hb_sln_UnderLinuxConsole ) @@ -370,7 +370,7 @@ void hb_gt_sln_mouse_Init( void ) { Gpm_Event Evt; - s_bMousePresent = TRUE; + s_bMousePresent = HB_TRUE; while( GetGpmEvent( &Evt ) ); { @@ -423,13 +423,13 @@ void hb_gt_sln_mouse_Exit( void ) Gpm_Close(); } #endif - s_bMousePresent = FALSE; + s_bMousePresent = HB_FALSE; } } /* *********************************************************************** */ -BOOL hb_gt_sln_mouse_IsPresent( PHB_GT pGT ) +HB_BOOL hb_gt_sln_mouse_IsPresent( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -490,7 +490,7 @@ void hb_gt_sln_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ) /* *********************************************************************** */ -BOOL hb_gt_sln_mouse_ButtonState( PHB_GT pGT, int iButton ) +HB_BOOL hb_gt_sln_mouse_ButtonState( PHB_GT pGT, int iButton ) { HB_SYMBOL_UNUSED( pGT ); @@ -504,7 +504,7 @@ BOOL hb_gt_sln_mouse_ButtonState( PHB_GT pGT, int iButton ) return ( s_usMouseState & M_BUTTON_MIDDLE ) != 0; } - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtstd/gtstd.c b/harbour/src/rtl/gtstd/gtstd.c index 4783bfbd2c..aee5314d79 100644 --- a/harbour/src/rtl/gtstd/gtstd.c +++ b/harbour/src/rtl/gtstd/gtstd.c @@ -94,9 +94,9 @@ typedef struct _HB_GTSTD HB_FHANDLE hStdin; HB_FHANDLE hStdout; HB_FHANDLE hStderr; - BOOL fStdinConsole; - BOOL fStdoutConsole; - BOOL fStderrConsole; + HB_BOOL fStdinConsole; + HB_BOOL fStdoutConsole; + HB_BOOL fStderrConsole; int iRow; int iCol; @@ -106,11 +106,11 @@ typedef struct _HB_GTSTD char * sLineBuf; ULONG ulTransBufSize; char * sTransBuf; - BOOL fFullRedraw; + HB_BOOL fFullRedraw; char * szCrLf; ULONG ulCrLf; - BOOL fDispTrans; + HB_BOOL fDispTrans; PHB_CODEPAGE cdpTerm; PHB_CODEPAGE cdpHost; BYTE keyTransTbl[ 256 ]; @@ -118,7 +118,7 @@ typedef struct _HB_GTSTD #if defined( HB_OS_UNIX ) || defined( __DJGPP__ ) struct termios saved_TIO; struct termios curr_TIO; - BOOL fRestTTY; + HB_BOOL fRestTTY; #endif double dToneSeconds; @@ -128,7 +128,7 @@ typedef struct _HB_GTSTD #if defined( HB_OS_UNIX ) || defined( __DJGPP__ ) -static volatile BOOL s_fRestTTY = FALSE; +static volatile HB_BOOL s_fRestTTY = HB_FALSE; #if defined( SIGTTOU ) static void sig_handler( int iSigNo ) @@ -147,27 +147,27 @@ static void sig_handler( int iSigNo ) #endif #ifdef SIGWINCH case SIGWINCH: - /* s_WinSizeChangeFlag = TRUE; */ + /* s_WinSizeChangeFlag = HB_TRUE; */ break; #endif #ifdef SIGINT case SIGINT: - /* s_InetrruptFlag = TRUE; */ + /* s_InetrruptFlag = HB_TRUE; */ break; #endif #ifdef SIGQUIT case SIGQUIT: - /* s_BreakFlag = TRUE; */ + /* s_BreakFlag = HB_TRUE; */ break; #endif #ifdef SIGTSTP case SIGTSTP: - /* s_DebugFlag = TRUE; */ + /* s_DebugFlag = HB_TRUE; */ break; #endif #ifdef SIGTSTP case SIGTTOU: - s_fRestTTY = FALSE; + s_fRestTTY = HB_FALSE; break; #endif } @@ -182,7 +182,7 @@ static void hb_gt_std_setKeyTrans( PHB_GTSTD pGTSTD, PHB_CODEPAGE cdpTerm, PHB_C for( i = 0; i < 256; ++i ) pGTSTD->keyTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); } static void hb_gt_std_termOut( PHB_GTSTD pGTSTD, const char * szStr, HB_SIZE ulLen ) @@ -246,7 +246,7 @@ static void hb_gt_std_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil sigaction( SIGTTOU, &act, 0 ); #endif - s_fRestTTY = TRUE; + s_fRestTTY = HB_TRUE; tcgetattr( pGTSTD->hStdin, &pGTSTD->saved_TIO ); memcpy( &pGTSTD->curr_TIO, &pGTSTD->saved_TIO, sizeof( struct termios ) ); @@ -414,13 +414,13 @@ static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask ) return ch; } -static BOOL hb_gt_std_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_std_IsColor( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_std_IsColor(%p)", pGT)); HB_SYMBOL_UNUSED( pGT ); - return FALSE; + return HB_FALSE; } static void hb_gt_std_Tone( PHB_GT pGT, double dFrequency, double dDuration ) @@ -470,7 +470,7 @@ static const char * hb_gt_std_Version( PHB_GT pGT, int iType ) return "Harbour Terminal: Standard stream console"; } -static BOOL hb_gt_std_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_std_Suspend( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Suspend(%p)", pGT ) ); @@ -485,7 +485,7 @@ static BOOL hb_gt_std_Suspend( PHB_GT pGT ) return HB_GTSUPER_SUSPEND( pGT ); } -static BOOL hb_gt_std_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_std_Resume( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Resume(%p)", pGT ) ); @@ -526,7 +526,7 @@ static void hb_gt_std_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int HB_GTSUPER_SCROLL( pGT, iTop, iLeft, iBottom, iRight, iColor, usChar, iRows, iCols ); } -static BOOL hb_gt_std_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_std_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_SetDispCP(%p,%s,%s,%d)", pGT, pszTermCDP, pszHostCDP, (int) fBox ) ); @@ -546,10 +546,10 @@ static BOOL hb_gt_std_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char pGTSTD->cdpTerm != pGTSTD->cdpHost; } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_std_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) +static HB_BOOL hb_gt_std_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_SetKeyCP(%p,%s,%s)", pGT, pszTermCDP, pszHostCDP ) ); @@ -563,7 +563,7 @@ static BOOL hb_gt_std_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char * hb_gt_std_setKeyTrans( HB_GTSTD_GET( pGT ), hb_cdpFind( pszTermCDP ), hb_cdpFind( pszHostCDP ) ); - return TRUE; + return HB_TRUE; } static void hb_gt_std_DispLine( PHB_GT pGT, int iRow ) @@ -663,7 +663,7 @@ static void hb_gt_std_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) if( pGTSTD->iRow > iRow ) { pGTSTD->iRow = -1; - pGTSTD->fFullRedraw = TRUE; + pGTSTD->fFullRedraw = HB_TRUE; } for( i = pGTSTD->iRow + 1; i < iRow; ++i ) hb_gt_std_DispLine( pGT, i ); @@ -731,7 +731,7 @@ static void hb_gt_std_Refresh( PHB_GT pGT ) pGTSTD->sLineBuf = ( char * ) hb_xrealloc( pGTSTD->sLineBuf, iWidth ); pGTSTD->iLineBufSize = iWidth; } - pGTSTD->fFullRedraw = FALSE; + pGTSTD->fFullRedraw = HB_FALSE; HB_GTSUPER_REFRESH( pGT ); if( pGTSTD->fFullRedraw ) { @@ -745,7 +745,7 @@ static void hb_gt_std_Refresh( PHB_GT pGT ) } } -static BOOL hb_gt_std_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_std_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -753,18 +753,18 @@ static BOOL hb_gt_std_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; default: return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -785,7 +785,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->ReadKey = hb_gt_std_ReadKey; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gttrm/gttrm.c b/harbour/src/rtl/gttrm/gttrm.c index df007bc071..aedd4b637d 100644 --- a/harbour/src/rtl/gttrm/gttrm.c +++ b/harbour/src/rtl/gttrm/gttrm.c @@ -313,20 +313,20 @@ typedef struct _HB_GTTRM int iCurrentSGR, iFgColor, iBgColor, iBold, iBlink, iACSC, iAM; int iAttrMask; int iCursorStyle; - BOOL fAM; + HB_BOOL fAM; - BOOL fOutTTY; - BOOL fStdinTTY; - BOOL fStdoutTTY; - BOOL fStderrTTY; + HB_BOOL fOutTTY; + HB_BOOL fStdinTTY; + HB_BOOL fStdoutTTY; + HB_BOOL fStderrTTY; - BOOL fPosAnswer; + HB_BOOL fPosAnswer; PHB_CODEPAGE cdpHost; PHB_CODEPAGE cdpBox; PHB_CODEPAGE cdpIn; - BOOL fUTF8; + HB_BOOL fUTF8; UCHAR keyTransTbl[ 256 ]; int charmap[ 256 ]; @@ -344,7 +344,7 @@ typedef struct _HB_GTTRM #if defined( HB_OS_UNIX ) || defined( __DJGPP__ ) struct termios saved_TIO, curr_TIO; - BOOL fRestTTY; + HB_BOOL fRestTTY; #endif double dToneSeconds; @@ -379,11 +379,11 @@ typedef struct _HB_GTTRM void (* Init) ( HB_GTTRM_PTR ); void (* Exit) ( HB_GTTRM_PTR ); void (* SetTermMode) ( HB_GTTRM_PTR, int ); - BOOL (* GetCursorPos) ( HB_GTTRM_PTR, int *, int *, const char * ); + HB_BOOL (* GetCursorPos) ( HB_GTTRM_PTR, int *, int *, const char * ); void (* SetCursorPos) ( HB_GTTRM_PTR, int , int ); void (* SetCursorStyle) ( HB_GTTRM_PTR, int ); void (* SetAttributes) ( HB_GTTRM_PTR, int ); - BOOL (* SetMode) ( HB_GTTRM_PTR, int *, int * ); + HB_BOOL (* SetMode) ( HB_GTTRM_PTR, int *, int * ); int (* GetAcsc) ( HB_GTTRM_PTR, unsigned char ); void (* Tone) ( HB_GTTRM_PTR, double, double ); void (* Bell) ( HB_GTTRM_PTR ); @@ -392,10 +392,10 @@ typedef struct _HB_GTTRM /* static variables use by signal handler */ #if defined( HB_OS_UNIX ) || defined( __DJGPP__ ) - static volatile BOOL s_WinSizeChangeFlag = FALSE; + static volatile HB_BOOL s_WinSizeChangeFlag = HB_FALSE; #endif #if defined( HB_OS_UNIX ) && defined( SA_NOCLDSTOP ) - static volatile BOOL s_fRestTTY = FALSE; + static volatile HB_BOOL s_fRestTTY = HB_FALSE; #endif /* save old hilit tracking & enable mouse tracking */ @@ -617,19 +617,19 @@ static void sig_handler( int iSigNo ) while( ( pid = waitpid( -1, &stat, WNOHANG ) ) > 0 ) { ; } break; case SIGWINCH: - s_WinSizeChangeFlag = TRUE; + s_WinSizeChangeFlag = HB_TRUE; break; case SIGINT: - /* s_InetrruptFlag = TRUE; */ + /* s_InetrruptFlag = HB_TRUE; */ break; case SIGQUIT: - /* s_BreakFlag = TRUE; */ + /* s_BreakFlag = HB_TRUE; */ break; case SIGTSTP: - /* s_DebugFlag = TRUE; */ + /* s_DebugFlag = HB_TRUE; */ break; case SIGTTOU: - s_fRestTTY = FALSE; + s_fRestTTY = HB_FALSE; break; } errno = e; @@ -749,7 +749,7 @@ static void hb_gt_trm_termOutTrans( PHB_GTTRM pTerm, const char * pStr, int iLen } if( i > iLen ) i = iLen; - pTerm->iOutBufIndex += hb_cdpStrToUTF8( cdp, TRUE, pStr, i, + pTerm->iOutBufIndex += hb_cdpStrToUTF8( cdp, HB_TRUE, pStr, i, pTerm->pOutBuf + pTerm->iOutBufIndex, pTerm->iOutBufSize - pTerm->iOutBufIndex ); pStr += i; @@ -1347,7 +1347,7 @@ static int wait_key( PHB_GTTRM pTerm, int milisec ) #if defined( HB_OS_UNIX ) || defined( __DJGPP__ ) if( s_WinSizeChangeFlag ) { - s_WinSizeChangeFlag = FALSE; + s_WinSizeChangeFlag = HB_FALSE; return K_RESIZE; } #endif @@ -1464,13 +1464,13 @@ again: { USHORT uc = 0; n = i = 0; - if( hb_cdpGetFromUTF8( pTerm->cdpIn, FALSE, ( UCHAR ) nKey, &n, &uc ) ) + if( hb_cdpGetFromUTF8( pTerm->cdpIn, HB_FALSE, ( UCHAR ) nKey, &n, &uc ) ) { while( n > 0 ) { ch = test_bufch( pTerm, i++, pTerm->esc_delay ); if( ch < 0 || ch > 255 || - !hb_cdpGetFromUTF8( pTerm->cdpIn, FALSE, ch, &n, &uc ) ) + !hb_cdpGetFromUTF8( pTerm->cdpIn, HB_FALSE, ch, &n, &uc ) ) break; } if( n == 0 ) @@ -1602,7 +1602,7 @@ static void hb_gt_trm_LinuxResetPalette( PHB_GTTRM pTerm ) /* * XTERM terminal operations */ -static BOOL hb_gt_trm_XtermSetMode( PHB_GTTRM pTerm, int * piRows, int * piCols ) +static HB_BOOL hb_gt_trm_XtermSetMode( PHB_GTTRM pTerm, int * piRows, int * piCols ) { int iHeight, iWidth; char escseq[64]; @@ -1619,12 +1619,12 @@ static BOOL hb_gt_trm_XtermSetMode( PHB_GTTRM pTerm, int * piRows, int * piCols if( *piRows != iHeight || *piCols != iWidth ) sleep( 3 ); if( s_WinSizeChangeFlag ) - s_WinSizeChangeFlag = FALSE; + s_WinSizeChangeFlag = HB_FALSE; #endif hb_gt_trm_getSize( pTerm, piRows, piCols ); - return TRUE; + return HB_TRUE; } static void hb_gt_trm_XtermSetAttributes( PHB_GTTRM pTerm, int iAttr ) @@ -1738,7 +1738,7 @@ static void hb_gt_trm_XtermSetAttributes( PHB_GTTRM pTerm, int iAttr ) /* * BSD console */ -static BOOL hb_gt_trm_BsdGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, +static HB_BOOL hb_gt_trm_BsdGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, const char * szPost ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_trm_BsdGetCursorPos(%p,%p,%p,%p)", pTerm, iRow, iCol, szPost)); @@ -1747,11 +1747,11 @@ static BOOL hb_gt_trm_BsdGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, if( pTerm->fPosAnswer ) { - pTerm->fPosAnswer = FALSE; + pTerm->fPosAnswer = HB_FALSE; *iRow = *iCol = -1; } - return FALSE; + return HB_FALSE; } static void hb_gt_trm_BsdSetCursorStyle( PHB_GTTRM pTerm, int iStyle ) @@ -1829,7 +1829,7 @@ static void hb_gt_trm_AnsiSetTermMode( PHB_GTTRM pTerm, int iAM ) } } -static BOOL hb_gt_trm_AnsiGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, +static HB_BOOL hb_gt_trm_AnsiGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, const char * szPost ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_trm_AnsiGetCursorPos(%p,%p,%p,%p)", pTerm, iRow, iCol, szPost)); @@ -1846,7 +1846,7 @@ static BOOL hb_gt_trm_AnsiGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, hb_gt_trm_termFlush( pTerm ); n = j = x = y = 0; - pTerm->fPosAnswer = FALSE; + pTerm->fPosAnswer = HB_FALSE; /* wait up to 2 seconds for answer */ end_timer = hb_dateMilliSeconds() + 2000; @@ -1884,7 +1884,7 @@ static BOOL hb_gt_trm_AnsiGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iCol, --j; } } - pTerm->fPosAnswer = TRUE; + pTerm->fPosAnswer = HB_TRUE; break; } } @@ -2099,7 +2099,7 @@ static int hb_gt_trm_AnsiGetAcsc( PHB_GTTRM pTerm, unsigned char c ) return c | HB_GTTRM_ATTR_ALT; } -static BOOL hb_gt_trm_AnsiSetMode( PHB_GTTRM pTerm, int * piRow, int * piCol ) +static HB_BOOL hb_gt_trm_AnsiSetMode( PHB_GTTRM pTerm, int * piRow, int * piCol ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_trm_AnsiSetMode(%p,%d,%d)", pTerm, *piRow, *piCol)); @@ -2107,7 +2107,7 @@ static BOOL hb_gt_trm_AnsiSetMode( PHB_GTTRM pTerm, int * piRow, int * piCol ) HB_SYMBOL_UNUSED( piRow ); HB_SYMBOL_UNUSED( piCol ); - return FALSE; + return HB_FALSE; } static void hb_gt_trm_AnsiBell( PHB_GTTRM pTerm ) @@ -2169,13 +2169,13 @@ static void hb_gt_trm_AnsiExit( PHB_GTTRM pTerm ) /* * common functions */ -static BOOL hb_trm_isUTF8( PHB_GTTRM pTerm ) +static HB_BOOL hb_trm_isUTF8( PHB_GTTRM pTerm ) { char * szLang; if( pTerm->fPosAnswer ) { int iRow = 0, iCol = 0; - BOOL fSize; + HB_BOOL fSize; hb_gt_trm_termOut( pTerm, "\005\r\303\255", 4 ); fSize = pTerm->GetCursorPos( pTerm, &iRow, &iCol, "\r \r" ); @@ -2231,7 +2231,7 @@ static void hb_gt_trm_SetKeyTrans( PHB_GTTRM pTerm, PHB_CODEPAGE cdpTerm, PHB_CO for( i = 0; i < 256; ++i ) pTerm->keyTransTbl[ i ] = ( unsigned char ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); pTerm->cdpIn = cdpTerm; } @@ -2283,7 +2283,7 @@ static void hb_gt_trm_SetDispTrans( PHB_GTTRM pTerm, PHB_CODEPAGE cdpHost, PHB_C if( hb_cdpIsAlpha( cdpHost, i ) ) { unsigned char uc = ( unsigned char ) - hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); pTerm->chrattr[i] = uc | HB_GTTRM_ATTR_STD; if( box ) @@ -2946,7 +2946,7 @@ static void hb_gt_trm_SetTerm( PHB_GTTRM pTerm ) pTerm->esc_delay = ESC_DELAY; pTerm->iAttrMask = ~HB_GTTRM_ATTR_BOX; pTerm->terminal_ext = 0; - pTerm->fAM = FALSE; + pTerm->fAM = HB_FALSE; szTerm = getenv("HB_TERM"); if( szTerm == NULL || *szTerm == '\0' ) @@ -3010,7 +3010,7 @@ static void hb_gt_trm_SetTerm( PHB_GTTRM pTerm ) pTerm->Bell = hb_gt_trm_AnsiBell; pTerm->szAcsc = szExtAcsc; pTerm->terminal_type = TERM_CONS; - pTerm->fAM = TRUE; + pTerm->fAM = HB_TRUE; } else { @@ -3037,10 +3037,10 @@ static void hb_gt_trm_SetTerm( PHB_GTTRM pTerm ) if( !pTerm->fOutTTY && pTerm->fStdinTTY ) { pTerm->hFileno = pTerm->hFilenoStdin; - pTerm->fOutTTY = TRUE; + pTerm->fOutTTY = HB_TRUE; } pTerm->fPosAnswer = pTerm->fOutTTY; - pTerm->fUTF8 = FALSE; + pTerm->fUTF8 = HB_FALSE; hb_fsSetDevMode( pTerm->hFileno, FD_BINARY ); @@ -3078,7 +3078,7 @@ static void hb_gt_trm_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil { struct sigaction act, old; - s_fRestTTY = TRUE; + s_fRestTTY = HB_TRUE; /* if( pTerm->saved_TIO.c_lflag & TOSTOP ) != 0 */ sigaction( SIGTTOU, NULL, &old ); @@ -3125,7 +3125,7 @@ static void hb_gt_trm_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil HB_GTSUPER_INIT( pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr ); HB_GTSELF_RESIZE( pGT, iRows, iCols ); - HB_GTSELF_SETFLAG( pGT, HB_GTI_COMPATBUFFER, FALSE ); + HB_GTSELF_SETFLAG( pGT, HB_GTI_COMPATBUFFER, HB_FALSE ); HB_GTSELF_SETFLAG( pGT, HB_GTI_STDOUTCON, pTerm->fStdoutTTY ); HB_GTSELF_SETFLAG( pGT, HB_GTI_STDERRCON, pTerm->fStderrTTY ); @@ -3136,7 +3136,7 @@ static void hb_gt_trm_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil pTerm->fUTF8 = hb_trm_isUTF8( pTerm ); hb_gt_trm_SetKeyTrans( pTerm, NULL, NULL ); hb_gt_trm_SetDispTrans( pTerm, NULL, NULL, 0 ); - HB_GTSELF_SETBLINK( pGT, TRUE ); + HB_GTSELF_SETBLINK( pGT, HB_TRUE ); if( pTerm->fOutTTY ) HB_GTSELF_SEMICOLD( pGT ); } @@ -3180,7 +3180,7 @@ static void hb_gt_trm_Exit( PHB_GT pGT ) } } -static BOOL hb_gt_trm_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_trm_mouse_IsPresent( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_mouse_IsPresent(%p)", pGT ) ); @@ -3239,10 +3239,10 @@ static void hb_gt_trm_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ) disp_mousecursor( pTerm ); } -static BOOL hb_gt_trm_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_trm_mouse_ButtonState( PHB_GT pGT, int iButton ) { PHB_GTTRM pTerm; - BOOL ret = FALSE; + HB_BOOL ret = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_mouse_ButtonState(%p,%i)", pGT, iButton ) ); @@ -3327,7 +3327,7 @@ static const char * hb_gt_trm_Version( PHB_GT pGT, int iType ) return "Harbour terminal driver"; } -static BOOL hb_gt_trm_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_trm_Suspend( PHB_GT pGT ) { PHB_GTTRM pTerm; @@ -3340,10 +3340,10 @@ static BOOL hb_gt_trm_Suspend( PHB_GT pGT ) #endif /* Enable line wrap when cursor set after last column */ pTerm->SetTermMode( pTerm, 1 ); - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_trm_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_trm_Resume( PHB_GT pGT ) { PHB_GTTRM pTerm; int iHeight, iWidth; @@ -3365,7 +3365,7 @@ static BOOL hb_gt_trm_Resume( PHB_GT pGT ) HB_GTSELF_REFRESH( pGT ); - return TRUE; + return HB_TRUE; } static void hb_gt_trm_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight, @@ -3400,7 +3400,7 @@ static void hb_gt_trm_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int HB_GTSUPER_SCROLL( pGT, iTop, iLeft, iBottom, iRight, iColor, usChar, iRows, iCols ); } -static BOOL hb_gt_trm_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_trm_SetMode( PHB_GT pGT, int iRows, int iCols ) { PHB_GTTRM pTerm; @@ -3410,12 +3410,12 @@ static BOOL hb_gt_trm_SetMode( PHB_GT pGT, int iRows, int iCols ) if( pTerm->SetMode( pTerm, &iRows, &iCols ) ) { HB_GTSELF_RESIZE( pGT, iRows, iCols ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static void hb_gt_trm_SetBlink( PHB_GT pGT, BOOL fBlink ) +static void hb_gt_trm_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) { PHB_GTTRM pTerm; @@ -3448,7 +3448,7 @@ static void hb_gt_trm_SetBlink( PHB_GT pGT, BOOL fBlink ) HB_GTSUPER_SETBLINK( pGT, fBlink ); } -static BOOL hb_gt_trm_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_trm_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_SetDispCP(%p,%s,%s,%d)", pGT, pszTermCDP, pszHostCDP, (int) fBox ) ); @@ -3463,10 +3463,10 @@ static BOOL hb_gt_trm_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char hb_cdpFind( pszTermCDP ), fBox ? 1 : 0 ); - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_trm_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) +static HB_BOOL hb_gt_trm_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_SetKeyCP(%p,%s,%s)", pGT, pszTermCDP, pszHostCDP ) ); @@ -3480,7 +3480,7 @@ static BOOL hb_gt_trm_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char * hb_gt_trm_SetKeyTrans( HB_GTTRM_GET( pGT ), hb_cdpFind( pszTermCDP ), hb_cdpFind( pszHostCDP ) ); - return TRUE; + return HB_TRUE; } static void hb_gt_trm_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) @@ -3579,7 +3579,7 @@ static void hb_gt_trm_Refresh( PHB_GT pGT ) disp_mousecursor( pTerm ); } -static BOOL hb_gt_trm_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_trm_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { PHB_GTTRM pTerm; const char * szVal; @@ -3592,7 +3592,7 @@ static BOOL hb_gt_trm_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ISUNICODE: @@ -3669,10 +3669,10 @@ static BOOL hb_gt_trm_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_FuncInit(%p)", pFuncTable ) ); @@ -3702,7 +3702,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseButtonState = hb_gt_trm_mouse_ButtonState; pFuncTable->MouseCountButton = hb_gt_trm_mouse_CountButton; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index 1a6b4a1cfc..655a763146 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -102,7 +102,7 @@ /* To disable mouse, initialization was made in cmdarg.c */ -static BOOL b_MouseEnable = TRUE; +static HB_BOOL b_MouseEnable = HB_TRUE; /* *********************************************************************** */ @@ -146,10 +146,10 @@ static HB_GT_FUNCS SuperTable; #define HB_GTSUPER (&SuperTable) #define HB_GTID_PTR (&s_GtId) -static BOOL s_bSpecialKeyHandling; -static BOOL s_bAltKeyHandling; +static HB_BOOL s_bSpecialKeyHandling; +static HB_BOOL s_bAltKeyHandling; static DWORD s_dwAltGrBits; /* JC: used to verify ALT+GR on different platforms */ -static BOOL s_bBreak; /* Used to signal Ctrl+Break to hb_inkeyPoll() */ +static HB_BOOL s_bBreak; /* Used to signal Ctrl+Break to hb_inkeyPoll() */ static int s_iCursorStyle; static int s_iOldCurStyle; static int s_iCurRow; @@ -558,7 +558,7 @@ static BOOL WINAPI hb_gt_win_CtrlHandler( DWORD dwCtrlType ) case CTRL_CLOSE_EVENT: case CTRL_BREAK_EVENT: - s_bBreak = TRUE; + s_bBreak = HB_TRUE; bHandled = TRUE; break; @@ -596,10 +596,10 @@ static void hb_gt_win_xGetScreenContents( PHB_GT pGT, SMALL_RECT * psrWin ) * very slow in some cases */ - uc = hb_cdpGetChar( s_cdpHost, FALSE, wc ); + uc = hb_cdpGetChar( s_cdpHost, HB_FALSE, wc ); if( uc == '?' && wc >= 0x100 && s_cdpHost != s_cdpBox ) { - uc = hb_cdpGetChar( s_cdpBox, FALSE, wc ); + uc = hb_cdpGetChar( s_cdpBox, HB_FALSE, wc ); if( uc != '?' ) bAttr |= HB_GT_ATTR_BOX; } @@ -702,12 +702,12 @@ static void hb_gt_win_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil s_hStdOut = hFilenoStdout; s_hStdErr = hFilenoStderr; - s_bBreak = FALSE; + s_bBreak = HB_FALSE; s_cNumRead = 0; s_cNumIndex = 0; s_iOldCurStyle = s_iCursorStyle = SC_NORMAL; - s_bSpecialKeyHandling = FALSE; - s_bAltKeyHandling = TRUE; + s_bSpecialKeyHandling = HB_FALSE; + s_bAltKeyHandling = HB_TRUE; #if defined( UNICODE ) s_cdpHost = s_cdpIn = hb_vmCDP(); @@ -715,7 +715,7 @@ static void hb_gt_win_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil #endif /* initialize code page translation */ - HB_GTSELF_SETDISPCP( pGT, NULL, NULL, FALSE ); + HB_GTSELF_SETDISPCP( pGT, NULL, NULL, HB_FALSE ); HB_GTSELF_SETKEYCP( pGT, NULL, NULL ); #ifndef HB_NO_ALLOC_CONSOLE @@ -792,7 +792,7 @@ static void hb_gt_win_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil s_csbi.srWindow.Right = HB_MIN( s_csbi.srWindow.Right, _GetScreenWidth() - 1 ); s_csbi.srWindow.Bottom = HB_MIN( s_csbi.srWindow.Bottom, _GetScreenHeight() - 1 ); - SetConsoleWindowInfo( s_HOutput, TRUE, &s_csbi.srWindow ); + SetConsoleWindowInfo( s_HOutput, TRUE, &s_csbi.srWindow ); SetConsoleScreenBufferSize( s_HOutput, s_csbi.dwSize ); hb_gt_win_xInitScreenParam( pGT ); @@ -837,9 +837,9 @@ static void hb_gt_win_Exit( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_win_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_win_SetMode( PHB_GT pGT, int iRows, int iCols ) { - BOOL fRet = FALSE; + HB_BOOL fRet = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_SetMode(%p,%d,%d)", pGT, iRows, iCols)); @@ -874,7 +874,7 @@ static BOOL hb_gt_win_SetMode( PHB_GT pGT, int iRows, int iCols ) if( SetConsoleWindowInfo( s_HOutput, TRUE, &srWin ) ) { SetConsoleScreenBufferSize( s_HOutput, coBuf ); - fRet = TRUE; + fRet = HB_TRUE; } } else if( ( int ) _GetScreenWidth() <= iCols && @@ -887,7 +887,7 @@ static BOOL hb_gt_win_SetMode( PHB_GT pGT, int iRows, int iCols ) if( SetConsoleScreenBufferSize( s_HOutput, coBuf ) ) { SetConsoleWindowInfo( s_HOutput, TRUE, &srWin ); - fRet = TRUE; + fRet = HB_TRUE; } } else @@ -921,7 +921,7 @@ static BOOL hb_gt_win_SetMode( PHB_GT pGT, int iRows, int iCols ) srWin.Right = ( SHORT ) ( iCols - 1 ); SetConsoleWindowInfo( s_HOutput, TRUE, &srWin ); } - fRet = TRUE; + fRet = HB_TRUE; } } @@ -948,19 +948,19 @@ static const char * hb_gt_win_Version( PHB_GT pGT, int iType ) /* *********************************************************************** */ -static BOOL hb_gt_win_PostExt( PHB_GT pGT ) +static HB_BOOL hb_gt_win_PostExt( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_PostExt(%p)", pGT)); HB_GTSUPER_POSTEXT( pGT ); if( s_pCharInfoScreen ) hb_gt_win_xInitScreenParam( pGT ); - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_win_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_win_Suspend( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_Suspend(%p)", pGT)); @@ -973,10 +973,10 @@ static BOOL hb_gt_win_Suspend( PHB_GT pGT ) SetConsoleMode( s_HOutput, s_dwomode ); SetConsoleMode( s_HInput, s_dwimode ); } - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_win_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_win_Resume( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_Resume(%p)", pGT)); @@ -989,7 +989,7 @@ static BOOL hb_gt_win_Resume( PHB_GT pGT ) hb_gt_win_xInitScreenParam( pGT ); hb_gt_win_xSetCursorStyle(); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ @@ -1072,7 +1072,7 @@ static int Handle_Alt_Key( int * paltisdown, int * paltnum, unsigned short wKey, return ch; } -static int SpecialHandling( WORD * wChar, unsigned short wKey, int ch, BOOL lReverse ) +static int SpecialHandling( WORD * wChar, unsigned short wKey, int ch, HB_BOOL lReverse ) { if( lReverse ) { @@ -1227,7 +1227,7 @@ static int hb_gt_win_ReadKey( PHB_GT pGT, int iEventMask ) if( s_bBreak ) { /* Reset the global Ctrl+Break flag */ - s_bBreak = FALSE; + s_bBreak = HB_FALSE; ch = HB_BREAK_FLAG; /* Indicate that Ctrl+Break was pressed */ } /* Check for events only when the event buffer is exhausted. */ @@ -1304,7 +1304,7 @@ static int hb_gt_win_ReadKey( PHB_GT pGT, int iEventMask ) #if defined( UNICODE ) ch = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.uChar.UnicodeChar; - ch = hb_cdpGetChar( s_cdpIn, FALSE, ( USHORT ) ch ); + ch = hb_cdpGetChar( s_cdpIn, HB_FALSE, ( USHORT ) ch ); #else ch = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.uChar.AsciiChar; #endif @@ -1517,7 +1517,7 @@ static void hb_gt_win_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* *********************************************************************** */ -static BOOL hb_gt_win_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_win_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP, HB_BOOL fBox ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_SetDispCP(%p,%s,%s,%d)", pGT, pszTermCDP, pszHostCDP, (int) fBox)); @@ -1558,19 +1558,19 @@ static BOOL hb_gt_win_SetDispCP( PHB_GT pGT, const char *pszTermCDP, const char for( i = 0; i < 256; i++ ) { s_charTrans[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); s_charTransRev[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, TRUE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_TRUE, cdpTerm, cdpHost ); } } # endif - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_win_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) +static HB_BOOL hb_gt_win_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char *pszHostCDP ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_SetKeyCP(%p,%s,%s)", pGT, pszTermCDP, pszHostCDP)); @@ -1608,16 +1608,16 @@ static BOOL hb_gt_win_SetKeyCP( PHB_GT pGT, const char *pszTermCDP, const char * for( i = 0; i < 256; i++ ) s_keyTrans[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); } # endif - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_win_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_win_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_win_Info(%p,%d,%p)", pGT, iType, pInfo ) ); @@ -1625,14 +1625,14 @@ static BOOL hb_gt_win_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ISUNICODE: #if defined( UNICODE ) - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); #else - pInfo->pResult = hb_itemPutL( pInfo->pResult, FALSE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_FALSE ); #endif break; @@ -1749,12 +1749,12 @@ static BOOL hb_gt_win_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_win_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_win_mouse_IsPresent( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); @@ -1769,9 +1769,9 @@ static void hb_gt_win_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) *piCol = s_mouse_iCol; } -static BOOL hb_gt_win_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_win_mouse_ButtonState( PHB_GT pGT, int iButton ) { - BOOL fReturn = FALSE; + HB_BOOL fReturn = HB_FALSE; HB_SYMBOL_UNUSED( pGT ); @@ -1818,7 +1818,7 @@ static void hb_gt_win_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) #if defined( UNICODE ) s_pCharInfoScreen[ i ].Char.UnicodeChar = hb_cdpGetU16( bAttr & HB_GT_ATTR_BOX ? s_cdpBox : s_cdpHost, - TRUE, ( UCHAR ) usChar ); + HB_TRUE, ( UCHAR ) usChar ); #else s_pCharInfoScreen[ i ].Char.AsciiChar = ( CHAR ) s_charTrans[ usChar & 0xFF ]; #endif @@ -1860,7 +1860,7 @@ static void hb_gt_win_Refresh( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -1885,7 +1885,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->MouseButtonState = hb_gt_win_mouse_ButtonState; pFuncTable->MouseCountButton = hb_gt_win_mouse_CountButton; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtwvt/gtwvt.c b/harbour/src/rtl/gtwvt/gtwvt.c index 4ec0e56c8f..64a5b81f5e 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.c +++ b/harbour/src/rtl/gtwvt/gtwvt.c @@ -176,9 +176,9 @@ static PHB_GTWVT hb_gt_wvt_Find( HWND hWnd ) return pWVT; } -static BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) { - BOOL fOK = FALSE; + HB_BOOL fOK = HB_FALSE; HB_WVT_LOCK @@ -193,7 +193,7 @@ static BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT ) pWVT->iHandle = iPos; if( ++s_wvtCount == 1 ) hb_gt_wvt_RegisterClass( pWVT->hInstance ); - fOK = TRUE; + fOK = HB_TRUE; break; } ++iPos; @@ -298,42 +298,42 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow ) pWVT->fontQuality = DEFAULT_QUALITY; hb_strncpy( pWVT->fontFace, WVT_DEFAULT_FONT_NAME, sizeof( pWVT->fontFace ) - 1 ); - pWVT->CaretExist = FALSE; - pWVT->CaretHidden = TRUE; + pWVT->CaretExist = HB_FALSE; + pWVT->CaretHidden = HB_TRUE; pWVT->CaretSize = 0; pWVT->CaretWidth = 0; pWVT->MousePos.x = 0; pWVT->MousePos.y = 0; - pWVT->MouseMove = TRUE; + pWVT->MouseMove = HB_TRUE; pWVT->hWnd = NULL; pWVT->keyPointerIn = 0; pWVT->keyPointerOut = 0; pWVT->keyLast = 0; - pWVT->CentreWindow = TRUE; /* Default is to always display window in centre of screen */ + pWVT->CentreWindow = HB_TRUE; /* Default is to always display window in centre of screen */ pWVT->CodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */ #if !defined( UNICODE ) pWVT->boxCodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */ #endif pWVT->Win9X = ( osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ); - pWVT->AltF4Close = FALSE; + pWVT->AltF4Close = HB_FALSE; - pWVT->IgnoreWM_SYSCHAR = FALSE; + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; - pWVT->bMaximized = FALSE; - pWVT->bBeingMarked = FALSE; - pWVT->bBeginMarked = FALSE; + pWVT->bMaximized = HB_FALSE; + pWVT->bBeingMarked = HB_FALSE; + pWVT->bBeginMarked = HB_FALSE; pWVT->pszSelectCopy = hb_strdup( "Mark and Copy" ); - pWVT->bSelectCopy = TRUE; - pWVT->bResizable = TRUE; - pWVT->bClosable = TRUE; + pWVT->bSelectCopy = HB_TRUE; + pWVT->bResizable = HB_TRUE; + pWVT->bClosable = HB_TRUE; pWVT->ResizeMode = HB_GTI_RESIZEMODE_FONT; - pWVT->bResizing = FALSE; - pWVT->bAlreadySizing = FALSE; + pWVT->bResizing = HB_FALSE; + pWVT->bAlreadySizing = HB_FALSE; pWVT->hostCDP = hb_vmCDP(); #if defined( UNICODE ) @@ -459,7 +459,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT ) if( pWVT->CaretExist && !pWVT->CaretHidden ) { HideCaret( pWVT->hWnd ); - pWVT->CaretHidden = TRUE; + pWVT->CaretHidden = HB_TRUE; } } else @@ -479,7 +479,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT ) SetCaretPos( xy.x, pWVT->CaretSize < 0 ? xy.y : xy.y + pWVT->PTEXTSIZE.y - pWVT->CaretSize ); ShowCaret( pWVT->hWnd ); - pWVT->CaretHidden = FALSE; + pWVT->CaretHidden = HB_FALSE; } } } @@ -489,7 +489,7 @@ static void hb_gt_wvt_KillCaret( PHB_GTWVT pWVT ) if( pWVT->CaretExist ) { DestroyCaret(); - pWVT->CaretExist = FALSE; + pWVT->CaretExist = HB_FALSE; } } @@ -518,7 +518,7 @@ static void hb_gt_wvt_AddCharToInputQueue( PHB_GTWVT pWVT, int iKey ) pWVT->keyPointerIn = iPos; } -static BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) +static HB_BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) { if( pWVT->keyPointerOut != pWVT->keyPointerIn ) { @@ -526,11 +526,11 @@ static BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) if( ++pWVT->keyPointerOut >= WVT_CHAR_QUEUE_SIZE ) pWVT->keyPointerOut = 0; - return TRUE; + return HB_TRUE; } *iKey = 0; - return FALSE; + return HB_FALSE; } static void hb_gt_wvt_TranslateKey( PHB_GTWVT pWVT, int key, int shiftkey, int altkey, int controlkey ) @@ -602,8 +602,8 @@ static void hb_gt_wvt_FitRows( PHB_GTWVT pWVT ) if( maxHeight > 0 ) { - BOOL bOldCentre = pWVT->CentreWindow; - pWVT->CentreWindow = pWVT->bMaximized ? TRUE : FALSE; + HB_BOOL bOldCentre = pWVT->CentreWindow; + pWVT->CentreWindow = pWVT->bMaximized ? HB_TRUE : HB_FALSE; HB_GTSELF_SETMODE( pWVT->pGT, ( maxHeight / pWVT->PTEXTSIZE.y ), ( maxWidth / pWVT->PTEXTSIZE.x ) ); pWVT->CentreWindow = bOldCentre; } @@ -702,7 +702,7 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) pWVT->PTEXTSIZE.y = tm.tmHeight; #if defined( HB_OS_WIN_CE ) - pWVT->FixedFont = FALSE; + pWVT->FixedFont = HB_FALSE; #else pWVT->FixedFont = !pWVT->Win9X && pWVT->fontWidth >= 0 && ( tm.tmPitchAndFamily & TMPF_FIXED_PITCH ) == 0 && @@ -745,7 +745,7 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) static void hb_gt_wvt_Maximize( PHB_GTWVT pWVT ) { - pWVT->bMaximized = TRUE; + pWVT->bMaximized = HB_TRUE; if( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT ) hb_gt_wvt_FitSize( pWVT ); @@ -820,7 +820,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT, HFONT hFont ) pWVT->PTEXTSIZE.y = tm.tmHeight; /* but seems to be a problem on Win9X so */ /* assume proportional fonts always for Win9X */ #if defined( HB_OS_WIN_CE ) - pWVT->FixedFont = FALSE; + pWVT->FixedFont = HB_FALSE; #else pWVT->FixedFont = ! pWVT->Win9X && pWVT->fontWidth >= 0 && ( tm.tmPitchAndFamily & TMPF_FIXED_PITCH ) == 0 && @@ -843,7 +843,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT, HFONT hFont ) height += ( int ) ( wi.bottom - wi.top - ci.bottom ); /* Center the window within the CLIENT area on the screen - but only if pWVT->CentreWindow == TRUE */ + but only if pWVT->CentreWindow == HB_TRUE */ if( pWVT->CentreWindow && SystemParametersInfo( SPI_GETWORKAREA, 0, &rcWorkArea, 0 ) ) { wi.left = rcWorkArea.left + ( ( rcWorkArea.right - rcWorkArea.left - width ) / 2 ); @@ -852,7 +852,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT, HFONT hFont ) if( wi.left < 0 || wi.top < 0 ) { - pWVT->bMaximized = TRUE; + pWVT->bMaximized = HB_TRUE; if( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT ) hb_gt_wvt_FitSize( pWVT ); @@ -870,7 +870,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT, HFONT hFont ) height += ( int ) ( wi.bottom - wi.top - ci.bottom ); /* Center the window within the CLIENT area on the screen - but only if pWVT->CentreWindow == TRUE */ + but only if pWVT->CentreWindow == HB_TRUE */ if( pWVT->CentreWindow && SystemParametersInfo( SPI_GETWORKAREA, 0, &rcWorkArea, 0 ) ) { wi.left = rcWorkArea.left + ( ( rcWorkArea.right - rcWorkArea.left - width ) / 2 ); @@ -893,7 +893,7 @@ static void hb_gt_wvt_SetWindowTitle( HWND hWnd, const char * title ) HB_TCHAR_FREE( text ); } -static BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) +static HB_BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) { TCHAR buffer[ WVT_MAX_TITLE_SIZE ]; int iResult; @@ -904,14 +904,14 @@ static BOOL hb_gt_wvt_GetWindowTitle( HWND hWnd, char ** title ) *title = ( char * ) hb_xgrab( iResult + 1 ); HB_TCHAR_GETFROM( *title, buffer, iResult ); ( *title )[ iResult ] = '\0'; - return TRUE; + return HB_TRUE; } *title = NULL; - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_wvt_SetWindowSize( PHB_GTWVT pWVT, int iRows, int iCols ) +static HB_BOOL hb_gt_wvt_SetWindowSize( PHB_GTWVT pWVT, int iRows, int iCols ) { if( HB_GTSELF_RESIZE( pWVT->pGT, iRows, iCols ) ) { @@ -924,15 +924,15 @@ static BOOL hb_gt_wvt_SetWindowSize( PHB_GTWVT pWVT, int iRows, int iCols ) } pWVT->ROWS = iRows; pWVT->COLS = iCols; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_wvt_InitWindow( PHB_GTWVT pWVT, int iRow, int iCol, HFONT hFont ) +static HB_BOOL hb_gt_wvt_InitWindow( PHB_GTWVT pWVT, int iRow, int iCol, HFONT hFont ) { - BOOL fRet = hb_gt_wvt_SetWindowSize( pWVT, iRow, iCol ); + HB_BOOL fRet = hb_gt_wvt_SetWindowSize( pWVT, iRow, iCol ); hb_gt_wvt_ResetWindowSize( pWVT, hFont ); @@ -1003,7 +1003,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { if( pWVT->bBeginMarked ) { - pWVT->bBeingMarked = TRUE; + pWVT->bBeingMarked = HB_TRUE; pWVT->sRectNew.left = xy.x; pWVT->sRectNew.top = xy.y; @@ -1035,8 +1035,8 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { if( pWVT->bBeingMarked ) { - pWVT->bBeginMarked = FALSE; - pWVT->bBeingMarked = FALSE; + pWVT->bBeginMarked = HB_FALSE; + pWVT->bBeingMarked = HB_FALSE; RedrawWindow( pWVT->hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW ); @@ -1199,16 +1199,16 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L hb_gt_wvt_AddCharToInputQueue( pWVT, keyCode ); } -static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPARAM lParam ) +static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPARAM lParam ) { switch( message ) { case WM_KEYDOWN: case WM_SYSKEYDOWN: { - BOOL bAlt = GetKeyState( VK_MENU ) & 0x8000; + HB_BOOL bAlt = GetKeyState( VK_MENU ) & 0x8000; - pWVT->IgnoreWM_SYSCHAR = FALSE; + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; switch( wParam ) { @@ -1283,8 +1283,8 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA break; default: { - BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; - BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000; + HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; + HB_BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000; int iScanCode = HIWORD( lParam ) & 0xFF; if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */ @@ -1300,7 +1300,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA if( bCtrl ) /* Not scroll lock */ { hb_gt_wvt_AddCharToInputQueue( pWVT, HB_BREAK_FLAG ); /* Pretend Alt+C pressed */ - pWVT->IgnoreWM_SYSCHAR = TRUE; + pWVT->IgnoreWM_SYSCHAR = HB_TRUE; } else DefWindowProc( pWVT->hWnd, message, wParam, lParam ); /* Let windows handle ScrollLock */ @@ -1314,7 +1314,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA wParam == VK_SUBTRACT || wParam == VK_DIVIDE ) ) { if( bAlt ) - pWVT->IgnoreWM_SYSCHAR = TRUE; + pWVT->IgnoreWM_SYSCHAR = HB_TRUE; switch( wParam ) { @@ -1339,7 +1339,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA case WM_CHAR: { - BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; + HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000; int iScanCode = HIWORD( lParam ) & 0xFF; int c = ( int ) wParam; @@ -1374,7 +1374,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA if( pWVT->inCDP ) { #if defined( UNICODE ) - c = hb_cdpGetChar( pWVT->inCDP, FALSE, ( USHORT ) c ); + c = hb_cdpGetChar( pWVT->inCDP, HB_FALSE, ( USHORT ) c ); #else if( c > 0 && c <= 255 && pWVT->keyTransTbl[ c ] ) c = pWVT->keyTransTbl[ c ]; @@ -1387,7 +1387,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA } } } - pWVT->IgnoreWM_SYSCHAR = FALSE; /* As Suggested by Peter */ + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; /* As Suggested by Peter */ break; } @@ -1518,7 +1518,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA } hb_gt_wvt_AddCharToInputQueue( pWVT, c ); } - pWVT->IgnoreWM_SYSCHAR = FALSE; + pWVT->IgnoreWM_SYSCHAR = HB_FALSE; } } @@ -1529,7 +1529,7 @@ static BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, LPA * hb_gt_wvt_TextOut converts col and row to x and y ( pixels ) and calls * the Windows function TextOut with the expected coordinates */ -static BOOL hb_gt_wvt_TextOut( PHB_GTWVT pWVT, HDC hdc, int col, int row, int iColor, LPCTSTR lpString, UINT cbString ) +static HB_BOOL hb_gt_wvt_TextOut( PHB_GTWVT pWVT, HDC hdc, int col, int row, int iColor, LPCTSTR lpString, UINT cbString ) { POINT xy; RECT rClip; @@ -1583,7 +1583,7 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT, RECT updateRect ) */ iColor &= 0xff; #if defined( UNICODE ) - usChar = hb_cdpGetU16( bAttr & HB_GT_ATTR_BOX ? pWVT->boxCDP : pWVT->hostCDP, TRUE, ( BYTE ) usChar ); + usChar = hb_cdpGetU16( bAttr & HB_GT_ATTR_BOX ? pWVT->boxCDP : pWVT->hostCDP, HB_TRUE, ( BYTE ) usChar ); if( len == 0 ) { iOldColor = iColor; @@ -1689,7 +1689,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case WM_CLOSE: /* Clicked 'X' on system menu */ if( hb_gt_wvt_FireEvent( pWVT, HB_GTE_CLOSE ) == 0 ) { - PHB_ITEM pItem = hb_itemPutL( NULL, TRUE ); + PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE ); hb_setSetItem( HB_SET_CANCEL, pItem ); hb_itemRelease( pItem ); hb_vmRequestCancel(); @@ -1713,7 +1713,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case WM_ENTERSIZEMOVE: if( pWVT->bMaximized ) { - pWVT->bMaximized = FALSE; + pWVT->bMaximized = HB_FALSE; /* Enable "maximize" button */ @@ -1728,11 +1728,11 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara ShowWindow( pWVT->hWnd, SW_HIDE ); ShowWindow( pWVT->hWnd, SW_NORMAL ); } - pWVT->bResizing = TRUE; + pWVT->bResizing = HB_TRUE; return 0; case WM_EXITSIZEMOVE: - pWVT->bResizing = FALSE; + pWVT->bResizing = HB_FALSE; hb_gt_wvt_FireEvent( pWVT, HB_GTE_RESIZED ); if( pWVT->ResizeMode == HB_GTI_RESIZEMODE_ROWS ) @@ -1744,14 +1744,14 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara { if( ! pWVT->bAlreadySizing ) { - pWVT->bAlreadySizing = TRUE; + pWVT->bAlreadySizing = HB_TRUE; if( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT ) hb_gt_wvt_FitSize( pWVT ); else hb_gt_wvt_FitRows( pWVT ); } - pWVT->bAlreadySizing = FALSE; + pWVT->bAlreadySizing = HB_FALSE; } return 0; @@ -1773,7 +1773,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case SYS_EV_MARK: { - pWVT->bBeginMarked = TRUE; + pWVT->bBeginMarked = HB_TRUE; return 0; } } @@ -1795,7 +1795,7 @@ static WPARAM hb_gt_wvt_ProcessMessages( void ) return msg.wParam; } -static BOOL hb_gt_wvt_ValidWindowSize( HWND hWnd, int rows, int cols, HFONT hFont, int iWidth ) +static HB_BOOL hb_gt_wvt_ValidWindowSize( HWND hWnd, int rows, int cols, HFONT hFont, int iWidth ) { HDC hdc; HFONT hOldFont; @@ -1820,7 +1820,7 @@ static BOOL hb_gt_wvt_ValidWindowSize( HWND hWnd, int rows, int cols, HFONT hFon return ( width <= maxWidth ) && ( height <= maxHeight ); } -static HWND hb_gt_wvt_CreateWindow( HINSTANCE hInstance, BOOL bResizable ) +static HWND hb_gt_wvt_CreateWindow( HINSTANCE hInstance, HB_BOOL bResizable ) { HWND hWnd; LPTSTR szAppName; @@ -1847,7 +1847,7 @@ static HWND hb_gt_wvt_CreateWindow( HINSTANCE hInstance, BOOL bResizable ) return hWnd; } -static BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) +static HB_BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) { if( !pWVT->hWnd ) { @@ -1920,7 +1920,7 @@ static BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) UpdateWindow( pWVT->hWnd ); } - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -1971,10 +1971,10 @@ static void hb_gt_wvt_Exit( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) +static HB_BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol ) { PHB_GTWVT pWVT; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_SetMode(%p,%d,%d)", pGT, iRow, iCol ) ); @@ -2028,7 +2028,7 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask ) { PHB_GTWVT pWVT; int c = 0; - BOOL fKey; + HB_BOOL fKey; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", pGT, iEventMask ) ); @@ -2057,13 +2057,13 @@ static void hb_gt_wvt_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_wvt_mouse_IsPresent( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_wvt_mouse_IsPresent(%p)", pGT)); HB_SYMBOL_UNUSED( pGT ); - return TRUE; + return HB_TRUE; } static void hb_gt_wvt_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) @@ -2077,7 +2077,7 @@ static void hb_gt_wvt_mouse_GetPos( PHB_GT pGT, int * piRow, int * piCol ) *piCol = pWVT->MousePos.x; } -static BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) { HB_TRACE( HB_TR_DEBUG, ("hb_gt_wvt_mouse_ButtonState(%p,%i)", pGT, iButton) ); @@ -2092,7 +2092,7 @@ static BOOL hb_gt_wvt_mouse_ButtonState( PHB_GT pGT, int iButton ) case 2: return ( GetKeyState( VK_MBUTTON ) & 0x8000 ) != 0; } - return FALSE; + return HB_FALSE; } static int hb_gt_wvt_mouse_CountButton( PHB_GT pGT ) @@ -2106,7 +2106,7 @@ static int hb_gt_wvt_mouse_CountButton( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { PHB_GTWVT pWVT; int iVal; @@ -2120,14 +2120,14 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: case HB_GTI_ISGRAPHIC: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_ISUNICODE: #if defined( UNICODE ) - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); #else - pInfo->pResult = hb_itemPutL( pInfo->pResult, FALSE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_FALSE ); #endif break; @@ -2424,7 +2424,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) LPTSTR lpImage; lpImage = HB_TCHAR_CONVTO( hb_itemGetCPtr( pInfo->pNewVal ) ); - pWVT->bIconToFree = TRUE; + pWVT->bIconToFree = HB_TRUE; pWVT->hIcon = ( HICON ) LoadImage( ( HINSTANCE ) NULL, lpImage, IMAGE_ICON, 0, 0, LR_LOADFROMFILE ); HB_TCHAR_FREE( lpImage ); @@ -2449,7 +2449,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) LPTSTR lpIcon; lpIcon = HB_TCHAR_CONVTO( hb_itemGetCPtr( pInfo->pNewVal ) ); - pWVT->bIconToFree = FALSE; + pWVT->bIconToFree = HB_FALSE; pWVT->hIcon = LoadIcon( pWVT->hInstance, lpIcon ); HB_TCHAR_FREE( lpIcon ); @@ -2466,7 +2466,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { HICON hIconToFree = ( pWVT->hIcon && pWVT->bIconToFree ) ? pWVT->hIcon : NULL; - pWVT->bIconToFree = FALSE; + pWVT->bIconToFree = HB_FALSE; pWVT->hIcon = LoadIcon( pWVT->hInstance, MAKEINTRESOURCE( ( HB_LONG ) hb_itemGetNInt( pInfo->pNewVal ) ) ); @@ -2547,8 +2547,8 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( iY > 0 ) { - BOOL bOldCentre = pWVT->CentreWindow; - pWVT->CentreWindow = pWVT->bMaximized ? TRUE : FALSE; + HB_BOOL bOldCentre = pWVT->CentreWindow; + pWVT->CentreWindow = pWVT->bMaximized ? HB_TRUE : HB_FALSE; HB_GTSELF_SETMODE( pGT, ( iY / pWVT->PTEXTSIZE.y ), ( iX / pWVT->PTEXTSIZE.x ) ); pWVT->CentreWindow = bOldCentre; } @@ -2559,7 +2559,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bResizable ); if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bResizable ) { pWVT->bResizable = bNewValue; @@ -2597,7 +2597,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) hb_xfree( pWVT->pszSelectCopy ); pWVT->pszSelectCopy = hb_strdup( hb_osEncodeCP( hb_itemGetCPtr( pInfo->pNewVal ), &pszFreeTitle, NULL ) ); - pWVT->bSelectCopy = TRUE; + pWVT->bSelectCopy = HB_TRUE; if( pszFreeTitle ) hb_xfree( pszFreeTitle ); @@ -2616,7 +2616,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } else if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bSelectCopy ) { if( pWVT->hWnd ) @@ -2638,7 +2638,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bClosable ); if( pInfo->pNewVal ) { - BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); + HB_BOOL bNewValue = hb_itemGetL( pInfo->pNewVal ); if( bNewValue != pWVT->bClosable ) { if( pWVT->hWnd ) @@ -2735,7 +2735,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ @@ -2926,7 +2926,7 @@ static void hb_gt_wvt_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) InvalidateRect( pWVT->hWnd, &rect, FALSE ); } else - pWVT->fInit = TRUE; + pWVT->fInit = HB_TRUE; } } @@ -2956,7 +2956,7 @@ static void hb_gt_wvt_Refresh( PHB_GT pGT ) /* ********************************************************************** */ -static BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox ); @@ -2998,15 +2998,15 @@ static BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char for( i = 0; i < 256; i++ ) { pWVT->chrTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, TRUE, cdpHost, cdpTerm ); + hb_cdpTranslateChar( i, HB_TRUE, cdpHost, cdpTerm ); } } # endif - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) +static HB_BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) { HB_GTSUPER_SETKEYCP( pGT, pszTermCDP, pszHostCDP ); @@ -3042,18 +3042,18 @@ static BOOL hb_gt_wvt_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char for( i = 0; i < 256; i++ ) pWVT->keyTransTbl[ i ] = ( BYTE ) - hb_cdpTranslateChar( i, FALSE, cdpTerm, cdpHost ); + hb_cdpTranslateChar( i, HB_FALSE, cdpTerm, cdpHost ); pWVT->inCDP = cdpTerm; } # endif - return TRUE; + return HB_TRUE; } /* ********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -3076,7 +3076,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->GfxPrimitive = hb_gt_wvt_gfx_Primitive; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtwvt/gtwvt.h b/harbour/src/rtl/gtwvt/gtwvt.h index f1ab57813f..7d50aa8630 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.h +++ b/harbour/src/rtl/gtwvt/gtwvt.h @@ -120,13 +120,13 @@ typedef struct COLORREF COLORS[ 16 ]; /* colors */ - BOOL CaretExist; /* TRUE if a caret has been created */ - BOOL CaretHidden; /* TRUE if a caret has been hiden */ + HB_BOOL CaretExist; /* TRUE if a caret has been created */ + HB_BOOL CaretHidden; /* TRUE if a caret has been hiden */ int CaretSize; /* Height of solid caret */ int CaretWidth; /* Width of solid caret */ POINT MousePos; /* the last mouse position */ - BOOL MouseMove; /* Flag to say whether to return mouse movement events */ + HB_BOOL MouseMove; /* Flag to say whether to return mouse movement events */ int Keys[ WVT_CHAR_QUEUE_SIZE ]; /* Array to hold the characters & events */ int keyPointerIn; /* Offset into key array for character to be placed */ @@ -134,7 +134,7 @@ typedef struct int keyLast; /* last inkey code value in buffer */ POINT PTEXTSIZE; /* size of the fixed width font */ - BOOL FixedFont; /* TRUE if current font is a fixed font */ + HB_BOOL FixedFont; /* TRUE if current font is a fixed font */ int * FixedSize; /* buffer for ExtTextOut() to emulate fixed pitch when Proportional font selected */ int fontHeight; /* requested font height */ int fontWidth; /* requested font width */ @@ -147,7 +147,7 @@ typedef struct #endif HWND hWnd; /* the window handle */ - BOOL fInit; /* logical variable indicating that window should be open */ + HB_BOOL fInit; /* logical variable indicating that window should be open */ PHB_CODEPAGE hostCDP; /* Host/HVM CodePage for unicode output translations */ PHB_CODEPAGE inCDP; /* Host/HVM CodePage for unicode input translations */ @@ -161,33 +161,33 @@ typedef struct #endif HICON hIcon; /* Title Bar and Task List icon. Can be NULL. */ - BOOL bIconToFree; /* Do we need to free this icon when it's not NULL? */ + HB_BOOL bIconToFree; /* Do we need to free this icon when it's not NULL? */ int CodePage; /* Code page to use for display characters */ #if ! defined( UNICODE ) int boxCodePage; /* Code page to use for display draw line characters */ #endif - BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */ - BOOL AltF4Close; /* Can use Alt+F4 to close application */ - BOOL CentreWindow; /* True if window is to be Reset into centre of window */ + HB_BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */ + HB_BOOL AltF4Close; /* Can use Alt+F4 to close application */ + HB_BOOL CentreWindow; /* True if window is to be Reset into centre of window */ - BOOL IgnoreWM_SYSCHAR; + HB_BOOL IgnoreWM_SYSCHAR; - BOOL bMaximized; /* Flag is set when window has been maximized */ - BOOL bBeingMarked; /* Flag to control DOS window like copy operation */ - BOOL bBeginMarked; + HB_BOOL bMaximized; /* Flag is set when window has been maximized */ + HB_BOOL bBeingMarked; /* Flag to control DOS window like copy operation */ + HB_BOOL bBeginMarked; - BOOL bResizable; - BOOL bSelectCopy; + HB_BOOL bResizable; + HB_BOOL bSelectCopy; char * pszSelectCopy; - BOOL bClosable; + HB_BOOL bClosable; int ResizeMode; /* Sets the resizing mode either to FONT or ROWS */ RECT sRectNew; RECT sRectOld; - BOOL bResizing; - BOOL bAlreadySizing; + HB_BOOL bResizing; + HB_BOOL bAlreadySizing; } HB_GTWVT, * PHB_GTWVT; diff --git a/harbour/src/rtl/gtxwc/gtxwc.c b/harbour/src/rtl/gtxwc/gtxwc.c index 3049e773ca..fd388a3b15 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.c +++ b/harbour/src/rtl/gtxwc/gtxwc.c @@ -271,17 +271,17 @@ typedef struct tag_rect typedef struct tag_modifiers { - BOOL bCtrl; - BOOL bAlt; - BOOL bAltGr; - BOOL bShift; + HB_BOOL bCtrl; + HB_BOOL bAlt; + HB_BOOL bAltGr; + HB_BOOL bShift; } MODIFIERS; typedef struct { HB_GT_PIXELTYPE pixel; - int value; - BOOL set; + int value; + HB_BOOL set; } WND_COLORS; typedef struct tag_x_wnddef @@ -299,12 +299,12 @@ typedef struct tag_x_wnddef void (*evt_callback)(void); /* is main window initialized */ - BOOL fInit; + HB_BOOL fInit; /* is anything written to screen */ - BOOL fData; + HB_BOOL fData; /* block recursive refresh calls */ - BOOL fRefresh; + HB_BOOL fRefresh; /* window size in character cells */ USHORT cols; @@ -315,16 +315,16 @@ typedef struct tag_x_wnddef USHORT height; /* Set to true when Windows is resized */ - BOOL fWinResize; + HB_BOOL fWinResize; USHORT newWidth; USHORT newHeight; - BOOL fResizable; - BOOL fClosable; + HB_BOOL fResizable; + HB_BOOL fClosable; /* window title */ char *szTitle; - BOOL fDspTitle; + HB_BOOL fDspTitle; /* used font informations */ XFontStruct *xfs; @@ -336,17 +336,17 @@ typedef struct tag_x_wnddef int fontWidth; /* if font has bad metric then try to fix it and display only single char at cell position at once */ - BOOL fFixMetric; + HB_BOOL fFixMetric; /* if font has bad size and doesn't clear background cell we can try to fix it and clear background drawing rectangle before displaying font */ - BOOL fClearBkg; - /* if TRUE then BOX characters will be drawn by GTXWC instead of + HB_BOOL fClearBkg; + /* if HB_TRUE then BOX characters will be drawn by GTXWC instead of using build in font ones */ - BOOL fDrawBox; + HB_BOOL fDrawBox; /* locale set to UTF-8 */ - BOOL fUTF8; + HB_BOOL fUTF8; /* CodePage support */ PHB_CODEPAGE hostCDP; /* PHB_CODEPAGE outCDP; */ @@ -364,7 +364,7 @@ typedef struct tag_x_wnddef int lastCursorRow; int lastCursorType; - BOOL cursorState; + HB_BOOL cursorState; ULONG cursorBlinkRate; ULONG cursorStateTime; @@ -384,10 +384,10 @@ typedef struct tag_x_wnddef /* character translation table, it changes characters in screen buffer into UNICODE or graphs primitives */ XWC_CharTrans charTrans[256]; - BOOL fInvalidChr; + HB_BOOL fInvalidChr; XWC_RECT rInvalidChr; - BOOL fInvalidPts; + HB_BOOL fInvalidPts; XWC_RECT rInvalidPts; /* Keyboard buffer */ @@ -401,8 +401,8 @@ typedef struct tag_x_wnddef ULONG ClipboardSize; Atom ClipboardRequest; Time ClipboardTime; - BOOL ClipboardOwner; - BOOL ClipboardRcvd; + HB_BOOL ClipboardOwner; + HB_BOOL ClipboardRcvd; /* Clipping */ XRectangle ClipRect; @@ -421,7 +421,7 @@ static void hb_gt_xwc_InvalidateChar( PXWND_DEF wnd, int left, int top, int righ /************************ globals ********************************/ static PXWND_DEF s_wnd = NULL; -static BOOL s_fNoXServer = FALSE; +static HB_BOOL s_fNoXServer = HB_FALSE; #if 1 static int s_updateMode = XWC_SYNC_UPDATE; @@ -430,7 +430,7 @@ static int s_updateMode = XWC_ASYNC_UPDATE; #endif static int s_iUpdateCounter; -static BOOL s_fIgnoreErrors = FALSE; +static HB_BOOL s_fIgnoreErrors = HB_FALSE; /* *********************************************************************** */ @@ -444,7 +444,7 @@ static int s_errorHandler( Display *dpy, XErrorEvent *e ) if( !s_fIgnoreErrors ) { - s_fNoXServer = TRUE; + s_fNoXServer = HB_TRUE; hb_errInternal( 10001, errorText, NULL, NULL ); } @@ -504,14 +504,14 @@ static void hb_gt_xwc_Enable( void ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans *bxCh ) +static HB_BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans *bxCh ) { XSegment segs[9]; XPoint pts[XWC_MAX_CHAR_POINTS]; XRectangle rect[4]; XWC_CharType type = CH_CHAR; int size = 0; - BOOL inverse = FALSE; + HB_BOOL inverse = HB_FALSE; int cellx = wnd->fontWidth; int celly = wnd->fontHeight; @@ -540,7 +540,7 @@ static BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans * { skip = 4; start = mod = 0; - inverse = TRUE; + inverse = HB_TRUE; } xx = yy = 0; for( y = 0; y < celly; y++ ) @@ -615,12 +615,12 @@ static BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans * break; case HB_GTXVG_FULL: - inverse = TRUE; + inverse = HB_TRUE; type = CH_NONE; break; case HB_GTXVG_FULL_B: - inverse = TRUE; + inverse = HB_TRUE; case HB_GTXVG_FULL_T: rect[0].x = 0; rect[0].y = 0; @@ -631,7 +631,7 @@ static BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans * break; case HB_GTXVG_FULL_R: - inverse = TRUE; + inverse = HB_TRUE; case HB_GTXVG_FULL_L: rect[0].x = 0; rect[0].y = 0; @@ -1497,9 +1497,9 @@ static BOOL hb_gt_xwc_DefineBoxChar( PXWND_DEF wnd, USHORT usCh, XWC_CharTrans * default: break; } - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ @@ -1544,12 +1544,12 @@ static void hb_gt_xwc_BuildCharTrans( PXWND_DEF wnd ) for( i = 0; i < 256; i++ ) { - usCh16 = hb_cdpGetU16( wnd->hostCDP, TRUE, ( unsigned char ) i ); + usCh16 = hb_cdpGetU16( wnd->hostCDP, HB_TRUE, ( unsigned char ) i ); wnd->charTrans[ i ].type = CH_CHAR; wnd->charTrans[ i ].u.ch16 = usCh16; wnd->charTrans[ i ].size = 0; - wnd->charTrans[ i ].inverse = FALSE; + wnd->charTrans[ i ].inverse = HB_FALSE; if( wnd->fDrawBox ) { hb_gt_xwc_DefineBoxChar( wnd, usCh16, &wnd->charTrans[ i ] ); @@ -1595,7 +1595,7 @@ static void hb_gt_xwc_AddCharToInputQueue( PXWND_DEF wnd, int keyCode ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_GetCharFromInputQueue( PXWND_DEF wnd, int *keyCode ) +static HB_BOOL hb_gt_xwc_GetCharFromInputQueue( PXWND_DEF wnd, int *keyCode ) { *keyCode = 0; if( wnd->keyBuffNO > 0 ) @@ -1607,9 +1607,9 @@ static BOOL hb_gt_xwc_GetCharFromInputQueue( PXWND_DEF wnd, int *keyCode ) } *keyCode = wnd->KeyBuff[ index ]; wnd->keyBuffNO--; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ @@ -1691,22 +1691,22 @@ static void hb_gt_xwc_ProcessKey( PXWND_DEF wnd, XKeyEvent *evt) /* First of all, let's scan for special codes */ case XK_Shift_L: case XK_Shift_R: - wnd->keyModifiers.bShift = TRUE; + wnd->keyModifiers.bShift = HB_TRUE; return; case XK_Control_L: case XK_Control_R: - wnd->keyModifiers.bCtrl = TRUE; + wnd->keyModifiers.bCtrl = HB_TRUE; return; case XK_Meta_L: case XK_Alt_L: - wnd->keyModifiers.bAlt = TRUE; + wnd->keyModifiers.bAlt = HB_TRUE; return; case XK_Meta_R: case XK_Alt_R: - wnd->keyModifiers.bAltGr = TRUE; + wnd->keyModifiers.bAltGr = HB_TRUE; return; /* Then we scan for movement */ @@ -1828,7 +1828,7 @@ static void hb_gt_xwc_ProcessKey( PXWND_DEF wnd, XKeyEvent *evt) /* hack for euro sign */ else if( outISO == 0x20ac ) { - ikey = hb_cdpGetChar( wnd->hostCDP, FALSE, ( HB_WCHAR ) outISO ); + ikey = hb_cdpGetChar( wnd->hostCDP, HB_FALSE, ( HB_WCHAR ) outISO ); hb_gt_xwc_AddCharToInputQueue( wnd, ikey ); return; } @@ -1965,19 +1965,19 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) { /* First of all, let's scan for special codes */ case XK_Shift_L: case XK_Shift_R: - wnd->keyModifiers.bShift = FALSE; + wnd->keyModifiers.bShift = HB_FALSE; return; case XK_Control_L: case XK_Control_R: - wnd->keyModifiers.bCtrl = FALSE; + wnd->keyModifiers.bCtrl = HB_FALSE; return; case XK_Meta_L: case XK_Alt_L: - wnd->keyModifiers.bAlt = FALSE; + wnd->keyModifiers.bAlt = HB_FALSE; return; case XK_Meta_R: case XK_Alt_R: - wnd->keyModifiers.bAltGr = FALSE; + wnd->keyModifiers.bAltGr = HB_FALSE; return; } break; @@ -2064,7 +2064,7 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) wnd->keyModifiers.bCtrl = wnd->keyModifiers.bAlt = wnd->keyModifiers.bAltGr = - wnd->keyModifiers.bShift = FALSE; + wnd->keyModifiers.bShift = HB_FALSE; break; case FocusOut: @@ -2079,7 +2079,7 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) #endif wnd->newWidth = evt->xconfigure.width; wnd->newHeight = evt->xconfigure.height; - wnd->fWinResize = TRUE; + wnd->fWinResize = HB_TRUE; break; case ClientMessage: @@ -2134,7 +2134,7 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) hb_cdpnDup( ( const char * ) text.value, &wnd->ClipboardSize, wnd->utf8CDP, wnd->hostCDP ); wnd->ClipboardTime = evt->xselection.time; - wnd->ClipboardRcvd = TRUE; + wnd->ClipboardRcvd = HB_TRUE; } else if( evt->xselection.target == s_atomString && text.format == 8 ) { @@ -2149,7 +2149,7 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) hb_cdpnDup( ( const char * ) text.value, &wnd->ClipboardSize, wnd->inCDP, wnd->hostCDP ); wnd->ClipboardTime = evt->xselection.time; - wnd->ClipboardRcvd = TRUE; + wnd->ClipboardRcvd = HB_TRUE; } else if( evt->xselection.target == s_atomTargets && text.format == 32 ) { @@ -2272,7 +2272,7 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) #ifdef XWC_DEBUG printf( "Event: SelectionClear\r\n" ); fflush(stdout); #endif - wnd->ClipboardOwner = FALSE; + wnd->ClipboardOwner = HB_FALSE; break; case PropertyNotify: @@ -2319,15 +2319,15 @@ static int hb_gt_xwc_GetColormapSize( PXWND_DEF wnd ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_AllocColor( PXWND_DEF wnd, XColor *pColor ) +static HB_BOOL hb_gt_xwc_AllocColor( PXWND_DEF wnd, XColor *pColor ) { - BOOL fOK = FALSE; + HB_BOOL fOK = HB_FALSE; int iCMapSize; if( XAllocColor( wnd->dpy, wnd->colorsmap, pColor ) != 0 ) { /* the exact color allocated */ - fOK = TRUE; + fOK = HB_TRUE; } else if( ( iCMapSize = hb_gt_xwc_GetColormapSize( wnd ) ) > 0 ) { @@ -2347,7 +2347,7 @@ static BOOL hb_gt_xwc_AllocColor( PXWND_DEF wnd, XColor *pColor ) for( i = 0; i < iCMapSize; i++ ) { colorTable[i].pixel = (HB_GT_PIXELTYPE) i; - checkTable[i] = FALSE; + checkTable[i] = HB_FALSE; } XQueryColors ( wnd->dpy, wnd->colorsmap, colorTable, iCMapSize ); @@ -2393,10 +2393,10 @@ static BOOL hb_gt_xwc_AllocColor( PXWND_DEF wnd, XColor *pColor ) if( XAllocColor( wnd->dpy, wnd->colorsmap, &colorTable[iClosestColor] ) != 0 ) { *pColor = colorTable[iClosestColor]; - fOK = TRUE; + fOK = HB_TRUE; break; } - checkTable[iClosestColor] = TRUE; + checkTable[iClosestColor] = HB_TRUE; } } while( iClosestColor > 0 ); @@ -2410,11 +2410,11 @@ static BOOL hb_gt_xwc_AllocColor( PXWND_DEF wnd, XColor *pColor ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_setPalette( PXWND_DEF wnd ) +static HB_BOOL hb_gt_xwc_setPalette( PXWND_DEF wnd ) { char rgb_color[13]; XColor color, dummy; - BOOL fSet = FALSE; + HB_BOOL fSet = HB_FALSE; int i; /* Set standard colors */ @@ -2440,7 +2440,7 @@ static BOOL hb_gt_xwc_setPalette( PXWND_DEF wnd ) #endif } } - fSet = wnd->colors[i].set = TRUE; + fSet = wnd->colors[i].set = HB_TRUE; } } return fSet; @@ -2682,7 +2682,7 @@ static void hb_gt_xwc_RestoreArea( PXWND_DEF wnd, static void hb_gt_xwc_InvalidateChar( PXWND_DEF wnd, int left, int top, int right, int bottom ) { - if( wnd->fInvalidChr == FALSE ) + if( wnd->fInvalidChr == HB_FALSE ) { wnd->rInvalidChr.top = top; wnd->rInvalidChr.left = left; @@ -2702,7 +2702,7 @@ static void hb_gt_xwc_InvalidateChar( PXWND_DEF wnd, * to make sure that screen will be updated (sometimes maybe twice but * it shouldn't hurt us) */ - wnd->fInvalidChr = TRUE; + wnd->fInvalidChr = HB_TRUE; } /* *********************************************************************** */ @@ -2724,7 +2724,7 @@ static void hb_gt_xwc_InvalidatePts( PXWND_DEF wnd, if( wnd->rInvalidPts.right < right ) wnd->rInvalidPts.right = right; if( wnd->rInvalidPts.bottom < bottom ) wnd->rInvalidPts.bottom = bottom; } - wnd->fInvalidPts = TRUE; + wnd->fInvalidPts = HB_TRUE; } /* *********************************************************************** */ @@ -2810,7 +2810,7 @@ static void hb_gt_xwc_UpdatePts( PXWND_DEF wnd ) top = wnd->rInvalidPts.top; right = wnd->rInvalidPts.right; bottom = wnd->rInvalidPts.bottom; - wnd->fInvalidPts = FALSE; + wnd->fInvalidPts = HB_FALSE; XCopyArea( wnd->dpy, wnd->pm, wnd->window, wnd->gc, left, top, right - left + 1, bottom - top + 1, left, top ); @@ -2839,7 +2839,7 @@ static void hb_gt_xwc_UpdateChr( PXWND_DEF wnd ) top = wnd->rInvalidChr.top; right = wnd->rInvalidChr.right; bottom = wnd->rInvalidChr.bottom; - wnd->fInvalidChr = FALSE; + wnd->fInvalidChr = HB_FALSE; hb_gt_xwc_RepaintChar( wnd, left, top, right, bottom ); @@ -2861,7 +2861,7 @@ static void hb_gt_xwc_UpdateSize( PXWND_DEF wnd ) int iRows = wnd->newHeight / wnd->fontHeight, iCols = wnd->newWidth / wnd->fontWidth; - wnd->fWinResize = FALSE; + wnd->fWinResize = HB_FALSE; if( iRows != wnd->rows || iCols != wnd->cols ) { if( HB_GTSELF_SETMODE( wnd->pGT, iRows, iCols ) ) @@ -2887,7 +2887,7 @@ static void hb_gt_xwc_ProcessMessages( PXWND_DEF wnd ) { if( wnd->cursorBlinkRate == 0 ) { - wnd->cursorState = TRUE; + wnd->cursorState = HB_TRUE; } else { @@ -2907,7 +2907,7 @@ static void hb_gt_xwc_ProcessMessages( PXWND_DEF wnd ) if( wnd->fDspTitle ) { - wnd->fDspTitle = FALSE; + wnd->fDspTitle = HB_FALSE; if( wnd->szTitle ) { XTextProperty text; @@ -2942,15 +2942,15 @@ static void hb_gt_xwc_ProcessMessages( PXWND_DEF wnd ) #else { - BOOL fRepeat; + HB_BOOL fRepeat; do { XEvent evt; - fRepeat = FALSE; + fRepeat = HB_FALSE; while( XCheckWindowEvent( wnd->dpy, wnd->window, XWC_STD_MASK, &evt ) ) { hb_gt_xwc_WndProc( wnd, &evt ); - fRepeat = TRUE; + fRepeat = HB_TRUE; } hb_gt_xwc_UpdateSize( wnd ); hb_gt_xwc_UpdatePts( wnd ); @@ -2989,7 +2989,7 @@ static void hb_gt_xwc_SetScrBuff( PXWND_DEF wnd, USHORT cols, USHORT rows ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_Resize( PXWND_DEF wnd, USHORT cols, USHORT rows ) +static HB_BOOL hb_gt_xwc_Resize( PXWND_DEF wnd, USHORT cols, USHORT rows ) { if( rows <= XWC_MAX_ROWS && cols <= XWC_MAX_COLS ) { @@ -3017,15 +3017,15 @@ static BOOL hb_gt_xwc_Resize( PXWND_DEF wnd, USHORT cols, USHORT rows ) } } - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ -static BOOL hb_gt_xwc_SetFont( PXWND_DEF wnd, const char *fontFace, +static HB_BOOL hb_gt_xwc_SetFont( PXWND_DEF wnd, const char *fontFace, const char *weight, int size, const char *encoding ) { @@ -3045,7 +3045,7 @@ static BOOL hb_gt_xwc_SetFont( PXWND_DEF wnd, const char *fontFace, xfs = XLoadQueryFont( wnd->dpy, fontString ); if( xfs == NULL ) - return FALSE; + return HB_FALSE; if( wnd->szFontSel ) hb_xfree( wnd->szFontSel ); @@ -3056,7 +3056,7 @@ static BOOL hb_gt_xwc_SetFont( PXWND_DEF wnd, const char *fontFace, wnd->fontWidth = xfs->max_bounds.rbearing - xfs->min_bounds.lbearing; wnd->xfs = xfs; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ @@ -3067,7 +3067,7 @@ static void hb_gt_xwc_ClearSelection( PXWND_DEF wnd ) { XSetSelectionOwner( wnd->dpy, s_atomPrimary, None, wnd->ClipboardTime ); XSetSelectionOwner( wnd->dpy, s_atomClipboard, None, wnd->ClipboardTime ); - wnd->ClipboardOwner = FALSE; + wnd->ClipboardOwner = HB_FALSE; } } @@ -3087,14 +3087,14 @@ static void hb_gt_xwc_SetSelection( PXWND_DEF wnd, const char *szData, ULONG ulS wnd->ClipboardData[ ulSize ] = '\0'; wnd->ClipboardSize = ulSize; wnd->ClipboardTime = wnd->lastEventTime; - wnd->ClipboardOwner = FALSE; + wnd->ClipboardOwner = HB_FALSE; if( ulSize > 0 ) { XSetSelectionOwner( wnd->dpy, s_atomPrimary, wnd->window, wnd->ClipboardTime ); if( XGetSelectionOwner( wnd->dpy, s_atomPrimary ) == wnd->window ) { - wnd->ClipboardOwner = TRUE; + wnd->ClipboardOwner = HB_TRUE; XSetSelectionOwner( wnd->dpy, s_atomClipboard, wnd->window, wnd->ClipboardTime ); } else @@ -3118,7 +3118,7 @@ static void hb_gt_xwc_RequestSelection( PXWND_DEF wnd ) ULONG ulCurrentTime = hb_gt_xwc_CurrentTime(); int iConnFD = ConnectionNumber( wnd->dpy ); - wnd->ClipboardRcvd = FALSE; + wnd->ClipboardRcvd = HB_FALSE; wnd->ClipboardRequest = s_atomTargets; aRequest = None; @@ -3181,9 +3181,9 @@ static void hb_gt_xwc_RequestSelection( PXWND_DEF wnd ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_isUTF8( void ) +static HB_BOOL hb_gt_xwc_isUTF8( void ) { - BOOL fUTF8 = FALSE; + HB_BOOL fUTF8 = HB_FALSE; const char * szLang = getenv( "LANG" ); if( szLang ) @@ -3214,11 +3214,11 @@ static PXWND_DEF hb_gt_xwc_CreateWndDef( PHB_GT pGT ) wnd->pGT = pGT; wnd->dpy = NULL; - wnd->fInit = wnd->fData = FALSE; + wnd->fInit = wnd->fData = HB_FALSE; hb_gt_xwc_SetScrBuff( wnd, XWC_DEFAULT_COLS, XWC_DEFAULT_ROWS ); - wnd->fResizable = TRUE; - wnd->fClosable = TRUE; - wnd->fWinResize = FALSE; + wnd->fResizable = HB_TRUE; + wnd->fClosable = HB_TRUE; + wnd->fWinResize = HB_FALSE; wnd->fUTF8 = hb_gt_xwc_isUTF8(); wnd->hostCDP = hb_vmCDP(); wnd->utf8CDP = hb_cdpFindExt( "UTF8" ); @@ -3228,7 +3228,7 @@ static PXWND_DEF hb_gt_xwc_CreateWndDef( PHB_GT pGT ) /* Window Title */ pFileName = hb_fsFNameSplit( hb_cmdargARGV()[0] ); wnd->szTitle = hb_strdup( pFileName->szName ); - wnd->fDspTitle = TRUE; + wnd->fDspTitle = HB_TRUE; hb_xfree( pFileName ); /* Font parameters */ @@ -3245,10 +3245,10 @@ static PXWND_DEF hb_gt_xwc_CreateWndDef( PHB_GT pGT ) /* Clear keyboard buffer */ wnd->keyBuffNO = 0; wnd->keyBuffPointer = 0; - wnd->keyModifiers.bCtrl = FALSE; - wnd->keyModifiers.bAlt = FALSE; - wnd->keyModifiers.bAltGr = FALSE; - wnd->keyModifiers.bShift = FALSE; + wnd->keyModifiers.bCtrl = HB_FALSE; + wnd->keyModifiers.bAlt = HB_FALSE; + wnd->keyModifiers.bAltGr = HB_FALSE; + wnd->keyModifiers.bShift = HB_FALSE; for( i = 0; i < 16; i++ ) wnd->colors[ i ].value = s_rgb_values[ i ]; @@ -3260,10 +3260,10 @@ static PXWND_DEF hb_gt_xwc_CreateWndDef( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_ConnectX( PXWND_DEF wnd, BOOL fExit ) +static HB_BOOL hb_gt_xwc_ConnectX( PXWND_DEF wnd, HB_BOOL fExit ) { if( wnd->dpy != NULL ) - return TRUE; + return HB_TRUE; HB_XWC_XLIB_LOCK @@ -3279,10 +3279,10 @@ static BOOL hb_gt_xwc_ConnectX( PXWND_DEF wnd, BOOL fExit ) it can run without console! hb_errRT_TERM( EG_CREATE, 10001, NULL, "Can't connect to X server", 0, 0 ); */ - s_fNoXServer = TRUE; + s_fNoXServer = HB_TRUE; hb_errInternal( 10001, "Can't connect to X server.", NULL, NULL ); } - return FALSE; + return HB_FALSE; } XSetErrorHandler( s_errorHandler ); hb_gt_xwc_MouseInit( wnd ); @@ -3304,7 +3304,7 @@ static BOOL hb_gt_xwc_ConnectX( PXWND_DEF wnd, BOOL fExit ) HB_XWC_XLIB_UNLOCK - return TRUE; + return HB_TRUE; } static void hb_gt_xwc_DissConnectX( PXWND_DEF wnd ) @@ -3346,7 +3346,7 @@ static void hb_gt_xwc_DissConnectX( PXWND_DEF wnd ) * in heavy stres MT tests that it can receive some events bound with * destroyed objects and executes our error handler. */ - s_fIgnoreErrors = TRUE; + s_fIgnoreErrors = HB_TRUE; } HB_XWC_XLIB_UNLOCK @@ -3427,7 +3427,7 @@ static void hb_gt_xwc_CreateWindow( PXWND_DEF wnd ) hb_errRT_TERM( EG_CREATE, 10001, NULL, "Can't load 'fixed' font", 0, 0 ); return; */ - s_fNoXServer = TRUE; + s_fNoXServer = HB_TRUE; hb_errInternal( 10001, "Can't load 'fixed' font", NULL, NULL ); } } @@ -3459,7 +3459,7 @@ static void hb_gt_xwc_CreateWindow( PXWND_DEF wnd ) XSetFont( wnd->dpy, wnd->gc, wnd->xfs->fid ); - /* wnd->fWinResize = TRUE; */ + /* wnd->fWinResize = HB_TRUE; */ hb_gt_xwc_Resize( wnd, wnd->cols, wnd->rows ); XMapWindow( wnd->dpy, wnd->window ); @@ -3484,10 +3484,10 @@ static void hb_gt_xwc_Initialize( PXWND_DEF wnd ) { if( !wnd->fInit ) { - if( hb_gt_xwc_ConnectX( wnd, TRUE ) ) + if( hb_gt_xwc_ConnectX( wnd, HB_TRUE ) ) { hb_gt_xwc_CreateWindow( wnd ); - wnd->fInit = TRUE; + wnd->fInit = HB_TRUE; hb_gt_xwc_Enable(); } } @@ -3503,9 +3503,9 @@ static void hb_gt_xwc_RealRefresh( PXWND_DEF wnd ) if( s_updateMode == XWC_SYNC_UPDATE && !wnd->fRefresh ) { - wnd->fRefresh = TRUE; + wnd->fRefresh = HB_TRUE; hb_gt_xwc_ProcessMessages( wnd ); - wnd->fRefresh = FALSE; + wnd->fRefresh = HB_FALSE; } } @@ -3547,7 +3547,7 @@ static void hb_gt_xwc_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil /* for signal handler */ s_wnd = wnd; - wnd->cursorState = TRUE; + wnd->cursorState = HB_TRUE; wnd->cursorBlinkRate = 350; wnd->cursorStateTime = 0; @@ -3558,7 +3558,7 @@ static void hb_gt_xwc_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil /* hb_gt_xwc_Initialize( wnd ); */ /* For connection to XSarver only */ - /* hb_gt_xwc_ConnectX( wnd, TRUE ); */ + /* hb_gt_xwc_ConnectX( wnd, HB_TRUE ); */ } /* *********************************************************************** */ @@ -3582,9 +3582,9 @@ static void hb_gt_xwc_Exit( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_SetMode( PHB_GT pGT, int iRow, int iCol ) +static HB_BOOL hb_gt_xwc_SetMode( PHB_GT pGT, int iRow, int iCol ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("hb_gt_xwc_SetMode(%p,%d,%d)", pGT, iRow, iCol)); @@ -3595,13 +3595,13 @@ static BOOL hb_gt_xwc_SetMode( PHB_GT pGT, int iRow, int iCol ) if( iCol == wnd->cols && iRow == wnd->rows ) { - fResult = TRUE; + fResult = HB_TRUE; HB_GTSELF_RESIZE( pGT, wnd->rows, wnd->cols ); } else if( !wnd->fInit ) { hb_gt_xwc_SetScrBuff( wnd, iCol, iRow ); - fResult = TRUE; + fResult = HB_TRUE; } else { @@ -3620,13 +3620,13 @@ static BOOL hb_gt_xwc_SetMode( PHB_GT pGT, int iRow, int iCol ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_GetBlink( PHB_GT pGT ) +static HB_BOOL hb_gt_xwc_GetBlink( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xwc_GetBlink(%p)", pGT)); HB_SYMBOL_UNUSED( pGT ); - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ @@ -3693,7 +3693,7 @@ static void hb_gt_xwc_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_mouse_IsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_xwc_mouse_IsPresent( PHB_GT pGT ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xwc_mouse_IsPresent(%p)", pGT)); @@ -3733,7 +3733,7 @@ static void hb_gt_xwc_mouse_SetPos( PHB_GT pGT, int iRow, int iCol ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_mouse_ButtonState( PHB_GT pGT,int iButton ) +static HB_BOOL hb_gt_xwc_mouse_ButtonState( PHB_GT pGT,int iButton ) { PXWND_DEF wnd; @@ -3743,7 +3743,7 @@ static BOOL hb_gt_xwc_mouse_ButtonState( PHB_GT pGT,int iButton ) if( iButton >= 0 && iButton < wnd->mouseNumButtons ) return ( wnd->mouseButtonsState & 1 << iButton ) != 0; else - return FALSE; + return HB_FALSE; } /* *********************************************************************** */ @@ -3762,7 +3762,7 @@ static int hb_gt_xwc_mouse_CountButton( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_xwc_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_xwc_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox ); @@ -3793,12 +3793,12 @@ static BOOL hb_gt_xwc_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char } } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ -static BOOL hb_gt_xwc_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) +static HB_BOOL hb_gt_xwc_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) { HB_GTSUPER_SETKEYCP( pGT, pszTermCDP, pszHostCDP ); @@ -3823,7 +3823,7 @@ static BOOL hb_gt_xwc_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char } } - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ @@ -3839,7 +3839,7 @@ static int hb_gt_xwc_getKbdState( PXWND_DEF wnd ) return iKbdState; } -static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { PXWND_DEF wnd; int iVal; @@ -3855,7 +3855,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_KBDSUPPORT: case HB_GTI_ISGRAPHIC: case HB_GTI_FONTSEL: - hb_gt_xwc_ConnectX( wnd, FALSE ); + hb_gt_xwc_ConnectX( wnd, HB_FALSE ); break; case HB_GTI_INPUTFD: @@ -3866,7 +3866,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_DESKTOPCOLS: case HB_GTI_DESKTOPROWS: case HB_GTI_CLIPBOARDDATA: - hb_gt_xwc_ConnectX( wnd, TRUE ); + hb_gt_xwc_ConnectX( wnd, HB_TRUE ); break; } } @@ -3880,7 +3880,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) break; case HB_GTI_ISUNICODE: - pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_TRUE ); break; case HB_GTI_INPUTFD: @@ -3978,7 +3978,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) else wnd->szTitle = NULL; - wnd->fDspTitle = TRUE; + wnd->fDspTitle = HB_TRUE; } break; @@ -4056,7 +4056,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( iColor != wnd->colors[ iVal ].value ) { wnd->colors[ iVal ].value = iColor; - wnd->colors[ iVal ].set = FALSE; + wnd->colors[ iVal ].set = HB_FALSE; if( wnd->dpy && hb_gt_xwc_setPalette( wnd ) ) { memset( wnd->pCurrScr, 0xFFFFFFFFL, wnd->cols * wnd->rows * sizeof( ULONG ) ); @@ -4082,7 +4082,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( iColor != wnd->colors[ iVal ].value ) { wnd->colors[ iVal ].value = iColor; - wnd->colors[ iVal ].set = FALSE; + wnd->colors[ iVal ].set = HB_FALSE; } } if( wnd->dpy && hb_gt_xwc_setPalette( wnd ) ) @@ -4098,7 +4098,7 @@ static BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) return HB_GTSUPER_INFO( pGT, iType, pInfo ); } - return TRUE; + return HB_TRUE; } static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, int iBottom, int iRight, int iColor ) @@ -4300,14 +4300,14 @@ static void hb_gt_xwc_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) break; if( iColor != iDefColor || usChar != ' ' ) { - wnd->fData = TRUE; + wnd->fData = HB_TRUE; break; } } } #else else - wnd->fData = TRUE; + wnd->fData = HB_TRUE; #endif } } @@ -4334,7 +4334,7 @@ static void hb_gt_xwc_Refresh( PHB_GT pGT ) /* *********************************************************************** */ -static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) +static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_FuncInit(%p)", pFuncTable)); @@ -4360,7 +4360,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable ) pFuncTable->GfxPrimitive = hb_gt_xwc_gfx_Primitive; - return TRUE; + return HB_TRUE; } /* *********************************************************************** */ diff --git a/harbour/src/rtl/gtxwc/gtxwc.h b/harbour/src/rtl/gtxwc/gtxwc.h index 91d08e569f..ece5c39a81 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.h +++ b/harbour/src/rtl/gtxwc/gtxwc.h @@ -115,9 +115,9 @@ typedef USHORT HB_GT_CELLTYPE; #define XWC_DEFAULT_FONT_ENCODING "iso10646-1" */ -#define XWC_DEFAULT_FONT_FIXMETRIC FALSE -#define XWC_DEFAULT_FONT_CLRBKG FALSE -#define XWC_DEFAULT_FONT_DRAWBOX TRUE +#define XWC_DEFAULT_FONT_FIXMETRIC HB_FALSE +#define XWC_DEFAULT_FONT_CLRBKG HB_FALSE +#define XWC_DEFAULT_FONT_DRAWBOX HB_TRUE #define XWC_SYNC_UPDATE 0 @@ -282,8 +282,8 @@ typedef struct tag_XWC_CharTrans XRectangle *rect; USHORT ch16; } u; - BYTE size; - BOOL inverse; + BYTE size; + HB_BOOL inverse; } XWC_CharTrans; #endif diff --git a/harbour/src/rtl/hbbffnc.c b/harbour/src/rtl/hbbffnc.c index 63b62e9433..f6df43dae5 100644 --- a/harbour/src/rtl/hbbffnc.c +++ b/harbour/src/rtl/hbbffnc.c @@ -82,7 +82,7 @@ HB_FUNC( HB_BLOWFISHENCRYPT ) { char * pszData; HB_BLOWFISH * bf = ( HB_BLOWFISH * ) hb_parc( 1 ); - BOOL fRaw = hb_parl( 3 ); + HB_BOOL fRaw = hb_parl( 3 ); /* In raw mode passed string is padded to 8 bytes with '\0' * otherwise ANSI X.923 padding is using @@ -126,7 +126,7 @@ HB_FUNC( HB_BLOWFISHDECRYPT ) const char * pszSource; char * pszData; HB_BLOWFISH * bf = ( HB_BLOWFISH * ) hb_parc( 1 ); - BOOL fRaw = hb_parl( 3 ); + HB_BOOL fRaw = hb_parl( 3 ); pszData = ( char * ) hb_xgrab( ulSize + ( fRaw ? 1 : 0 ) ); pszSource = hb_itemGetCPtr( pData ); diff --git a/harbour/src/rtl/hbbit.c b/harbour/src/rtl/hbbit.c index b420439bc7..2c8cc40e89 100644 --- a/harbour/src/rtl/hbbit.c +++ b/harbour/src/rtl/hbbit.c @@ -60,16 +60,16 @@ to update the references in the compiler as well. [vszakats] */ -static BOOL hb_numParam( int iParam, HB_LONG * plNum ) +static HB_BOOL hb_numParam( int iParam, HB_LONG * plNum ) { if( HB_ISNUM( iParam ) ) { *plNum = hb_parnint( iParam ); - return TRUE; + return HB_TRUE; } hb_errRT_BASE_SubstR( EG_ARG, 1089, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); *plNum = 0; - return FALSE; + return HB_FALSE; } HB_FUNC( HB_BITAND ) diff --git a/harbour/src/rtl/hbbyte.c b/harbour/src/rtl/hbbyte.c index 6b436eb1da..efcce13964 100644 --- a/harbour/src/rtl/hbbyte.c +++ b/harbour/src/rtl/hbbyte.c @@ -53,16 +53,16 @@ #include "hbapi.h" #include "hbapierr.h" -static BOOL hb_numParam( int iParam, HB_LONG * plNum ) +static HB_BOOL hb_numParam( int iParam, HB_LONG * plNum ) { if( HB_ISNUM( iParam ) ) { *plNum = hb_parnint( iParam ); - return TRUE; + return HB_TRUE; } hb_errRT_BASE_SubstR( EG_ARG, 1089, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); *plNum = 0; - return FALSE; + return HB_FALSE; } HB_FUNC( HB_BYTESWAPI ) diff --git a/harbour/src/rtl/hbfeof.c b/harbour/src/rtl/hbfeof.c index 6e8a0906ec..8103a69e4b 100644 --- a/harbour/src/rtl/hbfeof.c +++ b/harbour/src/rtl/hbfeof.c @@ -63,7 +63,7 @@ HB_FUNC( HB_FEOF ) uiError = hb_fsError(); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); hb_fsSetFError( uiError ); } diff --git a/harbour/src/rtl/hbgtcore.c b/harbour/src/rtl/hbgtcore.c index 16ec50dc6a..4d9c1ddd14 100644 --- a/harbour/src/rtl/hbgtcore.c +++ b/harbour/src/rtl/hbgtcore.c @@ -88,11 +88,11 @@ void hb_gt_BaseFree( PHB_GT pGT ) /* helper internal function */ static void hb_gt_def_BaseInit( PHB_GT_BASE pGT ) { - pGT->fVgaCell = TRUE; - pGT->fIsColor = TRUE; - pGT->fBlinking = TRUE; - pGT->fStdOutCon = FALSE; - pGT->fStdErrCon = FALSE; + pGT->fVgaCell = HB_TRUE; + pGT->fIsColor = HB_TRUE; + pGT->fBlinking = HB_TRUE; + pGT->fStdOutCon = HB_FALSE; + pGT->fStdErrCon = HB_FALSE; pGT->iCursorShape = SC_NORMAL; pGT->iDispCount = 0; pGT->iExtCount = 0; @@ -131,11 +131,11 @@ static void * hb_gt_def_New( PHB_GT pGT ) ( PHB_SCREENCELL ) hb_xgrab( sizeof( HB_SCREENCELL ) * ulSize ); pGT->prevBuffer = ( PHB_SCREENCELL ) hb_xgrab( sizeof( HB_SCREENCELL ) * ulSize ); - pGT->pLines = ( BOOL * ) hb_xgrab( sizeof( BOOL ) * pGT->iHeight ); + pGT->pLines = ( HB_BOOL * ) hb_xgrab( sizeof( HB_BOOL ) * pGT->iHeight ); memset( pGT->prevBuffer, 0, sizeof( HB_SCREENCELL ) * ulSize ); for( i = 0; i < pGT->iHeight; ++i ) - pGT->pLines[ i ] = TRUE; + pGT->pLines[ i ] = HB_TRUE; usChar = HB_GTSELF_GETCLEARCHAR( pGT ); iColor = HB_GTSELF_GETCLEARCOLOR( pGT ); @@ -189,7 +189,7 @@ static void hb_gt_def_Mark( PHB_GT pGT ) hb_gcMark( pGT->pMutex ); } -static BOOL hb_gt_def_Lock( PHB_GT pGT ) +static HB_BOOL hb_gt_def_Lock( PHB_GT pGT ) { return !pGT->pMutex || hb_threadMutexLock( pGT->pMutex ); } @@ -221,7 +221,7 @@ static void hb_gt_def_Exit( PHB_GT pGT ) HB_GTSELF_FREE( pGT ); } -static BOOL hb_gt_def_CheckPos( PHB_GT pGT, int iRow, int iCol, long *plIndex ) +static HB_BOOL hb_gt_def_CheckPos( PHB_GT pGT, int iRow, int iCol, long *plIndex ) { if( iRow >= 0 && iCol >= 0 ) { @@ -232,10 +232,10 @@ static BOOL hb_gt_def_CheckPos( PHB_GT pGT, int iRow, int iCol, long *plIndex ) { if( plIndex ) *plIndex = ( long ) iRow * iWidth + iCol; - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } static void hb_gt_def_GetPos( PHB_GT pGT, int * piRow, int * piCol ) @@ -260,7 +260,7 @@ static int hb_gt_def_MaxRow( PHB_GT pGT ) return pGT->iHeight - 1; } -static BOOL hb_gt_def_IsColor( PHB_GT pGT ) +static HB_BOOL hb_gt_def_IsColor( PHB_GT pGT ) { return pGT->fIsColor; } @@ -349,7 +349,7 @@ static const char * hb_gt_def_ColorDecode( const char * szColorString, int * piC { char c; int nColor = 0, iCount = 0; - BOOL bFore = TRUE; + HB_BOOL bFore = HB_TRUE; HB_TRACE(HB_TR_DEBUG, ("hb_gt_def_ColorDecode(%s,%p)", szColorString, piColor)); @@ -369,7 +369,7 @@ static const char * hb_gt_def_ColorDecode( const char * szColorString, int * piC if( !bFore ) nColor = ( ( nColor >> 4 ) & 0x0F07 ) | ( nColor & 0x88 ); else - bFore = FALSE; + bFore = HB_FALSE; break; case 'b': @@ -399,7 +399,7 @@ static const char * hb_gt_def_ColorDecode( const char * szColorString, int * piC case 'i': case 'I': - bFore = FALSE; + bFore = HB_FALSE; nColor &= 0x88; nColor |= 0x70; break; @@ -605,17 +605,17 @@ static void hb_gt_def_GetScrCursor( PHB_GT pGT, int * piRow, int * piCol, int * *piStyle = HB_GTSELF_GETCURSORSTYLE( pGT ); } -static BOOL hb_gt_def_GetBlink( PHB_GT pGT ) +static HB_BOOL hb_gt_def_GetBlink( PHB_GT pGT ) { return pGT->fBlinking; } -static void hb_gt_def_SetBlink( PHB_GT pGT, BOOL fBlink ) +static void hb_gt_def_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) { pGT->fBlinking = fBlink; } -static void hb_gt_def_SetSnowFlag( PHB_GT pGT, BOOL fNoSnow ) +static void hb_gt_def_SetSnowFlag( PHB_GT pGT, HB_BOOL fNoSnow ) { /* * NOTE: This is a compatibility function which have to be implemented @@ -643,29 +643,29 @@ static int hb_gt_def_DispCount( PHB_GT pGT ) return pGT->iDispCount; } -static BOOL hb_gt_def_PreExt( PHB_GT pGT ) +static HB_BOOL hb_gt_def_PreExt( PHB_GT pGT ) { if( pGT->iExtCount == 0 ) HB_GTSELF_REFRESH( pGT ); pGT->iExtCount++; - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_def_PostExt( PHB_GT pGT ) +static HB_BOOL hb_gt_def_PostExt( PHB_GT pGT ) { if( pGT->iExtCount ) pGT->iExtCount--; - return TRUE; + return HB_TRUE; } -static BOOL hb_gt_def_Suspend( PHB_GT pGT ) +static HB_BOOL hb_gt_def_Suspend( PHB_GT pGT ) { return HB_GTSELF_PREEXT( pGT ); } -static BOOL hb_gt_def_Resume( PHB_GT pGT ) +static HB_BOOL hb_gt_def_Resume( PHB_GT pGT ) { return HB_GTSELF_POSTEXT( pGT ); } @@ -740,8 +740,8 @@ static const char * hb_gt_def_Version( PHB_GT pGT, int iType ) return "Harbour Terminal: NULL"; } -static BOOL hb_gt_def_GetChar( PHB_GT pGT, int iRow, int iCol, - int * piColor, BYTE * pbAttr, USHORT * pusChar ) +static HB_BOOL hb_gt_def_GetChar( PHB_GT pGT, int iRow, int iCol, + int * piColor, BYTE * pbAttr, USHORT * pusChar ) { long lIndex; @@ -750,13 +750,13 @@ static BOOL hb_gt_def_GetChar( PHB_GT pGT, int iRow, int iCol, *pusChar = pGT->screenBuffer[ lIndex ].c.usChar; *piColor = pGT->screenBuffer[ lIndex ].c.bColor; *pbAttr = pGT->screenBuffer[ lIndex ].c.bAttr; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_def_PutChar( PHB_GT pGT, int iRow, int iCol, - int iColor, BYTE bAttr, USHORT usChar ) +static HB_BOOL hb_gt_def_PutChar( PHB_GT pGT, int iRow, int iCol, + int iColor, BYTE bAttr, USHORT usChar ) { long lIndex; @@ -765,11 +765,11 @@ static BOOL hb_gt_def_PutChar( PHB_GT pGT, int iRow, int iCol, pGT->screenBuffer[ lIndex ].c.usChar = usChar; pGT->screenBuffer[ lIndex ].c.bColor = ( BYTE ) iColor; pGT->screenBuffer[ lIndex ].c.bAttr = bAttr; - pGT->pLines[ iRow ] = TRUE; - pGT->fRefresh = TRUE; - return TRUE; + pGT->pLines[ iRow ] = HB_TRUE; + pGT->fRefresh = HB_TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } static void hb_gt_def_PutText( PHB_GT pGT, int iRow, int iCol, int iColor, const char * szText, HB_SIZE ulLen ) @@ -826,9 +826,9 @@ static void hb_gt_def_Write( PHB_GT pGT, const char * szText, HB_SIZE ulLength ) static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLength ) { int iLen = 0; - BOOL bDisp = FALSE; - BOOL bBell = FALSE; - BOOL bNewLine = FALSE; + HB_BOOL bDisp = HB_FALSE; + HB_BOOL bBell = HB_FALSE; + HB_BOOL bNewLine = HB_FALSE; int iRow, iCol, iMaxRow, iMaxCol; char szString[ WRITECON_BUFFER_SIZE ]; @@ -856,20 +856,20 @@ static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLengt switch( ch ) { case HB_CHAR_BEL: - bDisp = bBell = TRUE; + bDisp = bBell = HB_TRUE; break; case HB_CHAR_BS: if( iCol > 0 ) { --iCol; - bDisp = TRUE; + bDisp = HB_TRUE; } else if( iCol == 0 && iRow > 0 ) { iCol = iMaxCol; --iRow; - bDisp = TRUE; + bDisp = HB_TRUE; } if( bDisp ) { @@ -886,8 +886,8 @@ static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLengt case HB_CHAR_LF: iCol = 0; if( iRow >= 0 ) ++iRow; - bDisp = TRUE; - bNewLine = TRUE; + bDisp = HB_TRUE; + bNewLine = HB_TRUE; break; case HB_CHAR_CR: @@ -895,11 +895,11 @@ static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLengt if( *szText == HB_CHAR_LF ) { if( iRow >= 0 ) ++iRow; - bNewLine = TRUE; + bNewLine = HB_TRUE; ++szText; --ulLength; } - bDisp = TRUE; + bDisp = HB_TRUE; break; default: @@ -915,14 +915,14 @@ static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLengt the top edge, in which case only change the column */ iCol = 0; if( iRow >= 0 ) ++iRow; - bDisp = TRUE; - bNewLine = TRUE; + bDisp = HB_TRUE; + bNewLine = HB_TRUE; } else szString[ iLen++ ] = ch; /* Special handling for a really wide screen or device */ - if( iLen >= WRITECON_BUFFER_SIZE ) bDisp = TRUE; + if( iLen >= WRITECON_BUFFER_SIZE ) bDisp = HB_TRUE; } if( bDisp || ulLength == 0 ) @@ -947,8 +947,8 @@ static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLengt HB_GTSELF_GETCLEARCHAR( pGT ), 1, 0 ); } HB_GTSELF_SETPOS( pGT, iRow, iCol ); - bDisp = FALSE; - bNewLine = FALSE; + bDisp = HB_FALSE; + bNewLine = HB_FALSE; /* To emulate scrolling */ HB_GTSELF_FLUSH( pGT ); @@ -956,7 +956,7 @@ static void hb_gt_def_WriteCon( PHB_GT pGT, const char * szText, HB_SIZE ulLengt if( bBell ) { HB_GTSELF_BELL( pGT ); - bBell = FALSE; + bBell = HB_FALSE; } } } @@ -1201,8 +1201,8 @@ static void hb_gt_def_ScrollArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, if( iLength > 0 ) { long lIndex, lOffset = ( long ) iRows * iWidth + iCols; - BOOL fMove = ( iRows || iCols ) && iColSize >= 0 && - ( iBottom - iTop >= iRows ); + HB_BOOL fMove = ( iRows || iCols ) && iColSize >= 0 && + ( iBottom - iTop >= iRows ); while( iTop <= iBottom ) { @@ -1278,9 +1278,9 @@ static void hb_gt_def_ScrollUp( PHB_GT pGT, int iRows, int iColor, USHORT usChar pGT->screenBuffer[ lIndex ].c.bAttr = bAttr; ++lIndex; } - pGT->pLines[ i ] = TRUE; + pGT->pLines[ i ] = HB_TRUE; } - pGT->fRefresh = TRUE; + pGT->fRefresh = HB_TRUE; } } @@ -1431,7 +1431,7 @@ static void hb_gt_def_VertLine( PHB_GT pGT, int iCol, int iTop, int iBottom, } } -static BOOL hb_gt_def_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, BOOL fBox ) +static HB_BOOL hb_gt_def_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP, HB_BOOL fBox ) { if( !pszHostCDP ) pszHostCDP = hb_cdpID(); @@ -1444,23 +1444,23 @@ static BOOL hb_gt_def_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char pGT->cdpHost = hb_cdpFindExt( pszHostCDP ); pGT->fDispTrans = pGT->cdpTerm && pGT->cdpHost && pGT->cdpTerm != pGT->cdpHost; - return TRUE; + return HB_TRUE; } HB_SYMBOL_UNUSED( fBox ); - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_def_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) +static HB_BOOL hb_gt_def_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char * pszHostCDP ) { HB_SYMBOL_UNUSED( pGT ); HB_SYMBOL_UNUSED( pszTermCDP ); HB_SYMBOL_UNUSED( pszHostCDP ); - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) +static HB_BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { switch( iType ) { @@ -1470,7 +1470,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_ISCTWIN: case HB_GTI_ISMULTIWIN: case HB_GTI_ISUNICODE: - pInfo->pResult = hb_itemPutL( pInfo->pResult, FALSE ); + pInfo->pResult = hb_itemPutL( pInfo->pResult, HB_FALSE ); break; case HB_GTI_INPUTFD: @@ -1632,10 +1632,10 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) break; default: - return FALSE; + return HB_FALSE; } - return TRUE; + return HB_TRUE; } static int hb_gt_def_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions, @@ -1648,7 +1648,7 @@ static int hb_gt_def_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions, { const char * szMessage = hb_itemGetCPtr( pMessage ); HB_SIZE ulLen = hb_itemGetCLen( pMessage ); - BOOL fScreen = FALSE, fKeyBoard = FALSE; + HB_BOOL fScreen = HB_FALSE, fKeyBoard = HB_FALSE; int iKey = 0, i, iDspCount, iStyle, iRows, iCols, iRow, iCol, iTop, iLeft, iBottom, iRight, iMnuCol, iPos, iClr; void * pBuffer = NULL; @@ -1669,7 +1669,7 @@ static int hb_gt_def_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions, } HB_GTSELF_GETSIZE( pGT, &iRows, &iCols ); if( iCols <= 4 || iRows <= 4 ) - fScreen = FALSE; + fScreen = HB_FALSE; if( fScreen ) { @@ -1843,7 +1843,7 @@ static int hb_gt_def_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions, HB_GTSELF_DISPEND( pGT ); HB_GTSELF_REFRESH( pGT ); - iKey = fKeyBoard ? HB_GTSELF_INKEYGET( pGT, TRUE, dDelay, INKEY_ALL ) : 0; + iKey = fKeyBoard ? HB_GTSELF_INKEYGET( pGT, HB_TRUE, dDelay, INKEY_ALL ) : 0; if( iKey == K_ESC ) break; @@ -1939,7 +1939,7 @@ static int hb_gt_def_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions, HB_GTSELF_WRITECON( pGT, ") ", 2 ); while( iRet == 0 ) { - iKey = fKeyBoard ? HB_GTSELF_INKEYGET( pGT, TRUE, dDelay, INKEY_ALL ) : 0; + iKey = fKeyBoard ? HB_GTSELF_INKEYGET( pGT, HB_TRUE, dDelay, INKEY_ALL ) : 0; if( iKey == 0 ) iRet = 1; else if( iKey == K_ESC ) @@ -1996,12 +1996,12 @@ static int hb_gt_def_SetFlag( PHB_GT pGT, int iType, int iNewValue ) return iPrevValue; } -static BOOL hb_gt_def_SetMode( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_def_SetMode( PHB_GT pGT, int iRows, int iCols ) { return HB_GTSELF_RESIZE( pGT, iRows, iCols ); } -static BOOL hb_gt_def_Resize( PHB_GT pGT, int iRows, int iCols ) +static HB_BOOL hb_gt_def_Resize( PHB_GT pGT, int iRows, int iCols ) { if( iRows > 0 && iCols > 0 && pGT->screenBuffer ) { @@ -2025,13 +2025,14 @@ static BOOL hb_gt_def_Resize( PHB_GT pGT, int iRows, int iCols ) pGT->prevBuffer = ( PHB_SCREENCELL ) hb_xrealloc( pGT->prevBuffer, sizeof( HB_SCREENCELL ) * ulLen ); - pGT->pLines = ( BOOL * ) hb_xrealloc( pGT->pLines, - sizeof( BOOL ) * iRows ); + pGT->pLines = + ( HB_BOOL * ) hb_xrealloc( pGT->pLines, + sizeof( HB_BOOL ) * iRows ); memset( pGT->screenBuffer, 0, sizeof( HB_SCREENCELL ) * ulLen ); memset( pGT->prevBuffer, 0, sizeof( HB_SCREENCELL ) * ulLen ); for( i = 0; i < iRows; ++i ) - pGT->pLines[ i ] = TRUE; + pGT->pLines[ i ] = HB_TRUE; for( ulIndex = 0; ulIndex < ulLen; ++ulIndex ) { pGT->screenBuffer[ ulIndex ].c.usChar = HB_GTSELF_GETCLEARCHAR( pGT ); @@ -2048,7 +2049,7 @@ static BOOL hb_gt_def_Resize( PHB_GT pGT, int iRows, int iCols ) if( pGT->iCol >= pGT->iWidth ) pGT->iCol = pGT->iWidth - 1; - pGT->fRefresh = TRUE; + pGT->fRefresh = HB_TRUE; if( ulSize ) { @@ -2057,10 +2058,10 @@ static BOOL hb_gt_def_Resize( PHB_GT pGT, int iRows, int iCols ) } } - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } static void hb_gt_def_GetSize( PHB_GT pGT, int * piRows, int * piCols ) @@ -2073,8 +2074,8 @@ static void hb_gt_def_SemiCold( PHB_GT pGT ) { int i; for( i = 0; i < pGT->iHeight; ++i ) - pGT->pLines[ i ] = FALSE; - pGT->fRefresh = FALSE; + pGT->pLines[ i ] = HB_FALSE; + pGT->fRefresh = HB_FALSE; } static void hb_gt_def_ColdArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, int iRight ) @@ -2105,7 +2106,7 @@ static void hb_gt_def_ColdArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, in } } if( iLeft == 0 && iRight == pGT->iWidth - 1 ) - pGT->pLines[ iTop ] = FALSE; + pGT->pLines[ iTop ] = HB_FALSE; ++iTop; } } @@ -2134,8 +2135,8 @@ static void hb_gt_def_ExposeArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, if( HB_GTSELF_CHECKPOS( pGT, iTop, i, &lIndex ) ) { pGT->prevBuffer[ lIndex ].c.bAttr = HB_GT_ATTR_REFRESH; - pGT->pLines[ iTop ] = TRUE; - pGT->fRefresh = TRUE; + pGT->pLines[ iTop ] = HB_TRUE; + pGT->fRefresh = HB_TRUE; } } ++iTop; @@ -2146,8 +2147,8 @@ static void hb_gt_def_TouchLine( PHB_GT pGT, int iRow ) { if( iRow >= 0 && iRow < pGT->iHeight ) { - pGT->pLines[ iRow ] = TRUE; - pGT->fRefresh = TRUE; + pGT->pLines[ iRow ] = HB_TRUE; + pGT->fRefresh = HB_TRUE; } } @@ -2158,8 +2159,8 @@ static void hb_gt_def_TouchCell( PHB_GT pGT, int iRow, int iCol ) if( HB_GTSELF_CHECKPOS( pGT, iRow, iCol, &lIndex ) ) { pGT->prevBuffer[ lIndex ].c.bAttr = HB_GT_ATTR_REFRESH; - pGT->pLines[ iRow ] = TRUE; - pGT->fRefresh = TRUE; + pGT->pLines[ iRow ] = HB_TRUE; + pGT->fRefresh = HB_TRUE; } } @@ -2208,10 +2209,10 @@ static void hb_gt_def_RedrawDiff( PHB_GT pGT ) } while( ++l <= r ); } - pGT->pLines[ i ] = FALSE; + pGT->pLines[ i ] = HB_FALSE; } } - pGT->fRefresh = FALSE; + pGT->fRefresh = HB_FALSE; } } @@ -2354,7 +2355,7 @@ static void hb_gt_def_InkeyIns( PHB_GT pGT, int iKey ) } /* helper internal function */ -static BOOL hb_gt_def_InkeyNextCheck( PHB_GT pGT, int iEventMask, int * iKey ) +static HB_BOOL hb_gt_def_InkeyNextCheck( PHB_GT pGT, int iEventMask, int * iKey ) { HB_TRACE( HB_TR_DEBUG, ("hb_gt_def_InkeyNextCheck(%p,%p)", pGT, iKey) ); @@ -2368,16 +2369,16 @@ static BOOL hb_gt_def_InkeyNextCheck( PHB_GT pGT, int iEventMask, int * iKey ) } else { - return FALSE; + return HB_FALSE; } if( *iKey == 0 ) { hb_gt_def_InkeyPop( pGT ); - return FALSE; + return HB_FALSE; } - return TRUE; + return HB_TRUE; } /* helper internal function */ @@ -2442,10 +2443,10 @@ static int hb_gt_def_InkeyNext( PHB_GT pGT, int iEventMask ) } /* Wait for keyboard input */ -static int hb_gt_def_InkeyGet( PHB_GT pGT, BOOL fWait, double dSeconds, int iEventMask ) +static int hb_gt_def_InkeyGet( PHB_GT pGT, HB_BOOL fWait, double dSeconds, int iEventMask ) { HB_ULONG end_timer; - BOOL fPop; + HB_BOOL fPop; HB_TRACE(HB_TR_DEBUG, ("hb_gt_def_InkeyGet(%p,%d,%f,%d)", pGT, (int) fWait, dSeconds, iEventMask)); @@ -2598,10 +2599,10 @@ static void hb_gt_def_MouseExit( PHB_GT pGT ) HB_SYMBOL_UNUSED( pGT ); } -static BOOL hb_gt_def_MouseIsPresent( PHB_GT pGT ) +static HB_BOOL hb_gt_def_MouseIsPresent( PHB_GT pGT ) { HB_SYMBOL_UNUSED( pGT ); - return FALSE; + return HB_FALSE; } static void hb_gt_def_MouseShow( PHB_GT pGT ) @@ -2614,17 +2615,17 @@ static void hb_gt_def_MouseHide( PHB_GT pGT ) HB_SYMBOL_UNUSED( pGT ); } -static BOOL hb_gt_def_MouseGetCursor( PHB_GT pGT ) +static HB_BOOL hb_gt_def_MouseGetCursor( PHB_GT pGT ) { return pGT->fMouseVisible; } -static void hb_gt_def_MouseSetCursor( PHB_GT pGT, BOOL fVisible ) +static void hb_gt_def_MouseSetCursor( PHB_GT pGT, HB_BOOL fVisible ) { if( fVisible ) { HB_GTSELF_MOUSESHOW( pGT ); - pGT->fMouseVisible = TRUE; + pGT->fMouseVisible = HB_TRUE; } else if( pGT->fMouseVisible ) { @@ -2642,7 +2643,7 @@ static void hb_gt_def_MouseSetCursor( PHB_GT pGT, BOOL fVisible ) * [druzus] */ HB_GTSELF_MOUSEHIDE( pGT ); - pGT->fMouseVisible = FALSE; + pGT->fMouseVisible = HB_FALSE; } } @@ -2757,32 +2758,32 @@ static int hb_gt_def_MouseCountButton( PHB_GT pGT ) return 0; } -static BOOL hb_gt_def_MouseButtonState( PHB_GT pGT, int iButton ) +static HB_BOOL hb_gt_def_MouseButtonState( PHB_GT pGT, int iButton ) { HB_SYMBOL_UNUSED( pGT ); HB_SYMBOL_UNUSED( iButton ); - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_def_MouseButtonPressed( PHB_GT pGT, int iButton, int * piRow, int * piCol ) +static HB_BOOL hb_gt_def_MouseButtonPressed( PHB_GT pGT, int iButton, int * piRow, int * piCol ) { HB_SYMBOL_UNUSED( pGT ); HB_SYMBOL_UNUSED( iButton ); HB_SYMBOL_UNUSED( piRow ); HB_SYMBOL_UNUSED( piCol ); - return FALSE; + return HB_FALSE; } -static BOOL hb_gt_def_MouseButtonReleased( PHB_GT pGT, int iButton, int * piRow, int * piCol ) +static HB_BOOL hb_gt_def_MouseButtonReleased( PHB_GT pGT, int iButton, int * piRow, int * piCol ) { HB_SYMBOL_UNUSED( pGT ); HB_SYMBOL_UNUSED( iButton ); HB_SYMBOL_UNUSED( piRow ); HB_SYMBOL_UNUSED( piCol ); - return FALSE; + return HB_FALSE; } static int hb_gt_def_MouseReadKey( PHB_GT pGT, int iEventMask ) @@ -3189,16 +3190,16 @@ void hb_gtSetDefault( const char * szGtName ) hb_gt_szNameDefault = s_gtNameBuf; } -BOOL hb_gtRegister( const HB_GT_INIT * gtInit ) +HB_BOOL hb_gtRegister( const HB_GT_INIT * gtInit ) { if( s_iGtCount < HB_GT_MAX_ && hb_gt_FindEntry( gtInit->id ) == -1 ) { if( gtInit->pGtId ) *gtInit->pGtId = s_iGtCount; s_gtInit[ s_iGtCount++ ] = gtInit; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } PHB_GT hb_gtLoad( const char * szGtName, PHB_GT pGT, PHB_GT_FUNCS pSuperTable ) @@ -3224,7 +3225,7 @@ PHB_GT hb_gtLoad( const char * szGtName, PHB_GT pGT, PHB_GT_FUNCS pSuperTable ) if( iPos != -1 ) { - BOOL fNew = pGT == NULL; + HB_BOOL fNew = pGT == NULL; if( fNew ) { @@ -3327,12 +3328,12 @@ void * hb_gtSwap( void * hGT ) return hCurrGT; } -BOOL hb_gtReload( const char * szGtName, - HB_FHANDLE hFilenoStdin, - HB_FHANDLE hFilenoStdout, - HB_FHANDLE hFilenoStderr ) +HB_BOOL hb_gtReload( const char * szGtName, + HB_FHANDLE hFilenoStdin, + HB_FHANDLE hFilenoStdout, + HB_FHANDLE hFilenoStderr ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( szGtName && hb_gt_FindEntry( szGtName ) != -1 ) { hb_gtRelease( NULL ); @@ -3344,9 +3345,9 @@ BOOL hb_gtReload( const char * szGtName, } void * hb_gtCreate( const char * szGtName, - HB_FHANDLE hFilenoStdin, - HB_FHANDLE hFilenoStdout, - HB_FHANDLE hFilenoStderr ) + HB_FHANDLE hFilenoStdin, + HB_FHANDLE hFilenoStdout, + HB_FHANDLE hFilenoStderr ) { void * hCurrGT = hb_gtSwap( NULL ); @@ -3362,7 +3363,7 @@ void * hb_gtCreate( const char * szGtName, return hb_gtSwap( hCurrGT ); } -static BOOL hb_gtTryInit( const char * szGtName, BOOL fFree ) +static HB_BOOL hb_gtTryInit( const char * szGtName, HB_BOOL fFree ) { if( szGtName ) { @@ -3378,18 +3379,18 @@ static BOOL hb_gtTryInit( const char * szGtName, BOOL fFree ) void hb_gtStartupInit( void ) { - if( hb_gtTryInit( hb_cmdargString( "GT" ), TRUE ) ) + if( hb_gtTryInit( hb_cmdargString( "GT" ), HB_TRUE ) ) return; - if( hb_gtTryInit( hb_getenv( "HB_GT" ), TRUE ) ) + if( hb_gtTryInit( hb_getenv( "HB_GT" ), HB_TRUE ) ) return; - if( hb_gtTryInit( hb_gt_FindDefault(), FALSE ) ) + if( hb_gtTryInit( hb_gt_FindDefault(), HB_FALSE ) ) return; - if( hb_gtTryInit( hb_gt_szNameDefault, FALSE ) ) + if( hb_gtTryInit( hb_gt_szNameDefault, HB_FALSE ) ) return; if( hb_dynsymFind( "HB_GT_NUL" ) ) /* GTNUL was explicitly REQUESTed */ { - if( hb_gtTryInit( "NUL", FALSE ) ) + if( hb_gtTryInit( "NUL", HB_FALSE ) ) return; } diff --git a/harbour/src/rtl/hbhex.c b/harbour/src/rtl/hbhex.c index 28d1941ad6..e9ef44b831 100644 --- a/harbour/src/rtl/hbhex.c +++ b/harbour/src/rtl/hbhex.c @@ -90,7 +90,7 @@ HB_FUNC( HB_NUMTOHEX ) { HB_ULONG ulNum; int iLen; - BOOL fDefaultLen; + HB_BOOL fDefaultLen; char ret[ 33 ]; if( HB_ISNUM( 2 ) ) diff --git a/harbour/src/rtl/hbi18n1.c b/harbour/src/rtl/hbi18n1.c index 7332a7dd06..c6bd43ec69 100644 --- a/harbour/src/rtl/hbi18n1.c +++ b/harbour/src/rtl/hbi18n1.c @@ -446,7 +446,7 @@ static PHB_ITEM hb_i18n_serialize( PHB_I18N_TRANS pI18N ) { HB_SIZE ulSize; ULONG ulCRC; - char * pBuffer = hb_itemSerialize( pI18N->table, FALSE, &ulSize ); + char * pBuffer = hb_itemSerialize( pI18N->table, HB_FALSE, &ulSize ); char * pI18Nbuffer; PHB_ITEM pKey, pValue; @@ -472,10 +472,10 @@ static PHB_ITEM hb_i18n_serialize( PHB_I18N_TRANS pI18N ) return NULL; } -static BOOL hb_i18n_headercheck( const char * pBuffer, HB_SIZE ulLen ) +static HB_BOOL hb_i18n_headercheck( const char * pBuffer, HB_SIZE ulLen ) { if( ulLen < HB_I18N_HEADER_SIZE ) - return FALSE; + return HB_FALSE; ulLen -= HB_I18N_HEADER_SIZE; return memcmp( pBuffer, s_signature, HB_I18N_SIG_SIZE ) == 0 && @@ -530,7 +530,7 @@ static const HB_GC_FUNCS s_gcI18NFuncs = hb_gcDummyMark }; -static PHB_I18N_TRANS hb_i18n_param( int * piParam, BOOL fActive ) +static PHB_I18N_TRANS hb_i18n_param( int * piParam, HB_BOOL fActive ) { PHB_I18N_TRANS * pI18NHolder = ( PHB_I18N_TRANS * ) hb_parptrGC( &s_gcI18NFuncs, *piParam ); @@ -557,10 +557,10 @@ static PHB_ITEM hb_i18n_newitem( PHB_I18N_TRANS pI18N ) return hb_itemPutPtrGC( pItem, pI18NHolder ); } -static BOOL hb_i18n_getpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pOldForm, - BOOL fBase ) +static HB_BOOL hb_i18n_getpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pOldForm, + HB_BOOL fBase ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pI18N ) { @@ -587,15 +587,15 @@ static BOOL hb_i18n_getpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pOldForm, else hb_itemPutCConst( pOldForm, "EN" ); /* default is ENGLISH */ } - fResult = TRUE; + fResult = HB_TRUE; } return fResult; } -static BOOL hb_i18n_setpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pForm, - BOOL fBase ) +static HB_BOOL hb_i18n_setpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pForm, + HB_BOOL fBase ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pI18N && pForm ) { @@ -615,7 +615,7 @@ static BOOL hb_i18n_setpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pForm, else pI18N->plural_block = hb_itemNew( pForm ); } - fResult = TRUE; + fResult = HB_TRUE; } else if( HB_IS_STRING( pForm ) ) { @@ -644,7 +644,7 @@ static BOOL hb_i18n_setpluralform( PHB_I18N_TRANS pI18N, PHB_ITEM pForm, szKey = "LANG"; } hb_i18n_setitem( pI18N->table, szKey, hb_i18n_pluralformid( iForm ) ); - fResult = TRUE; + fResult = HB_TRUE; } } } @@ -664,7 +664,7 @@ static void hb_i18n_transitm( PHB_ITEM pText, PHB_CODEPAGE cdpIn, PHB_CODEPAGE c static const char * hb_i18n_setcodepage( PHB_I18N_TRANS pI18N, const char * szCdpID, - BOOL fBase, BOOL fTranslate ) + HB_BOOL fBase, HB_BOOL fTranslate ) { const char * szOldCdpID = NULL, * szKey; @@ -982,7 +982,7 @@ HB_FUNC( HB_I18N_CODEPAGE ) PHB_I18N_TRANS pI18N; int iParam = 1; - pI18N = hb_i18n_param( &iParam, TRUE ); + pI18N = hb_i18n_param( &iParam, HB_TRUE ); if( pI18N ) hb_retc( hb_i18n_setcodepage( pI18N, hb_parc( iParam ), @@ -998,12 +998,12 @@ HB_FUNC( HB_I18N_PLURALFORM ) PHB_I18N_TRANS pI18N; int iParam = 1; - pI18N = hb_i18n_param( &iParam, TRUE ); + pI18N = hb_i18n_param( &iParam, HB_TRUE ); if( pI18N ) { PHB_ITEM pOldForm = hb_itemNew( NULL ); PHB_ITEM pForm = hb_param( iParam, HB_IT_STRING | HB_IT_BLOCK ); - BOOL fBase = hb_parl( iParam + 1 ); + HB_BOOL fBase = hb_parl( iParam + 1 ); if( hb_i18n_getpluralform( pI18N, pOldForm, fBase ) ) hb_itemReturn( pOldForm ); @@ -1020,7 +1020,7 @@ HB_FUNC( HB_I18N_DESCRIPTION ) PHB_I18N_TRANS pI18N; int iParam = 1; - pI18N = hb_i18n_param( &iParam, TRUE ); + pI18N = hb_i18n_param( &iParam, HB_TRUE ); if( pI18N ) { PHB_ITEM pNewDescript = hb_param( iParam, HB_IT_STRING ); @@ -1038,7 +1038,7 @@ HB_FUNC( HB_I18N_ADDTEXT ) PHB_I18N_TRANS pI18N; int iParam = 1; - pI18N = hb_i18n_param( &iParam, FALSE ); + pI18N = hb_i18n_param( &iParam, HB_FALSE ); if( pI18N ) { PHB_ITEM pMsgID = hb_param( iParam, HB_IT_STRING ); @@ -1086,7 +1086,7 @@ HB_FUNC( HB_I18N_SET ) else { int iParam = 1; - PHB_I18N_TRANS pI18N = hb_i18n_param( &iParam, FALSE ); + PHB_I18N_TRANS pI18N = hb_i18n_param( &iParam, HB_FALSE ); if( pI18N ) hb_vmSetI18N( hb_i18n_alloc( pI18N ) ); else @@ -1104,7 +1104,7 @@ HB_FUNC( HB_I18N_SAVETABLE ) PHB_I18N_TRANS pI18N; int iParam = 1; - pI18N = hb_i18n_param( &iParam, TRUE ); + pI18N = hb_i18n_param( &iParam, HB_TRUE ); if( pI18N ) hb_itemReturnRelease( hb_i18n_serialize( pI18N ) ); } @@ -1150,7 +1150,7 @@ HB_FUNC( __I18N_HASHTABLE ) { int iParam = 1; - pI18N = hb_i18n_param( &iParam, TRUE ); + pI18N = hb_i18n_param( &iParam, HB_TRUE ); if( pI18N ) hb_itemReturn( pI18N->table ); } diff --git a/harbour/src/rtl/hbinet.c b/harbour/src/rtl/hbinet.c index 96d042e32c..4bee7c32d9 100644 --- a/harbour/src/rtl/hbinet.c +++ b/harbour/src/rtl/hbinet.c @@ -136,14 +136,14 @@ static void hb_inetErrRT( void ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } -static BOOL hb_inetIsOpen( PHB_SOCKET_STRUCT socket ) +static HB_BOOL hb_inetIsOpen( PHB_SOCKET_STRUCT socket ) { if( socket->sd == HB_NO_SOCKET ) { socket->iError = HB_INET_ERR_CLOSEDSOCKET; - return FALSE; + return HB_FALSE; } - return TRUE; + return HB_TRUE; } static int hb_inetCloseSocket( PHB_SOCKET_STRUCT socket ) @@ -226,11 +226,11 @@ static void hb_inetAutoInit( void ) } } -BOOL hb_znetInetInitialize( PHB_ITEM pItem, PHB_ZNETSTREAM pStream, - HB_INET_RFUNC recvFunc, - HB_INET_SFUNC sendFunc, - HB_INET_FFUNC flushFunc, - HB_INET_CFUNC cleanFunc ) +HB_BOOL hb_znetInetInitialize( PHB_ITEM pItem, PHB_ZNETSTREAM pStream, + HB_INET_RFUNC recvFunc, + HB_INET_SFUNC sendFunc, + HB_INET_FFUNC flushFunc, + HB_INET_CFUNC cleanFunc ) { PHB_SOCKET_STRUCT socket = ( PHB_SOCKET_STRUCT ) hb_itemGetPtrGC( pItem, &s_gcInetFuncs ); @@ -243,11 +243,11 @@ BOOL hb_znetInetInitialize( PHB_ITEM pItem, PHB_ZNETSTREAM pStream, socket->flushFunc = flushFunc; socket->cleanFunc = cleanFunc; socket->stream = pStream; - return TRUE; + return HB_TRUE; } hb_inetErrRT(); - return FALSE; + return HB_FALSE; } HB_FUNC( HB_INETINIT ) @@ -602,7 +602,7 @@ HB_FUNC( HB_INETSETRCVBUFSIZE ) * TCP receive and send functions ***/ -static long s_inetRecv( PHB_SOCKET_STRUCT socket, char * buffer, long size, BOOL readahead ) +static long s_inetRecv( PHB_SOCKET_STRUCT socket, char * buffer, long size, HB_BOOL readahead ) { long rec = 0; @@ -621,7 +621,7 @@ static long s_inetRecv( PHB_SOCKET_STRUCT socket, char * buffer, long size, BOOL socket->inbuffer = HB_MAX( 0, rec ); } else - readahead = FALSE; + readahead = HB_FALSE; if( socket->inbuffer > 0 ) { @@ -693,7 +693,7 @@ static void s_inetRecvInternal( int iMode ) socket->iError = HB_INET_ERR_OK; do { - iLen = s_inetRecv( socket, buffer + iReceived, iMaxLen - iReceived, FALSE ); + iLen = s_inetRecv( socket, buffer + iReceived, iMaxLen - iReceived, HB_FALSE ); if( iLen >= 0 ) { iReceived += iLen; @@ -790,14 +790,14 @@ static void s_inetRecvPattern( const char ** patterns, int * patternsizes, buffer = ( char * ) hb_xrealloc( buffer, iAllocated ); } - iLen = s_inetRecv( socket, &cChar, 1, TRUE ); + iLen = s_inetRecv( socket, &cChar, 1, HB_TRUE ); if( iLen == -1 && hb_socketGetError() == HB_SOCKET_ERR_TIMEOUT ) { iLen = -2; /* this signals timeout */ iTimeElapsed += socket->iTimeout; if( socket->pPeriodicBlock ) { - BOOL fResult; + HB_BOOL fResult; hb_execFromArray( socket->pPeriodicBlock ); fResult = hb_parl( -1 ) && hb_vmRequestQuery() == 0; @@ -957,7 +957,7 @@ HB_FUNC( HB_INETDATAREADY ) } -static void s_inetSendInternal( BOOL lAll ) +static void s_inetSendInternal( HB_BOOL lAll ) { PHB_SOCKET_STRUCT socket = HB_PARSOCKET( 1 ); PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING ); @@ -1031,12 +1031,12 @@ static void s_inetSendInternal( BOOL lAll ) HB_FUNC( HB_INETSEND ) { - s_inetSendInternal( FALSE ); + s_inetSendInternal( HB_FALSE ); } HB_FUNC( HB_INETSENDALL ) { - s_inetSendInternal( TRUE ); + s_inetSendInternal( HB_TRUE ); } @@ -1165,7 +1165,7 @@ HB_FUNC( HB_INETACCEPT ) * Client specific (connection functions) ****/ -static void hb_inetConnectInternal( BOOL fResolve ) +static void hb_inetConnectInternal( HB_BOOL fResolve ) { const char * szHost = hb_parc( 1 ); char * szAddr = NULL; @@ -1200,7 +1200,7 @@ static void hb_inetConnectInternal( BOOL fResolve ) if( hb_socketInetAddr( &socket->remote, &socket->remotelen, szHost, iPort ) ) { - hb_socketSetKeepAlive( socket->sd, TRUE ); + hb_socketSetKeepAlive( socket->sd, HB_TRUE ); if( hb_socketConnect( socket->sd, socket->remote, socket->remotelen, socket->iTimeout ) != 0 ) socket->iError = hb_socketGetError(); @@ -1222,12 +1222,12 @@ static void hb_inetConnectInternal( BOOL fResolve ) HB_FUNC( HB_INETCONNECT ) { - hb_inetConnectInternal( TRUE ); + hb_inetConnectInternal( HB_TRUE ); } HB_FUNC( HB_INETCONNECTIP ) { - hb_inetConnectInternal( FALSE ); + hb_inetConnectInternal( HB_FALSE ); } /*********************************************************** @@ -1261,7 +1261,7 @@ HB_FUNC( HB_INETDGRAMBIND ) /* Setting broadcast if needed. */ if( hb_parl( 3 ) ) - hb_socketSetBroadcast( socket->sd, TRUE ); + hb_socketSetBroadcast( socket->sd, HB_TRUE ); szAddress = hb_parc( 2 ); if( socket->remote ) @@ -1300,7 +1300,7 @@ HB_FUNC( HB_INETDGRAM ) /* Setting broadcast if needed. */ if( hb_parl( 1 ) ) - hb_socketSetBroadcast( socket->sd, TRUE ); + hb_socketSetBroadcast( socket->sd, HB_TRUE ); hb_itemReturnRelease( pSocket ); } @@ -1368,7 +1368,7 @@ HB_FUNC( HB_INETDGRAMRECV ) int iLen = 0, iMax; char * buffer = NULL; HB_SIZE ulLen; - BOOL fRepeat; + HB_BOOL fRepeat; if( socket == NULL || pBuffer == NULL || ! HB_ISBYREF( 2 ) ) hb_inetErrRT(); @@ -1391,7 +1391,7 @@ HB_FUNC( HB_INETDGRAMRECV ) do { - fRepeat = FALSE; + fRepeat = HB_FALSE; if( socket->remote ) hb_xfree( socket->remote ); iMax = hb_socketRecvFrom( socket->sd, buffer, iLen, 0, diff --git a/harbour/src/rtl/hbproces.c b/harbour/src/rtl/hbproces.c index eb4a6082f3..da6dd1d381 100644 --- a/harbour/src/rtl/hbproces.c +++ b/harbour/src/rtl/hbproces.c @@ -247,7 +247,7 @@ static int hb_fsProcessExec( const char *pszFilename, #if defined( HB_OS_WIN_CE ) { LPTSTR lpAppName, lpParams; - BOOL fError; + HB_BOOL fError; HB_SYMBOL_UNUSED( hStdin ); HB_SYMBOL_UNUSED( hStdout ); @@ -384,7 +384,7 @@ static int hb_fsProcessExec( const char *pszFilename, HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, HB_FHANDLE *phStdin, HB_FHANDLE *phStdout, HB_FHANDLE *phStderr, - BOOL fDetach, ULONG *pulPID ) + HB_BOOL fDetach, ULONG *pulPID ) { HB_FHANDLE hResult = FS_ERROR; char * pszFree = NULL; @@ -400,7 +400,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, # define CreatePipe( hIn, hOut, sa, flags ) ( FALSE ) #endif - BOOL fError = FALSE; + HB_BOOL fError = HB_FALSE; HANDLE hPipes[ 6 ]; SECURITY_ATTRIBUTES sa; int i; @@ -410,7 +410,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, memset( &sa, 0, sizeof( sa ) ); sa.nLength = sizeof( sa ); - sa.bInheritHandle = TRUE; + sa.bInheritHandle = HB_TRUE; if( phStdin != NULL ) fError = !CreatePipe( &hPipes[0], &hPipes[1], &sa, 0 ); @@ -424,11 +424,11 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, hPipes[5] = hPipes[3]; } else - fError = !CreatePipe( &hPipes[4], &hPipes[5], &sa, 0 ); + fError = CreatePipe( &hPipes[4], &hPipes[5], &sa, 0 ) ? HB_FALSE : HB_TRUE; } if( fError ) - hb_fsSetIOError( FALSE, 0 ); + hb_fsSetIOError( HB_FALSE, 0 ); else { PROCESS_INFORMATION pi; @@ -464,16 +464,16 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, si.hStdOutput = phStdout ? hPipes[ 3 ] : GetStdHandle( STD_OUTPUT_HANDLE ); si.hStdError = phStderr ? hPipes[ 5 ] : GetStdHandle( STD_ERROR_HANDLE ); } - fError = ! CreateProcess( NULL, /* lpAppName */ - lpCommand, - NULL, /* lpProcessAttr */ - NULL, /* lpThreadAttr */ - TRUE, /* bInheritHandles */ - dwFlags, /* dwCreationFlags */ - NULL, /* lpEnvironment */ - NULL, /* lpCurrentDirectory */ - &si, - &pi ); + fError = CreateProcess( NULL, /* lpAppName */ + lpCommand, + NULL, /* lpProcessAttr */ + NULL, /* lpThreadAttr */ + TRUE, /* bInheritHandles */ + dwFlags, /* dwCreationFlags */ + NULL, /* lpEnvironment */ + NULL, /* lpCurrentDirectory */ + &si, + &pi ) ? HB_FALSE : HB_TRUE; hb_fsSetIOError( !fError, 0 ); hb_xfree( lpCommand ); if( !fError ) @@ -508,7 +508,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, } #elif defined( HB_OS_UNIX ) { - BOOL fError = FALSE; + HB_BOOL fError = HB_FALSE; HB_FHANDLE hPipeIn [ 2 ] = { FS_ERROR, FS_ERROR }, hPipeOut[ 2 ] = { FS_ERROR, FS_ERROR }, hPipeErr[ 2 ] = { FS_ERROR, FS_ERROR }; @@ -533,7 +533,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, pid_t pid = fork(); if( pid == -1 ) - fError = TRUE; + fError = HB_TRUE; else if( pid != 0 ) /* parent process */ { if( phStdin != NULL ) @@ -658,7 +658,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, } while( 0 ) #endif - BOOL fError = FALSE; + HB_BOOL fError = HB_FALSE; HB_FHANDLE hPipeIn [ 2 ] = { FS_ERROR, FS_ERROR }, hPipeOut[ 2 ] = { FS_ERROR, FS_ERROR }, hPipeErr[ 2 ] = { FS_ERROR, FS_ERROR }; @@ -733,7 +733,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, dup2( hStdErr, 2 ); if( pid < 0 ) - fError = TRUE; + fError = HB_TRUE; else if( pid != 0 ) /* parent process */ { if( phStdin != NULL ) @@ -796,7 +796,7 @@ HB_FHANDLE hb_fsProcessOpen( const char *pszFilename, return hResult; } -int hb_fsProcessValue( HB_FHANDLE hProcess, BOOL fWait ) +int hb_fsProcessValue( HB_FHANDLE hProcess, HB_BOOL fWait ) { int iRetStatus = -1; @@ -804,7 +804,7 @@ int hb_fsProcessValue( HB_FHANDLE hProcess, BOOL fWait ) #if defined( HB_IO_WIN ) { - BOOL fError = TRUE; + HB_BOOL fError = HB_TRUE; DWORD dwResult; HANDLE hProc = ( HANDLE ) hb_fsGetOsHandle( hProcess ); @@ -887,9 +887,9 @@ int hb_fsProcessValue( HB_FHANDLE hProcess, BOOL fWait ) /* Closes/kills process. The handle is still valid until you * catch it with hb_fsProcessValue. */ -BOOL hb_fsProcessClose( HB_FHANDLE hProcess, BOOL fGentle ) +HB_BOOL hb_fsProcessClose( HB_FHANDLE hProcess, HB_BOOL fGentle ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("hb_fsProcessClose(%p, %d)", ( void * ) ( HB_PTRDIFF ) hProcess, fGentle)); @@ -900,7 +900,7 @@ BOOL hb_fsProcessClose( HB_FHANDLE hProcess, BOOL fGentle ) if( hProc ) { if( TerminateProcess( hProc, fGentle ? 0 : 1 ) ) - fResult = TRUE; + fResult = HB_TRUE; hb_fsSetIOError( fResult, 0 ); } else @@ -912,7 +912,7 @@ BOOL hb_fsProcessClose( HB_FHANDLE hProcess, BOOL fGentle ) if( pid > 0 ) { if( kill( pid, fGentle ? SIGTERM : SIGKILL ) == 0 ) - fResult = TRUE; + fResult = HB_TRUE; hb_fsSetIOError( fResult, 0 ); } else @@ -925,7 +925,7 @@ BOOL hb_fsProcessClose( HB_FHANDLE hProcess, BOOL fGentle ) if( hProc ) { if( TerminateProcess( hProc, fGentle ? 0 : 1 ) ) - fResult = TRUE; + fResult = HB_TRUE; hb_fsSetIOError( fResult, 0 ); CloseHandle( hProc ); } @@ -950,7 +950,7 @@ int hb_fsProcessRun( const char * pszFilename, const char * pStdInBuf, HB_SIZE ulStdInLen, char ** pStdOutPtr, HB_SIZE * pulStdOut, char ** pStdErrPtr, HB_SIZE * pulStdErr, - BOOL fDetach ) + HB_BOOL fDetach ) { HB_FHANDLE hStdin, hStdout, hStderr, *phStdin, *phStdout, *phStderr; char * pOutBuf, *pErrBuf; @@ -1261,7 +1261,7 @@ int hb_fsProcessRun( const char * pszFilename, if( hStderr != FS_ERROR ) hb_fsClose( hStderr ); - iResult = hb_fsProcessValue( hProcess, TRUE ); + iResult = hb_fsProcessValue( hProcess, HB_TRUE ); #else diff --git a/harbour/src/rtl/hbprocfn.c b/harbour/src/rtl/hbprocfn.c index 9bfc4db7f0..9ddf565319 100644 --- a/harbour/src/rtl/hbprocfn.c +++ b/harbour/src/rtl/hbprocfn.c @@ -63,7 +63,7 @@ HB_FUNC( HB_PROCESSOPEN ) PHB_ITEM pStdIn = hb_param( 2, HB_IT_BYREF ); PHB_ITEM pStdOut = hb_param( 3, HB_IT_BYREF ); PHB_ITEM pStdErr = hb_param( 4, HB_IT_BYREF ); - BOOL fDetach = hb_parl( 5 ); + HB_BOOL fDetach = hb_parl( 5 ); HB_FHANDLE hStdIn, *phStdIn, hStdOut, *phStdOut, hStdErr, *phStdErr; HB_FHANDLE hProcess; ULONG ulPID; @@ -126,7 +126,7 @@ HB_FUNC( HB_PROCESSRUN ) const char * szStdIn = hb_parc( 2 ); PHB_ITEM pStdOut = hb_param( 3, HB_IT_BYREF ); PHB_ITEM pStdErr = hb_param( 4, HB_IT_BYREF ); - BOOL fDetach = hb_parl( 5 ); + HB_BOOL fDetach = hb_parl( 5 ); if( szName && ( szStdIn || HB_ISNIL( 2 ) ) && diff --git a/harbour/src/rtl/hbrandom.c b/harbour/src/rtl/hbrandom.c index fdb72c09be..1847510ca5 100644 --- a/harbour/src/rtl/hbrandom.c +++ b/harbour/src/rtl/hbrandom.c @@ -123,7 +123,7 @@ HB_FUNC( HB_RANDOMINT ) HB_FUNC( HB_RANDOMSEED ) { srand( HB_ISNUM( 1 ) ? ( unsigned ) hb_parni( 1 ) : ( unsigned ) hb_dateMilliSeconds() ); - s_fInit = TRUE; + s_fInit = HB_TRUE; } /* Returns a double value between 0 and 1 */ @@ -134,7 +134,7 @@ double hb_random_num() if( !s_fInit ) { srand( ( unsigned ) hb_dateMilliSeconds() ); - s_fInit = TRUE; + s_fInit = HB_TRUE; } d1 = ( double ) rand(); diff --git a/harbour/src/rtl/hbregex.c b/harbour/src/rtl/hbregex.c index e4efbe68d4..453b88a69b 100644 --- a/harbour/src/rtl/hbregex.c +++ b/harbour/src/rtl/hbregex.c @@ -172,7 +172,7 @@ HB_FUNC( HB_REGEXCOMP ) pRegEx = hb_regexCompile( hb_parc( 1 ), ulLen, iFlags ); if( pRegEx ) { - pRegEx->fFree = FALSE; + pRegEx->fFree = HB_FALSE; hb_retptrGC( pRegEx ); } } @@ -240,12 +240,12 @@ HB_FUNC( HB_ATX ) } } -static BOOL hb_regex( int iRequest ) +static HB_BOOL hb_regex( int iRequest ) { HB_REGMATCH aMatches[ HB_REGMATCH_SIZE( REGEX_MAX_GROUPS ) ]; PHB_ITEM pRetArray, pMatch, pString; int i, iMatches, iMaxMatch; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; PHB_REGEX pRegEx; const char * pszString; HB_SIZE ulLen; @@ -255,13 +255,13 @@ static BOOL hb_regex( int iRequest ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, "Wrong parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - return FALSE; + return HB_FALSE; } pRegEx = hb_regexGet( hb_param( 1, HB_IT_ANY ), ( !hb_parldef( 3, 1 ) ? HBREG_ICASE : 0 ) | ( hb_parl( 4 ) ? HBREG_NEWLINE : 0 ) ); if( !pRegEx ) - return FALSE; + return HB_FALSE; pszString = hb_itemGetCPtr( pString ); ulLen = hb_itemGetCLen( pString ); @@ -285,7 +285,7 @@ static BOOL hb_regex( int iRequest ) hb_arraySetCL( pRetArray, i + 1, NULL, 0 ); } hb_itemReturnRelease( pRetArray ); - fResult = TRUE; + fResult = HB_TRUE; break; case 1: /* LIKE */ @@ -294,7 +294,7 @@ static BOOL hb_regex( int iRequest ) break; case 2: /* MATCH ( HAS ) */ - fResult = TRUE; + fResult = HB_TRUE; break; case 3: /* SPLIT */ @@ -324,7 +324,7 @@ static BOOL hb_regex( int iRequest ) hb_itemRelease( pMatch ); hb_itemReturnRelease( pRetArray ); - fResult = TRUE; + fResult = HB_TRUE; break; case 4: /* results AND positions */ @@ -353,7 +353,7 @@ static BOOL hb_regex( int iRequest ) } } hb_itemReturnRelease( pRetArray ); - fResult = TRUE; + fResult = HB_TRUE; break; case 5: /* _ALL_ results AND positions */ @@ -361,7 +361,7 @@ static BOOL hb_regex( int iRequest ) PHB_ITEM pAtxArray; int iMax = hb_parni( 5 ); /* max nuber of matches I want, 0 = unlimited */ int iGetMatch = hb_parni( 6 ); /* Gets if want only one single match or a sub-match */ - BOOL fOnlyMatch = hb_parldef( 7, 1 ); /* if TRUE returns only matches and sub-matches, not positions */ + HB_BOOL fOnlyMatch = hb_parldef( 7, 1 ); /* if HB_TRUE returns only matches and sub-matches, not positions */ HB_SIZE ulOffSet = 0; int iCount = 0; int iSO, iEO; @@ -459,7 +459,7 @@ static BOOL hb_regex( int iRequest ) while( iEO && ulLen && ( iMax == 0 || iCount < iMax ) && ( iMatches = hb_regexec( pRegEx, pszString, ulLen, iMaxMatch, aMatches ) ) > 0 ); hb_itemReturnRelease( pRetArray ); - fResult = TRUE; + fResult = HB_TRUE; break; } } @@ -469,7 +469,7 @@ static BOOL hb_regex( int iRequest ) pRetArray = hb_itemArrayNew( 1 ); hb_arraySet( pRetArray, 1, pString ); hb_itemReturnRelease( pRetArray ); - fResult = TRUE; + fResult = HB_TRUE; } hb_regexFree( pRegEx ); diff --git a/harbour/src/rtl/hbregexc.c b/harbour/src/rtl/hbregexc.c index 2e0dd409c6..0f9420c458 100644 --- a/harbour/src/rtl/hbregexc.c +++ b/harbour/src/rtl/hbregexc.c @@ -101,7 +101,7 @@ static const HB_GC_FUNCS s_gcRegexFuncs = hb_gcDummyMark }; -BOOL hb_regexIs( PHB_ITEM pItem ) +HB_BOOL hb_regexIs( PHB_ITEM pItem ) { return hb_itemGetPtrGC( pItem, &s_gcRegexFuncs ) != NULL; } @@ -114,7 +114,7 @@ PHB_REGEX hb_regexCompile( const char *szRegEx, HB_SIZE ulLen, int iFlags ) pRegEx = ( PHB_REGEX ) hb_gcAllocate( sizeof( HB_REGEX ), &s_gcRegexFuncs ); memset( pRegEx, 0, sizeof( HB_REGEX ) ); - pRegEx->fFree = TRUE; + pRegEx->fFree = HB_TRUE; pRegEx->iFlags = iFlags; if( ( s_reg_comp )( pRegEx, szRegEx ) != 0 ) @@ -151,7 +151,7 @@ PHB_REGEX hb_regexGet( PHB_ITEM pRegExItm, int iFlags ) return pRegEx; } -void hb_regexFree( PHB_REGEX pRegEx ) +void hb_regexFree( PHB_REGEX pRegEx ) { if( pRegEx && pRegEx->fFree ) { @@ -160,10 +160,10 @@ void hb_regexFree( PHB_REGEX pRegEx ) } } -BOOL hb_regexMatch( PHB_REGEX pRegEx, const char *szString, HB_SIZE ulLen, BOOL fFull ) +HB_BOOL hb_regexMatch( PHB_REGEX pRegEx, const char *szString, HB_SIZE ulLen, HB_BOOL fFull ) { HB_REGMATCH aMatches[ HB_REGMATCH_SIZE( 1 ) ]; - BOOL fMatch; + HB_BOOL fMatch; fMatch = ( s_reg_exec )( pRegEx, szString, ulLen, 1, aMatches ) > 0; return fMatch && ( !fFull || diff --git a/harbour/src/rtl/hbrunfun.c b/harbour/src/rtl/hbrunfun.c index cc76ba532c..52cfc75132 100644 --- a/harbour/src/rtl/hbrunfun.c +++ b/harbour/src/rtl/hbrunfun.c @@ -68,7 +68,7 @@ HB_FUNC( HB_RUN ) { #if defined( HB_OS_WIN_CE ) iResult = hb_fsProcessRun( pszCommand, - NULL, 0, NULL, NULL, NULL, NULL, FALSE ); + NULL, 0, NULL, NULL, NULL, NULL, HB_FALSE ); #else char * pszFree = NULL; diff --git a/harbour/src/rtl/hbsocket.c b/harbour/src/rtl/hbsocket.c index f733e51569..f697c5ab46 100644 --- a/harbour/src/rtl/hbsocket.c +++ b/harbour/src/rtl/hbsocket.c @@ -352,36 +352,36 @@ int hb_socketGetAddrFamilly( const void * pSockAddr, unsigned len ) return -1; } -BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, - const char * szAddr ) +HB_BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, + const char * szAddr ) { HB_SYMBOL_UNUSED( szAddr ); hb_socketSetRawError( HB_SOCKET_ERR_AFNOSUPPORT ); *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } -BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, - const char * szAddr, int iPort ) +HB_BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, + const char * szAddr, int iPort ) { HB_SYMBOL_UNUSED( szAddr ); HB_SYMBOL_UNUSED( iPort ); hb_socketSetRawError( HB_SOCKET_ERR_AFNOSUPPORT ); *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } -BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, - const char * szAddr, int iPort ) +HB_BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, + const char * szAddr, int iPort ) { HB_SYMBOL_UNUSED( szAddr ); HB_SYMBOL_UNUSED( iPort ); hb_socketSetRawError( HB_SOCKET_ERR_AFNOSUPPORT ); *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } char * hb_socketAddrGetName( const void * pSockAddr, unsigned len ) @@ -400,13 +400,13 @@ int hb_socketAddrGetPort( const void * pSockAddr, unsigned len ) return -1; } -BOOL hb_socketAddrFromItem( void ** pSockAddr, unsigned * puiLen, PHB_ITEM pAddrItm ) +HB_BOOL hb_socketAddrFromItem( void ** pSockAddr, unsigned * puiLen, PHB_ITEM pAddrItm ) { HB_SYMBOL_UNUSED( pAddrItm ); hb_socketSetRawError( HB_SOCKET_ERR_AFNOSUPPORT ); *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } PHB_ITEM hb_socketAddrToItem( const void * pSockAddr, unsigned len ) @@ -544,7 +544,7 @@ long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** return -1; } -int hb_socketSetBlockingIO( HB_SOCKET sd, BOOL fBlocking ) +int hb_socketSetBlockingIO( HB_SOCKET sd, HB_BOOL fBlocking ) { HB_SYMBOL_UNUSED( sd ); HB_SYMBOL_UNUSED( fBlocking ); @@ -552,7 +552,7 @@ int hb_socketSetBlockingIO( HB_SOCKET sd, BOOL fBlocking ) return -1; } -int hb_socketSetNoDelay( HB_SOCKET sd, BOOL fNoDelay ) +int hb_socketSetNoDelay( HB_SOCKET sd, HB_BOOL fNoDelay ) { HB_SYMBOL_UNUSED( sd ); HB_SYMBOL_UNUSED( fNoDelay ); @@ -560,7 +560,7 @@ int hb_socketSetNoDelay( HB_SOCKET sd, BOOL fNoDelay ) return -1; } -int hb_socketSetReuseAddr( HB_SOCKET sd, BOOL fReuse ) +int hb_socketSetReuseAddr( HB_SOCKET sd, HB_BOOL fReuse ) { HB_SYMBOL_UNUSED( sd ); HB_SYMBOL_UNUSED( fReuse ); @@ -568,7 +568,7 @@ int hb_socketSetReuseAddr( HB_SOCKET sd, BOOL fReuse ) return -1; } -int hb_socketSetKeepAlive( HB_SOCKET sd, BOOL fKeepAlive ) +int hb_socketSetKeepAlive( HB_SOCKET sd, HB_BOOL fKeepAlive ) { HB_SYMBOL_UNUSED( sd ); HB_SYMBOL_UNUSED( fKeepAlive ); @@ -576,7 +576,7 @@ int hb_socketSetKeepAlive( HB_SOCKET sd, BOOL fKeepAlive ) return -1; } -int hb_socketSetBroadcast( HB_SOCKET sd, BOOL fBroadcast ) +int hb_socketSetBroadcast( HB_SOCKET sd, HB_BOOL fBroadcast ) { HB_SYMBOL_UNUSED( sd ); HB_SYMBOL_UNUSED( fBroadcast ); @@ -650,9 +650,9 @@ int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout ) return -1; } -int hb_socketSelect( PHB_ITEM pArrayRD, BOOL fSetRD, - PHB_ITEM pArrayWR, BOOL fSetWR, - PHB_ITEM pArrayEX, BOOL fSetEX, +int hb_socketSelect( PHB_ITEM pArrayRD, HB_BOOL fSetRD, + PHB_ITEM pArrayWR, HB_BOOL fSetWR, + PHB_ITEM pArrayEX, HB_BOOL fSetEX, HB_LONG timeout, HB_SOCKET_FUNC pFunc ) { HB_SYMBOL_UNUSED( pArrayRD ); @@ -667,14 +667,14 @@ int hb_socketSelect( PHB_ITEM pArrayRD, BOOL fSetRD, return -1; } -BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ) +HB_BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ) { HB_SYMBOL_UNUSED( szAddr ); HB_SYMBOL_UNUSED( iPort ); hb_socketSetRawError( HB_SOCKET_ERR_AFNOSUPPORT ); *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } char * hb_socketResolveAddr( const char * szAddr, int af ) @@ -1542,8 +1542,8 @@ int hb_socketGetAddrFamilly( const void * pSockAddr, unsigned len ) return pSockAddr && len ? ( ( struct sockaddr * ) pSockAddr )->sa_family : -1; } -BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, - const char * szAddr ) +HB_BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, + const char * szAddr ) { #if defined( HB_HAS_UNIX ) struct sockaddr_un sa; @@ -1556,18 +1556,18 @@ BOOL hb_socketLocalAddr( void ** pSockAddr, unsigned * puiLen, hb_strncpy( sa.sun_path, szAddr, sizeof( sa.sun_path ) - 1 ); *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; #else HB_SYMBOL_UNUSED( szAddr ); *pSockAddr = NULL; *puiLen = 0; hb_socketSetRawError( HB_SOCKET_ERR_AFNOSUPPORT ); - return FALSE; + return HB_FALSE; #endif } -BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, - const char * szAddr, int iPort ) +HB_BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, + const char * szAddr, int iPort ) { #if defined( AF_INET ) struct sockaddr_in sa; @@ -1580,7 +1580,7 @@ BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, sa.sin_addr.s_addr = htonl( INADDR_ANY ); *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; } else { @@ -1596,7 +1596,7 @@ BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, { *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; } else hb_socketSetRawError( HB_SOCKET_ERR_WRONGADDR ); @@ -1608,11 +1608,11 @@ BOOL hb_socketInetAddr( void ** pSockAddr, unsigned * puiLen, #endif *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } -BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, - const char * szAddr, int iPort ) +HB_BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, + const char * szAddr, int iPort ) { #if defined( HB_HAS_INET6 ) struct sockaddr_in6 sa; @@ -1631,7 +1631,7 @@ BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, #endif *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; } else { @@ -1641,7 +1641,7 @@ BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, { *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; } else if( err == 0 ) hb_socketSetRawError( HB_SOCKET_ERR_WRONGADDR ); @@ -1658,7 +1658,7 @@ BOOL hb_socketInet6Addr( void ** pSockAddr, unsigned * puiLen, #endif *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } /* caller must free the buffer if not NULL */ @@ -1773,9 +1773,9 @@ int hb_socketAddrGetPort( const void * pSockAddr, unsigned len ) return iPort; } -BOOL hb_socketAddrFromItem( void ** pSockAddr, unsigned * puiLen, PHB_ITEM pAddrItm ) +HB_BOOL hb_socketAddrFromItem( void ** pSockAddr, unsigned * puiLen, PHB_ITEM pAddrItm ) { - BOOL fOK = FALSE; + HB_BOOL fOK = HB_FALSE; *pSockAddr = NULL; *puiLen = 0; @@ -2067,7 +2067,7 @@ int hb_socketBind( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen ) /* it allows to reuse port immediately without timeout used to * clean all pending connections addressed to previous port owner */ - hb_socketSetReuseAddr( sd, TRUE ); + hb_socketSetReuseAddr( sd, HB_TRUE ); ret = bind( sd, ( struct sockaddr * ) pSockAddr, ( socklen_t ) uiLen ); hb_socketSetOsError( ret == 0 ? 0 : HB_SOCK_GETERROR() ); @@ -2107,11 +2107,11 @@ HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, H * network error appear after above select() or when other thread * accepts incoming connection (concurrent calls). */ - ret = timeout < 0 ? 0 : hb_socketSetBlockingIO( sd, FALSE ); + ret = timeout < 0 ? 0 : hb_socketSetBlockingIO( sd, HB_FALSE ); newsd = accept( sd, sa, &len ); hb_socketSetOsError( newsd != HB_NO_SOCKET ? 0 : HB_SOCK_GETERROR() ); if( ret > 0 ) - hb_socketSetBlockingIO( sd, TRUE ); + hb_socketSetBlockingIO( sd, HB_TRUE ); if( pSockAddr && puiLen ) { if( newsd == HB_NO_SOCKET ) @@ -2131,7 +2131,7 @@ HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, H * explicitly.. */ if( newsd != HB_NO_SOCKET ) - hb_socketSetBlockingIO( newsd, TRUE ); + hb_socketSetBlockingIO( newsd, HB_TRUE ); } else if( ret == 0 ) hb_socketSetRawError( HB_SOCKET_ERR_TIMEOUT ); @@ -2148,7 +2148,7 @@ int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_L /* set not blocking IO to implement timeout in connect() operation in * portable way without using signals */ - blk = timeout < 0 ? 0 : hb_socketSetBlockingIO( sd, FALSE ); + blk = timeout < 0 ? 0 : hb_socketSetBlockingIO( sd, HB_FALSE ); ret = connect( sd, ( struct sockaddr * ) pSockAddr, ( socklen_t ) uiLen ); hb_socketSetOsError( ret == 0 ? 0 : HB_SOCK_GETERROR() ); if( ret != 0 && HB_SOCK_IS_EINPROGRES() && timeout >= 0 ) @@ -2166,7 +2166,7 @@ int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_L } } if( blk > 0 ) - hb_socketSetBlockingIO( sd, TRUE ); + hb_socketSetBlockingIO( sd, HB_TRUE ); hb_vmLock(); return ret; } @@ -2324,7 +2324,7 @@ long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** return lReceived; } -int hb_socketSetBlockingIO( HB_SOCKET sd, BOOL fBlocking ) +int hb_socketSetBlockingIO( HB_SOCKET sd, HB_BOOL fBlocking ) { int ret; #if defined( HB_OS_WIN ) @@ -2343,7 +2343,7 @@ int hb_socketSetBlockingIO( HB_SOCKET sd, BOOL fBlocking ) ret = fcntl( sd, F_GETFL, 0 ); if( ret != -1 ) { - BOOL fBlocked; + HB_BOOL fBlocked; long flags; fBlocked = ( ret & O_NONBLOCK ) == 0; if( fBlocking ? !fBlocked : fBlocked ) @@ -2376,7 +2376,7 @@ int hb_socketSetBlockingIO( HB_SOCKET sd, BOOL fBlocking ) return ret; } -int hb_socketSetNoDelay( HB_SOCKET sd, BOOL fNoDelay ) +int hb_socketSetNoDelay( HB_SOCKET sd, HB_BOOL fNoDelay ) { int ret; #if defined( TCP_NODELAY ) @@ -2400,7 +2400,7 @@ int hb_socketSetNoDelay( HB_SOCKET sd, BOOL fNoDelay ) return ret; } -int hb_socketSetReuseAddr( HB_SOCKET sd, BOOL fReuse ) +int hb_socketSetReuseAddr( HB_SOCKET sd, HB_BOOL fReuse ) { /* it allows to reuse port immediately without timeout used to * clean all pending connections addressed to previous port owner @@ -2411,7 +2411,7 @@ int hb_socketSetReuseAddr( HB_SOCKET sd, BOOL fReuse ) return ret; } -int hb_socketSetKeepAlive( HB_SOCKET sd, BOOL fKeepAlive ) +int hb_socketSetKeepAlive( HB_SOCKET sd, HB_BOOL fKeepAlive ) { int val = fKeepAlive ? 1 : 0, ret; ret = setsockopt( sd, SOL_SOCKET, SO_KEEPALIVE, ( const char * ) &val, sizeof( val ) ); @@ -2419,7 +2419,7 @@ int hb_socketSetKeepAlive( HB_SOCKET sd, BOOL fKeepAlive ) return ret; } -int hb_socketSetBroadcast( HB_SOCKET sd, BOOL fBroadcast ) +int hb_socketSetBroadcast( HB_SOCKET sd, HB_BOOL fBroadcast ) { int val = fBroadcast ? 1 : 0, ret; ret = setsockopt( sd, SOL_SOCKET, SO_BROADCAST, ( const char * ) &val, sizeof( val ) ); @@ -2539,16 +2539,16 @@ int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout ) return ret; } -int hb_socketSelect( PHB_ITEM pArrayRD, BOOL fSetRD, - PHB_ITEM pArrayWR, BOOL fSetWR, - PHB_ITEM pArrayEX, BOOL fSetEX, +int hb_socketSelect( PHB_ITEM pArrayRD, HB_BOOL fSetRD, + PHB_ITEM pArrayWR, HB_BOOL fSetWR, + PHB_ITEM pArrayEX, HB_BOOL fSetEX, HB_LONG timeout, HB_SOCKET_FUNC pFunc ) { HB_SOCKET maxsd, sd; int i, ret; HB_SIZE ulLen, ulPos, ul; PHB_ITEM pItemSets[ 3 ]; - BOOL pSet[ 3 ]; + HB_BOOL pSet[ 3 ]; fd_set fds[ 3 ], *pfds[ 3 ]; struct timeval tv, *ptv; @@ -2644,11 +2644,11 @@ int hb_socketSelect( PHB_ITEM pArrayRD, BOOL fSetRD, } /* DNS functions */ -BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ) +HB_BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char * szAddr, int iPort ) { #if defined( AF_INET ) struct sockaddr_in sa; - BOOL fTrans ; + HB_BOOL fTrans; memset( &sa, 0, sizeof( sa ) ); sa.sin_family = AF_INET; @@ -2658,7 +2658,7 @@ BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char sa.sin_addr.s_addr = htonl( INADDR_ANY ); *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; } #if defined( HB_HAS_INET_PTON ) @@ -2685,7 +2685,7 @@ BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char hb_socketGetAddrFamilly( res->ai_addr, res->ai_addrlen ) == AF_INET ) { sa.sin_addr.s_addr = ( ( struct sockaddr_in * ) res->ai_addr )->sin_addr.s_addr; - fTrans = TRUE; + fTrans = HB_TRUE; } freeaddrinfo( res ); } @@ -2698,7 +2698,7 @@ BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char if( he && he->h_addr_list[ 0 ] ) { sa.sin_addr.s_addr = ( ( struct in_addr * ) he->h_addr_list[ 0 ] )->s_addr; - fTrans = TRUE; + fTrans = HB_TRUE; } hb_vmLock(); #endif @@ -2708,7 +2708,7 @@ BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char { *pSockAddr = memcpy( hb_xgrab( sizeof( sa ) + 1 ), &sa, sizeof( sa ) ); *puiLen = ( unsigned ) sizeof( sa ); - return TRUE; + return HB_TRUE; } #else HB_SYMBOL_UNUSED( szAddr ); @@ -2717,13 +2717,13 @@ BOOL hb_socketResolveInetAddr( void ** pSockAddr, unsigned * puiLen, const char #endif *pSockAddr = NULL; *puiLen = 0; - return FALSE; + return HB_FALSE; } char * hb_socketResolveAddr( const char * szAddr, int af ) { char * szResult = NULL; - BOOL fTrans = FALSE; + HB_BOOL fTrans = HB_FALSE; if( af == HB_SOCKET_PF_INET ) { @@ -2748,7 +2748,7 @@ char * hb_socketResolveAddr( const char * szAddr, int af ) if( he && he->h_addr_list[ 0 ] ) { sin.s_addr = ( ( struct in_addr * ) he->h_addr_list[ 0 ] )->s_addr; - fTrans = TRUE; + fTrans = HB_TRUE; } hb_vmLock(); } @@ -2776,7 +2776,7 @@ char * hb_socketResolveAddr( const char * szAddr, int af ) fTrans = inet_pton( AF_INET6, szAddr, &sin ) > 0; #else int iTODO; - fTrans = FALSE; + fTrans = HB_FALSE; #endif } #endif diff --git a/harbour/src/rtl/hbstrfmt.c b/harbour/src/rtl/hbstrfmt.c index 1ec07733d3..bc56098d99 100644 --- a/harbour/src/rtl/hbstrfmt.c +++ b/harbour/src/rtl/hbstrfmt.c @@ -79,7 +79,7 @@ PHB_ITEM hb_strFormat( PHB_ITEM pItemReturn, PHB_ITEM pItemFormat, int iCount, P const char *pFmt, *pFmtEnd, *pFmtSave; int i, iParam, iParamNo, iWidth, iDec; HB_SIZE ulSize; - BOOL fLeftAlign, fForceSign, fPadZero, fSpaceSign, fSign; + HB_BOOL fLeftAlign, fForceSign, fPadZero, fSpaceSign, fSign; pFmt = hb_itemGetCPtr( pItemFormat ); ulSize = hb_itemGetCLen( pItemFormat ); diff --git a/harbour/src/rtl/hbtoken.c b/harbour/src/rtl/hbtoken.c index 7ed24c747a..f9415e1937 100644 --- a/harbour/src/rtl/hbtoken.c +++ b/harbour/src/rtl/hbtoken.c @@ -175,10 +175,10 @@ static PHB_ITEM hb_tokenArray( const char * szLine, HB_SIZE ulLen, return pArray; } -static BOOL hb_tokenParam( int iParam, HB_SIZE ulSkip, - const char ** pszLine, HB_SIZE * pulLen, - const char ** pszDelim, HB_SIZE * pulDelim, - int * piFlags ) +static HB_BOOL hb_tokenParam( int iParam, HB_SIZE ulSkip, + const char ** pszLine, HB_SIZE * pulLen, + const char ** pszDelim, HB_SIZE * pulDelim, + int * piFlags ) { const char * szLine = hb_parc( 1 ), * szDelim = NULL; HB_SIZE ulLen = hb_parclen( 1 ), ulDelim = 0; diff --git a/harbour/src/rtl/idle.c b/harbour/src/rtl/idle.c index 4880190572..3984a20e8b 100644 --- a/harbour/src/rtl/idle.c +++ b/harbour/src/rtl/idle.c @@ -72,8 +72,8 @@ typedef struct { - BOOL fCollectGarbage; /* flag to force GC activation in idle state */ - BOOL fIamIdle; /* flag to prevent recursive calls of hb_idleState() */ + HB_BOOL fCollectGarbage; /* flag to force GC activation in idle state */ + HB_BOOL fIamIdle; /* flag to prevent recursive calls of hb_idleState() */ int iIdleTask; /* current task to be executed */ int iIdleMaxTask; /* number of tasks in the list */ PHB_ITEM * pIdleTasks; /* list of background tasks */ @@ -110,15 +110,15 @@ void hb_idleState( void ) if( ! pIdleData->fIamIdle ) { - pIdleData->fIamIdle = TRUE; + pIdleData->fIamIdle = HB_TRUE; hb_releaseCPU(); if( hb_vmRequestQuery() == 0 ) { if( pIdleData->fCollectGarbage ) { - hb_gcCollectAll( FALSE ); - pIdleData->fCollectGarbage = FALSE; + hb_gcCollectAll( HB_FALSE ); + pIdleData->fCollectGarbage = HB_FALSE; } if( pIdleData->pIdleTasks && pIdleData->iIdleTask < pIdleData->iIdleMaxTask ) @@ -128,10 +128,10 @@ void hb_idleState( void ) if( pIdleData->iIdleTask == pIdleData->iIdleMaxTask && hb_setGetIdleRepeat() ) { pIdleData->iIdleTask = 0; /* restart processing of idle tasks */ - pIdleData->fCollectGarbage = TRUE; + pIdleData->fCollectGarbage = HB_TRUE; } } - pIdleData->fIamIdle = FALSE; + pIdleData->fIamIdle = HB_FALSE; } } } @@ -143,7 +143,7 @@ void hb_idleReset( void ) if( pIdleData->iIdleTask == pIdleData->iIdleMaxTask && !hb_setGetIdleRepeat() ) pIdleData->iIdleTask = 0; - pIdleData->fCollectGarbage = TRUE; + pIdleData->fCollectGarbage = HB_TRUE; } void hb_idleSleep( double dSeconds ) @@ -163,7 +163,7 @@ void hb_idleSleep( double dSeconds ) HB_FUNC( HB_IDLESTATE ) { PHB_IDLEDATA pIdleData = ( PHB_IDLEDATA ) hb_stackGetTSD( &s_idleData ); - pIdleData->fCollectGarbage = TRUE; + pIdleData->fCollectGarbage = HB_TRUE; hb_idleState(); } diff --git a/harbour/src/rtl/inkeyapi.c b/harbour/src/rtl/inkeyapi.c index a236cd92d2..9278081c63 100644 --- a/harbour/src/rtl/inkeyapi.c +++ b/harbour/src/rtl/inkeyapi.c @@ -52,7 +52,7 @@ #include "hbgtcore.h" -int hb_inkey( BOOL fWait, double dSeconds, int iEventMask ) +int hb_inkey( HB_BOOL fWait, double dSeconds, int iEventMask ) { int iKey = 0; PHB_GT pGT; diff --git a/harbour/src/rtl/isprint.c b/harbour/src/rtl/isprint.c index 1f3e5e9b42..b4d24bcbcb 100644 --- a/harbour/src/rtl/isprint.c +++ b/harbour/src/rtl/isprint.c @@ -53,9 +53,9 @@ #include "hbapi.h" #include "hbapifs.h" -BOOL hb_printerIsReady( const char * pszPrinterName ) +HB_BOOL hb_printerIsReady( const char * pszPrinterName ) { - BOOL bIsPrinter; + HB_BOOL bIsPrinter; #if defined( HB_OS_DOS ) @@ -92,7 +92,7 @@ BOOL hb_printerIsReady( const char * pszPrinterName ) bIsPrinter = ( regs.h.ah == 0x90 ); } else - bIsPrinter = FALSE; + bIsPrinter = HB_FALSE; } #elif defined( HB_OS_WIN ) @@ -122,7 +122,7 @@ BOOL hb_printerIsReady( const char * pszPrinterName ) HB_SYMBOL_UNUSED( pszPrinterName ); - bIsPrinter = FALSE; + bIsPrinter = HB_FALSE; } #endif diff --git a/harbour/src/rtl/itemseri.c b/harbour/src/rtl/itemseri.c index a57ebb9928..aceaaae762 100644 --- a/harbour/src/rtl/itemseri.c +++ b/harbour/src/rtl/itemseri.c @@ -151,7 +151,7 @@ typedef struct _HB_CYCLIC_REF { void * value; ULONG ulOffset; - BOOL fRef; + HB_BOOL fRef; struct _HB_CYCLIC_REF * pNext; } HB_CYCLIC_REF, * PHB_CYCLIC_REF; @@ -160,15 +160,15 @@ static ULONG hb_deserializeItem( PHB_ITEM pItem, const UCHAR * pBuffer, ULONG ulOffset, PHB_CYCLIC_REF pRef ); -static BOOL hb_itemSerialValueRef( PHB_CYCLIC_REF * pRefPtr, void * value, - ULONG ulOffset ) +static HB_BOOL hb_itemSerialValueRef( PHB_CYCLIC_REF * pRefPtr, void * value, + ULONG ulOffset ) { while( * pRefPtr ) { if( ( * pRefPtr )->value == value ) { - ( * pRefPtr )->fRef = TRUE; - return TRUE; + ( * pRefPtr )->fRef = HB_TRUE; + return HB_TRUE; } pRefPtr = &( * pRefPtr )->pNext; } @@ -176,10 +176,10 @@ static BOOL hb_itemSerialValueRef( PHB_CYCLIC_REF * pRefPtr, void * value, * pRefPtr = ( PHB_CYCLIC_REF ) hb_xgrab( sizeof( HB_CYCLIC_REF ) ); ( * pRefPtr )->value = value; ( * pRefPtr )->ulOffset = ulOffset; - ( * pRefPtr )->fRef = FALSE; + ( * pRefPtr )->fRef = HB_FALSE; ( * pRefPtr )->pNext = NULL; - return FALSE; + return HB_FALSE; } static void hb_itemSerialUnRefFree( PHB_CYCLIC_REF * pRefPtr ) @@ -199,8 +199,8 @@ static void hb_itemSerialUnRefFree( PHB_CYCLIC_REF * pRefPtr ) } } -static BOOL hb_itemSerialValueOffset( PHB_CYCLIC_REF pRef, void * value, - ULONG ulOffset, ULONG * pulRef ) +static HB_BOOL hb_itemSerialValueOffset( PHB_CYCLIC_REF pRef, void * value, + ULONG ulOffset, ULONG * pulRef ) { while( pRef ) { @@ -213,26 +213,26 @@ static BOOL hb_itemSerialValueOffset( PHB_CYCLIC_REF pRef, void * value, } * pulRef = HB_SERIAL_DUMMYOFFSET; - return FALSE; + return HB_FALSE; } -static BOOL hb_itemSerialOffsetRef( PHB_CYCLIC_REF * pRefPtr, void * value, - ULONG ulOffset ) +static HB_BOOL hb_itemSerialOffsetRef( PHB_CYCLIC_REF * pRefPtr, void * value, + ULONG ulOffset ) { while( * pRefPtr ) { if( ( * pRefPtr )->ulOffset == ulOffset ) - return TRUE; + return HB_TRUE; pRefPtr = &( * pRefPtr )->pNext; } * pRefPtr = ( PHB_CYCLIC_REF ) hb_xgrab( sizeof( HB_CYCLIC_REF ) ); ( * pRefPtr )->value = value; ( * pRefPtr )->ulOffset = ulOffset; - ( * pRefPtr )->fRef = FALSE; + ( * pRefPtr )->fRef = HB_FALSE; ( * pRefPtr )->pNext = NULL; - return FALSE; + return HB_FALSE; } static void hb_itemSerialOffsetSet( PHB_CYCLIC_REF pRef, PHB_ITEM pItem, @@ -273,7 +273,7 @@ static void hb_itemSerialRefFree( PHB_CYCLIC_REF pRef ) } } -static ULONG hb_itemSerialSize( PHB_ITEM pItem, BOOL fNumSize, +static ULONG hb_itemSerialSize( PHB_ITEM pItem, HB_BOOL fNumSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, PHB_CYCLIC_REF * pRefPtr, ULONG ulOffset ) { @@ -413,7 +413,7 @@ static ULONG hb_itemSerialSize( PHB_ITEM pItem, BOOL fNumSize, return ulSize; } -static ULONG hb_serializeItem( PHB_ITEM pItem, BOOL fNumSize, +static ULONG hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, UCHAR * pBuffer, ULONG ulOffset, PHB_CYCLIC_REF pRef ) @@ -808,11 +808,11 @@ static ULONG hb_deserializeItem( PHB_ITEM pItem, break; case HB_SERIAL_TRUE: - hb_itemPutL( pItem, TRUE ); + hb_itemPutL( pItem, HB_TRUE ); break; case HB_SERIAL_FALSE: - hb_itemPutL( pItem, FALSE ); + hb_itemPutL( pItem, HB_FALSE ); break; case HB_SERIAL_ZERO: @@ -1034,14 +1034,14 @@ static ULONG hb_deserializeItem( PHB_ITEM pItem, return ulOffset; } -static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, - ULONG ulOffset, PHB_CYCLIC_REF * pRefPtr ) +static HB_BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, + ULONG ulOffset, PHB_CYCLIC_REF * pRefPtr ) { const UCHAR * pBuffer = * pBufferPtr; ULONG ulSize = * pulSize, ulLen = 0; if( ulSize == 0 ) - return FALSE; + return HB_FALSE; switch( *pBuffer++ ) { @@ -1103,7 +1103,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_ARRAYREF8: if( hb_itemSerialOffsetRef( pRefPtr, NULL, ulOffset ) ) - return FALSE; + return HB_FALSE; case HB_SERIAL_ARRAY8: if( ulSize >= 2 ) { @@ -1115,7 +1115,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_ARRAYREF16: if( hb_itemSerialOffsetRef( pRefPtr, NULL, ulOffset ) ) - return FALSE; + return HB_FALSE; case HB_SERIAL_ARRAY16: if( ulSize >= 3 ) { @@ -1127,7 +1127,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_ARRAYREF32: if( hb_itemSerialOffsetRef( pRefPtr, NULL, ulOffset ) ) - return FALSE; + return HB_FALSE; case HB_SERIAL_ARRAY32: if( ulSize >= 5 ) { @@ -1139,7 +1139,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_HASHREF8: if( hb_itemSerialOffsetRef( pRefPtr, NULL, ulOffset ) ) - return FALSE; + return HB_FALSE; case HB_SERIAL_HASH8: if( ulSize >= 2 ) { @@ -1151,7 +1151,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_HASHREF16: if( hb_itemSerialOffsetRef( pRefPtr, NULL, ulOffset ) ) - return FALSE; + return HB_FALSE; case HB_SERIAL_HASH16: if( ulSize >= 3 ) { @@ -1163,7 +1163,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_HASHREF32: if( hb_itemSerialOffsetRef( pRefPtr, NULL, ulOffset ) ) - return FALSE; + return HB_FALSE; case HB_SERIAL_HASH32: if( ulSize >= 5 ) { @@ -1175,7 +1175,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, break; case HB_SERIAL_REF: if( !hb_itemSerialOffsetRef( pRefPtr, NULL, HB_GET_LE_UINT32( pBuffer ) ) ) - return FALSE; + return HB_FALSE; ulSize = 5; break; case HB_SERIAL_OBJ: @@ -1198,7 +1198,7 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, } if( ulSize > * pulSize ) - return FALSE; + return HB_FALSE; * pulSize -= ulSize; * pBufferPtr += ulSize; @@ -1208,18 +1208,18 @@ static BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, ULONG * pulSize, ulOffset += ulSize; ulSize = * pulSize; if( !hb_deserializeTest( pBufferPtr, pulSize, ulOffset, pRefPtr ) ) - return FALSE; + return HB_FALSE; ulSize -= * pulSize; --ulLen; } - return TRUE; + return HB_TRUE; } /* * public API functions */ -char * hb_itemSerialize( PHB_ITEM pItem, BOOL fNumSize, ULONG *pulSize ) +char * hb_itemSerialize( PHB_ITEM pItem, HB_BOOL fNumSize, ULONG *pulSize ) { PHB_CYCLIC_REF pRef = NULL; ULONG ulSize = hb_itemSerialSize( pItem, fNumSize, NULL, NULL, &pRef, 0 ); @@ -1236,7 +1236,7 @@ char * hb_itemSerialize( PHB_ITEM pItem, BOOL fNumSize, ULONG *pulSize ) return ( char * ) pBuffer; } -char * hb_itemSerializeCP( PHB_ITEM pItem, BOOL fNumSize, +char * hb_itemSerializeCP( PHB_ITEM pItem, HB_BOOL fNumSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, ULONG *pulSize ) { diff --git a/harbour/src/rtl/langapi.c b/harbour/src/rtl/langapi.c index b3e60303cd..da3685abaa 100644 --- a/harbour/src/rtl/langapi.c +++ b/harbour/src/rtl/langapi.c @@ -232,7 +232,7 @@ static int hb_langFindPos( const char * pszID ) return -1; } -BOOL hb_langRegister( PHB_LANG lang ) +HB_BOOL hb_langRegister( PHB_LANG lang ) { HB_TRACE(HB_TR_DEBUG, ("hb_langRegister(%p)", lang)); @@ -247,21 +247,21 @@ BOOL hb_langRegister( PHB_LANG lang ) if( s_langList[ iPos ] == NULL ) { s_langList[ iPos ] = lang; - return TRUE; + return HB_TRUE; } } } else { s_langList[ iPos ] = lang; - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_langDeRegister( const char * pszID ) +HB_BOOL hb_langDeRegister( const char * pszID ) { int iPos; @@ -272,10 +272,10 @@ BOOL hb_langDeRegister( const char * pszID ) if( iPos != -1 ) { s_langList[ iPos ] = NULL; - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } PHB_LANG hb_langFind( const char * pszID ) diff --git a/harbour/src/rtl/math.c b/harbour/src/rtl/math.c index 3fa9fc336a..0c08febae5 100644 --- a/harbour/src/rtl/math.c +++ b/harbour/src/rtl/math.c @@ -302,8 +302,8 @@ int matherr( struct exception *err ) } #endif -BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, - double arg1, double arg2, double dResult ) +HB_BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, + double arg1, double arg2, double dResult ) { #if defined( HB_MATH_ERRNO ) @@ -314,7 +314,7 @@ BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, switch( errno ) { case 0: - return FALSE; + return HB_FALSE; case EDOM: case ERANGE: # if defined( EOVERFLOW ) @@ -370,7 +370,7 @@ BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, if( mathHandler ) ( *mathHandler )( phb_exc ); } - return TRUE; + return HB_TRUE; #else HB_TRACE( HB_TR_DEBUG, ( "hb_mathGetError(%p,%s,%lf,%lf,%lf)", phb_exc, szFunc, arg1, arg2, dResult ) ); @@ -387,7 +387,7 @@ BOOL hb_mathGetError( HB_MATH_EXCEPTION * phb_exc, const char *szFunc, # else HB_SYMBOL_UNUSED( phb_exc ); - return FALSE; + return HB_FALSE; # endif diff --git a/harbour/src/rtl/memofile.c b/harbour/src/rtl/memofile.c index b7c99c8e1c..cd070b8806 100644 --- a/harbour/src/rtl/memofile.c +++ b/harbour/src/rtl/memofile.c @@ -58,7 +58,7 @@ this limit is extended, so we are not *strictly* compatible here. [vszakats] */ -static void hb_memoread( BOOL bHandleEOF ) +static void hb_memoread( HB_BOOL bHandleEOF ) { PHB_ITEM pFileName = hb_param( 1, HB_IT_STRING ); @@ -112,19 +112,19 @@ static void hb_memoread( BOOL bHandleEOF ) HB_FUNC( HB_MEMOREAD ) { - hb_memoread( FALSE ); + hb_memoread( HB_FALSE ); } HB_FUNC( MEMOREAD ) { - hb_memoread( TRUE ); + hb_memoread( HB_TRUE ); } -static BOOL hb_memowrit( BOOL bHandleEOF ) +static HB_BOOL hb_memowrit( HB_BOOL bHandleEOF ) { PHB_ITEM pFileName = hb_param( 1, HB_IT_STRING ); PHB_ITEM pString = hb_param( 2, HB_IT_STRING ); - BOOL bRetVal = FALSE; + HB_BOOL bRetVal = HB_FALSE; if( pFileName && pString ) { @@ -157,10 +157,10 @@ static BOOL hb_memowrit( BOOL bHandleEOF ) HB_FUNC( HB_MEMOWRIT ) { - hb_retl( hb_memowrit( FALSE ) ); + hb_retl( hb_memowrit( HB_FALSE ) ); } HB_FUNC( MEMOWRIT ) { - hb_retl( hb_memowrit( TRUE ) ); + hb_retl( hb_memowrit( HB_TRUE ) ); } diff --git a/harbour/src/rtl/minmax.c b/harbour/src/rtl/minmax.c index c44fad4c40..0f98e6e1fd 100644 --- a/harbour/src/rtl/minmax.c +++ b/harbour/src/rtl/minmax.c @@ -87,8 +87,8 @@ HB_FUNC( MAX ) } else if( HB_IS_LOGICAL( p1 ) && HB_IS_LOGICAL( p2 ) ) { - BOOL b1 = hb_itemGetL( p1 ); - BOOL b2 = hb_itemGetL( p2 ); + HB_BOOL b1 = hb_itemGetL( p1 ); + HB_BOOL b2 = hb_itemGetL( p2 ); hb_retl( b1 >= b2 ? b1 : b2 ); return; @@ -148,8 +148,8 @@ HB_FUNC( MIN ) } else if( HB_IS_LOGICAL( p1 ) && HB_IS_LOGICAL( p2 ) ) { - BOOL b1 = hb_itemGetL( p1 ); - BOOL b2 = hb_itemGetL( p2 ); + HB_BOOL b1 = hb_itemGetL( p1 ); + HB_BOOL b2 = hb_itemGetL( p2 ); hb_retl( b1 <= b2 ? b1 : b2 ); return; diff --git a/harbour/src/rtl/mlcfunc.c b/harbour/src/rtl/mlcfunc.c index f11adf616e..03afd23b00 100644 --- a/harbour/src/rtl/mlcfunc.c +++ b/harbour/src/rtl/mlcfunc.c @@ -75,7 +75,7 @@ static int hb_mlEol( const char * pszString, HB_SIZE ulLen, static HB_SIZE hb_mlGetLine( const char * pszString, HB_SIZE ulLen, HB_SIZE ulOffset, HB_SIZE ulLineLength, HB_SIZE ulTabSize, HB_SIZE ulMaxPos, - BOOL fWordWrap, PHB_EOL_INFO pEOLs, int iEOLs, + HB_BOOL fWordWrap, PHB_EOL_INFO pEOLs, int iEOLs, HB_SIZE * pulLen, HB_SIZE * pulEOL ) { HB_SIZE ulCol = 0, ulBlankCol = 0, ulBlankPos = 0; @@ -217,7 +217,7 @@ static PHB_EOL_INFO hb_mlGetEOLs( int iParam, int * piEOLs ) static const char * hb_mlGetParams( int iParAdd, HB_SIZE * pulLen, HB_SIZE * pulLineLength, - HB_SIZE * pulTabSize, BOOL * pfWordWrap, + HB_SIZE * pulTabSize, HB_BOOL * pfWordWrap, PHB_EOL_INFO * pEOLs, int * piEOLs ) { const char * pszString = hb_parc( 1 ); @@ -250,7 +250,7 @@ static const char * hb_mlGetParams( int iParAdd, HB_SIZE * pulLen, HB_FUNC( MEMOLINE ) { HB_SIZE ulLen, ulLineLength, ulTabSize; - BOOL fWordWrap; + HB_BOOL fWordWrap; PHB_EOL_INFO pEOLs; int iEOLs; const char * pszString = hb_mlGetParams( 1, &ulLen, &ulLineLength, @@ -312,7 +312,7 @@ HB_FUNC( MEMOLINE ) HB_FUNC( MLCOUNT ) { HB_SIZE ulLen, ulLineLength, ulTabSize; - BOOL fWordWrap; + HB_BOOL fWordWrap; PHB_EOL_INFO pEOLs; int iEOLs; const char * pszString = hb_mlGetParams( 0, &ulLen, &ulLineLength, @@ -339,7 +339,7 @@ HB_FUNC( MLCOUNT ) HB_FUNC( MLPOS ) { HB_SIZE ulLen, ulLineLength, ulTabSize; - BOOL fWordWrap; + HB_BOOL fWordWrap; PHB_EOL_INFO pEOLs; int iEOLs; const char * pszString = hb_mlGetParams( 1, &ulLen, &ulLineLength, @@ -367,7 +367,7 @@ HB_FUNC( MLPOS ) HB_FUNC( MLCTOPOS ) { HB_SIZE ulLen, ulLineLength, ulTabSize; - BOOL fWordWrap; + HB_BOOL fWordWrap; PHB_EOL_INFO pEOLs; int iEOLs; const char * pszString = hb_mlGetParams( 2, &ulLen, &ulLineLength, @@ -388,7 +388,7 @@ HB_FUNC( MLCTOPOS ) pEOLs, iEOLs, &ulCols, NULL ); if( ulOffset < ulLen && ulCol ) ulOffset = hb_mlGetLine( pszString, ulLen, ulOffset, - ulCol, ulTabSize, ulLen, FALSE, + ulCol, ulTabSize, ulLen, HB_FALSE, pEOLs, iEOLs, &ulCols, NULL ); } hb_xfree( pEOLs ); @@ -400,7 +400,7 @@ HB_FUNC( MLCTOPOS ) HB_FUNC( MPOSTOLC ) { HB_SIZE ulLen, ulLineLength, ulTabSize; - BOOL fWordWrap; + HB_BOOL fWordWrap; PHB_EOL_INFO pEOLs; int iEOLs; const char * pszString = hb_mlGetParams( 1, &ulLen, &ulLineLength, diff --git a/harbour/src/rtl/mouse53.c b/harbour/src/rtl/mouse53.c index ea120cde76..9f02ff81fd 100644 --- a/harbour/src/rtl/mouse53.c +++ b/harbour/src/rtl/mouse53.c @@ -67,12 +67,12 @@ HB_FUNC( MPRESENT ) HB_FUNC( MHIDE ) { - hb_mouseSetCursor( FALSE ); + hb_mouseSetCursor( HB_FALSE ); } HB_FUNC( MSHOW ) { - hb_mouseSetCursor( TRUE ); + hb_mouseSetCursor( HB_TRUE ); } HB_FUNC( MSETCURSOR ) diff --git a/harbour/src/rtl/mouseapi.c b/harbour/src/rtl/mouseapi.c index 6556248b04..a04b482c8b 100644 --- a/harbour/src/rtl/mouseapi.c +++ b/harbour/src/rtl/mouseapi.c @@ -70,9 +70,9 @@ */ /* C callable interface */ -BOOL hb_mouseIsPresent( void ) +HB_BOOL hb_mouseIsPresent( void ) { - BOOL fPresent = FALSE; + HB_BOOL fPresent = HB_FALSE; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_mouseIsPresent()")); @@ -86,9 +86,9 @@ BOOL hb_mouseIsPresent( void ) return fPresent; } -BOOL hb_mouseGetCursor( void ) +HB_BOOL hb_mouseGetCursor( void ) { - BOOL fVisible = FALSE; + HB_BOOL fVisible = HB_FALSE; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_mouseGetCursor()")); @@ -102,7 +102,7 @@ BOOL hb_mouseGetCursor( void ) return fVisible; } -void hb_mouseSetCursor( BOOL fVisible ) +void hb_mouseSetCursor( HB_BOOL fVisible ) { PHB_GT pGT; @@ -294,9 +294,9 @@ int hb_mouseCountButton( void ) return iButtons; } -BOOL hb_mouseButtonState( int iButton ) +HB_BOOL hb_mouseButtonState( int iButton ) { - BOOL fPressed = FALSE; + HB_BOOL fPressed = HB_FALSE; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_mouseButtonState(%d)", iButton)); @@ -310,9 +310,9 @@ BOOL hb_mouseButtonState( int iButton ) return fPressed; } -BOOL hb_mouseButtonPressed( int iButton, int * piRow, int * piCol ) +HB_BOOL hb_mouseButtonPressed( int iButton, int * piRow, int * piCol ) { - BOOL fPressed = FALSE; + HB_BOOL fPressed = HB_FALSE; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_mouseButtonPressed(%d,%p,%p)", iButton, piRow, piCol)); @@ -326,9 +326,9 @@ BOOL hb_mouseButtonPressed( int iButton, int * piRow, int * piCol ) return fPressed; } -BOOL hb_mouseButtonReleased( int iButton, int * piRow, int * piCol ) +HB_BOOL hb_mouseButtonReleased( int iButton, int * piRow, int * piCol ) { - BOOL fReleased = FALSE; + HB_BOOL fReleased = HB_FALSE; PHB_GT pGT; HB_TRACE(HB_TR_DEBUG, ("hb_mouseButtonReleased(%d,%p,%p)", iButton, piRow, piCol)); diff --git a/harbour/src/rtl/padc.c b/harbour/src/rtl/padc.c index 676b040d56..c115c890f5 100644 --- a/harbour/src/rtl/padc.c +++ b/harbour/src/rtl/padc.c @@ -58,7 +58,7 @@ HB_FUNC( PADC ) { HB_SIZE ulSize; - BOOL bFreeReq; + HB_BOOL bFreeReq; char * szText; long lLen = hb_parnl( 2 ); diff --git a/harbour/src/rtl/padl.c b/harbour/src/rtl/padl.c index 27869a1f8c..0771d42bc2 100644 --- a/harbour/src/rtl/padl.c +++ b/harbour/src/rtl/padl.c @@ -58,7 +58,7 @@ HB_FUNC( PADL ) { HB_SIZE ulSize; - BOOL bFreeReq; + HB_BOOL bFreeReq; char * szText; long lLen = hb_parnl( 2 ); diff --git a/harbour/src/rtl/padr.c b/harbour/src/rtl/padr.c index 6e13e97ead..ba64fe33d4 100644 --- a/harbour/src/rtl/padr.c +++ b/harbour/src/rtl/padr.c @@ -58,7 +58,7 @@ HB_FUNC( PADR ) { HB_SIZE ulSize; - BOOL bFreeReq; + HB_BOOL bFreeReq; char * szText; long lLen = hb_parnl( 2 ); diff --git a/harbour/src/rtl/philes.c b/harbour/src/rtl/philes.c index 7a54e3bebd..5063b246c1 100644 --- a/harbour/src/rtl/philes.c +++ b/harbour/src/rtl/philes.c @@ -179,7 +179,7 @@ HB_FUNC( FCLOSE ) hb_retl( uiError == 0 ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); hb_fsSetFError( uiError ); } @@ -329,7 +329,7 @@ HB_FUNC( HB_FCOMMIT ) HB_FUNC( HB_FLOCK ) { HB_ERRCODE uiError = 0; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { @@ -346,7 +346,7 @@ HB_FUNC( HB_FLOCK ) HB_FUNC( HB_FUNLOCK ) { HB_ERRCODE uiError = 0; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { @@ -413,10 +413,10 @@ HB_FUNC( HB_FGETDATETIME ) else hb_stortdt( lJulian, lMillisec, 2 ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } HB_FUNC( HB_FSETDEVMODE ) diff --git a/harbour/src/rtl/rat.c b/harbour/src/rtl/rat.c index 539549167f..a814b345f4 100644 --- a/harbour/src/rtl/rat.c +++ b/harbour/src/rtl/rat.c @@ -64,7 +64,7 @@ HB_FUNC( RAT ) { const char * pszSub = hb_parc( 1 ); const char * pszText = hb_parc( 2 ); - BOOL bFound = FALSE; + HB_BOOL bFound = HB_FALSE; while( lPos >= 0 && !bFound ) { @@ -95,7 +95,7 @@ HB_FUNC( HB_RAT ) { const char * pszSub = hb_parc( 1 ); const char * pszText = hb_parc( 2 ); - BOOL bFound = FALSE; + HB_BOOL bFound = HB_FALSE; long lStart; if( HB_ISNUM( 3 ) ) diff --git a/harbour/src/rtl/run.c b/harbour/src/rtl/run.c index ff53633e4b..68bc907618 100644 --- a/harbour/src/rtl/run.c +++ b/harbour/src/rtl/run.c @@ -66,7 +66,7 @@ HB_FUNC( __RUN ) if( pszCommand && hb_gtSuspend() == 0 ) { #if defined( HB_OS_WIN_CE ) - hb_fsProcessRun( pszCommand, NULL, 0, NULL, NULL, NULL, NULL, FALSE ); + hb_fsProcessRun( pszCommand, NULL, 0, NULL, NULL, NULL, NULL, HB_FALSE ); #else char * pszFree = NULL; diff --git a/harbour/src/rtl/saverest.c b/harbour/src/rtl/saverest.c index 6693e2fe06..7736bbd725 100644 --- a/harbour/src/rtl/saverest.c +++ b/harbour/src/rtl/saverest.c @@ -54,7 +54,7 @@ #include "hbapigt.h" static void hb_getScreenRange( int * piMin, int * piMax, - BOOL fNoCheck, BOOL fVertical ) + HB_BOOL fNoCheck, HB_BOOL fVertical ) { int iFrom, iTo, iMax; @@ -98,10 +98,10 @@ HB_FUNC( SAVESCREEN ) int iTop, iLeft, iBottom, iRight; HB_SIZE ulSize; void * pBuffer; - BOOL fNoCheck = FALSE; + HB_BOOL fNoCheck = HB_FALSE; - hb_getScreenRange( &iTop, &iBottom, fNoCheck, TRUE ); - hb_getScreenRange( &iLeft, &iRight, fNoCheck, FALSE ); + hb_getScreenRange( &iTop, &iBottom, fNoCheck, HB_TRUE ); + hb_getScreenRange( &iLeft, &iRight, fNoCheck, HB_FALSE ); hb_gtRectSize( iTop, iLeft, iBottom, iRight, &ulSize ); pBuffer = hb_xgrab( ulSize + 1 ); @@ -115,10 +115,10 @@ HB_FUNC( RESTSCREEN ) if( HB_ISCHAR( 5 ) ) { int iTop, iLeft, iBottom, iRight; - BOOL fNoCheck = FALSE; + HB_BOOL fNoCheck = HB_FALSE; - hb_getScreenRange( &iTop, &iBottom, fNoCheck, TRUE ); - hb_getScreenRange( &iLeft, &iRight, fNoCheck, FALSE ); + hb_getScreenRange( &iTop, &iBottom, fNoCheck, HB_TRUE ); + hb_getScreenRange( &iLeft, &iRight, fNoCheck, HB_FALSE ); hb_gtRest( iTop, iLeft, iBottom, iRight, hb_parc( 5 ) ); } diff --git a/harbour/src/rtl/setcolor.c b/harbour/src/rtl/setcolor.c index 118876b4f4..6b23c51558 100644 --- a/harbour/src/rtl/setcolor.c +++ b/harbour/src/rtl/setcolor.c @@ -82,7 +82,7 @@ HB_FUNC( COLORSELECT ) HB_FUNC( SETBLINK ) { - BOOL bPreviousBlink; + HB_BOOL bPreviousBlink; hb_gtGetBlink( &bPreviousBlink ); diff --git a/harbour/src/rtl/setcurs.c b/harbour/src/rtl/setcurs.c index 02e3a0d67e..a288d68c01 100644 --- a/harbour/src/rtl/setcurs.c +++ b/harbour/src/rtl/setcurs.c @@ -53,7 +53,7 @@ #include "hbapi.h" #include "hbapigt.h" -int hb_conSetCursor( BOOL bSetCursor, int iNewCursor ) +int hb_conSetCursor( HB_BOOL bSetCursor, int iNewCursor ) { int iCursor; diff --git a/harbour/src/rtl/setkey.c b/harbour/src/rtl/setkey.c index 913e2b3e31..06717b2656 100644 --- a/harbour/src/rtl/setkey.c +++ b/harbour/src/rtl/setkey.c @@ -110,7 +110,7 @@ static PHB_SETKEY sk_findkey( int iKeyCode, PHB_SETKEY sk_list, return sk_list_tmp; } -static void sk_add( PHB_SETKEY * sk_list_ptr, BOOL bReturn, +static void sk_add( PHB_SETKEY * sk_list_ptr, HB_BOOL bReturn, int iKeyCode, PHB_ITEM pAction, PHB_ITEM pIsActive ) { if( iKeyCode ) @@ -201,7 +201,7 @@ HB_FUNC( SETKEY ) else { /* Set a SETKEY value */ - sk_add( &sk_data->sk_list, TRUE, hb_itemGetNI( pKeyCode ), + sk_add( &sk_data->sk_list, HB_TRUE, hb_itemGetNI( pKeyCode ), hb_param( 2, HB_IT_BLOCK ), NULL ); } } @@ -234,7 +234,7 @@ HB_FUNC( HB_SETKEY ) else { /* Set a SETKEY value */ - sk_add( &sk_data->sk_list, TRUE, hb_itemGetNI( pKeyCode ), + sk_add( &sk_data->sk_list, HB_TRUE, hb_itemGetNI( pKeyCode ), hb_param( 2, HB_IT_BLOCK ), hb_param( 3, HB_IT_BLOCK ) ); } } @@ -255,7 +255,7 @@ HB_FUNC( HB_SETKEYARRAY ) HB_SIZE nPos; for( nPos = 1; nPos <= nLen; nPos++ ) - sk_add( &sk_data->sk_list, FALSE, hb_arrayGetNI( pKeyCodeArray, nPos ), pAction, pIsActive ); + sk_add( &sk_data->sk_list, HB_FALSE, hb_arrayGetNI( pKeyCodeArray, nPos ), pAction, pIsActive ); } } @@ -326,7 +326,7 @@ HB_FUNC( HB_SETKEYSAVE ) { PHB_ITEM itmKeyElements = hb_arrayGetItemPtr( pParam, nitem ); - sk_add( &sk_data->sk_list, FALSE, + sk_add( &sk_data->sk_list, HB_FALSE, hb_arrayGetNI( itmKeyElements, 1 ), hb_arrayGetItemPtr( itmKeyElements, 2 ), hb_arrayGetItemPtr( itmKeyElements, 3 ) ); @@ -338,7 +338,7 @@ HB_FUNC( HB_SETKEYSAVE ) HB_FUNC( HB_SETKEYCHECK ) { PHB_ITEM pKeyCode = hb_param( 1, HB_IT_NUMERIC ); - BOOL bIsKeySet = FALSE; + HB_BOOL bIsKeySet = HB_FALSE; if( pKeyCode ) { @@ -354,7 +354,7 @@ HB_FUNC( HB_SETKEYCHECK ) if( pIsActiveResults == NULL || ! HB_IS_LOGICAL( pIsActiveResults ) || hb_itemGetL( pIsActiveResults ) ) { - bIsKeySet = TRUE; + bIsKeySet = HB_TRUE; switch( hb_pcount() ) { diff --git a/harbour/src/rtl/spfiles.c b/harbour/src/rtl/spfiles.c index 5c686daf8a..8595f2b9ae 100644 --- a/harbour/src/rtl/spfiles.c +++ b/harbour/src/rtl/spfiles.c @@ -53,10 +53,10 @@ #include "hbapifs.h" #include "hbset.h" -BOOL hb_spFile( const char * pFilename, char * pRetPath ) +HB_BOOL hb_spFile( const char * pFilename, char * pRetPath ) { char *Path; - BOOL bIsFile = FALSE; + HB_BOOL bIsFile = HB_FALSE; PHB_FNAME pFilepath; HB_TRACE(HB_TR_DEBUG, ("hb_spFile(%s, %p)", pFilename, pRetPath)); @@ -87,7 +87,7 @@ BOOL hb_spFile( const char * pFilename, char * pRetPath ) { HB_PATHNAMES * NextPath = hb_setGetFirstSetPath(); - while( bIsFile == FALSE && NextPath ) + while( bIsFile == HB_FALSE && NextPath ) { pFilepath->szPath = NextPath->szPath; hb_fsFNameMerge( Path, pFilepath ); @@ -117,10 +117,10 @@ BOOL hb_spFile( const char * pFilename, char * pRetPath ) return bIsFile; } -BOOL hb_spFileExists( const char * pFilename, char * pRetPath ) +HB_BOOL hb_spFileExists( const char * pFilename, char * pRetPath ) { char *Path; - BOOL bIsFile = FALSE; + HB_BOOL bIsFile = HB_FALSE; PHB_FNAME pFilepath; HB_TRACE(HB_TR_DEBUG, ("hb_spFile(%s, %p)", pFilename, pRetPath)); @@ -151,7 +151,7 @@ BOOL hb_spFileExists( const char * pFilename, char * pRetPath ) { HB_PATHNAMES * NextPath = hb_setGetFirstSetPath(); - while( bIsFile == FALSE && NextPath ) + while( bIsFile == HB_FALSE && NextPath ) { pFilepath->szPath = NextPath->szPath; hb_fsFNameMerge( Path, pFilepath ); diff --git a/harbour/src/rtl/strc.c b/harbour/src/rtl/strc.c index e27aa8c457..1f3d54770c 100644 --- a/harbour/src/rtl/strc.c +++ b/harbour/src/rtl/strc.c @@ -93,7 +93,7 @@ HB_FUNC( HB_STRCDECODE ) if( pText ) { HB_SIZE ulLen = hb_itemGetCLen( pText ); - BOOL fCont = hb_parl( 2 ); + HB_BOOL fCont = hb_parl( 2 ); if( ulLen > 0 ) { const char * pszSrc = hb_itemGetCPtr( pText ); @@ -113,7 +113,7 @@ HB_FUNC( HB_STRCDECODE ) { ++pszSrc; --ulLen; - fCont = TRUE; + fCont = HB_TRUE; } } if( !fCont || !ulLen ) @@ -125,7 +125,7 @@ HB_FUNC( HB_STRCDECODE ) char c = pszSrc[ ul ]; if( c == '"' ) { - fCont = FALSE; + fCont = HB_FALSE; break; } pszDst[ ulDst + ul ] = c; diff --git a/harbour/src/rtl/strclear.c b/harbour/src/rtl/strclear.c index 0edc744977..6989075ff0 100644 --- a/harbour/src/rtl/strclear.c +++ b/harbour/src/rtl/strclear.c @@ -55,21 +55,21 @@ HB_FUNC( HB_STRCLEAR ) { - PHB_ITEM pBuffer = hb_param( 1, HB_IT_STRING ); + PHB_ITEM pItem = hb_param( 1, HB_IT_STRING ); /* NOTE: clear RETURN value before calling hb_itemGetWriteCL(), it's possible that it contains copy of passed item [druzus] */ hb_retl( HB_FALSE ); - if( pBuffer && HB_ISBYREF( 1 ) ) + if( pItem && HB_ISBYREF( 1 ) ) { - char * buffer; + const char * pszPtr; + char * pBuffer; HB_SIZE nSize; - if( hb_itemGetWriteCL( pBuffer, &buffer, &nSize ) ) - { - memset( buffer, '\0', nSize + 1 ); - hb_retl( HB_TRUE ); - } + pszPtr = hb_itemGetCPtr( pItem ); + hb_itemGetWriteCL( pItem, &pBuffer, &nSize ); + memset( pBuffer, '\0', nSize + 1 ); + hb_retl( pszPtr == pBuffer ); } } diff --git a/harbour/src/rtl/strmatch.c b/harbour/src/rtl/strmatch.c index ca83adfba5..38d49d54c1 100644 --- a/harbour/src/rtl/strmatch.c +++ b/harbour/src/rtl/strmatch.c @@ -53,7 +53,7 @@ #include "hbapi.h" #include "hbregex.h" -BOOL hb_strMatchRegExp( const char * szString, const char * szPattern ) +HB_BOOL hb_strMatchRegExp( const char * szString, const char * szPattern ) { PHB_REGEX pRegEx; @@ -62,8 +62,8 @@ BOOL hb_strMatchRegExp( const char * szString, const char * szPattern ) pRegEx = hb_regexCompile( szPattern, strlen( szPattern ), HBREG_EXTENDED ); if( pRegEx ) { - BOOL fMatch; - fMatch = hb_regexMatch( pRegEx, szString, strlen( szString ), TRUE ); + HB_BOOL fMatch; + fMatch = hb_regexMatch( pRegEx, szString, strlen( szString ), HB_TRUE ); hb_regexFree( pRegEx ); return fMatch; } @@ -84,7 +84,7 @@ BOOL hb_strMatchRegExp( const char * szString, const char * szPattern ) HB_FUNC( HB_WILDMATCH ) { - hb_retl( ( ! HB_ISCHAR( 1 ) || ! HB_ISCHAR( 2 ) ) ? FALSE : + hb_retl( ( ! HB_ISCHAR( 1 ) || ! HB_ISCHAR( 2 ) ) ? HB_FALSE : hb_parl( 3 ) ? hb_strMatchWildExact( hb_parc( 2 ), hb_parc( 1 ) ) : hb_strMatchWild( hb_parc( 2 ), hb_parc( 1 ) ) ); } @@ -96,6 +96,6 @@ HB_FUNC( HB_WILDMATCHI ) HB_FUNC( HB_FILEMATCH ) { - hb_retl( ( ! HB_ISCHAR( 1 ) || ! HB_ISCHAR( 2 ) ) ? FALSE : + hb_retl( ( ! HB_ISCHAR( 1 ) || ! HB_ISCHAR( 2 ) ) ? HB_FALSE : hb_strMatchFile( hb_parc( 1 ), hb_parc( 2 ) ) ); } diff --git a/harbour/src/rtl/strtran.c b/harbour/src/rtl/strtran.c index 3eaed60c37..bd0815e9f6 100644 --- a/harbour/src/rtl/strtran.c +++ b/harbour/src/rtl/strtran.c @@ -89,7 +89,7 @@ HB_FUNC( STRTRAN ) PHB_ITEM pReplace = hb_param( 3, HB_IT_STRING ); HB_SIZE ulReplace; HB_SIZE ulCount; - BOOL bAll; + HB_BOOL bAll; if( pReplace ) { @@ -105,12 +105,12 @@ HB_FUNC( STRTRAN ) if( HB_ISNUM( 5 ) ) { ulCount = hb_parnl( 5 ); - bAll = FALSE; + bAll = HB_FALSE; } else { ulCount = 0; - bAll = TRUE; + bAll = HB_TRUE; } if( bAll || ulCount > 0 ) diff --git a/harbour/src/rtl/trace.c b/harbour/src/rtl/trace.c index 0c046bb53e..910fb04679 100644 --- a/harbour/src/rtl/trace.c +++ b/harbour/src/rtl/trace.c @@ -67,7 +67,7 @@ static void hb_trace_message( char * buffer, HB_SIZE ulSize, int iParam, int iCo { char * pszString; HB_SIZE ulLen; - BOOL fFree; + HB_BOOL fFree; if( iParam > iFirst ) { diff --git a/harbour/src/rtl/transfrm.c b/harbour/src/rtl/transfrm.c index d9683ba619..088aae3949 100644 --- a/harbour/src/rtl/transfrm.c +++ b/harbour/src/rtl/transfrm.c @@ -89,10 +89,10 @@ HB_FUNC( TRANSFORM ) PHB_ITEM pValue = hb_param( 1, HB_IT_ANY ); /* Input parameter */ PHB_ITEM pPic = hb_param( 2, HB_IT_STRING ); /* Picture string */ - BOOL bError = FALSE; + HB_BOOL bError = HB_FALSE; if( pValue == NULL ) - bError = TRUE; + bError = HB_TRUE; else if( pPic && hb_itemGetCLen( pPic ) > 0 ) { char szPicDate[ 11 ]; @@ -118,7 +118,7 @@ HB_FUNC( TRANSFORM ) if( *szPic == '@' ) { - BOOL bDone = FALSE; + HB_BOOL bDone = HB_FALSE; /* Skip the "@" char */ @@ -134,7 +134,7 @@ HB_FUNC( TRANSFORM ) { case HB_CHAR_HT: case ' ': - bDone = TRUE; /* End of function string */ + bDone = HB_TRUE; /* End of function string */ break; case '!': uiPicFlags |= PF_UPPER; @@ -202,8 +202,8 @@ HB_FUNC( TRANSFORM ) const char * szExp = hb_itemGetCPtr( pValue ); HB_SIZE ulExpLen = hb_itemGetCLen( pValue ); HB_SIZE ulExpPos = 0; - BOOL bAnyPic = FALSE; - BOOL bFound = FALSE; + HB_BOOL bAnyPic = HB_FALSE; + HB_BOOL bFound = HB_FALSE; /* Grab enough */ @@ -232,7 +232,7 @@ HB_FUNC( TRANSFORM ) { szResult[ ulResultPos++ ] = ( char ) hb_charUpper( szExp[ ulExpPos ] ); ulExpPos++; - bAnyPic = TRUE; + bAnyPic = HB_TRUE; break; } @@ -250,7 +250,7 @@ HB_FUNC( TRANSFORM ) { szResult[ ulResultPos++ ] = ( uiPicFlags & PF_UPPER ) ? ( char ) hb_charUpper( szExp[ ulExpPos ] ) : szExp[ ulExpPos ]; ulExpPos++; - bAnyPic = TRUE; + bAnyPic = HB_TRUE; break; } @@ -263,7 +263,7 @@ HB_FUNC( TRANSFORM ) szExp[ ulExpPos ] == 'y' || szExp[ ulExpPos ] == 'Y' ) ? ( char ) 'Y' : ( char ) 'N'; ulExpPos++; - bAnyPic = TRUE; + bAnyPic = HB_TRUE; break; } @@ -335,7 +335,7 @@ HB_FUNC( TRANSFORM ) if( !bFound && ulResultPos ) { szResult[ ulResultPos++ ] = ','; - bFound = TRUE; + bFound = HB_TRUE; } break; @@ -873,8 +873,8 @@ HB_FUNC( TRANSFORM ) else if( HB_IS_LOGICAL( pValue ) ) { - BOOL bDone = FALSE; - BOOL bExit = FALSE; + HB_BOOL bDone = HB_FALSE; + HB_BOOL bExit = HB_FALSE; char cPic; if( uiPicFlags & ( PF_DATE | PF_BRITISH ) ) @@ -894,7 +894,7 @@ HB_FUNC( TRANSFORM ) else { cPic = 'L'; - bExit = TRUE; + bExit = HB_TRUE; } switch( cPic ) @@ -905,7 +905,7 @@ HB_FUNC( TRANSFORM ) if( !bDone ) { szResult[ ulResultPos ] = hb_itemGetL( pValue ) ? 'Y' : 'N'; - bDone = TRUE; /* Logical written */ + bDone = HB_TRUE; /* Logical written */ } else szResult[ ulResultPos ] = ' '; @@ -920,7 +920,7 @@ HB_FUNC( TRANSFORM ) if( !bDone ) { szResult[ ulResultPos ] = hb_itemGetL( pValue ) ? 'T' : 'F'; - bDone = TRUE; + bDone = HB_TRUE; } else szResult[ ulResultPos ] = ' '; @@ -933,7 +933,7 @@ HB_FUNC( TRANSFORM ) } if( !( uiPicFlags & PF_REMAIN ) ) - bExit = TRUE; + bExit = HB_TRUE; } } @@ -943,7 +943,7 @@ HB_FUNC( TRANSFORM ) { szResult = NULL; /* To avoid GCC -O2 warning */ ulResultPos = 0; /* To avoid GCC -O2 warning */ - bError = TRUE; + bError = HB_TRUE; } if( ! bError ) @@ -990,7 +990,7 @@ HB_FUNC( TRANSFORM ) else { HB_SIZE ulLen; - BOOL bFreeReq; + HB_BOOL bFreeReq; szStr = hb_itemString( pValue, &ulLen, &bFreeReq ); if( bFreeReq ) @@ -1019,10 +1019,10 @@ HB_FUNC( TRANSFORM ) hb_retc_const( hb_itemGetL( pValue ) ? "T" : "F" ); } else - bError = TRUE; + bError = HB_TRUE; } else - bError = TRUE; + bError = HB_TRUE; /* If there was any parameter error, launch a runtime error */ diff --git a/harbour/src/rtl/trim.c b/harbour/src/rtl/trim.c index bf6f37b2bf..80541c53f8 100644 --- a/harbour/src/rtl/trim.c +++ b/harbour/src/rtl/trim.c @@ -70,7 +70,7 @@ const char * hb_strLTrim( const char * szText, HB_SIZE * ulLen ) } /* return length of szText ignoring trailing white space (or true spaces) */ -HB_SIZE hb_strRTrimLen( const char * szText, HB_SIZE ulLen, BOOL bAnySpace ) +HB_SIZE hb_strRTrimLen( const char * szText, HB_SIZE ulLen, HB_BOOL bAnySpace ) { HB_TRACE(HB_TR_DEBUG, ("hb_strRTrimLen(%s, %lu. %d)", szText, ulLen, (int) bAnySpace)); @@ -125,7 +125,7 @@ HB_FUNC( RTRIM ) const char * szText = hb_itemGetCPtr( pText ); ulSrc = hb_itemGetCLen( pText ); - ulLen = hb_strRTrimLen( szText, ulSrc, FALSE ); + ulLen = hb_strRTrimLen( szText, ulSrc, HB_FALSE ); if( ulLen == ulSrc ) hb_itemReturn( pText ); @@ -157,7 +157,7 @@ HB_FUNC( ALLTRIM ) const char * szText = hb_itemGetCPtr( pText ); ulSrc = hb_itemGetCLen( pText ); - ulLen = hb_strRTrimLen( szText, ulSrc, FALSE ); + ulLen = hb_strRTrimLen( szText, ulSrc, HB_FALSE ); szText = hb_strLTrim( szText, &ulLen ); if( ulLen == ulSrc ) diff --git a/harbour/src/rtl/val.c b/harbour/src/rtl/val.c index a3731e42ab..d495d51f2a 100644 --- a/harbour/src/rtl/val.c +++ b/harbour/src/rtl/val.c @@ -63,7 +63,7 @@ HB_FUNC( VAL ) { const char * szText = hb_itemGetCPtr( pText ); int iWidth, iDec, iLen = ( int ) hb_itemGetCLen( pText ); - BOOL fDbl; + HB_BOOL fDbl; HB_LONG lValue; double dValue; diff --git a/harbour/src/rtl/valtostr.c b/harbour/src/rtl/valtostr.c index 4efa3eace5..6a41b8686a 100644 --- a/harbour/src/rtl/valtostr.c +++ b/harbour/src/rtl/valtostr.c @@ -61,7 +61,7 @@ HB_FUNC( HB_VALTOSTR ) if( pItem ) { HB_SIZE ulLen; - BOOL bFreeReq; + HB_BOOL bFreeReq; char * buffer = hb_itemString( pItem, &ulLen, &bFreeReq ); if( bFreeReq ) diff --git a/harbour/src/rtl/version.c b/harbour/src/rtl/version.c index 852267a886..ca70024520 100644 --- a/harbour/src/rtl/version.c +++ b/harbour/src/rtl/version.c @@ -132,17 +132,17 @@ HB_FUNC( HB_VERSION ) case HB_VERSION_UNIX_COMPAT: #if defined( HB_OS_UNIX ) - hb_retl( TRUE ); + hb_retl( HB_TRUE ); #else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); #endif break; case HB_VERSION_COMPILER_CPP: #if defined( __cplusplus ) - hb_retl( TRUE ); + hb_retl( HB_TRUE ); #else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); #endif break; diff --git a/harbour/src/vm/arrays.c b/harbour/src/vm/arrays.c index 4d9c824543..f55b9ae4b6 100644 --- a/harbour/src/vm/arrays.c +++ b/harbour/src/vm/arrays.c @@ -179,7 +179,7 @@ static const HB_GC_FUNCS s_gcArrayFuncs = }; -BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ) /* creates a new array */ +HB_BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ) /* creates a new array */ { PHB_BASEARRAY pBaseArray; PHB_ITEM pItems; @@ -213,10 +213,10 @@ BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ) /* creates a new array */ pItem->type = HB_IT_ARRAY; pItem->item.asArray.value = pBaseArray; - return TRUE; + return HB_TRUE; } -BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ) +HB_BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySize(%p, %lu)", pArray, ulLen)); @@ -286,10 +286,10 @@ BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ) pBaseArray->ulLen = ulLen; } - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } HB_SIZE hb_arrayLen( PHB_ITEM pArray ) @@ -302,14 +302,14 @@ HB_SIZE hb_arrayLen( PHB_ITEM pArray ) return 0; } -BOOL hb_arrayIsObject( PHB_ITEM pArray ) +HB_BOOL hb_arrayIsObject( PHB_ITEM pArray ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayIsObject(%p)", pArray)); if( HB_IS_ARRAY( pArray ) ) return pArray->item.asArray.value->uiClass != 0; else - return FALSE; + return HB_FALSE; } /* retrives the array unique ID */ @@ -321,7 +321,7 @@ void * hb_arrayId( PHB_ITEM pArray ) return NULL; } -BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue ) +HB_BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayAdd(%p, %p)", pArray, pValue)); @@ -335,14 +335,14 @@ BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue ) pBaseArray = ( PHB_BASEARRAY ) pArray->item.asArray.value; hb_itemCopy( pBaseArray->pItems + ( pBaseArray->ulLen - 1 ), pValue ); - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_arrayAddForward( PHB_ITEM pArray, PHB_ITEM pValue ) +HB_BOOL hb_arrayAddForward( PHB_ITEM pArray, PHB_ITEM pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayAddForward(%p, %p)", pArray, pValue)); @@ -356,14 +356,14 @@ BOOL hb_arrayAddForward( PHB_ITEM pArray, PHB_ITEM pValue ) pBaseArray = ( PHB_BASEARRAY ) pArray->item.asArray.value; hb_itemMove( pBaseArray->pItems + ( pBaseArray->ulLen - 1 ), pValue ); - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ) +HB_BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayDel(%p, %lu)", pArray, ulIndex)); @@ -386,14 +386,14 @@ BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ) pBaseArray->pItems + ulIndex ); } - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ) +HB_BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayIns(%p, %lu)", pArray, ulIndex)); @@ -416,59 +416,59 @@ BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ) pBaseArray->pItems + ulLen - 1 ); } - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_arraySet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) +HB_BOOL hb_arraySet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySet(%p, %lu, %p)", pArray, ulIndex, pItem)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemCopy( pArray->item.asArray.value->pItems + ( ulIndex - 1 ), pItem ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetForward( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) +HB_BOOL hb_arraySetForward( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetForward(%p, %lu, %p)", pArray, ulIndex, pItem)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemMove( pArray->item.asArray.value->pItems + ( ulIndex - 1 ), pItem ); - return TRUE; + return HB_TRUE; } else { hb_itemClear( pItem ); - return FALSE; + return HB_FALSE; } } -BOOL hb_arrayGet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) +HB_BOOL hb_arrayGet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayGet(%p, %lu, %p)", pArray, ulIndex, pItem)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemCopy( pItem, pArray->item.asArray.value->pItems + ( ulIndex - 1 ) ); - return TRUE; + return HB_TRUE; } else { hb_itemSetNil( pItem ); - return FALSE; + return HB_FALSE; } } -BOOL hb_arrayGetItemRef( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) +HB_BOOL hb_arrayGetItemRef( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetItemRef(%p, %lu, %p)", pArray, ulIndex, pItem)); @@ -484,12 +484,12 @@ BOOL hb_arrayGetItemRef( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) pItem->item.asRefer.BasePtr.array = pArray->item.asArray.value; pItem->item.asRefer.value = ulIndex - 1; pItem->item.asRefer.offset = 0; - return TRUE; + return HB_TRUE; } else { hb_itemSetNil( pItem ); - return FALSE; + return HB_FALSE; } } @@ -541,7 +541,7 @@ double hb_arrayGetTD( PHB_ITEM pArray, HB_SIZE ulIndex ) return 0; } -BOOL hb_arrayGetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long * plJulian, long * plMilliSec ) +HB_BOOL hb_arrayGetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long * plJulian, long * plMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetTDT(%p, %lu, %p, %p)", pArray, ulIndex, plJulian, plMilliSec)); @@ -550,18 +550,18 @@ BOOL hb_arrayGetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long * plJulian, long * p else { *plJulian = *plMilliSec = 0; - return FALSE; + return HB_FALSE; } } -BOOL hb_arrayGetL( PHB_ITEM pArray, HB_SIZE ulIndex ) +HB_BOOL hb_arrayGetL( PHB_ITEM pArray, HB_SIZE ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetL(%p, %lu)", pArray, ulIndex)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) return hb_itemGetL( pArray->item.asArray.value->pItems + ulIndex - 1 ); else - return FALSE; + return HB_FALSE; } int hb_arrayGetNI( PHB_ITEM pArray, HB_SIZE ulIndex ) @@ -697,217 +697,217 @@ HB_TYPE hb_arrayGetType( PHB_ITEM pArray, HB_SIZE ulIndex ) return 0; } -BOOL hb_arraySetDS( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szDate ) +HB_BOOL hb_arraySetDS( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szDate ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetDS(%p, %lu, %s)", pArray, ulIndex, szDate)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutDS( pArray->item.asArray.value->pItems + ulIndex - 1, szDate ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetDL( PHB_ITEM pArray, HB_SIZE ulIndex, long lDate ) +HB_BOOL hb_arraySetDL( PHB_ITEM pArray, HB_SIZE ulIndex, long lDate ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetDL(%p, %lu, %ld)", pArray, ulIndex, lDate)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutDL( pArray->item.asArray.value->pItems + ulIndex - 1, lDate ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetTD( PHB_ITEM pArray, HB_SIZE ulIndex, double dTimeStamp ) +HB_BOOL hb_arraySetTD( PHB_ITEM pArray, HB_SIZE ulIndex, double dTimeStamp ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetTD(%p, %lu, %lf)", pArray, ulIndex, dTimeStamp)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutTD( pArray->item.asArray.value->pItems + ulIndex - 1, dTimeStamp ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long lJulian, long lMilliSec ) +HB_BOOL hb_arraySetTDT( PHB_ITEM pArray, HB_SIZE ulIndex, long lJulian, long lMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetTDT(%p, %lu, %lu, %lu)", pArray, ulIndex, lJulian, lMilliSec)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutTDT( pArray->item.asArray.value->pItems + ulIndex - 1, lJulian, lMilliSec ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetL( PHB_ITEM pArray, HB_SIZE ulIndex, BOOL fValue ) +HB_BOOL hb_arraySetL( PHB_ITEM pArray, HB_SIZE ulIndex, HB_BOOL fValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetL(%p, %lu, %d)", pArray, ulIndex, fValue)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutL( pArray->item.asArray.value->pItems + ulIndex - 1, fValue ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetNI( PHB_ITEM pArray, HB_SIZE ulIndex, int iNumber ) +HB_BOOL hb_arraySetNI( PHB_ITEM pArray, HB_SIZE ulIndex, int iNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNI(%p, %lu, %d)", pArray, ulIndex, iNumber)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutNI( pArray->item.asArray.value->pItems + ulIndex - 1, iNumber ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetNL( PHB_ITEM pArray, HB_SIZE ulIndex, long lNumber ) +HB_BOOL hb_arraySetNL( PHB_ITEM pArray, HB_SIZE ulIndex, long lNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNL(%p, %lu, %lu)", pArray, ulIndex, lNumber)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutNL( pArray->item.asArray.value->pItems + ulIndex - 1, lNumber ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } #ifndef HB_LONG_LONG_OFF -BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, LONGLONG llNumber ) +HB_BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, LONGLONG llNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNLL(%p, %lu, %" PFLL "d)", pArray, ulIndex, llNumber)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutNLL( pArray->item.asArray.value->pItems + ulIndex - 1, llNumber ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } #endif -BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONG lNumber ) +HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONG lNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNInt(%p, %lu, %" PFHL "d)", pArray, ulIndex, lNumber)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutNInt( pArray->item.asArray.value->pItems + ulIndex - 1, lNumber ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetND( PHB_ITEM pArray, HB_SIZE ulIndex, double dNumber ) +HB_BOOL hb_arraySetND( PHB_ITEM pArray, HB_SIZE ulIndex, double dNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetND(%p, %lu, %lf)", pArray, ulIndex, dNumber)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutND( pArray->item.asArray.value->pItems + ulIndex - 1, dNumber ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText ) +HB_BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetC(%p, %lu, %p)", pArray, ulIndex, szText)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutC( pArray->item.asArray.value->pItems + ulIndex - 1, szText ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText, HB_SIZE ulLen ) +HB_BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetC(%p, %lu, %p, %lu)", pArray, ulIndex, szText, ulLen)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutCL( pArray->item.asArray.value->pItems + ulIndex - 1, szText, ulLen ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetCLPtr( PHB_ITEM pArray, HB_SIZE ulIndex, char * szText, HB_SIZE ulLen ) +HB_BOOL hb_arraySetCLPtr( PHB_ITEM pArray, HB_SIZE ulIndex, char * szText, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetCLPtr(%p, %lu, %p, %lu)", pArray, ulIndex, szText, ulLen)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutCLPtr( pArray->item.asArray.value->pItems + ulIndex - 1, szText, ulLen ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetPtr( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ) +HB_BOOL hb_arraySetPtr( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetPtr(%p, %lu, %p)", pArray, ulIndex, pValue)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutPtr( pArray->item.asArray.value->pItems + ulIndex - 1, pValue ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetPtrGC( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ) +HB_BOOL hb_arraySetPtrGC( PHB_ITEM pArray, HB_SIZE ulIndex, void * pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetPtrGC(%p, %lu, %p)", pArray, ulIndex, pValue)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutPtrGC( pArray->item.asArray.value->pItems + ulIndex - 1, pValue ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetSymbol( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_SYMB pSymbol ) +HB_BOOL hb_arraySetSymbol( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_SYMB pSymbol ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetSymbol(%p, %lu, %p)", pArray, ulIndex, pSymbol)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutSymbol( pArray->item.asArray.value->pItems + ulIndex - 1, pSymbol ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) +HB_BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayLast(%p, %p)", pArray, pResult)); @@ -919,15 +919,15 @@ BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) else hb_itemSetNil( pResult ); - return TRUE; + return HB_TRUE; } hb_itemSetNil( pResult ); - return FALSE; + return HB_FALSE; } -BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount ) +HB_BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayFill(%p, %p, %p, %p)", pArray, pValue, pulStart, pulCount)); @@ -959,13 +959,13 @@ BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE } } - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, BOOL fExact ) +HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, HB_BOOL fExact ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayScan(%p, %p, %p, %p, %d)", pArray, pValue, pulStart, pulCount, (int) fExact)); @@ -1064,7 +1064,7 @@ HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_S } else if( HB_IS_LOGICAL( pValue ) ) { - BOOL bValue = hb_itemGetL( pValue ); + HB_BOOL bValue = hb_itemGetL( pValue ); do { @@ -1129,7 +1129,7 @@ HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_S return 0; } -HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, BOOL fExact ) +HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_SIZE * pulCount, HB_BOOL fExact ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayRevScan(%p, %p, %p, %p, %d)", pArray, pValue, pulStart, pulCount, (int) fExact)); @@ -1231,7 +1231,7 @@ HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, H } else if( HB_IS_LOGICAL( pValue ) ) { - BOOL bValue = hb_itemGetL( pValue ); + HB_BOOL bValue = hb_itemGetL( pValue ); do { @@ -1296,7 +1296,7 @@ HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, H return 0; } -BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, HB_SIZE * pulStart, HB_SIZE * pulCount ) +HB_BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, HB_SIZE * pulStart, HB_SIZE * pulCount ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayEval(%p, %p, %p, %p)", pArray, bBlock, pulStart, pulCount)); @@ -1336,17 +1336,17 @@ BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, HB_SIZE * pulStart, HB_SIZE } } - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } /* NOTE: CA-Cl*pper 5.3a has a fix for the case when the starting position is greater than the length of the array. [vszakats] */ -BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, HB_SIZE * pulStart, - HB_SIZE * pulCount, HB_SIZE * pulTarget ) +HB_BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, HB_SIZE * pulStart, + HB_SIZE * pulCount, HB_SIZE * pulTarget ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayCopy(%p, %p, %p, %p, %p)", pSrcArray, pDstArray, pulStart, pulCount, pulTarget)); @@ -1404,10 +1404,10 @@ BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, HB_SIZE * pulStart, } } - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } static void hb_arrayCloneBody( PHB_BASEARRAY pSrcBaseArray, PHB_BASEARRAY pDstBaseArray, PHB_NESTED_CLONED pClonedList ) diff --git a/harbour/src/vm/arrayshb.c b/harbour/src/vm/arrayshb.c index c2a9388e56..86125a04ef 100644 --- a/harbour/src/vm/arrayshb.c +++ b/harbour/src/vm/arrayshb.c @@ -85,14 +85,14 @@ HB_FUNC( ARRAY ) if( iPCount > 0 ) { - BOOL bError = FALSE; + HB_BOOL bError = HB_FALSE; int iParam; for( iParam = 1; iParam <= iPCount; iParam++ ) { if( ! HB_ISNUM( iParam ) ) { - bError = TRUE; + bError = HB_TRUE; break; } @@ -103,7 +103,7 @@ HB_FUNC( ARRAY ) #else hb_errRT_BASE( EG_BOUND, 1131, NULL, hb_langDGetErrorDesc( EG_ARRDIMENSION ), HB_ERR_ARGS_BASEPARAMS ); #endif - bError = TRUE; + bError = HB_TRUE; break; } } @@ -262,7 +262,7 @@ HB_FUNC( ASCAN ) hb_retnint( hb_arrayScan( pArray, pValue, HB_ISNUM( 3 ) ? &ulStart : NULL, HB_ISNUM( 4 ) ? &ulCount : NULL, - FALSE ) ); + HB_FALSE ) ); } else hb_retni( 0 ); diff --git a/harbour/src/vm/asort.c b/harbour/src/vm/asort.c index 92dc53170b..d13fe369ff 100644 --- a/harbour/src/vm/asort.c +++ b/harbour/src/vm/asort.c @@ -63,7 +63,7 @@ #include "hbvm.h" #include "hbstack.h" -static BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock, PHB_BASEARRAY pBaseArray, HB_SIZE ulLast ) +static HB_BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock, PHB_BASEARRAY pBaseArray, HB_SIZE ulLast ) { if( pBlock ) { @@ -74,26 +74,26 @@ static BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock, PH hb_vmSend( 2 ); if( pBaseArray->ulLen <= ulLast ) - return FALSE; + return HB_FALSE; else { PHB_ITEM pRet = hb_param( -1, HB_IT_ANY ); /* CA-Cl*pper always takes return value as logical item - * accepting 0, 1 as numeric representation of FALSE/TRUE + * accepting 0, 1 as numeric representation of HB_FALSE/HB_TRUE */ if( HB_IS_LOGICAL( pRet ) || HB_IS_NUMERIC( pRet ) ) return hb_itemGetL( pRet ); else - return TRUE; + return HB_TRUE; } } /* Do native compare when no codeblock is supplied */ if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) - return hb_itemStrCmp( pItem1, pItem2, FALSE ) < 0; + return hb_itemStrCmp( pItem1, pItem2, HB_FALSE ) < 0; else if( HB_IS_NUMINT( pItem1 ) && HB_IS_NUMINT( pItem2 ) ) /* intentionally separate comparison for integer numbers to avoid precision lose in 64bit integer to double conversion */ @@ -210,7 +210,7 @@ static void hb_arraySortQuick( PHB_BASEARRAY pBaseArray, LONG lb, LONG ub, PHB_I } } -BOOL hb_arraySort( PHB_ITEM pArray, HB_SIZE * pulStart, HB_SIZE * pulCount, PHB_ITEM pBlock ) +HB_BOOL hb_arraySort( PHB_ITEM pArray, HB_SIZE * pulStart, HB_SIZE * pulCount, PHB_ITEM pBlock ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySort(%p, %p, %p, %p)", pArray, pulStart, pulCount, pBlock)); @@ -244,10 +244,10 @@ BOOL hb_arraySort( PHB_ITEM pArray, HB_SIZE * pulStart, HB_SIZE * pulCount, PHB_ hb_arraySortQuick( pBaseArray, ulStart - 1, ulEnd, pBlock ); } - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } HB_FUNC( ASORT ) diff --git a/harbour/src/vm/classes.c b/harbour/src/vm/classes.c index 26f6dc4382..18b3c4ce2c 100644 --- a/harbour/src/vm/classes.c +++ b/harbour/src/vm/classes.c @@ -440,7 +440,7 @@ static USHORT hb_clsBucketPos( PHB_DYNS pMsg, USHORT uiMask ) * * Realloc (widen) class */ -static BOOL hb_clsDictRealloc( PCLASS pClass ) +static HB_BOOL hb_clsDictRealloc( PCLASS pClass ) { ULONG ulNewHashKey, ulLimit, ul; #ifdef HB_MSG_POOL @@ -537,7 +537,7 @@ static BOOL hb_clsDictRealloc( PCLASS pClass ) pClass->pMethods = pNewMethods; #endif - return TRUE; + return HB_TRUE; } static void hb_clsDictInit( PCLASS pClass, USHORT uiHashKey ) @@ -654,7 +654,7 @@ static PMETHOD hb_clsAllocMsg( PCLASS pClass, PHB_DYNS pMsg ) return NULL; } -static BOOL hb_clsCanClearMethod( PMETHOD pMethod, BOOL fError ) +static HB_BOOL hb_clsCanClearMethod( PMETHOD pMethod, HB_BOOL fError ) { HB_SYMBOL_UNUSED( pMethod ); HB_SYMBOL_UNUSED( fError ); @@ -663,10 +663,10 @@ static BOOL hb_clsCanClearMethod( PMETHOD pMethod, BOOL fError ) { if( fError ) hb_errRT_BASE( EG_ARG, 3000, "Cannot delete supercast messages", HB_ERR_FUNCNAME, 0 ); - return FALSE; + return HB_FALSE; } #endif - return TRUE; + return HB_TRUE; } static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) @@ -685,7 +685,7 @@ static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) { if( * puiMsgIdx && pClass->pMethods[ * puiMsgIdx ].pMessage == pMsg ) { - if( hb_clsCanClearMethod( &pClass->pMethods[ * puiMsgIdx ], TRUE ) ) + if( hb_clsCanClearMethod( &pClass->pMethods[ * puiMsgIdx ], HB_TRUE ) ) { memset( &pClass->pMethods[ * puiMsgIdx ], 0, sizeof( METHOD ) ); * puiMsgIdx = 0; @@ -711,7 +711,7 @@ static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) { if( pMethod->pMessage == pMsg ) { - if( hb_clsCanClearMethod( pMethod, TRUE ) ) + if( hb_clsCanClearMethod( pMethod, HB_TRUE ) ) { /* Move messages */ while( --uiBucket ) @@ -731,7 +731,7 @@ static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) #endif } -static BOOL hb_clsHasParent( PCLASS pClass, PHB_DYNS pParentSym ) +static HB_BOOL hb_clsHasParent( PCLASS pClass, PHB_DYNS pParentSym ) { PMETHOD pMethod = hb_clsFindMsg( pClass, pParentSym ); @@ -840,15 +840,15 @@ static USHORT hb_clsFindClassDataOffset( PCLASS pClass, PMETHOD pNewMethod ) return 0; } -static BOOL hb_clsUpdateHiddenMessages( PMETHOD pSrcMethod, PMETHOD pDstMethod, - PCLASS pDstClass ) +static HB_BOOL hb_clsUpdateHiddenMessages( PMETHOD pSrcMethod, PMETHOD pDstMethod, + PCLASS pDstClass ) { PMETHOD pNewMethod = pSrcMethod; HB_TRACE(HB_TR_DEBUG, ("hb_clsUpdateHiddenMessages(%p,%p,%p)", pSrcMethod, pDstMethod, pDstClass)); if( ! pDstMethod->pMessage || - ( hb_clsCanClearMethod( pDstMethod, FALSE ) && + ( hb_clsCanClearMethod( pDstMethod, HB_FALSE ) && pDstMethod->uiPrevCls != pDstMethod->uiSprClass && ( pDstMethod->uiScope & HB_OO_CLSTP_HIDDEN ) && ( pDstMethod->uiScope & HB_OO_CLSTP_NONVIRTUAL ) ) ) @@ -863,7 +863,7 @@ static BOOL hb_clsUpdateHiddenMessages( PMETHOD pSrcMethod, PMETHOD pDstMethod, } if( pNewMethod && pNewMethod != pSrcMethod && !( pNewMethod->uiScope & HB_OO_CLSTP_HIDDEN ) && - hb_clsCanClearMethod( pDstMethod, FALSE ) ) + hb_clsCanClearMethod( pDstMethod, HB_FALSE ) ) { USHORT uiPrevCls = pDstMethod->uiPrevCls, uiPrevMth = pDstMethod->uiPrevMth; @@ -899,11 +899,11 @@ static BOOL hb_clsUpdateHiddenMessages( PMETHOD pSrcMethod, PMETHOD pDstMethod, } pDstMethod->uiData = uiData; } - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } static void hb_clsCopyClass( PCLASS pClsDst, PCLASS pClsSrc ) @@ -969,7 +969,7 @@ static void hb_clsCopyClass( PCLASS pClsDst, PCLASS pClsSrc ) while( --ulLimit ); } -static BOOL hb_clsIsFriendSymbol( PCLASS pClass, PHB_SYMB pSym ) +static HB_BOOL hb_clsIsFriendSymbol( PCLASS pClass, PHB_SYMB pSym ) { USHORT uiCount; @@ -977,15 +977,15 @@ static BOOL hb_clsIsFriendSymbol( PCLASS pClass, PHB_SYMB pSym ) if( pSym >= pClass->pFriendModule && pSym < pClass->pFriendModule + pClass->uiFriendModule ) - return TRUE; + return HB_TRUE; for( uiCount = 0; uiCount < pClass->uiFriendSyms; ++uiCount ) { if( pClass->pFriendSyms[ uiCount ] == pSym ) - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } static void hb_clsAddFriendSymbol( PCLASS pClass, PHB_SYMB pSym ) @@ -1225,14 +1225,14 @@ void hb_clsIsClassRef( void ) #endif } -BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ) +HB_BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ) { if( uiClass && uiClass <= s_uiClasses ) { PCLASS pClass = s_pClasses[ uiClass ]; if( strcmp( pClass->szName, szParentName ) == 0 ) - return TRUE; + return HB_TRUE; else { PHB_DYNS pMsg = hb_dynsymFindName( szParentName ); @@ -1242,7 +1242,7 @@ BOOL hb_clsIsParent( USHORT uiClass, const char * szParentName ) } } - return FALSE; + return HB_FALSE; } USHORT hb_objGetClass( PHB_ITEM pItem ) @@ -2058,8 +2058,8 @@ PHB_SYMB hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pMessage, return NULL; } -BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, - PHB_STACK_STATE pStack ) +HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, + PHB_STACK_STATE pStack ) { PHB_SYMB pExecSym; @@ -2131,18 +2131,18 @@ BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, } } - return FALSE; + return HB_FALSE; } /* * Check if class has object destructors */ -BOOL hb_clsHasDestructor( USHORT uiClass ) +HB_BOOL hb_clsHasDestructor( USHORT uiClass ) { if( uiClass && uiClass <= s_uiClasses ) return s_pClasses[ uiClass ]->fHasDestructor; else - return FALSE; + return HB_FALSE; } /* @@ -2228,7 +2228,7 @@ void hb_objDestructorCall( PHB_ITEM pObject ) /* * Check if object has a given operator */ -BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ) +HB_BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ) { USHORT uiClass; @@ -2240,16 +2240,16 @@ BOOL hb_objHasOperator( PHB_ITEM pObject, USHORT uiOperator ) return ( s_pClasses[ uiClass ]->ulOpFlags & ( 1UL << uiOperator ) ) != 0; } - return FALSE; + return HB_FALSE; } /* * Call object operator. If pMsgArg is NULL then operator is unary. - * Function return TRUE when object class overloads given operator - * and FALSE otherwise. [druzus] + * Function return HB_TRUE when object class overloads given operator + * and HB_FALSE otherwise. [druzus] */ -BOOL hb_objOperatorCall( USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObject, - PHB_ITEM pMsgArg1, PHB_ITEM pMsgArg2 ) +HB_BOOL hb_objOperatorCall( 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)); @@ -2275,15 +2275,15 @@ BOOL hb_objOperatorCall( USHORT uiOperator, HB_ITEM_PTR pResult, PHB_ITEM pObjec /* store the return value */ hb_itemMove( pResult, hb_stackReturnItem() ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } /* - * return TRUE if object has a given message + * return HB_TRUE if object has a given message */ -BOOL hb_objHasMessage( PHB_ITEM pObject, PHB_DYNS pMessage ) +HB_BOOL hb_objHasMessage( PHB_ITEM pObject, PHB_DYNS pMessage ) { return hb_objGetMethod( pObject, pMessage->pSymbol, NULL ) != NULL; } @@ -2295,7 +2295,7 @@ BOOL hb_objHasMessage( PHB_ITEM pObject, PHB_DYNS pMessage ) * * should be read as a boolean */ -BOOL hb_objHasMsg( PHB_ITEM pObject, const char *szString ) +HB_BOOL hb_objHasMsg( PHB_ITEM pObject, const char *szString ) { PHB_DYNS pDynSym; @@ -2303,13 +2303,9 @@ BOOL hb_objHasMsg( PHB_ITEM pObject, const char *szString ) pDynSym = hb_dynsymFindName( szString ); if( pDynSym ) - { return hb_objGetMethod( pObject, pDynSym->pSymbol, NULL ) != NULL; - } else - { - return FALSE; - } + return HB_FALSE; } PHB_ITEM hb_objSendMessage( PHB_ITEM pObject, PHB_DYNS pMsgSym, ULONG ulArg, ... ) @@ -2477,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, BOOL fAssign ) +static USHORT hb_clsUpdateScope( USHORT uiScope, HB_BOOL fAssign ) { if( !fAssign ) uiScope &= ~HB_OO_CLSTP_READONLY; @@ -2645,9 +2641,9 @@ static HB_TYPE hb_clsGetItemType( PHB_ITEM pItem, HB_TYPE nDefault ) * HB_OO_MSG_CLSASSIGN : / * HB_OO_MSG_SUPER : Superclass handle */ -static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, - USHORT uiType, USHORT uiScope, - PHB_ITEM pFunction, PHB_ITEM pInit ) +static HB_BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, + USHORT uiType, USHORT uiScope, + PHB_ITEM pFunction, PHB_ITEM pInit ) { if( szMessage && uiClass && uiClass <= s_uiClasses ) { @@ -2657,11 +2653,11 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, PMETHOD pNewMeth; USHORT uiOperator, uiSprClass = 0, uiIndex = 0, uiPrevCls, uiPrevMth; PHB_SYMB pOpSym, pFuncSym = NULL; - BOOL fOK; + HB_BOOL fOK; ULONG ulOpFlags = 0; if( pClass->fLocked ) - return FALSE; + return HB_FALSE; if( !( uiScope & ( HB_OO_CLSTP_EXPORTED | HB_OO_CLSTP_PROTECTED | HB_OO_CLSTP_HIDDEN ) ) ) uiScope |= HB_OO_CLSTP_EXPORTED; @@ -2788,22 +2784,22 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, case HB_OO_MSG_REALCLASS: case HB_OO_MSG_VIRTUAL: case HB_OO_MSG_PERFORM: - fOK = TRUE; + fOK = HB_TRUE; break; default: - fOK = FALSE; + fOK = HB_FALSE; } if( !fOK ) { hb_errRT_BASE( EG_ARG, 3000, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - return FALSE; + return HB_FALSE; } pNewMeth = hb_clsAllocMsg( pClass, pMessage ); if( ! pNewMeth ) - return FALSE; + return HB_FALSE; uiPrevCls = uiClass; uiPrevMth = ( USHORT ) ( pClass->pMethods - pNewMeth ); @@ -2817,14 +2813,14 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, pClass->uiMethods++; /* One more message */ else { - BOOL fOverLoad = ( pNewMeth->uiScope & HB_OO_CLSTP_OVERLOADED ) || - ( ( pNewMeth->uiScope & HB_OO_CLSTP_NONVIRTUAL ) && - pNewMeth->uiSprClass != uiClass ); + HB_BOOL fOverLoad = ( pNewMeth->uiScope & HB_OO_CLSTP_OVERLOADED ) || + ( ( pNewMeth->uiScope & HB_OO_CLSTP_NONVIRTUAL ) && + pNewMeth->uiSprClass != uiClass ); uiPrevCls = pNewMeth->uiPrevCls; uiPrevMth = pNewMeth->uiPrevMth; - if( ! hb_clsCanClearMethod( pNewMeth, TRUE ) ) - return FALSE; + if( ! hb_clsCanClearMethod( pNewMeth, HB_TRUE ) ) + return HB_FALSE; memset( pNewMeth, 0, sizeof( METHOD ) ); if( fOverLoad ) @@ -2845,7 +2841,7 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, case HB_OO_MSG_ASSIGN: - pNewMeth->uiScope = hb_clsUpdateScope( uiScope, TRUE ); + pNewMeth->uiScope = hb_clsUpdateScope( uiScope, HB_TRUE ); /* Class(y) does not allow to write to HIDDEN+READONLY instance variables, [druzus] */ if( pNewMeth->uiScope & HB_OO_CLSTP_READONLY && @@ -2862,7 +2858,7 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, case HB_OO_MSG_ACCESS: - pNewMeth->uiScope = hb_clsUpdateScope( uiScope, FALSE ); + pNewMeth->uiScope = hb_clsUpdateScope( uiScope, HB_FALSE ); pNewMeth->uiData = uiIndex; pNewMeth->uiOffset = pClass->uiDataFirst; hb_clsAddInitValue( pClass, pInit, HB_OO_MSG_DATA, @@ -2874,7 +2870,7 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, pNewMeth->uiData = uiIndex; pNewMeth->itemType = hb_clsGetItemType( pInit, 0 ); - pNewMeth->uiScope = hb_clsUpdateScope( uiScope, TRUE ); + pNewMeth->uiScope = hb_clsUpdateScope( uiScope, HB_TRUE ); /* Class(y) does not allow to write to HIDDEN+READONLY instance variables, [druzus] */ if( pNewMeth->uiScope & HB_OO_CLSTP_READONLY && @@ -2896,7 +2892,7 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, case HB_OO_MSG_CLSACCESS: - pNewMeth->uiScope = hb_clsUpdateScope( uiScope, FALSE ); + pNewMeth->uiScope = hb_clsUpdateScope( uiScope, HB_FALSE ); pNewMeth->uiData = uiIndex; if( pNewMeth->uiScope & HB_OO_CLSTP_SHARED ) { @@ -2968,13 +2964,13 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, case HB_OO_MSG_ONERROR: pNewMeth->pFuncSym = pFuncSym; - pClass->fHasOnError = TRUE; + pClass->fHasOnError = HB_TRUE; break; case HB_OO_MSG_DESTRUCTOR: pNewMeth->pFuncSym = pFuncSym; - pClass->fHasDestructor = TRUE; + pClass->fHasDestructor = HB_TRUE; break; default: @@ -3002,7 +2998,7 @@ static BOOL hb_clsAddMsg( USHORT uiClass, const char * szMessage, } } - return TRUE; + return HB_TRUE; } /* @@ -3126,13 +3122,13 @@ HB_FUNC( __CLSADDMSG ) */ static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, PHB_ITEM pSuperArray, PHB_SYMB pClassFunc, - BOOL fModuleFriendly ) + HB_BOOL fModuleFriendly ) { PCLASS pNewCls; PMETHOD pMethod; USHORT ui, uiSuper, uiSuperCls; USHORT * puiClassData = NULL, uiClassDataSize = 0; - BOOL fClsMutex = FALSE; + HB_BOOL fClsMutex = HB_FALSE; uiSuper = ( USHORT ) ( pSuperArray ? hb_arrayLen( pSuperArray ) : 0 ); pClassFunc = hb_vmGetRealFuncSym( pClassFunc ); @@ -3316,7 +3312,7 @@ static USHORT hb_clsNew( const char * szClassName, USHORT uiDatas, if( pSprCls->uiMutexOffset ) pNewCls->uiMutexOffset = 1; if( pSprCls->pMutex ) - fClsMutex = TRUE; + fClsMutex = HB_TRUE; } } } @@ -3538,7 +3534,7 @@ HB_FUNC( __CLSLOCK ) USHORT uiClass = ( USHORT ) hb_parni( 1 ); if( uiClass && uiClass <= s_uiClasses ) - s_pClasses[ uiClass ]->fLocked = TRUE; + s_pClasses[ uiClass ]->fLocked = HB_TRUE; } /* @@ -3833,7 +3829,7 @@ HB_FUNC( __CLSASSOCTYPE ) HB_STACK_TLS_PRELOAD USHORT uiClass = ( USHORT ) hb_parni( 1 ); PHB_ITEM pType = hb_param( 2, HB_IT_ANY ); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( uiClass && uiClass <= s_uiClasses && pType ) { @@ -4238,7 +4234,7 @@ HB_FUNC_STATIC( msgClassSel ) PMETHOD pMethod = pClass->pMethods; ULONG ulLimit = hb_clsMthNum( pClass ), ulPos = 0; USHORT nParam, nScope; - BOOL lFull; + HB_BOOL lFull; nParam = hb_parnidef( 1, HB_MSGLISTALL ); nScope = ( USHORT ) hb_parni( 2 ); @@ -4945,14 +4941,14 @@ HB_FUNC( __CLSLOCKDEF ) { HB_STACK_TLS_PRELOAD PHB_ITEM pClsItm = hb_param( 1, HB_IT_BYREF ); - BOOL fLocked = FALSE; + HB_BOOL fLocked = HB_FALSE; if( pClsItm && HB_IS_NIL( pClsItm ) ) { if( !s_pClassMtx || hb_threadMutexLock( s_pClassMtx ) ) { if( HB_IS_NIL( pClsItm ) ) - fLocked = TRUE; + fLocked = HB_TRUE; else if( s_pClassMtx ) hb_threadMutexUnlock( s_pClassMtx ); } @@ -5022,7 +5018,7 @@ HB_FUNC( __OBJSETCLASS ) /* Harbour equivalent for Clipper internal __mdCreate() */ USHORT hb_clsCreate( USHORT usSize, const char * szClassName ) { - return hb_clsNew( szClassName, usSize, NULL, NULL, FALSE ); + return hb_clsNew( szClassName, usSize, NULL, NULL, HB_FALSE ); } /* Harbour equivalent for Clipper internal __mdAdd() */ @@ -5102,9 +5098,9 @@ HB_FUNC( __CLS_PAR00 ) * Use hb_objHasMessage() instead. */ #if defined( __cplusplus ) - extern "C" BOOL hb_objGetpMethod( PHB_ITEM pObject, PHB_SYMB pMessage ); + extern "C" HB_BOOL hb_objGetpMethod( PHB_ITEM pObject, PHB_SYMB pMessage ); #endif -BOOL hb_objGetpMethod( PHB_ITEM pObject, PHB_SYMB pMessage ) +HB_BOOL hb_objGetpMethod( PHB_ITEM pObject, PHB_SYMB pMessage ) { return hb_objHasMessage( pObject, pMessage->pDynSym ); } diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index 99c0ac1069..6ca7f827fc 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -73,17 +73,17 @@ static TCHAR s_lpAppName[ MAX_PATH ]; static HANDLE s_hInstance = 0; static HANDLE s_hPrevInstance = 0; static int s_iCmdShow = 0; -static BOOL s_WinMainParam = FALSE; +static HB_BOOL s_WinMainParam = HB_FALSE; void hb_winmainArgInit( HANDLE hInstance, HANDLE hPrevInstance, int iCmdShow ) { s_hInstance = hInstance; s_hPrevInstance = hPrevInstance; s_iCmdShow = iCmdShow; - s_WinMainParam = TRUE; + s_WinMainParam = HB_TRUE; } -BOOL hb_winmainArgGet( HANDLE * phInstance, HANDLE * phPrevInstance, int * piCmdShow ) +HB_BOOL hb_winmainArgGet( HANDLE * phInstance, HANDLE * phPrevInstance, int * piCmdShow ) { if( phInstance ) *phInstance = s_hInstance; @@ -149,7 +149,7 @@ void hb_cmdargUpdate( void ) /* NOTE: try to create absolute path from s_argv[ 0 ] if necessary */ { PHB_FNAME pFName = hb_fsFNameSplit( s_argv[ 0 ] ); - BOOL fInPath = FALSE; + HB_BOOL fInPath = HB_FALSE; if( !pFName->szPath ) { @@ -180,7 +180,7 @@ void hb_cmdargUpdate( void ) */ hb_xfree( pFName ); pFName = hb_fsFNameSplit( s_szAppName ); - fInPath = TRUE; + fInPath = HB_TRUE; break; } pNextPath = pNextPath->pNext; @@ -224,7 +224,7 @@ void hb_cmdargUpdate( void ) } } -BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ) +HB_BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_cmdargIsInternal(%s, %p)", szArg, piLen)); @@ -237,7 +237,7 @@ BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ) if( piLen ) *piLen = 5; - return TRUE; + return HB_TRUE; } else if( strlen( szArg ) >= 2 && szArg[ 0 ] == '/' && @@ -246,13 +246,13 @@ BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ) if( piLen ) *piLen = 2; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -static char * hb_cmdargGet( const char * pszName, BOOL bRetValue ) +static char * hb_cmdargGet( const char * pszName, HB_BOOL bRetValue ) { char * pszRetVal = NULL; char * pszEnvVar; @@ -353,16 +353,16 @@ static char * hb_cmdargGet( const char * pszName, BOOL bRetValue ) return pszRetVal; } -BOOL hb_cmdargCheck( const char * pszName ) +HB_BOOL hb_cmdargCheck( const char * pszName ) { - return hb_cmdargGet( pszName, FALSE ) != NULL; + return hb_cmdargGet( pszName, HB_FALSE ) != NULL; } /* NOTE: Pointer must be freed with hb_xfree() if not NULL */ char * hb_cmdargString( const char * pszName ) { - return hb_cmdargGet( pszName, TRUE ); + return hb_cmdargGet( pszName, HB_TRUE ); } int hb_cmdargNum( const char * pszName ) @@ -371,7 +371,7 @@ int hb_cmdargNum( const char * pszName ) HB_TRACE(HB_TR_DEBUG, ("hb_cmdargNum(%s)", pszName)); - pszValue = hb_cmdargGet( pszName, TRUE ); + pszValue = hb_cmdargGet( pszName, HB_TRUE ); if( pszValue ) { int iValue = atoi( pszValue ); @@ -388,7 +388,7 @@ int hb_cmdargNum( const char * pszName ) HB_FUNC( HB_ARGCHECK ) { - hb_retl( HB_ISCHAR( 1 ) ? hb_cmdargCheck( hb_parc( 1 ) ) : FALSE ); + hb_retl( HB_ISCHAR( 1 ) ? hb_cmdargCheck( hb_parc( 1 ) ) : HB_FALSE ); } /* Returns the value of an internal switch */ diff --git a/harbour/src/vm/codebloc.c b/harbour/src/vm/codebloc.c index d3554c2e5f..492a293d9f 100644 --- a/harbour/src/vm/codebloc.c +++ b/harbour/src/vm/codebloc.c @@ -78,7 +78,7 @@ static HB_GARBAGE_FUNC( hb_codeblockGarbageDelete ) */ if( pCBlock->pCode && pCBlock->dynBuffer ) { - pCBlock->dynBuffer = FALSE; + pCBlock->dynBuffer = HB_FALSE; hb_xfree( pCBlock->pCode ); } pCBlock->pCode = ( BYTE * ) s_pCode; @@ -280,7 +280,7 @@ HB_CODEBLOCK_PTR hb_codeblockMacroNew( const BYTE * pBuffer, HB_SIZE ulLen ) pBase = hb_stackBaseItem(); /* Store the number of referenced local variables */ pCBlock->pCode = pCode; - pCBlock->dynBuffer = TRUE; + pCBlock->dynBuffer = HB_TRUE; pCBlock->pDefSymb = pBase->item.asSymbol.stackstate->uiClass ? hb_clsMethodSym( pBase ) : pBase->item.asSymbol.value; pCBlock->pSymbols = NULL; /* macro-compiled codeblock cannot acces a local symbol table */ diff --git a/harbour/src/vm/debug.c b/harbour/src/vm/debug.c index 10580ad18d..e27d16e362 100644 --- a/harbour/src/vm/debug.c +++ b/harbour/src/vm/debug.c @@ -76,7 +76,7 @@ * general: * __DBGINVOKEDEBUG() (debugger.prg) * __DBGPROCLEVEL() (debugger.prg) - * hb_dbg_InvokeDebug(BOOL) (dbgentry.c) + * hb_dbg_InvokeDebug(HB_BOOL) (dbgentry.c) * hb_dbg_ProcLevel() (dbgentry.c) * hb_dbg_SetEntry(*ENTRY_FUNC) (dbgentry.c) * for statics: diff --git a/harbour/src/vm/dynlibhb.c b/harbour/src/vm/dynlibhb.c index 2a13704787..fa33553aa7 100644 --- a/harbour/src/vm/dynlibhb.c +++ b/harbour/src/vm/dynlibhb.c @@ -109,7 +109,7 @@ HB_FUNC( HB_LIBLOAD ) if( hb_vmLockModuleSymbols() ) { /* use stack address as first level marker */ - hb_vmBeginSymbolGroup( ( void * ) hb_stackId(), TRUE ); + hb_vmBeginSymbolGroup( ( void * ) hb_stackId(), HB_TRUE ); #if defined( HB_OS_WIN ) { void * hFileName; @@ -155,7 +155,7 @@ HB_FUNC( HB_LIBLOAD ) HB_FUNC( HB_LIBFREE ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; void ** pDynLibPtr = ( void ** ) hb_parptrGC( &s_gcDynlibFuncs, 1 ); if( pDynLibPtr && *pDynLibPtr && diff --git a/harbour/src/vm/dynsym.c b/harbour/src/vm/dynsym.c index eea1a7284f..e14f999854 100644 --- a/harbour/src/vm/dynsym.c +++ b/harbour/src/vm/dynsym.c @@ -465,7 +465,7 @@ const char * hb_dynsymName( PHB_DYNS pDynSym ) return pDynSym->pSymbol->szName; } -BOOL hb_dynsymIsFunction( PHB_DYNS pDynSym ) +HB_BOOL hb_dynsymIsFunction( PHB_DYNS pDynSym ) { HB_TRACE(HB_TR_DEBUG, ("hb_dynsymIsFunction(%p)", pDynSym)); diff --git a/harbour/src/vm/estack.c b/harbour/src/vm/estack.c index 37828dfc53..8d2b42052a 100644 --- a/harbour/src/vm/estack.c +++ b/harbour/src/vm/estack.c @@ -111,10 +111,10 @@ static HB_TLS_KEY hb_stack_key; # define hb_stack_ptr ( ( PHB_STACK ) hb_tls_get( hb_stack_key ) ) # endif - static volatile BOOL s_fInited = FALSE; + static volatile HB_BOOL s_fInited = HB_FALSE; # define hb_stack_alloc() do { if( !s_fInited ) { \ hb_tls_init( hb_stack_key ); \ - s_fInited = TRUE; } \ + s_fInited = HB_TRUE; } \ hb_tls_set( hb_stack_key, \ hb_xgrab( sizeof( HB_STACK ) ) ); \ } while ( 0 ) @@ -141,7 +141,7 @@ # define hb_stack_alloc() # define hb_stack_dealloc() -# define hb_stack_ready() (TRUE) +# define hb_stack_ready() ( HB_TRUE ) #endif /* HB_MT_VM */ @@ -447,7 +447,7 @@ void hb_stackClearMemvars( int iExcept ) } #undef hb_stackQuitState -BOOL hb_stackQuitState( void ) +HB_BOOL hb_stackQuitState( void ) { HB_STACK_TLS_PRELOAD return hb_stack.uiQuitState != 0; @@ -486,7 +486,7 @@ int * hb_stackKeyPolls( void ) } #undef hb_stackDebugRequest -BOOL * hb_stackDebugRequest( void ) +HB_BOOL * hb_stackDebugRequest( void ) { HB_STACK_TLS_PRELOAD @@ -689,7 +689,7 @@ HB_ITEM_PTR hb_stackNewFrame( PHB_STACK_STATE pFrame, USHORT uiParams ) /* as some type of protection we can set hb_stack.pStatics to NULL here */ pFrame->ulPrivateBase = hb_memvarGetPrivatesBase(); pFrame->uiClass = pFrame->uiMethod = pFrame->uiLineNo = 0; - pFrame->fDebugging = FALSE; + pFrame->fDebugging = HB_FALSE; pItem->item.asSymbol.stackstate = pFrame; pItem->item.asSymbol.paramcnt = uiParams; @@ -1231,7 +1231,7 @@ static HB_DYNS_FUNC( hb_stackMemvarScan ) if( pMemvar && HB_IS_GCITEM( pMemvar ) ) hb_gcItemRef( pMemvar ); - return TRUE; + return HB_TRUE; } #endif diff --git a/harbour/src/vm/eval.c b/harbour/src/vm/eval.c index 3f24ae1d6c..c241f56107 100644 --- a/harbour/src/vm/eval.c +++ b/harbour/src/vm/eval.c @@ -69,7 +69,7 @@ #include "hbapierr.h" #include "hbvm.h" -BOOL hb_evalNew( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) +HB_BOOL hb_evalNew( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_evalNew(%p, %p)", pEvalInfo, pItem)); @@ -79,10 +79,10 @@ BOOL hb_evalNew( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) pEvalInfo->pItems[ 0 ] = pItem; pEvalInfo->paramCount = 0; - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } /* NOTE: CA-Cl*pper is buggy and will not check if more parameters are @@ -98,7 +98,7 @@ BOOL hb_evalNew( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) all, don't release the eval parameter Items explicitly to make both Harbour and CA-Cl*pper happy. [vszakats] */ -BOOL hb_evalPutParam( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) +HB_BOOL hb_evalPutParam( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_evalPutParam(%p, %p)", pEvalInfo, pItem)); @@ -106,10 +106,10 @@ BOOL hb_evalPutParam( PHB_EVALINFO pEvalInfo, PHB_ITEM pItem ) { pEvalInfo->pItems[ ++pEvalInfo->paramCount ] = pItem; - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } PHB_ITEM hb_evalLaunch( PHB_EVALINFO pEvalInfo ) @@ -168,7 +168,7 @@ PHB_ITEM hb_evalLaunch( PHB_EVALINFO pEvalInfo ) once and only once before calling hb_evalRelease(). Harbour doesn't have these requirements. [vszakats] */ -BOOL hb_evalRelease( PHB_EVALINFO pEvalInfo ) +HB_BOOL hb_evalRelease( PHB_EVALINFO pEvalInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_evalRelease(%p)", pEvalInfo)); @@ -184,10 +184,10 @@ BOOL hb_evalRelease( PHB_EVALINFO pEvalInfo ) pEvalInfo->paramCount = 0; - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } /* NOTE: Same purpose as hb_evalLaunch(), but simpler, faster and more flexible. @@ -502,7 +502,7 @@ HB_FUNC( HB_EXECFROMARRAY ) hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } -BOOL hb_execFromArray( PHB_ITEM pParam ) +HB_BOOL hb_execFromArray( PHB_ITEM pParam ) { PHB_SYMB pExecSym = NULL; PHB_ITEM pArray = NULL; @@ -560,13 +560,13 @@ BOOL hb_execFromArray( PHB_ITEM pParam ) else hb_vmProc( ( USHORT ) iPCount ); - return TRUE; + return HB_TRUE; } } hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - return FALSE; + return HB_FALSE; } /* hb_execMsg( , , [] ) -> diff --git a/harbour/src/vm/extend.c b/harbour/src/vm/extend.c index 7eb5bbd136..914f8a5ab5 100644 --- a/harbour/src/vm/extend.c +++ b/harbour/src/vm/extend.c @@ -167,7 +167,7 @@ ULONG hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex ) /* function to be called from pcode DLLs to detect if the extend system * is going to use an array item */ -BOOL hb_extIsArray( int iParam ) +HB_BOOL hb_extIsArray( int iParam ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -177,7 +177,7 @@ BOOL hb_extIsArray( int iParam ) else if( iParam >= 0 && iParam <= hb_pcount() ) pItem = hb_stackItemFromBase( iParam ); else - return FALSE; + return HB_FALSE; if( HB_IS_BYREF( pItem ) ) pItem = hb_itemUnRef( pItem ); @@ -188,7 +188,7 @@ BOOL hb_extIsArray( int iParam ) /* function to be called from pcode DLLs to detect if the extend system * is going to use an object item */ -BOOL hb_extIsObject( int iParam ) +HB_BOOL hb_extIsObject( int iParam ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -198,7 +198,7 @@ BOOL hb_extIsObject( int iParam ) else if( iParam >= 0 && iParam <= hb_pcount() ) pItem = hb_stackItemFromBase( iParam ); else - return FALSE; + return HB_FALSE; if( HB_IS_BYREF( pItem ) ) pItem = hb_itemUnRef( pItem ); @@ -386,7 +386,7 @@ double hb_partd( int iParam ) return 0; } -BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ) +HB_BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ) { HB_STACK_TLS_PRELOAD @@ -403,11 +403,11 @@ BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ) { *plJulian = pItem->item.asDateTime.julian; *plMilliSec = pItem->item.asDateTime.time; - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } @@ -955,7 +955,7 @@ double hb_parvtd( int iParam, ... ) return 0; } -BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ) +HB_BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ) { HB_STACK_TLS_PRELOAD @@ -972,7 +972,7 @@ BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ) { *plJulian = pItem->item.asDateTime.julian; *plMilliSec = pItem->item.asDateTime.time; - return TRUE; + return HB_TRUE; } else if( HB_IS_ARRAY( pItem ) ) { @@ -987,7 +987,7 @@ BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ) } } - return FALSE; + return HB_FALSE; } @@ -1433,7 +1433,7 @@ void hb_retl( int iLogical ) HB_TRACE(HB_TR_DEBUG, ("hb_retl(%d)", iLogical)); - hb_itemPutL( hb_stackReturnItem(), iLogical ? TRUE : FALSE ); + hb_itemPutL( hb_stackReturnItem(), iLogical ? HB_TRUE : HB_FALSE ); } #undef hb_retnd @@ -1780,7 +1780,7 @@ int hb_storl( int iLogical, int iParam ) if( iParam == -1 ) { - hb_itemPutL( hb_stackReturnItem(), iLogical ? TRUE : FALSE ); + hb_itemPutL( hb_stackReturnItem(), iLogical ? HB_TRUE : HB_FALSE ); return 1; } else if( iParam >= 0 && iParam <= hb_pcount() ) @@ -1789,7 +1789,7 @@ int hb_storl( int iLogical, int iParam ) if( HB_IS_BYREF( pItem ) ) { - hb_itemPutL( hb_itemUnRef( pItem ), iLogical ? TRUE : FALSE ); + hb_itemPutL( hb_itemUnRef( pItem ), iLogical ? HB_TRUE : HB_FALSE ); return 1; } } @@ -1987,7 +1987,7 @@ int hb_storvc( const char * szText, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2020,7 +2020,7 @@ int hb_storvclen( const char * szText, HB_SIZE ulLen, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2053,7 +2053,7 @@ int hb_storvclen_buffer( char * szText, HB_SIZE ulLen, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2088,7 +2088,7 @@ int hb_storvds( const char * szDate, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2121,7 +2121,7 @@ int hb_storvdl( long lJulian, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2154,7 +2154,7 @@ int hb_storvtd( double dTimeStamp, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2187,7 +2187,7 @@ int hb_storvtdt( long lJulian, long lMilliSec, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2220,7 +2220,7 @@ int hb_storvl( int iLogical, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2230,13 +2230,13 @@ int hb_storvl( int iLogical, int iParam, ... ) int iRetVal; va_list va; va_start( va, iParam ); - iRetVal = hb_arraySetL( pItem, va_arg( va, HB_SIZE ), iLogical ? TRUE : FALSE ) ? 1 : 0; + iRetVal = hb_arraySetL( pItem, va_arg( va, HB_SIZE ), iLogical ? HB_TRUE : HB_FALSE ) ? 1 : 0; va_end( va ); return iRetVal; } else if( bByRef || iParam == -1 ) { - hb_itemPutL( pItem, iLogical ? TRUE : FALSE ); + hb_itemPutL( pItem, iLogical ? HB_TRUE : HB_FALSE ); return 1; } } @@ -2253,7 +2253,7 @@ int hb_storvni( int iValue, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2286,7 +2286,7 @@ int hb_storvnl( long lValue, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2320,7 +2320,7 @@ int hb_storvnll( LONGLONG llValue, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2354,7 +2354,7 @@ int hb_storvnint( HB_LONG lValue, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2387,7 +2387,7 @@ int hb_storvnd( double dNumber, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2420,7 +2420,7 @@ int hb_storvptr( void * pointer, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); @@ -2453,7 +2453,7 @@ int hb_storvptrGC( void * pointer, int iParam, ... ) if( iParam >= -1 && iParam <= hb_pcount() ) { PHB_ITEM pItem = ( iParam == -1 ) ? hb_stackReturnItem() : hb_stackItemFromBase( iParam ); - BOOL bByRef = HB_IS_BYREF( pItem ); + HB_BOOL bByRef = HB_IS_BYREF( pItem ); if( bByRef ) pItem = hb_itemUnRef( pItem ); diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index d5a11bddb5..67aef4365d 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -261,7 +261,7 @@ #endif #ifdef HB_FM_NEED_INIT -static BOOL s_fInitedFM = FALSE; +static HB_BOOL s_fInitedFM = HB_FALSE; #endif #ifdef HB_FM_STATISTICS @@ -305,7 +305,7 @@ typedef struct _HB_MEMINFO */ #define HB_TRACE_FM HB_TRACE_STEALTH -static BOOL s_fStatistic = FALSE; +static HB_BOOL s_fStatistic = HB_FALSE; static long s_lMemoryBlocks = 0; /* memory blocks used */ static long s_lMemoryMaxBlocks = 0; /* maximum number of used memory blocks */ @@ -902,9 +902,9 @@ void hb_xRefInc( void * pMem ) HB_ATOM_INC( HB_COUNTER_PTR( pMem ) ); } -/* decrement reference counter, return TRUE when 0 reached */ +/* decrement reference counter, return HB_TRUE when 0 reached */ #undef hb_xRefDec -BOOL hb_xRefDec( void * pMem ) +HB_BOOL hb_xRefDec( void * pMem ) { return HB_ATOM_DEC( HB_COUNTER_PTR( pMem ) ) == 0; } @@ -1019,13 +1019,13 @@ void hb_xinit( void ) /* Initialize fixed memory subsystem */ if( hb_getenv_buffer( "HB_FM_STAT", buffer, sizeof( buffer ) ) ) { if( hb_stricmp( "yes", buffer ) == 0 ) - s_fStatistic = TRUE; + s_fStatistic = HB_TRUE; else if( hb_stricmp( "no", buffer ) == 0 ) - s_fStatistic = FALSE; + s_fStatistic = HB_FALSE; } #ifndef HB_FM_STATISTICS_DYN_OFF else - s_fStatistic = TRUE; /* enabled by default */ + s_fStatistic = HB_TRUE; /* enabled by default */ #endif /* HB_FM_STATISTICS_DYN_OFF */ #endif /* HB_FM_STATISTICS */ @@ -1033,7 +1033,7 @@ void hb_xinit( void ) /* Initialize fixed memory subsystem */ s_hProcessHeap = GetProcessHeap(); #endif - s_fInitedFM = TRUE; + s_fInitedFM = HB_TRUE; } #endif /* HB_FM_NEED_INIT */ } diff --git a/harbour/src/vm/garbage.c b/harbour/src/vm/garbage.c index c63ca1c2a5..05ec315868 100644 --- a/harbour/src/vm/garbage.c +++ b/harbour/src/vm/garbage.c @@ -158,7 +158,7 @@ static HB_GARBAGE_PTR s_pLockedBlock = NULL; static HB_GARBAGE_PTR s_pDeletedBlock = NULL; /* marks if block releasing is requested during garbage collecting */ -static BOOL s_bCollecting = FALSE; +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 @@ -210,7 +210,7 @@ void * hb_gcAllocate( ULONG ulSize, const HB_GC_FUNCS * pFuncs ) if( s_ulBlocks > s_ulBlocksCheck ) { HB_GC_UNLOCK - hb_gcCollectAll( TRUE ); + hb_gcCollectAll( HB_TRUE ); HB_GC_LOCK pAlloc->used = s_uUsedFlag; } @@ -241,7 +241,7 @@ void * hb_gcAllocRaw( ULONG ulSize, const HB_GC_FUNCS * pFuncs ) if( s_ulBlocks > s_ulBlocksCheck ) { HB_GC_UNLOCK - hb_gcCollectAll( TRUE ); + hb_gcCollectAll( HB_TRUE ); HB_GC_LOCK pAlloc->used = s_uUsedFlag; } @@ -608,12 +608,12 @@ void hb_gcItemRef( HB_ITEM_PTR pItem ) void hb_gcCollect( void ) { /* TODO: decrease the amount of time spend collecting */ - hb_gcCollectAll( FALSE ); + hb_gcCollectAll( HB_FALSE ); } /* Check all memory block if they can be released */ -void hb_gcCollectAll( BOOL fForce ) +void hb_gcCollectAll( HB_BOOL fForce ) { /* MTNOTE: it's not necessary to protect s_bCollecting with mutex * because it can be changed at RT only inside this procedure @@ -630,7 +630,7 @@ void hb_gcCollectAll( BOOL fForce ) return; } - s_bCollecting = TRUE; + s_bCollecting = HB_TRUE; /* Step 1 - mark */ /* All blocks are already marked because we are flipping @@ -746,7 +746,7 @@ void hb_gcCollectAll( BOOL fForce ) } while( s_pDeletedBlock ); } - s_bCollecting = FALSE; + s_bCollecting = HB_FALSE; } } @@ -817,7 +817,7 @@ void hb_gcReleaseAll( void ) { HB_GARBAGE_PTR pAlloc, pDelete; - s_bCollecting = TRUE; + s_bCollecting = HB_TRUE; pAlloc = s_pCurrBlock; do @@ -841,7 +841,7 @@ void hb_gcReleaseAll( void ) } while ( s_pCurrBlock ); } - s_bCollecting = FALSE; + s_bCollecting = HB_FALSE; #ifdef HB_LEGACY_LEVEL2 hb_gcAllocExit(); diff --git a/harbour/src/vm/hashes.c b/harbour/src/vm/hashes.c index 560e42033a..1da4f8d662 100644 --- a/harbour/src/vm/hashes.c +++ b/harbour/src/vm/hashes.c @@ -161,9 +161,9 @@ static int hb_hashItemCmp( PHB_ITEM pKey1, PHB_ITEM pKey2, int iFlags ) pKey2->item.asString.value, pKey1->item.asString.length ) ); else if( iFlags & HB_HASH_IGNORECASE ) - return hb_itemStrICmp( pKey1, pKey2, TRUE ); + return hb_itemStrICmp( pKey1, pKey2, HB_TRUE ); else - return hb_itemStrCmp( pKey1, pKey2, TRUE ); + return hb_itemStrCmp( pKey1, pKey2, HB_TRUE ); } else return 1; @@ -230,7 +230,7 @@ static void hb_hashResort( PHB_BASEHASH pBaseHash ) pBaseHash->iFlags &= ~HB_HASH_RESORT; } -static BOOL hb_hashFind( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, HB_SIZE * pulPos ) +static HB_BOOL hb_hashFind( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, HB_SIZE * pulPos ) { HB_SIZE ulLeft, ulRight, ulMiddle; int iFlags = pBaseHash->iFlags; @@ -250,7 +250,7 @@ static BOOL hb_hashFind( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, HB_SIZE * pulPos { if( pulPos ) *pulPos = ulMiddle; - return TRUE; + return HB_TRUE; } else if( i < 0 ) ulLeft = ulMiddle + 1; @@ -260,7 +260,7 @@ static BOOL hb_hashFind( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, HB_SIZE * pulPos if( pulPos ) *pulPos = ulLeft; - return FALSE; + return HB_FALSE; } static void hb_hashResize( PHB_BASEHASH pBaseHash, HB_SIZE ulNewSize ) @@ -294,7 +294,7 @@ static void hb_hashResize( PHB_BASEHASH pBaseHash, HB_SIZE ulNewSize ) } } -static PHB_ITEM hb_hashValuePtr( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, BOOL fAdd ) +static PHB_ITEM hb_hashValuePtr( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, HB_BOOL fAdd ) { HB_SIZE ulPos; @@ -322,7 +322,7 @@ static PHB_ITEM hb_hashValuePtr( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, BOOL fAd return &pBaseHash->pPairs[ ulPos ].value; } -static BOOL hb_hashNewValue( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, PHB_ITEM pValue ) +static HB_BOOL hb_hashNewValue( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, PHB_ITEM pValue ) { HB_SIZE ulPos; @@ -343,10 +343,10 @@ static BOOL hb_hashNewValue( PHB_BASEHASH pBaseHash, PHB_ITEM pKey, PHB_ITEM pVa hb_itemCopyFromRef( &pBaseHash->pPairs[ ulPos ].value, pValue ); pBaseHash->ulLen++; - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } static void hb_hashNewPair( PHB_BASEHASH pBaseHash, PHB_ITEM * pKeyPtr, PHB_ITEM * pValPtr ) @@ -436,17 +436,17 @@ void hb_hashPreallocate( PHB_ITEM pHash, HB_SIZE ulNewSize ) hb_hashResize( pHash->item.asHash.value, ulNewSize ); } -BOOL hb_hashAllocNewPair( PHB_ITEM pHash, PHB_ITEM * pKeyPtr, PHB_ITEM * pValPtr ) +HB_BOOL hb_hashAllocNewPair( PHB_ITEM pHash, PHB_ITEM * pKeyPtr, PHB_ITEM * pValPtr ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashAllocNewPair(%p,%p,%p)", pHash, pKeyPtr, pValPtr)); if( HB_IS_HASH( pHash ) ) { hb_hashNewPair( pHash->item.asHash.value, pKeyPtr, pValPtr ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } void hb_hashSort( PHB_ITEM pHash ) @@ -486,7 +486,7 @@ PHB_ITEM hb_hashGetCItemPtr( PHB_ITEM pHash, const char * pszKey ) * safe to use hb_itemPutCConst() */ PHB_ITEM pKey = hb_itemPutCConst( hb_stackAllocItem(), pszKey ); - PHB_ITEM pDest = hb_hashValuePtr( pHash->item.asHash.value, pKey, FALSE ); + PHB_ITEM pDest = hb_hashValuePtr( pHash->item.asHash.value, pKey, HB_FALSE ); hb_stackPop(); if( pDest ) return HB_IS_BYREF( pDest ) ? hb_itemUnRef( pDest ) : pDest; @@ -515,7 +515,7 @@ PHB_ITEM hb_hashGetItemRefPtr( PHB_ITEM pHash, PHB_ITEM pKey ) return NULL; } -BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ) +HB_BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashScan(%p,%p,%p)", pHash, pKey, pulPos)); @@ -528,7 +528,7 @@ BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ) { if( pulPos ) *pulPos = ulPos + 1; - return TRUE; + return HB_TRUE; } } else if( HB_IS_HASH( pKey ) && pKey->item.asHash.value->ulLen == 1 ) @@ -537,15 +537,15 @@ BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ) { PHB_ITEM pVal1 = &pHash->item.asHash.value->pPairs[ ulPos ].value; PHB_ITEM pVal2 = &pKey->item.asHash.value->pPairs[ 0 ].value; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( HB_IS_STRING( pVal1 ) && HB_IS_STRING( pVal2 ) ) - fResult = hb_itemStrCmp( pVal1, pVal2, TRUE ) == 0; + fResult = hb_itemStrCmp( pVal1, pVal2, HB_TRUE ) == 0; else if( HB_IS_NUMINT( pVal1 ) && HB_IS_NUMINT( pVal2 ) ) fResult = HB_ITEM_GET_NUMINTRAW( pVal1 ) == HB_ITEM_GET_NUMINTRAW( pVal2 ); else if( HB_IS_NUMERIC( pVal1 ) && HB_IS_NUMERIC( pVal2 ) ) fResult = hb_itemGetND( pVal1 ) == hb_itemGetND( pVal2 ); else if( HB_IS_NIL( pVal1 ) && HB_IS_NIL( pVal2 ) ) - fResult = TRUE; + fResult = HB_TRUE; else if( hb_itemType( pVal1 ) & hb_itemType( pVal2 ) ) { hb_vmPush( pVal1 ); @@ -561,17 +561,17 @@ BOOL hb_hashScan( PHB_ITEM pHash, PHB_ITEM pKey, HB_SIZE * pulPos ) { if( pulPos ) *pulPos = ulPos + 1; - return TRUE; + return HB_TRUE; } } } } if( pulPos ) *pulPos = 0; - return FALSE; + return HB_FALSE; } -static BOOL hb_hashClear( PHB_ITEM pHash ) +static HB_BOOL hb_hashClear( PHB_ITEM pHash ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashClear(%p)", pHash)); @@ -598,13 +598,13 @@ static BOOL hb_hashClear( PHB_ITEM pHash ) pHash->item.asHash.value->ulSize = 0; } } - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_hashDel( PHB_ITEM pHash, PHB_ITEM pKey ) +HB_BOOL hb_hashDel( PHB_ITEM pHash, PHB_ITEM pKey ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashDel(%p,%p)", pHash, pKey)); @@ -616,14 +616,14 @@ BOOL hb_hashDel( PHB_ITEM pHash, PHB_ITEM pKey ) if( hb_hashFind( pBaseHash, pKey, &ulPos ) ) { hb_hashDelPair( pBaseHash, ulPos ); - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ) +HB_BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashRemove(%p,%p)", pHash, pItem)); @@ -632,7 +632,7 @@ BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ) if( HB_IS_HASHKEY( pItem ) ) { hb_hashDel( pHash, pItem ); - return TRUE; + return HB_TRUE; } else if( HB_IS_ARRAY( pItem ) ) { @@ -640,7 +640,7 @@ BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ) PHB_ITEM pKey; while( ( pKey = hb_arrayGetItemPtr( pItem, ++ul ) ) != NULL ) hb_hashDel( pHash, pKey ); - return TRUE; + return HB_TRUE; } else if( HB_IS_HASH( pItem ) ) { @@ -652,19 +652,19 @@ BOOL hb_hashRemove( PHB_ITEM pHash, PHB_ITEM pItem ) while( ulLen < pItem->item.asHash.value->ulLen ) hb_hashDel( pHash, &pItem->item.asHash.value->pPairs[ ulLen++ ].key ); } - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_hashAdd( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ) +HB_BOOL hb_hashAdd( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashAdd(%p,%p,%p)", pHash, pKey, pValue)); if( HB_IS_HASH( pHash ) && HB_IS_HASHKEY( pKey ) ) { - PHB_ITEM pDest = hb_hashValuePtr( pHash->item.asHash.value, pKey, TRUE ); + PHB_ITEM pDest = hb_hashValuePtr( pHash->item.asHash.value, pKey, HB_TRUE ); if( pDest ) { if( HB_IS_BYREF( pDest ) ) @@ -673,21 +673,21 @@ BOOL hb_hashAdd( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ) hb_itemCopyFromRef( pDest, pValue ); else hb_itemSetNil( pDest ); - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } -BOOL hb_hashAddNew( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ) +HB_BOOL hb_hashAddNew( PHB_ITEM pHash, PHB_ITEM pKey, PHB_ITEM pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashAddNew(%p,%p,%p)", pHash, pKey, pValue)); if( HB_IS_HASH( pHash ) && HB_IS_HASHKEY( pKey ) ) return hb_hashNewValue( pHash->item.asHash.value, pKey, pValue ); else - return FALSE; + return HB_FALSE; } PHB_ITEM hb_hashGetKeyAt( PHB_ITEM pHash, HB_SIZE ulPos ) @@ -712,17 +712,17 @@ PHB_ITEM hb_hashGetValueAt( PHB_ITEM pHash, HB_SIZE ulPos ) return NULL; } -BOOL hb_hashDelAt( PHB_ITEM pHash, HB_SIZE ulPos ) +HB_BOOL hb_hashDelAt( PHB_ITEM pHash, HB_SIZE ulPos ) { HB_TRACE(HB_TR_DEBUG, ("hb_hashDelAt(%p,%lu)", pHash, ulPos)); if( HB_IS_HASH( pHash ) && ulPos > 0 && ulPos <= pHash->item.asHash.value->ulLen ) { hb_hashDelPair( pHash->item.asHash.value, ulPos - 1 ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } /* retrives the hash unique ID */ diff --git a/harbour/src/vm/hashfunc.c b/harbour/src/vm/hashfunc.c index 737b1065d7..00d8cffe32 100644 --- a/harbour/src/vm/hashfunc.c +++ b/harbour/src/vm/hashfunc.c @@ -436,7 +436,7 @@ HB_FUNC( HB_HSCAN ) if( pHash && pValue ) { - BOOL fExact = hb_parl( 5 ), fFound = FALSE; + HB_BOOL fExact = hb_parl( 5 ), fFound = HB_FALSE; HB_SIZE ulLen = hb_hashLen( pHash ), ulStart, ulCount; ulStart = hb_parnl( 3 ); @@ -462,7 +462,7 @@ HB_FUNC( HB_HSCAN ) PHB_ITEM pReturn = hb_stackReturnItem(); if( HB_IS_LOGICAL( pReturn ) && hb_itemGetL( pReturn ) ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -481,7 +481,7 @@ HB_FUNC( HB_HSCAN ) { if( HB_IS_STRING( pItem ) && hb_itemStrCmp( pItem, pValue, fExact ) == 0 ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -500,7 +500,7 @@ HB_FUNC( HB_HSCAN ) { if( HB_IS_NUMERIC( pItem ) && hb_itemGetND( pItem ) == dValue ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -520,7 +520,7 @@ HB_FUNC( HB_HSCAN ) pItem->item.asDateTime.julian == pValue->item.asDateTime.julian && ( !fExact || pItem->item.asDateTime.time == pValue->item.asDateTime.time ) ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -531,7 +531,7 @@ HB_FUNC( HB_HSCAN ) } else if( HB_IS_LOGICAL( pValue ) ) { - BOOL fValue = hb_itemGetDL( pValue ); + HB_BOOL fValue = hb_itemGetDL( pValue ); while( ulCount-- ) { PHB_ITEM pItem = hb_hashGetValueAt( pHash, ulStart ); @@ -539,7 +539,7 @@ HB_FUNC( HB_HSCAN ) { if( HB_IS_LOGICAL( pItem ) && hb_itemGetL( pItem ) == fValue ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -557,7 +557,7 @@ HB_FUNC( HB_HSCAN ) { if( HB_IS_NIL( pItem ) ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -576,7 +576,7 @@ HB_FUNC( HB_HSCAN ) if( HB_IS_POINTER( pItem ) && pItem->item.asPointer.value == pValue->item.asPointer.value ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -595,7 +595,7 @@ HB_FUNC( HB_HSCAN ) if( HB_IS_ARRAY( pItem ) && pItem->item.asArray.value == pValue->item.asArray.value ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } @@ -614,7 +614,7 @@ HB_FUNC( HB_HSCAN ) if( HB_IS_HASH( pItem ) && pItem->item.asHash.value == pValue->item.asHash.value ) { - fFound = TRUE; + fFound = HB_TRUE; break; } } diff --git a/harbour/src/vm/hvm.c b/harbour/src/vm/hvm.c index 61a9bf5093..bb8d498bd6 100644 --- a/harbour/src/vm/hvm.c +++ b/harbour/src/vm/hvm.c @@ -196,7 +196,7 @@ static void hb_vmDuplUnRef( void ); /* duplicates the latest value o static void hb_vmSwap( BYTE bCount ); /* swap bCount+1 time two items on HVM stack starting from the most top one */ /* Pop */ -static BOOL hb_vmPopLogical( void ); /* pops the stack latest value and returns its logical value */ +static HB_BOOL hb_vmPopLogical( void ); /* pops the stack latest value and returns its logical value */ static void hb_vmPopAlias( void ); /* pops the workarea number form the eval stack */ 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*/ @@ -217,7 +217,7 @@ static void hb_vmStaticName( BYTE bIsGlobal, USHORT uiStatic, char * szStatic static void hb_vmModuleName( 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( BOOL fRemove ); /* shuts down the debugger */ +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_vmDebuggerEndProc( void ); /* notifies the debugger for an endproc */ @@ -242,13 +242,13 @@ static HB_CRITICAL_NEW( s_atInitMtx ); #endif /* HB_MT_VM */ #ifndef HB_NO_PROFILER -static ULONG hb_ulOpcodesCalls[ HB_P_LAST_PCODE ];/* array to profile opcodes calls */ -static ULONG hb_ulOpcodesTime[ HB_P_LAST_PCODE ]; /* array to profile opcodes consumed time */ -static BOOL hb_bProfiler = FALSE; /* profiler status is off */ +static ULONG hb_ulOpcodesCalls[ HB_P_LAST_PCODE ]; /* array to profile opcodes calls */ +static ULONG hb_ulOpcodesTime[ HB_P_LAST_PCODE ]; /* array to profile opcodes consumed time */ +static HB_BOOL hb_bProfiler = HB_FALSE; /* profiler status is off */ #endif #if defined( HB_PRG_TRACE ) -static BOOL hb_bTracePrgCalls = FALSE; /* prg tracing is off */ +static HB_BOOL hb_bTracePrgCalls = HB_FALSE; /* prg tracing is off */ # define HB_TRACE_PRG( _TRMSG_ ) if( hb_bTracePrgCalls ) HB_TRACE( HB_TR_ALWAYS, _TRMSG_ ) #else # define HB_TRACE_PRG( _TRMSG_ ) @@ -260,15 +260,15 @@ static const char * s_vm_pszLinkedMain = NULL; /* name of startup function set b HB_SYMB hb_symEval = { "EVAL", {HB_FS_PUBLIC}, {hb_vmDoBlock}, NULL }; /* symbol to evaluate codeblocks */ -static BOOL s_fHVMActive = FALSE; /* is HVM ready for PCODE executing */ -static BOOL s_fDoExitProc = TRUE; /* execute EXIT procedures */ +static HB_BOOL s_fHVMActive = HB_FALSE; /* is HVM ready for PCODE executing */ +static HB_BOOL s_fDoExitProc = HB_TRUE; /* execute EXIT procedures */ static int s_nErrorLevel = 0; /* application exit errorlevel */ static PHB_SYMB s_pSymStart = NULL; /* start symbol of the application. MAIN() is not required */ static PHB_SYMBOLS s_pSymbols = NULL; /* to hold a linked list of all different modules symbol tables */ static ULONG s_ulFreeSymbols = 0;/* number of free module symbols */ static void * s_hDynLibID = NULL; /* unique identifer to mark symbol tables loaded from dynamic libraries */ -static BOOL s_fCloneSym = FALSE;/* clone registered symbol tables */ +static HB_BOOL s_fCloneSym = HB_FALSE;/* clone registered symbol tables */ /* main VM thread stack ID */ static void * s_main_thread = NULL; @@ -387,10 +387,10 @@ static void hb_vmDoInitClip( void ) #if !defined( HB_MT_VM ) -BOOL hb_vmIsMt( void ) { return FALSE; } +HB_BOOL hb_vmIsMt( void ) { return HB_FALSE; } void hb_vmLock( void ) {} void hb_vmUnlock( void ) {} -BOOL hb_vmSuspendThreads( BOOL fWait ) { HB_SYMBOL_UNUSED( fWait ); return TRUE; } +HB_BOOL hb_vmSuspendThreads( HB_BOOL fWait ) { HB_SYMBOL_UNUSED( fWait ); return HB_TRUE; } void hb_vmResumeThreads( void ) {} #else @@ -413,7 +413,7 @@ static HB_THREAD_NO s_threadNo = 0; # define HB_VM_LOCK hb_threadEnterCriticalSection( &s_vmMtx ); # define HB_VM_UNLOCK hb_threadLeaveCriticalSection( &s_vmMtx ); -BOOL hb_vmIsMt( void ) { return TRUE; } +HB_BOOL hb_vmIsMt( void ) { return HB_TRUE; } static void hb_vmRequestTest( void ) { @@ -427,7 +427,7 @@ static void hb_vmRequestTest( void ) HB_STACK_TLS_PRELOAD if( !hb_stackQuitState() ) { - hb_stackSetQuitState( TRUE ); + hb_stackSetQuitState( HB_TRUE ); hb_stackSetActionRequest( HB_QUIT_REQUESTED ); } } @@ -461,7 +461,7 @@ void hb_vmUnlock( void ) { if( !hb_stackQuitState() ) { - hb_stackSetQuitState( TRUE ); + hb_stackSetQuitState( HB_TRUE ); hb_stackSetActionRequest( HB_QUIT_REQUESTED ); } } @@ -490,7 +490,7 @@ void hb_vmLock( void ) { if( !hb_stackQuitState() ) { - hb_stackSetQuitState( TRUE ); + hb_stackSetQuitState( HB_TRUE ); hb_stackSetActionRequest( HB_QUIT_REQUESTED ); } } @@ -506,7 +506,7 @@ void hb_vmLock( void ) } /* (try to) stop all threads except current one */ -BOOL hb_vmSuspendThreads( BOOL fWait ) +HB_BOOL hb_vmSuspendThreads( HB_BOOL fWait ) { HB_VM_LOCK @@ -520,7 +520,7 @@ BOOL hb_vmSuspendThreads( BOOL fWait ) { hb_vmThreadRequest &= ~HB_THREQUEST_STOP; ++s_iRunningCount; - return TRUE; + return HB_TRUE; } if( !fWait ) break; @@ -535,7 +535,7 @@ BOOL hb_vmSuspendThreads( BOOL fWait ) HB_VM_UNLOCK - return FALSE; + return HB_FALSE; } /* unblock execution of threads stopped by hb_vmSuspendThreads() */ @@ -636,9 +636,9 @@ static PHB_ITEM hb_vmStackDel( PHB_THREADSTATE pState ) HB_TRACE(HB_TR_DEBUG, ("hb_vmStackDel(%p)", pState)); - pState->fActive = FALSE; + pState->fActive = HB_FALSE; pState->pStackId = NULL; - pState->fFinished = TRUE; + pState->fFinished = HB_TRUE; if( pState->pPrev ) { @@ -676,7 +676,7 @@ static void hb_vmStackInit( PHB_THREADSTATE pState ) hb_stackUnlock(); pState->pStackId = hb_stackId(); hb_stackListSet( ( void * ) ( pState ) ); - pState->fActive = TRUE; + pState->fActive = HB_TRUE; hb_vmStackAdd( pState ); } HB_VM_UNLOCK @@ -687,7 +687,7 @@ static void hb_vmStackInit( PHB_THREADSTATE pState ) static void hb_vmStackRelease( void ) { HB_STACK_TLS_PRELOAD - BOOL fLocked; + HB_BOOL fLocked; PHB_ITEM pThItm; HB_TRACE(HB_TR_DEBUG, ("hb_vmStackRelease()")); @@ -722,7 +722,7 @@ static void hb_vmStackRelease( void ) HB_VM_UNLOCK } -BOOL hb_vmThreadRegister( void * Cargo ) +HB_BOOL hb_vmThreadRegister( void * Cargo ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmThreadRegister(%p)", Cargo)); @@ -732,7 +732,7 @@ BOOL hb_vmThreadRegister( void * Cargo ) HB_VM_UNLOCK - return TRUE; + return HB_TRUE; } void hb_vmThreadRelease( void * Cargo ) @@ -815,7 +815,7 @@ void hb_vmThreadQuit( void ) HB_TRACE(HB_TR_DEBUG, ("hb_vmThreadQuit()")); - hb_stackSetQuitState( TRUE ); + hb_stackSetQuitState( HB_TRUE ); hb_stackSetActionRequest( 0 ); pState = ( PHB_THREADSTATE ) hb_stackList(); @@ -838,10 +838,10 @@ void hb_vmThreadQuit( void ) hb_stackSetActionRequest( 0 ); hb_rddCloseAll(); /* close all workareas */ hb_stackRemove( 1 ); /* clear stack items, leave only initial symbol item */ - hb_memvarsClear( TRUE ); /* clear all PUBLIC (and PRIVATE if any) variables */ + hb_memvarsClear( HB_TRUE ); /* clear all PUBLIC (and PRIVATE if any) variables */ hb_vmSetI18N( NULL ); /* remove i18n translation table */ #ifndef HB_NO_DEBUG - hb_vmDebuggerExit( FALSE ); /* deactivate debugger */ + hb_vmDebuggerExit( HB_FALSE ); /* deactivate debugger */ #endif hb_gtRelease( NULL ); hb_vmStackRelease(); /* release HVM stack and remove it from linked HVM stacks list */ @@ -901,7 +901,7 @@ void hb_vmSetFunction( PHB_SYMB pOldSym, PHB_SYMB pNewSym ) /* application entry point */ -void hb_vmInit( BOOL bStartMainProc ) +void hb_vmInit( HB_BOOL bStartMainProc ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmInit()")); @@ -959,7 +959,7 @@ void hb_vmInit( BOOL bStartMainProc ) #endif /* enable executing PCODE (HVM reenter request) */ - s_fHVMActive = TRUE; + s_fHVMActive = HB_TRUE; #ifndef HB_NO_DEBUG s_pDynsDbgEntry = hb_dynsymFind( "__DBGENTRY" ); @@ -1095,7 +1095,7 @@ int hb_vmQuit( void ) /* intentionally here to allow executing object destructors for all * cross referenced items before we release classy subsystem */ - hb_gcCollectAll( TRUE ); + hb_gcCollectAll( HB_TRUE ); /* Clear any pending actions so RDD shutdown process * can be cleanly executed @@ -1103,22 +1103,22 @@ int hb_vmQuit( void ) hb_stackSetActionRequest( 0 ); hb_rddCloseAll(); /* close all workareas */ hb_rddShutDown(); /* remove all registered RDD drivers */ - hb_memvarsClear( TRUE ); /* clear all PUBLIC (and PRIVATE if any) variables */ + hb_memvarsClear( HB_TRUE ); /* clear all PUBLIC (and PRIVATE if any) variables */ hb_vmSetI18N( NULL ); /* remove i18n translation table */ hb_i18n_exit(); /* unregister i18n module */ hb_itemClear( hb_stackReturnItem() ); - hb_gcCollectAll( TRUE ); + hb_gcCollectAll( HB_TRUE ); #ifndef HB_NO_DEBUG /* deactivate debugger */ - hb_vmDebuggerExit( TRUE ); + hb_vmDebuggerExit( HB_TRUE ); #endif /* release thread specific data */ hb_stackDestroyTSD(); /* stop executing PCODE (HVM reenter request) */ - s_fHVMActive = FALSE; + s_fHVMActive = HB_FALSE; hb_vmStaticsClear(); @@ -1134,7 +1134,7 @@ int hb_vmQuit( void ) hb_dynsymRelease(); /* releases the dynamic symbol table */ hb_cdpReleaseAll(); /* releases codepages */ hb_itemClear( hb_stackReturnItem() ); - hb_gcCollectAll( TRUE ); + hb_gcCollectAll( HB_TRUE ); hb_vmDoModuleQuitFunctions(); /* process AtQuit registered functions */ hb_vmCleanModuleFunctions(); @@ -1166,8 +1166,8 @@ int hb_vmQuit( void ) void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) { HB_STACK_TLS_PRELOAD - BOOL bCanRecover = FALSE; - BOOL bDynCode = pSymbols == NULL || ( pSymbols->scope.value & HB_FS_DYNCODE ) != 0; + HB_BOOL bCanRecover = HB_FALSE; + HB_BOOL bDynCode = pSymbols == NULL || ( pSymbols->scope.value & HB_FS_DYNCODE ) != 0; #ifndef HB_NO_PROFILER ULONG ulLastOpcode = 0; /* opcodes profiler support */ ULONG ulPastClock = 0; /* opcodes profiler support */ @@ -1812,7 +1812,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) /* * we are now inside a valid SEQUENCE envelope */ - bCanRecover = TRUE; + bCanRecover = HB_TRUE; pCode += 4; break; } @@ -1911,7 +1911,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) /* * we are now inside a valid SEQUENCE envelope */ - bCanRecover = TRUE; + bCanRecover = HB_TRUE; pCode += 4; break; } @@ -2028,7 +2028,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) PHB_ITEM pItem = hb_stackAllocItem(); pItem->type = HB_IT_LOGICAL; - pItem->item.asLogical.value = TRUE; + pItem->item.asLogical.value = HB_TRUE; pCode++; } break; @@ -2038,7 +2038,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) PHB_ITEM pItem = hb_stackAllocItem(); pItem->type = HB_IT_LOGICAL; - pItem->item.asLogical.value = FALSE; + pItem->item.asLogical.value = HB_FALSE; pCode++; } break; @@ -3695,14 +3695,14 @@ static void hb_vmExactlyEqual( void ) if( HB_IS_COMPLEX( pItem1 ) ) hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; - pItem1->item.asLogical.value = FALSE; + pItem1->item.asLogical.value = HB_FALSE; } else if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - BOOL fResult = pItem1->item.asString.length == pItem2->item.asString.length && - memcmp( pItem1->item.asString.value, - pItem2->item.asString.value, - pItem1->item.asString.length ) == 0; + HB_BOOL fResult = pItem1->item.asString.length == pItem2->item.asString.length && + memcmp( pItem1->item.asString.value, + pItem2->item.asString.value, + pItem1->item.asString.length ) == 0; hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3740,7 +3740,7 @@ static void hb_vmExactlyEqual( void ) } else if( HB_IS_POINTER( pItem1 ) && HB_IS_POINTER( pItem2 ) ) { - BOOL fResult = pItem1->item.asPointer.value == pItem2->item.asPointer.value; + HB_BOOL fResult = pItem1->item.asPointer.value == pItem2->item.asPointer.value; hb_stackPop(); hb_itemClear( pItem1 ); @@ -3749,7 +3749,7 @@ static void hb_vmExactlyEqual( void ) } else if( HB_IS_HASH( pItem1 ) && HB_IS_HASH( pItem2 ) ) { - BOOL fResult = pItem1->item.asHash.value == pItem2->item.asHash.value; + HB_BOOL fResult = pItem1->item.asHash.value == pItem2->item.asHash.value; hb_stackPop(); hb_itemClear( pItem1 ); @@ -3759,7 +3759,7 @@ static void hb_vmExactlyEqual( void ) else if( HB_IS_ARRAY( pItem1 ) && HB_IS_ARRAY( pItem2 ) && ! hb_objHasOperator( pItem1, HB_OO_OP_EXACTEQUAL ) ) { - BOOL fResult = pItem1->item.asArray.value == pItem2->item.asArray.value; + HB_BOOL fResult = pItem1->item.asArray.value == pItem2->item.asArray.value; hb_stackPop(); hb_itemClear( pItem1 ); @@ -3804,11 +3804,11 @@ static void hb_vmEqual( void ) if( HB_IS_COMPLEX( pItem1 ) ) hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; - pItem1->item.asLogical.value = FALSE; + pItem1->item.asLogical.value = HB_FALSE; } else if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - BOOL fResult = hb_itemStrCmp( pItem1, pItem2, FALSE ) == 0; + HB_BOOL fResult = hb_itemStrCmp( pItem1, pItem2, HB_FALSE ) == 0; hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3850,7 +3850,7 @@ static void hb_vmEqual( void ) } else if( HB_IS_POINTER( pItem1 ) && HB_IS_POINTER( pItem2 ) ) { - BOOL fResult = pItem1->item.asPointer.value == pItem2->item.asPointer.value; + HB_BOOL fResult = pItem1->item.asPointer.value == pItem2->item.asPointer.value; hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3859,7 +3859,7 @@ static void hb_vmEqual( void ) /* else if( HB_IS_HASH( pItem1 ) && HB_IS_HASH( pItem2 ) ) { - BOOL fResult = pItem1->item.asHash.value == pItem2->item.asHash.value; + HB_BOOL fResult = pItem1->item.asHash.value == pItem2->item.asHash.value; hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3904,11 +3904,11 @@ static void hb_vmNotEqual( void ) if( HB_IS_COMPLEX( pItem1 ) ) hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; - pItem1->item.asLogical.value = TRUE; + pItem1->item.asLogical.value = HB_TRUE; } else if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - int i = hb_itemStrCmp( pItem1, pItem2, FALSE ); + int i = hb_itemStrCmp( pItem1, pItem2, HB_FALSE ); hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3950,8 +3950,8 @@ static void hb_vmNotEqual( void ) } else if( HB_IS_POINTER( pItem1 ) && HB_IS_POINTER( pItem2 ) ) { - BOOL fResult = pItem1->item.asPointer.value != - pItem2->item.asPointer.value; + HB_BOOL fResult = pItem1->item.asPointer.value != + pItem2->item.asPointer.value; hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3960,7 +3960,7 @@ static void hb_vmNotEqual( void ) /* else if( HB_IS_HASH( pItem1 ) && HB_IS_HASH( pItem2 ) ) { - BOOL fResult = pItem1->item.asHash.value != pItem2->item.asHash.value; + HB_BOOL fResult = pItem1->item.asHash.value != pItem2->item.asHash.value; hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -3995,7 +3995,7 @@ static void hb_vmLess( void ) if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - int i = hb_itemStrCmp( pItem1, pItem2, FALSE ); + int i = hb_itemStrCmp( pItem1, pItem2, HB_FALSE ); hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -4065,7 +4065,7 @@ static void hb_vmLessEqual( void ) if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - int i = hb_itemStrCmp( pItem1, pItem2, FALSE ); + int i = hb_itemStrCmp( pItem1, pItem2, HB_FALSE ); hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -4135,7 +4135,7 @@ static void hb_vmGreater( void ) if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - int i = hb_itemStrCmp( pItem1, pItem2, FALSE ); + int i = hb_itemStrCmp( pItem1, pItem2, HB_FALSE ); hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -4205,7 +4205,7 @@ static void hb_vmGreaterEqual( void ) if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - int i = hb_itemStrCmp( pItem1, pItem2, FALSE ); + int i = hb_itemStrCmp( pItem1, pItem2, HB_FALSE ); hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -4275,8 +4275,8 @@ static void hb_vmInstring( void ) if( HB_IS_STRING( pItem1 ) && HB_IS_STRING( pItem2 ) ) { - BOOL fResult = ( hb_strAt( pItem1->item.asString.value, pItem1->item.asString.length, - pItem2->item.asString.value, pItem2->item.asString.length ) != 0 ); + HB_BOOL fResult = ( hb_strAt( pItem1->item.asString.value, pItem1->item.asString.length, + pItem2->item.asString.value, pItem2->item.asString.length ) != 0 ); hb_stackPop(); hb_itemClear( pItem1 ); pItem1->type = HB_IT_LOGICAL; @@ -4285,7 +4285,7 @@ static void hb_vmInstring( void ) else if( HB_IS_HASH( pItem2 ) && ( HB_IS_HASHKEY( pItem1 ) || hb_hashLen( pItem1 ) == 1 ) ) { - BOOL fResult = hb_hashScan( pItem2, pItem1, NULL ); + HB_BOOL fResult = hb_hashScan( pItem2, pItem1, NULL ); hb_stackPop(); hb_itemClear( pItem1 ); @@ -4320,7 +4320,7 @@ static void hb_vmForTest( void ) /* Test to check the end point of the FO { HB_STACK_TLS_PRELOAD PHB_ITEM pStep; - BOOL fBack; + HB_BOOL fBack; HB_TRACE(HB_TR_DEBUG, ("hb_vmForTest()")); @@ -4395,7 +4395,7 @@ static void hb_vmSeqBlock( void ) hb_itemRawCpy( pBlock, pItem ); pItem->type = HB_IT_POINTER; pItem->item.asPointer.value = pBlockCopy; - pItem->item.asPointer.collect = pItem->item.asPointer.single = TRUE; + pItem->item.asPointer.collect = pItem->item.asPointer.single = HB_TRUE; } } @@ -4428,7 +4428,7 @@ static void hb_vmWithObjectStart( void ) * plWithObjectBase = hb_stackWithObjectOffset(); pItem->type = HB_IT_POINTER; pItem->item.asPointer.value = plWithObjectBase; - pItem->item.asPointer.collect = pItem->item.asPointer.single = TRUE; + pItem->item.asPointer.collect = pItem->item.asPointer.single = HB_TRUE; /* The object is pushed directly before this pcode */ /* store position of current WITH OBJECT frame */ hb_stackWithObjectSetOffset( hb_stackTopOffset() - 2 ); @@ -4541,7 +4541,7 @@ static void hb_vmEnumReference( PHB_ITEM pBase ) static void hb_vmEnumStart( BYTE nVars, BYTE nDescend ) { HB_STACK_TLS_PRELOAD - BOOL fStart = TRUE; + HB_BOOL fStart = HB_TRUE; int i; /* @@ -4589,7 +4589,7 @@ static void hb_vmEnumStart( BYTE nVars, BYTE nDescend ) hb_stackPop(); if( hb_vmRequestQuery() != 0 || ! hb_vmPopLogical() ) { - fStart = FALSE; + fStart = HB_FALSE; break; } else if( hb_objHasOperator( pBase, HB_OO_OP_ENUMSKIP ) ) @@ -4604,7 +4604,7 @@ static void hb_vmEnumStart( BYTE nVars, BYTE nDescend ) pEnum->item.asEnum.offset = ( nDescend > 0 ) ? 1 : pBase->item.asArray.value->ulLen; if( pBase->item.asArray.value->ulLen == 0 ) - fStart = FALSE; + fStart = HB_FALSE; } else if( HB_IS_HASH( pBase ) ) { @@ -4612,7 +4612,7 @@ static void hb_vmEnumStart( BYTE nVars, BYTE nDescend ) /* the index into a hash */ pEnum->item.asEnum.offset = ( nDescend > 0 ) ? 1 : ulLen; if( ulLen == 0 ) - fStart = FALSE; + fStart = HB_FALSE; } else if( HB_IS_STRING( pBase ) ) { @@ -4624,7 +4624,7 @@ static void hb_vmEnumStart( BYTE nVars, BYTE nDescend ) hb_itemPutCL( NULL, pBase->item.asString.value + pEnum->item.asEnum.offset - 1, 1 ); else - fStart = FALSE; + fStart = HB_FALSE; } else { @@ -4665,7 +4665,7 @@ static void hb_vmEnumNext( void ) { ++pEnum->item.asEnum.offset; hb_vmPushNil(); - hb_vmPushLogical( FALSE ); + hb_vmPushLogical( HB_FALSE ); hb_objOperatorCall( HB_OO_OP_ENUMSKIP, hb_stackItemFromTop( -2 ), pBase, pEnumRef, hb_stackItemFromTop( -1 ) ); hb_stackPop(); @@ -4744,7 +4744,7 @@ static void hb_vmEnumPrev( void ) { --pEnum->item.asEnum.offset; hb_vmPushNil(); - hb_vmPushLogical( TRUE ); + hb_vmPushLogical( HB_TRUE ); hb_objOperatorCall( HB_OO_OP_ENUMSKIP, hb_stackItemFromTop( -2 ), pBase, pEnumRef, hb_stackItemFromTop( -1 ) ); hb_stackPop(); @@ -4843,7 +4843,7 @@ static const BYTE * hb_vmSwitch( const BYTE * pCode, USHORT casesCnt ) if( pSwitch ) { - BOOL fFound = FALSE; + HB_BOOL fFound = HB_FALSE; while( !fFound && casesCnt-- ) { @@ -4871,7 +4871,7 @@ static const BYTE * hb_vmSwitch( const BYTE * pCode, USHORT casesCnt ) case HB_P_PUSHNIL: /* default clause */ - fFound = TRUE; + fFound = HB_TRUE; pCode++; break; } @@ -5564,7 +5564,7 @@ static HB_ERRCODE hb_vmSelectWorkarea( PHB_ITEM pAlias, PHB_SYMB pField ) { HB_STACK_TLS_PRELOAD HB_ERRCODE errCode; - BOOL fRepeat; + HB_BOOL fRepeat; HB_TRACE(HB_TR_DEBUG, ("hb_vmSelectWorkArea(%p,%p)", pAlias, pField)); @@ -5573,7 +5573,7 @@ static HB_ERRCODE hb_vmSelectWorkarea( PHB_ITEM pAlias, PHB_SYMB pField ) */ do { - fRepeat = FALSE; + fRepeat = HB_FALSE; errCode = HB_SUCCESS; switch( HB_ITEM_TYPE( pAlias ) ) @@ -5614,7 +5614,7 @@ static HB_ERRCODE hb_vmSelectWorkarea( PHB_ITEM pAlias, PHB_SYMB pField ) */ /* expand '&' operator if exists */ char * szAlias; - BOOL bNewString; + HB_BOOL bNewString; szAlias = hb_macroExpandString( pAlias->item.asString.value, pAlias->item.asString.length, &bNewString ); if( pField ) @@ -5647,7 +5647,7 @@ static HB_ERRCODE hb_vmSelectWorkarea( PHB_ITEM pAlias, PHB_SYMB pField ) { hb_itemMove( pAlias, pSubstVal ); hb_itemRelease( pSubstVal ); - fRepeat = TRUE; + fRepeat = HB_TRUE; } else { @@ -5698,7 +5698,7 @@ void hb_vmProc( USHORT uiParams ) PHB_SYMB pSym; #ifndef HB_NO_PROFILER ULONG ulClock = 0; - BOOL bProfiler = hb_bProfiler; /* because profiler state may change */ + HB_BOOL bProfiler = hb_bProfiler; /* because profiler state may change */ #endif HB_TRACE(HB_TR_DEBUG, ("hb_vmProc(%hu)", uiParams)); @@ -5758,7 +5758,7 @@ void hb_vmDo( USHORT uiParams ) PHB_ITEM pSelf; #ifndef HB_NO_PROFILER ULONG ulClock = 0; - BOOL bProfiler = hb_bProfiler; /* because profiler state may change */ + HB_BOOL bProfiler = hb_bProfiler; /* because profiler state may change */ #endif HB_TRACE(HB_TR_DEBUG, ("hb_vmDo(%hu)", uiParams)); @@ -5847,7 +5847,7 @@ void hb_vmSend( USHORT uiParams ) PHB_ITEM pSelf; #ifndef HB_NO_PROFILER ULONG ulClock = 0; - BOOL bProfiler = hb_bProfiler; /* because profiler state may change */ + HB_BOOL bProfiler = hb_bProfiler; /* because profiler state may change */ #endif HB_TASK_SHEDULER @@ -6132,7 +6132,7 @@ static void hb_vmDummyDebugEntry( int nMode, int nLine, const char *szName, int HB_SYMBOL_UNUSED( pFrame ); } -static void hb_vmDebuggerExit( BOOL fRemove ) +static void hb_vmDebuggerExit( HB_BOOL fRemove ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmDebuggerExit(%d)", fRemove)); @@ -6192,7 +6192,7 @@ static void hb_vmModuleName( char * szModuleName ) /* PRG and function name info { HB_STACK_TLS_PRELOAD s_pFunDbgEntry( HB_DBG_MODULENAME, 0, szModuleName, 0, NULL ); - hb_stackBaseItem()->item.asSymbol.stackstate->fDebugging = TRUE; + hb_stackBaseItem()->item.asSymbol.stackstate->fDebugging = HB_TRUE; } } #endif @@ -6453,7 +6453,7 @@ void hb_vmPushNil( void ) hb_stackAllocItem()->type = HB_IT_NIL; } -void hb_vmPushLogical( BOOL bValue ) +void hb_vmPushLogical( HB_BOOL bValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -6659,7 +6659,7 @@ void hb_vmPushPointer( void * pPointer ) pItem->type = HB_IT_POINTER; pItem->item.asPointer.value = pPointer; pItem->item.asPointer.collect = - pItem->item.asPointer.single = FALSE; + pItem->item.asPointer.single = HB_FALSE; } void hb_vmPushString( const char * szText, HB_SIZE length ) @@ -7088,7 +7088,7 @@ void hb_vmPopState( void ) hb_stackPopReturn(); } -static BOOL hb_vmPopLogical( void ) +static HB_BOOL hb_vmPopLogical( void ) { HB_STACK_TLS_PRELOAD @@ -7096,7 +7096,7 @@ static BOOL hb_vmPopLogical( void ) if( HB_IS_LOGICAL( hb_stackItemFromTop( -1 ) ) ) { - BOOL fValue = hb_stackItemFromTop( -1 )->item.asLogical.value; + HB_BOOL fValue = hb_stackItemFromTop( -1 )->item.asLogical.value; hb_stackDec(); return fValue; @@ -7104,7 +7104,7 @@ static BOOL hb_vmPopLogical( void ) else { hb_errRT_BASE( EG_ARG, 1066, NULL, hb_langDGetErrorDesc( EG_CONDITION ), 1, hb_stackItemFromTop( -1 ) ); - return FALSE; + return HB_FALSE; } } @@ -7251,12 +7251,12 @@ PHB_SYMB hb_vmGetRealFuncSym( PHB_SYMB pSym ) return pSym; } -BOOL hb_vmLockModuleSymbols( void ) +HB_BOOL hb_vmLockModuleSymbols( void ) { #if defined( HB_MT_VM ) return !s_pSymbolsMtx || hb_threadMutexLock( s_pSymbolsMtx ); #else - return TRUE; + return HB_TRUE; #endif /* HB_MT_VM */ } @@ -7287,8 +7287,8 @@ const char * hb_vmFindModuleSymbolName( PHB_SYMB pSym ) return NULL; } -BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, - USHORT * puiSymbols ) +HB_BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, + USHORT * puiSymbols ) { if( pSym ) { @@ -7307,7 +7307,7 @@ BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, { * pSymbols = pLastSymbols->pModuleSymbols; * puiSymbols = pLastSymbols->uiModuleSymbols; - return TRUE; + return HB_TRUE; } pLastSymbols = pLastSymbols->pNext; } @@ -7315,7 +7315,7 @@ BOOL hb_vmFindModuleSymbols( PHB_SYMB pSym, PHB_SYMB * pSymbols, * pSymbols = NULL; * puiSymbols = 0; - return FALSE; + return HB_FALSE; } #define HB_SYM_STATICSBASE( p ) \ @@ -7497,14 +7497,14 @@ void hb_vmFreeSymbols( PHB_SYMBOLS pSymbols ) } } pSymbols->hDynLib = NULL; - pSymbols->fActive = FALSE; + pSymbols->fActive = HB_FALSE; ++s_ulFreeSymbols; } hb_vmUnlockModuleSymbols(); } } -void hb_vmBeginSymbolGroup( void * hDynLib, BOOL fClone ) +void hb_vmBeginSymbolGroup( void * hDynLib, HB_BOOL fClone ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmBeginSymbolGroup(%p,%d)", hDynLib, (int)fClone)); @@ -7516,13 +7516,13 @@ void hb_vmInitSymbolGroup( void * hNewDynLib, int argc, const char * argv[] ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmInitSymbolGroup(%p,%d,%p)", hNewDynLib, argc, argv)); - s_fCloneSym = FALSE; + s_fCloneSym = HB_FALSE; if( s_hDynLibID ) { PHB_SYMBOLS pLastSymbols = s_pSymbols; void * hDynLib = s_hDynLibID; - BOOL fFound = FALSE; + HB_BOOL fFound = HB_FALSE; USHORT ui; s_hDynLibID = NULL; @@ -7531,7 +7531,7 @@ void hb_vmInitSymbolGroup( void * hNewDynLib, int argc, const char * argv[] ) { if( pLastSymbols->hDynLib == hDynLib ) { - fFound = TRUE; + fFound = HB_TRUE; if( pLastSymbols->fInitStatics && pLastSymbols->fActive ) { @@ -7548,7 +7548,7 @@ void hb_vmInitSymbolGroup( void * hNewDynLib, int argc, const char * argv[] ) hb_vmProc( 0 ); } } - pLastSymbols->fInitStatics = FALSE; + pLastSymbols->fInitStatics = HB_FALSE; } pLastSymbols->hDynLib = hNewDynLib; @@ -7596,13 +7596,13 @@ void hb_vmExitSymbolGroup( void * hDynLib ) if( hDynLib ) { PHB_SYMBOLS pLastSymbols = s_pSymbols; - BOOL fFound = FALSE; + HB_BOOL fFound = HB_FALSE; while( pLastSymbols ) { if( pLastSymbols->hDynLib == hDynLib ) { - fFound = TRUE; + fFound = HB_TRUE; if( pLastSymbols->fActive && ( pLastSymbols->hScope & HB_FS_EXIT ) != 0 ) { USHORT ui; @@ -7639,10 +7639,10 @@ void hb_vmExitSymbolGroup( void * hDynLib ) PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, const char * szModuleName, ULONG ulID, - BOOL fDynLib, BOOL fClone ) + HB_BOOL fDynLib, HB_BOOL fClone ) { PHB_SYMBOLS pNewSymbols; - BOOL fRecycled, fInitStatics = FALSE; + HB_BOOL fRecycled, fInitStatics = HB_FALSE; USHORT ui; HB_TRACE(HB_TR_DEBUG, ("hb_vmRegisterSymbols(%p,%hu,%s,%lu,%d,%d)", pModuleSymbols, uiSymbols, szModuleName, ulID, (int)fDynLib, (int)fClone)); @@ -7652,13 +7652,13 @@ PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, if( pNewSymbols ) { - pNewSymbols->fActive = fRecycled = TRUE; + pNewSymbols->fActive = fRecycled = HB_TRUE; pNewSymbols->hDynLib = s_hDynLibID; pNewSymbols->hScope = 0; } else { - fRecycled = FALSE; + fRecycled = HB_FALSE; if( fClone ) { @@ -7686,8 +7686,8 @@ PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, pNewSymbols->szModuleName = hb_strdup( szModuleName ); pNewSymbols->ulID = ulID; pNewSymbols->fAllocated = fClone; - pNewSymbols->fActive = TRUE; - pNewSymbols->fInitStatics = FALSE; + pNewSymbols->fActive = HB_TRUE; + pNewSymbols->fInitStatics = HB_FALSE; pNewSymbols->hDynLib = s_hDynLibID; pNewSymbols->hScope = 0; pNewSymbols->pNext = NULL; @@ -7710,7 +7710,7 @@ PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, { PHB_SYMB pSymbol = pNewSymbols->pModuleSymbols + ui; HB_SYMBOLSCOPE hSymScope; - BOOL fPublic, fStatics; + HB_BOOL fPublic, fStatics; fStatics = ( pSymbol->scope.value & HB_FS_INITEXIT ) == HB_FS_INITEXIT || ( fRecycled && ui != 0 && ui == pNewSymbols->uiStaticsOffset && @@ -7734,7 +7734,7 @@ PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols, { if( !fRecycled && strncmp( pSymbol->szName, "(_INITSTATICS", 13 ) == 0 ) pNewSymbols->uiStaticsOffset = ui; - fInitStatics = TRUE; + fInitStatics = HB_TRUE; } if( ( hSymScope & ( HB_FS_PCODEFUNC | HB_FS_LOCAL | HB_FS_FRAME ) ) == @@ -7837,7 +7837,7 @@ PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, USHORT uiModuleSymbols, hb_vmVerifyPCodeVersion( szModuleName, uiPCodeVer ); return hb_vmRegisterSymbols( pSymbols, uiModuleSymbols, szModuleName, ulID, - TRUE, TRUE )->pModuleSymbols; + HB_TRUE, HB_TRUE )->pModuleSymbols; } static void hb_vmReleaseLocalSymbols( void ) @@ -7886,7 +7886,7 @@ static void hb_vmDoInitStatics( void ) hb_vmProc( 0 ); } } - pLastSymbols->fInitStatics = FALSE; + pLastSymbols->fInitStatics = HB_FALSE; } pLastSymbols = pLastSymbols->pNext; } @@ -7948,7 +7948,7 @@ static void hb_vmDoExitFunctions( void ) /* EXIT procedures should be processed? */ if( s_fDoExitProc ) { - s_fDoExitProc = FALSE; + s_fDoExitProc = HB_FALSE; hb_stackSetActionRequest( 0 ); while( pLastSymbols ) @@ -8159,7 +8159,7 @@ static void hb_vmMsgRefMark( void * value ) /* * create extended message reference */ -BOOL hb_vmMsgReference( PHB_ITEM pObject, PHB_DYNS pMessage, PHB_DYNS pAccMsg ) +HB_BOOL hb_vmMsgReference( PHB_ITEM pObject, PHB_DYNS pMessage, PHB_DYNS pAccMsg ) { static const HB_EXTREF s_MsgExtRef = { hb_vmMsgRefRead, @@ -8188,7 +8188,7 @@ BOOL hb_vmMsgReference( PHB_ITEM pObject, PHB_DYNS pMessage, PHB_DYNS pAccMsg ) pRefer->item.asExtRef.value = ( void * ) pMsgRef; pRefer->item.asExtRef.func = &s_MsgExtRef; - return TRUE; + return HB_TRUE; } /* ------------------------------- */ @@ -8409,7 +8409,7 @@ void hb_vmRequestBreak( PHB_ITEM pItem ) * do not execute EXIT procedures to be as close as possible * buggy Clipper behavior. [druzus] */ - s_fDoExitProc = FALSE; + s_fDoExitProc = HB_FALSE; hb_stackSetActionRequest( HB_QUIT_REQUESTED ); #else /* @@ -8457,7 +8457,7 @@ void hb_vmRequestCancel( void ) /* * Clipper does not execute EXIT procedures when quiting using break key */ - s_fDoExitProc = FALSE; + s_fDoExitProc = HB_FALSE; hb_stackSetActionRequest( HB_QUIT_REQUESTED ); } } @@ -8468,21 +8468,21 @@ USHORT hb_vmRequestQuery( void ) return hb_stackGetActionRequest(); } -BOOL hb_vmRequestReenter( void ) +HB_BOOL hb_vmRequestReenter( void ) { HB_STACK_TLS_PRELOAD HB_TRACE(HB_TR_DEBUG, ("hb_vmRequestReenter()")); if( !s_fHVMActive ) - return FALSE; + return HB_FALSE; hb_stackPushReturn(); hb_vmPushInteger( hb_stackGetActionRequest() ); hb_stackSetActionRequest( 0 ); - return TRUE; + return HB_TRUE; } void hb_vmRequestRestore( void ) @@ -8613,7 +8613,7 @@ void hb_xvmSeqBegin( void ) hb_stackSetRecoverBase( hb_stackTopOffset() ); } -BOOL hb_xvmSeqEnd( void ) +HB_BOOL hb_xvmSeqEnd( void ) { HB_STACK_TLS_PRELOAD @@ -8642,13 +8642,13 @@ BOOL hb_xvmSeqEnd( void ) hb_vmRequestTest(); #endif /* HB_MT_VM */ if( hb_stackGetActionRequest() & ( HB_ENDPROC_REQUESTED | HB_QUIT_REQUESTED ) ) - return TRUE; + return HB_TRUE; else if( hb_stackGetActionRequest() & HB_BREAK_REQUESTED ) hb_stackSetActionRequest( 0 ); - return FALSE; + return HB_FALSE; } -BOOL hb_xvmSeqEndTest( void ) +HB_BOOL hb_xvmSeqEndTest( void ) { HB_STACK_TLS_PRELOAD @@ -8658,7 +8658,7 @@ BOOL hb_xvmSeqEndTest( void ) #endif /* HB_MT_VM */ if( ( hb_stackGetActionRequest() & ( HB_ENDPROC_REQUESTED | HB_BREAK_REQUESTED | HB_QUIT_REQUESTED ) ) != 0 ) - return TRUE; + return HB_TRUE; /* * remove all items placed on the stack after BEGIN code @@ -8679,10 +8679,10 @@ BOOL hb_xvmSeqEndTest( void ) hb_stackDec(); /* 1) Discard the value returned by BREAK statement */ hb_stackPop(); - return FALSE; + return HB_FALSE; } -BOOL hb_xvmSeqRecover( void ) +HB_BOOL hb_xvmSeqRecover( void ) { HB_STACK_TLS_PRELOAD @@ -8708,10 +8708,10 @@ BOOL hb_xvmSeqRecover( void ) hb_vmRequestTest(); #endif /* HB_MT_VM */ if( hb_stackGetActionRequest() & ( HB_ENDPROC_REQUESTED | HB_QUIT_REQUESTED ) ) - return TRUE; + return HB_TRUE; else if( hb_stackGetActionRequest() & HB_BREAK_REQUESTED ) hb_stackSetActionRequest( 0 ); - return FALSE; + return HB_FALSE; } void hb_xvmSeqAlways( void ) @@ -8742,7 +8742,7 @@ void hb_xvmSeqAlways( void ) hb_stackSetRecoverBase( hb_stackTopOffset() ); } -BOOL hb_xvmAlwaysBegin( void ) +HB_BOOL hb_xvmAlwaysBegin( void ) { HB_STACK_TLS_PRELOAD @@ -8764,7 +8764,7 @@ BOOL hb_xvmAlwaysBegin( void ) HB_XVM_RETURN } -BOOL hb_xvmAlwaysEnd( void ) +HB_BOOL hb_xvmAlwaysEnd( void ) { HB_STACK_TLS_PRELOAD USHORT uiPrevAction, uiCurrAction; @@ -8803,7 +8803,7 @@ BOOL hb_xvmAlwaysEnd( void ) HB_XVM_RETURN } -BOOL hb_xvmSeqBlock( void ) +HB_BOOL hb_xvmSeqBlock( void ) { HB_STACK_TLS_PRELOAD @@ -8814,7 +8814,7 @@ BOOL hb_xvmSeqBlock( void ) HB_XVM_RETURN } -BOOL hb_xvmEnumStart( BYTE nVars, BYTE nDescend ) +HB_BOOL hb_xvmEnumStart( BYTE nVars, BYTE nDescend ) { HB_STACK_TLS_PRELOAD @@ -8825,7 +8825,7 @@ BOOL hb_xvmEnumStart( BYTE nVars, BYTE nDescend ) HB_XVM_RETURN } -BOOL hb_xvmEnumNext( void ) +HB_BOOL hb_xvmEnumNext( void ) { HB_STACK_TLS_PRELOAD @@ -8836,7 +8836,7 @@ BOOL hb_xvmEnumNext( void ) HB_XVM_RETURN } -BOOL hb_xvmEnumPrev( void ) +HB_BOOL hb_xvmEnumPrev( void ) { HB_STACK_TLS_PRELOAD @@ -8854,7 +8854,7 @@ void hb_xvmEnumEnd( void ) hb_vmEnumEnd(); } -BOOL hb_xvmSwitchGet( PHB_ITEM * pSwitchPtr ) +HB_BOOL hb_xvmSwitchGet( PHB_ITEM * pSwitchPtr ) { HB_STACK_TLS_PRELOAD @@ -8899,7 +8899,7 @@ void hb_xvmSFrame( PHB_SYMB pSymbol ) hb_vmSFrame( pSymbol ); } -BOOL hb_xvmDo( USHORT uiParams ) +HB_BOOL hb_xvmDo( USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -8910,7 +8910,7 @@ BOOL hb_xvmDo( USHORT uiParams ) HB_XVM_RETURN } -BOOL hb_xvmFunction( USHORT uiParams ) +HB_BOOL hb_xvmFunction( USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -8923,7 +8923,7 @@ BOOL hb_xvmFunction( USHORT uiParams ) HB_XVM_RETURN } -BOOL hb_xvmSend( USHORT uiParams ) +HB_BOOL hb_xvmSend( USHORT uiParams ) { HB_STACK_TLS_PRELOAD @@ -8936,7 +8936,7 @@ BOOL hb_xvmSend( USHORT uiParams ) HB_XVM_RETURN } -BOOL hb_xvmPushObjectVarRef( void ) +HB_BOOL hb_xvmPushObjectVarRef( void ) { HB_STACK_TLS_PRELOAD @@ -9053,7 +9053,7 @@ void hb_xvmPopStatic( USHORT uiStatic ) hb_vmPopStatic( uiStatic ); } -BOOL hb_xvmPushVariable( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPushVariable( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9064,7 +9064,7 @@ BOOL hb_xvmPushVariable( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPopVariable( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPopVariable( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9086,14 +9086,14 @@ void hb_xvmPushBlockShort( const BYTE * pCode, PHB_SYMB pSymbols ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmPushBlockShort(%p, %p)", pCode, pSymbols)); - hb_vmPushBlockShort( pCode, pSymbols, FALSE ); + hb_vmPushBlockShort( pCode, pSymbols, HB_FALSE ); } void hb_xvmPushBlock( const BYTE * pCode, PHB_SYMB pSymbols ) { HB_TRACE(HB_TR_DEBUG, ("hb_xvmPushBlock(%p, %p)", pCode, pSymbols)); - hb_vmPushBlock( pCode, pSymbols, FALSE ); + hb_vmPushBlock( pCode, pSymbols, HB_FALSE ); } void hb_xvmPushSelf( void ) @@ -9119,7 +9119,7 @@ void hb_xvmPushFuncSymbol( PHB_SYMB pSym ) hb_stackAllocItem()->type = HB_IT_NIL; } -BOOL hb_xvmPopLogical( BOOL * pfValue ) +HB_BOOL hb_xvmPopLogical( HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD @@ -9130,7 +9130,7 @@ BOOL hb_xvmPopLogical( BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmPopAlias( void ) +HB_BOOL hb_xvmPopAlias( void ) { HB_STACK_TLS_PRELOAD @@ -9142,7 +9142,7 @@ BOOL hb_xvmPopAlias( void ) HB_XVM_RETURN } -BOOL hb_xvmSwapAlias( void ) +HB_BOOL hb_xvmSwapAlias( void ) { HB_STACK_TLS_PRELOAD @@ -9153,7 +9153,7 @@ BOOL hb_xvmSwapAlias( void ) HB_XVM_RETURN } -BOOL hb_xvmPushField( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPushField( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9164,7 +9164,7 @@ BOOL hb_xvmPushField( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPushAlias( void ) +HB_BOOL hb_xvmPushAlias( void ) { HB_STACK_TLS_PRELOAD @@ -9175,7 +9175,7 @@ BOOL hb_xvmPushAlias( void ) HB_XVM_RETURN } -BOOL hb_xvmPushAliasedField( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPushAliasedField( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9186,7 +9186,7 @@ BOOL hb_xvmPushAliasedField( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPushAliasedVar( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPushAliasedVar( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9197,7 +9197,7 @@ BOOL hb_xvmPushAliasedVar( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPopField( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPopField( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9209,7 +9209,7 @@ BOOL hb_xvmPopField( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPushMemvar( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPushMemvar( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9220,7 +9220,7 @@ BOOL hb_xvmPushMemvar( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPushMemvarByRef( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPushMemvarByRef( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9231,7 +9231,7 @@ BOOL hb_xvmPushMemvarByRef( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPopMemvar( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPopMemvar( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9243,7 +9243,7 @@ BOOL hb_xvmPopMemvar( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPopAliasedField( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPopAliasedField( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9254,7 +9254,7 @@ BOOL hb_xvmPopAliasedField( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmPopAliasedVar( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmPopAliasedVar( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD @@ -9300,7 +9300,7 @@ void hb_xvmLocalSetInt( int iLocal, LONG lValue ) } } -BOOL hb_xvmLocalAddInt( int iLocal, LONG lAdd ) +HB_BOOL hb_xvmLocalAddInt( int iLocal, LONG lAdd ) { HB_STACK_TLS_PRELOAD @@ -9311,7 +9311,7 @@ BOOL hb_xvmLocalAddInt( int iLocal, LONG lAdd ) HB_XVM_RETURN } -BOOL hb_xvmLocalInc( int iLocal ) +HB_BOOL hb_xvmLocalInc( int iLocal ) { HB_STACK_TLS_PRELOAD PHB_ITEM pLocal; @@ -9324,7 +9324,7 @@ BOOL hb_xvmLocalInc( int iLocal ) HB_XVM_RETURN } -BOOL hb_xvmLocalDec( int iLocal ) +HB_BOOL hb_xvmLocalDec( int iLocal ) { HB_STACK_TLS_PRELOAD PHB_ITEM pLocal; @@ -9337,7 +9337,7 @@ BOOL hb_xvmLocalDec( int iLocal ) HB_XVM_RETURN } -BOOL hb_xvmLocalIncPush( int iLocal ) +HB_BOOL hb_xvmLocalIncPush( int iLocal ) { HB_STACK_TLS_PRELOAD PHB_ITEM pLocal; @@ -9353,7 +9353,7 @@ BOOL hb_xvmLocalIncPush( int iLocal ) HB_XVM_RETURN } -BOOL hb_xvmLocalAdd( int iLocal ) +HB_BOOL hb_xvmLocalAdd( int iLocal ) { HB_STACK_TLS_PRELOAD PHB_ITEM pLocal; @@ -9370,7 +9370,7 @@ BOOL hb_xvmLocalAdd( int iLocal ) HB_XVM_RETURN } -BOOL hb_xvmStaticAdd( USHORT uiStatic ) +HB_BOOL hb_xvmStaticAdd( USHORT uiStatic ) { HB_STACK_TLS_PRELOAD PHB_ITEM pStatic; @@ -9387,7 +9387,7 @@ BOOL hb_xvmStaticAdd( USHORT uiStatic ) HB_XVM_RETURN } -BOOL hb_xvmMemvarAdd( PHB_SYMB pSymbol ) +HB_BOOL hb_xvmMemvarAdd( PHB_SYMB pSymbol ) { HB_STACK_TLS_PRELOAD PHB_ITEM pMemVar, pVal1, pVal2; @@ -9416,7 +9416,7 @@ BOOL hb_xvmMemvarAdd( PHB_SYMB pSymbol ) HB_XVM_RETURN } -BOOL hb_xvmAnd( void ) +HB_BOOL hb_xvmAnd( void ) { HB_STACK_TLS_PRELOAD @@ -9427,7 +9427,7 @@ BOOL hb_xvmAnd( void ) HB_XVM_RETURN } -BOOL hb_xvmOr( void ) +HB_BOOL hb_xvmOr( void ) { HB_STACK_TLS_PRELOAD @@ -9438,7 +9438,7 @@ BOOL hb_xvmOr( void ) HB_XVM_RETURN } -BOOL hb_xvmNot( void ) +HB_BOOL hb_xvmNot( void ) { HB_STACK_TLS_PRELOAD @@ -9449,7 +9449,7 @@ BOOL hb_xvmNot( void ) HB_XVM_RETURN } -BOOL hb_xvmNegate( void ) +HB_BOOL hb_xvmNegate( void ) { HB_STACK_TLS_PRELOAD @@ -9488,7 +9488,7 @@ void hb_xvmSwap( int iCount ) hb_vmSwap( ( BYTE ) iCount ); } -BOOL hb_xvmForTest( void ) +HB_BOOL hb_xvmForTest( void ) { HB_STACK_TLS_PRELOAD @@ -9506,7 +9506,7 @@ void hb_xvmFuncPtr( void ) hb_vmFuncPtr(); } -BOOL hb_xvmEqual( void ) +HB_BOOL hb_xvmEqual( void ) { HB_STACK_TLS_PRELOAD @@ -9517,7 +9517,7 @@ BOOL hb_xvmEqual( void ) HB_XVM_RETURN } -BOOL hb_xvmExactlyEqual( void ) +HB_BOOL hb_xvmExactlyEqual( void ) { HB_STACK_TLS_PRELOAD @@ -9528,7 +9528,7 @@ BOOL hb_xvmExactlyEqual( void ) HB_XVM_RETURN } -BOOL hb_xvmEqualInt( LONG lValue ) +HB_BOOL hb_xvmEqualInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9553,7 +9553,7 @@ BOOL hb_xvmEqualInt( LONG lValue ) } else if( HB_IS_NIL( pItem ) ) { - pItem->item.asLogical.value = FALSE; + pItem->item.asLogical.value = HB_FALSE; pItem->type = HB_IT_LOGICAL; } else if( hb_objHasOperator( pItem, HB_OO_OP_EQUAL ) ) @@ -9581,7 +9581,7 @@ BOOL hb_xvmEqualInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmEqualIntIs( LONG lValue, BOOL * pfValue ) +HB_BOOL hb_xvmEqualIntIs( LONG lValue, HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9606,7 +9606,7 @@ BOOL hb_xvmEqualIntIs( LONG lValue, BOOL * pfValue ) } else if( HB_IS_NIL( pItem ) ) { - * pfValue = FALSE; + * pfValue = HB_FALSE; hb_stackDec(); } else if( hb_objHasOperator( pItem, HB_OO_OP_EQUAL ) ) @@ -9636,7 +9636,7 @@ BOOL hb_xvmEqualIntIs( LONG lValue, BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmNotEqual( void ) +HB_BOOL hb_xvmNotEqual( void ) { HB_STACK_TLS_PRELOAD @@ -9647,7 +9647,7 @@ BOOL hb_xvmNotEqual( void ) HB_XVM_RETURN } -BOOL hb_xvmNotEqualInt( LONG lValue ) +HB_BOOL hb_xvmNotEqualInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9672,7 +9672,7 @@ BOOL hb_xvmNotEqualInt( LONG lValue ) } else if( HB_IS_NIL( pItem ) ) { - pItem->item.asLogical.value = TRUE; + pItem->item.asLogical.value = HB_TRUE; pItem->type = HB_IT_LOGICAL; } else if( hb_objHasOperator( pItem, HB_OO_OP_NOTEQUAL ) ) @@ -9700,7 +9700,7 @@ BOOL hb_xvmNotEqualInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmNotEqualIntIs( LONG lValue, BOOL * pfValue ) +HB_BOOL hb_xvmNotEqualIntIs( LONG lValue, HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9725,7 +9725,7 @@ BOOL hb_xvmNotEqualIntIs( LONG lValue, BOOL * pfValue ) } else if( HB_IS_NIL( pItem ) ) { - * pfValue = TRUE; + * pfValue = HB_TRUE; hb_stackDec(); } else if( hb_objHasOperator( pItem, HB_OO_OP_NOTEQUAL ) ) @@ -9755,7 +9755,7 @@ BOOL hb_xvmNotEqualIntIs( LONG lValue, BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmLess( void ) +HB_BOOL hb_xvmLess( void ) { HB_STACK_TLS_PRELOAD @@ -9766,7 +9766,7 @@ BOOL hb_xvmLess( void ) HB_XVM_RETURN } -BOOL hb_xvmLessThenInt( LONG lValue ) +HB_BOOL hb_xvmLessThenInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9814,7 +9814,7 @@ BOOL hb_xvmLessThenInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmLessThenIntIs( LONG lValue, BOOL * pfValue ) +HB_BOOL hb_xvmLessThenIntIs( LONG lValue, HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9864,7 +9864,7 @@ BOOL hb_xvmLessThenIntIs( LONG lValue, BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmLessEqual( void ) +HB_BOOL hb_xvmLessEqual( void ) { HB_STACK_TLS_PRELOAD @@ -9875,7 +9875,7 @@ BOOL hb_xvmLessEqual( void ) HB_XVM_RETURN } -BOOL hb_xvmLessEqualThenInt( LONG lValue ) +HB_BOOL hb_xvmLessEqualThenInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9923,7 +9923,7 @@ BOOL hb_xvmLessEqualThenInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmLessEqualThenIntIs( LONG lValue, BOOL * pfValue ) +HB_BOOL hb_xvmLessEqualThenIntIs( LONG lValue, HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -9973,7 +9973,7 @@ BOOL hb_xvmLessEqualThenIntIs( LONG lValue, BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmGreater( void ) +HB_BOOL hb_xvmGreater( void ) { HB_STACK_TLS_PRELOAD @@ -9984,7 +9984,7 @@ BOOL hb_xvmGreater( void ) HB_XVM_RETURN } -BOOL hb_xvmGreaterThenInt( LONG lValue ) +HB_BOOL hb_xvmGreaterThenInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -10032,7 +10032,7 @@ BOOL hb_xvmGreaterThenInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmGreaterThenIntIs( LONG lValue, BOOL * pfValue ) +HB_BOOL hb_xvmGreaterThenIntIs( LONG lValue, HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -10082,7 +10082,7 @@ BOOL hb_xvmGreaterThenIntIs( LONG lValue, BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmGreaterEqual( void ) +HB_BOOL hb_xvmGreaterEqual( void ) { HB_STACK_TLS_PRELOAD @@ -10093,7 +10093,7 @@ BOOL hb_xvmGreaterEqual( void ) HB_XVM_RETURN } -BOOL hb_xvmGreaterEqualThenInt( LONG lValue ) +HB_BOOL hb_xvmGreaterEqualThenInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -10141,7 +10141,7 @@ BOOL hb_xvmGreaterEqualThenInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmGreaterEqualThenIntIs( LONG lValue, BOOL * pfValue ) +HB_BOOL hb_xvmGreaterEqualThenIntIs( LONG lValue, HB_BOOL * pfValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pItem; @@ -10191,7 +10191,7 @@ BOOL hb_xvmGreaterEqualThenIntIs( LONG lValue, BOOL * pfValue ) HB_XVM_RETURN } -BOOL hb_xvmInstring( void ) +HB_BOOL hb_xvmInstring( void ) { HB_STACK_TLS_PRELOAD @@ -10202,7 +10202,7 @@ BOOL hb_xvmInstring( void ) HB_XVM_RETURN } -BOOL hb_xvmAddInt( LONG lAdd ) +HB_BOOL hb_xvmAddInt( LONG lAdd ) { HB_STACK_TLS_PRELOAD @@ -10213,7 +10213,7 @@ BOOL hb_xvmAddInt( LONG lAdd ) HB_XVM_RETURN } -BOOL hb_xvmPlus( void ) +HB_BOOL hb_xvmPlus( void ) { HB_STACK_TLS_PRELOAD @@ -10226,7 +10226,7 @@ BOOL hb_xvmPlus( void ) HB_XVM_RETURN } -BOOL hb_xvmPlusEq( void ) +HB_BOOL hb_xvmPlusEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue; @@ -10243,7 +10243,7 @@ BOOL hb_xvmPlusEq( void ) HB_XVM_RETURN } -BOOL hb_xvmPlusEqPop( void ) +HB_BOOL hb_xvmPlusEqPop( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult; @@ -10258,7 +10258,7 @@ BOOL hb_xvmPlusEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmMinus( void ) +HB_BOOL hb_xvmMinus( void ) { HB_STACK_TLS_PRELOAD @@ -10271,7 +10271,7 @@ BOOL hb_xvmMinus( void ) HB_XVM_RETURN } -BOOL hb_xvmMinusEq( void ) +HB_BOOL hb_xvmMinusEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue; @@ -10288,7 +10288,7 @@ BOOL hb_xvmMinusEq( void ) HB_XVM_RETURN } -BOOL hb_xvmMinusEqPop( void ) +HB_BOOL hb_xvmMinusEqPop( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult; @@ -10303,7 +10303,7 @@ BOOL hb_xvmMinusEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmMultByInt( LONG lValue ) +HB_BOOL hb_xvmMultByInt( LONG lValue ) { HB_STACK_TLS_PRELOAD PHB_ITEM pValue; @@ -10345,7 +10345,7 @@ BOOL hb_xvmMultByInt( LONG lValue ) HB_XVM_RETURN } -BOOL hb_xvmMult( void ) +HB_BOOL hb_xvmMult( void ) { HB_STACK_TLS_PRELOAD @@ -10357,7 +10357,7 @@ BOOL hb_xvmMult( void ) HB_XVM_RETURN } -BOOL hb_xvmMultEq( void ) +HB_BOOL hb_xvmMultEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue; @@ -10374,7 +10374,7 @@ BOOL hb_xvmMultEq( void ) HB_XVM_RETURN } -BOOL hb_xvmMultEqPop( void ) +HB_BOOL hb_xvmMultEqPop( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult; @@ -10389,7 +10389,7 @@ BOOL hb_xvmMultEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmDivideByInt( LONG lDivisor ) +HB_BOOL hb_xvmDivideByInt( LONG lDivisor ) { HB_STACK_TLS_PRELOAD PHB_ITEM pValue; @@ -10444,7 +10444,7 @@ BOOL hb_xvmDivideByInt( LONG lDivisor ) HB_XVM_RETURN } -BOOL hb_xvmDivide( void ) +HB_BOOL hb_xvmDivide( void ) { HB_STACK_TLS_PRELOAD @@ -10456,7 +10456,7 @@ BOOL hb_xvmDivide( void ) HB_XVM_RETURN } -BOOL hb_xvmDivEq( void ) +HB_BOOL hb_xvmDivEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue; @@ -10473,7 +10473,7 @@ BOOL hb_xvmDivEq( void ) HB_XVM_RETURN } -BOOL hb_xvmDivEqPop( void ) +HB_BOOL hb_xvmDivEqPop( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult; @@ -10488,7 +10488,7 @@ BOOL hb_xvmDivEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmModulus( void ) +HB_BOOL hb_xvmModulus( void ) { HB_STACK_TLS_PRELOAD @@ -10500,7 +10500,7 @@ BOOL hb_xvmModulus( void ) HB_XVM_RETURN } -BOOL hb_xvmModEq( void ) +HB_BOOL hb_xvmModEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue; @@ -10517,7 +10517,7 @@ BOOL hb_xvmModEq( void ) HB_XVM_RETURN } -BOOL hb_xvmModEqPop( void ) +HB_BOOL hb_xvmModEqPop( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult; @@ -10532,7 +10532,7 @@ BOOL hb_xvmModEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmPower( void ) +HB_BOOL hb_xvmPower( void ) { HB_STACK_TLS_PRELOAD HB_TRACE(HB_TR_DEBUG, ("hb_xvmPower()")); @@ -10543,7 +10543,7 @@ BOOL hb_xvmPower( void ) HB_XVM_RETURN } -BOOL hb_xvmExpEq( void ) +HB_BOOL hb_xvmExpEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue; @@ -10560,7 +10560,7 @@ BOOL hb_xvmExpEq( void ) HB_XVM_RETURN } -BOOL hb_xvmExpEqPop( void ) +HB_BOOL hb_xvmExpEqPop( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult; @@ -10575,7 +10575,7 @@ BOOL hb_xvmExpEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmInc( void ) +HB_BOOL hb_xvmInc( void ) { HB_STACK_TLS_PRELOAD HB_TRACE(HB_TR_DEBUG, ("hb_xvmInc()")); @@ -10585,7 +10585,7 @@ BOOL hb_xvmInc( void ) HB_XVM_RETURN } -BOOL hb_xvmIncEq( void ) +HB_BOOL hb_xvmIncEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue, pTemp; @@ -10603,7 +10603,7 @@ BOOL hb_xvmIncEq( void ) HB_XVM_RETURN } -BOOL hb_xvmIncEqPop( void ) +HB_BOOL hb_xvmIncEqPop( void ) { HB_STACK_TLS_PRELOAD @@ -10615,7 +10615,7 @@ BOOL hb_xvmIncEqPop( void ) HB_XVM_RETURN } -BOOL hb_xvmDec( void ) +HB_BOOL hb_xvmDec( void ) { HB_STACK_TLS_PRELOAD @@ -10626,7 +10626,7 @@ BOOL hb_xvmDec( void ) HB_XVM_RETURN } -BOOL hb_xvmDecEq( void ) +HB_BOOL hb_xvmDecEq( void ) { HB_STACK_TLS_PRELOAD PHB_ITEM pResult, pValue, pTemp; @@ -10644,7 +10644,7 @@ BOOL hb_xvmDecEq( void ) HB_XVM_RETURN } -BOOL hb_xvmDecEqPop( void ) +HB_BOOL hb_xvmDecEqPop( void ) { HB_STACK_TLS_PRELOAD @@ -10848,7 +10848,7 @@ static void hb_vmArrayItemPop( HB_SIZE ulIndex ) } -BOOL hb_xvmArrayPush( void ) +HB_BOOL hb_xvmArrayPush( void ) { HB_STACK_TLS_PRELOAD @@ -10859,7 +10859,7 @@ BOOL hb_xvmArrayPush( void ) HB_XVM_RETURN } -BOOL hb_xvmArrayPushRef( void ) +HB_BOOL hb_xvmArrayPushRef( void ) { HB_STACK_TLS_PRELOAD @@ -10870,7 +10870,7 @@ BOOL hb_xvmArrayPushRef( void ) HB_XVM_RETURN } -BOOL hb_xvmArrayItemPush( HB_SIZE ulIndex ) +HB_BOOL hb_xvmArrayItemPush( HB_SIZE ulIndex ) { HB_STACK_TLS_PRELOAD @@ -10881,7 +10881,7 @@ BOOL hb_xvmArrayItemPush( HB_SIZE ulIndex ) HB_XVM_RETURN } -BOOL hb_xvmArrayPop( void ) +HB_BOOL hb_xvmArrayPop( void ) { HB_STACK_TLS_PRELOAD @@ -10892,7 +10892,7 @@ BOOL hb_xvmArrayPop( void ) HB_XVM_RETURN } -BOOL hb_xvmArrayItemPop( HB_SIZE ulIndex ) +HB_BOOL hb_xvmArrayItemPop( HB_SIZE ulIndex ) { HB_STACK_TLS_PRELOAD @@ -10973,7 +10973,7 @@ void hb_xvmModuleName( char * szModuleName ) #endif } -BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -10984,7 +10984,7 @@ BOOL hb_xvmMacroArrayGen( USHORT uiArgSets ) HB_XVM_RETURN } -BOOL hb_xvmMacroDo( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroDo( USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -10995,7 +10995,7 @@ BOOL hb_xvmMacroDo( USHORT uiArgSets ) HB_XVM_RETURN } -BOOL hb_xvmMacroFunc( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroFunc( USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -11006,7 +11006,7 @@ BOOL hb_xvmMacroFunc( USHORT uiArgSets ) HB_XVM_RETURN } -BOOL hb_xvmMacroSend( USHORT uiArgSets ) +HB_BOOL hb_xvmMacroSend( USHORT uiArgSets ) { HB_STACK_TLS_PRELOAD @@ -11017,7 +11017,7 @@ BOOL hb_xvmMacroSend( USHORT uiArgSets ) HB_XVM_RETURN } -BOOL hb_xvmMacroPush( BYTE bFlags ) +HB_BOOL hb_xvmMacroPush( BYTE bFlags ) { HB_STACK_TLS_PRELOAD @@ -11028,7 +11028,7 @@ BOOL hb_xvmMacroPush( BYTE bFlags ) HB_XVM_RETURN } -BOOL hb_xvmMacroPushRef( void ) +HB_BOOL hb_xvmMacroPushRef( void ) { HB_STACK_TLS_PRELOAD @@ -11042,7 +11042,7 @@ BOOL hb_xvmMacroPushRef( void ) HB_XVM_RETURN } -BOOL hb_xvmMacroPushIndex( void ) +HB_BOOL hb_xvmMacroPushIndex( void ) { HB_STACK_TLS_PRELOAD @@ -11053,7 +11053,7 @@ BOOL hb_xvmMacroPushIndex( void ) HB_XVM_RETURN } -BOOL hb_xvmMacroPushList( BYTE bFlags ) +HB_BOOL hb_xvmMacroPushList( BYTE bFlags ) { HB_STACK_TLS_PRELOAD @@ -11064,7 +11064,7 @@ BOOL hb_xvmMacroPushList( BYTE bFlags ) HB_XVM_RETURN } -BOOL hb_xvmMacroPushPare( BYTE bFlags ) +HB_BOOL hb_xvmMacroPushPare( BYTE bFlags ) { HB_STACK_TLS_PRELOAD @@ -11075,7 +11075,7 @@ BOOL hb_xvmMacroPushPare( BYTE bFlags ) HB_XVM_RETURN } -BOOL hb_xvmMacroPushAliased( BYTE bFlags ) +HB_BOOL hb_xvmMacroPushAliased( BYTE bFlags ) { HB_STACK_TLS_PRELOAD @@ -11086,7 +11086,7 @@ BOOL hb_xvmMacroPushAliased( BYTE bFlags ) HB_XVM_RETURN } -BOOL hb_xvmMacroPop( BYTE bFlags ) +HB_BOOL hb_xvmMacroPop( BYTE bFlags ) { HB_STACK_TLS_PRELOAD @@ -11097,7 +11097,7 @@ BOOL hb_xvmMacroPop( BYTE bFlags ) HB_XVM_RETURN } -BOOL hb_xvmMacroPopAliased( BYTE bFlags ) +HB_BOOL hb_xvmMacroPopAliased( BYTE bFlags ) { HB_STACK_TLS_PRELOAD @@ -11108,7 +11108,7 @@ BOOL hb_xvmMacroPopAliased( BYTE bFlags ) HB_XVM_RETURN } -BOOL hb_xvmMacroSymbol( void ) +HB_BOOL hb_xvmMacroSymbol( void ) { HB_STACK_TLS_PRELOAD @@ -11119,7 +11119,7 @@ BOOL hb_xvmMacroSymbol( void ) HB_XVM_RETURN } -BOOL hb_xvmMacroText( void ) +HB_BOOL hb_xvmMacroText( void ) { HB_STACK_TLS_PRELOAD @@ -11193,21 +11193,21 @@ void hb_vmRequestDebug( void ) HB_TRACE(HB_TR_DEBUG, ("hb_vmRequestDebug()")); - *( hb_stackDebugRequest() ) = TRUE; + *( hb_stackDebugRequest() ) = HB_TRUE; #endif } -BOOL hb_dbg_InvokeDebug( BOOL bInvoke ) +HB_BOOL hb_dbg_InvokeDebug( HB_BOOL bInvoke ) { #ifndef HB_NO_DEBUG HB_STACK_TLS_PRELOAD - BOOL * pfRequest = hb_stackDebugRequest(); - BOOL bRequest = *pfRequest; + HB_BOOL * pfRequest = hb_stackDebugRequest(); + HB_BOOL bRequest = *pfRequest; *pfRequest = bInvoke; return bRequest; #else HB_SYMBOL_UNUSED( bInvoke ); - return FALSE; + return HB_FALSE; #endif } @@ -11250,12 +11250,12 @@ HB_FUNC( __DBGINVOKEDEBUG ) HB_STACK_TLS_PRELOAD #ifndef HB_NO_DEBUG - BOOL * pfRequest = hb_stackDebugRequest(); + HB_BOOL * pfRequest = hb_stackDebugRequest(); hb_retl( *pfRequest ); *pfRequest = hb_parl( 1 ); #else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); #endif } @@ -11428,7 +11428,7 @@ HB_FUNC( __SETPROFILER ) { HB_STACK_TLS_PRELOAD #ifdef HB_NO_PROFILER - hb_retl( FALSE ); + hb_retl( HB_FALSE ); #else hb_retl( hb_bProfiler ); if( HB_ISLOG( 1 ) ) @@ -11448,7 +11448,7 @@ HB_FUNC( __TRACEPRGCALLS ) if( HB_ISLOG( 1 ) ) hb_bTracePrgCalls = hb_parl( 1 ); #else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); #endif } diff --git a/harbour/src/vm/itemapi.c b/harbour/src/vm/itemapi.c index 787c449b13..9eb167b815 100644 --- a/harbour/src/vm/itemapi.c +++ b/harbour/src/vm/itemapi.c @@ -122,7 +122,7 @@ PHB_ITEM hb_itemParamPtr( USHORT uiParam, long lMask ) return hb_param( ( int ) uiParam, lMask ); } -BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ) +HB_BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemParamStore(%hu, %p)", uiParam, pItem)); @@ -130,13 +130,13 @@ BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem ) { HB_STACK_TLS_PRELOAD hb_itemCopyToRef( hb_stackItemFromBase( uiParam ), pItem ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } -BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ) +HB_BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemParamStoreForward(%hu, %p)", uiParam, pItem)); @@ -144,10 +144,10 @@ BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem ) { HB_STACK_TLS_PRELOAD hb_itemMoveToRef( hb_stackItemFromBase( uiParam ), pItem ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; } USHORT hb_itemPCount( void ) @@ -159,17 +159,17 @@ USHORT hb_itemPCount( void ) return ( USHORT ) hb_pcount(); } -BOOL hb_itemRelease( PHB_ITEM pItem ) +HB_BOOL hb_itemRelease( PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemRelease(%p)", pItem)); if( pItem ) { hb_gcGripDrop( pItem ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } PHB_ITEM hb_itemArrayNew( HB_SIZE ulLen ) @@ -477,7 +477,7 @@ HB_SIZE hb_itemCopyC( PHB_ITEM pItem, char * szBuffer, HB_SIZE ulLen ) return 0; } -BOOL hb_itemFreeC( char * szText ) +HB_BOOL hb_itemFreeC( char * szText ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemFreeC(%s)", szText)); @@ -485,10 +485,10 @@ BOOL hb_itemFreeC( char * szText ) { hb_xfree( szText ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } /* NOTE: Clipper is buggy and will not append a trailing zero, although @@ -543,7 +543,7 @@ double hb_itemGetTD( PHB_ITEM pItem ) return 0; } -BOOL hb_itemGetTDT( PHB_ITEM pItem, long * plJulian, long * plMilliSec ) +HB_BOOL hb_itemGetTDT( PHB_ITEM pItem, long * plJulian, long * plMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemGetTDT(%p,%p,%p)", pItem, plJulian, plMilliSec)); @@ -551,16 +551,16 @@ BOOL hb_itemGetTDT( PHB_ITEM pItem, long * plJulian, long * plMilliSec ) { *plJulian = pItem->item.asDateTime.julian; *plMilliSec = pItem->item.asDateTime.time; - return TRUE; + return HB_TRUE; } else { *plJulian = *plMilliSec = 0; - return FALSE; + return HB_FALSE; } } -BOOL hb_itemGetL( PHB_ITEM pItem ) +HB_BOOL hb_itemGetL( PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemGetL(%p)", pItem)); @@ -579,7 +579,7 @@ BOOL hb_itemGetL( PHB_ITEM pItem ) return pItem->item.asDouble.value != 0.0; } - return FALSE; + return HB_FALSE; } double hb_itemGetND( PHB_ITEM pItem ) @@ -887,7 +887,7 @@ PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, long lJulian, long lMilliSec ) return pItem; } -PHB_ITEM hb_itemPutL( PHB_ITEM pItem, BOOL bValue ) +PHB_ITEM hb_itemPutL( PHB_ITEM pItem, HB_BOOL bValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemPutL(%p, %d)", pItem, ( int ) bValue)); @@ -1274,7 +1274,7 @@ PHB_ITEM hb_itemPutPtr( PHB_ITEM pItem, void * pValue ) pItem->type = HB_IT_POINTER; pItem->item.asPointer.value = pValue; pItem->item.asPointer.collect = - pItem->item.asPointer.single = FALSE; + pItem->item.asPointer.single = HB_FALSE; return pItem; } @@ -1293,8 +1293,8 @@ PHB_ITEM hb_itemPutPtrGC( PHB_ITEM pItem, void * pValue ) pItem->type = HB_IT_POINTER; pItem->item.asPointer.value = pValue; - pItem->item.asPointer.collect = TRUE; - pItem->item.asPointer.single = FALSE; + pItem->item.asPointer.collect = HB_TRUE; + pItem->item.asPointer.single = HB_FALSE; hb_gcAttach( pValue ); @@ -1531,7 +1531,7 @@ void hb_itemCopy( PHB_ITEM pDest, PHB_ITEM pSource ) if( pSource->item.asPointer.collect ) { if( pSource->item.asPointer.single ) - pDest->item.asPointer.collect = FALSE; + pDest->item.asPointer.collect = HB_FALSE; else hb_gcRefInc( pSource->item.asPointer.value ); } @@ -2000,7 +2000,7 @@ PHB_ITEM hb_itemUnShare( PHB_ITEM pItem ) return pItem; } -BOOL hb_itemGetWriteCL( PHB_ITEM pItem, char ** pszValue, HB_SIZE * pulLen ) +HB_BOOL hb_itemGetWriteCL( PHB_ITEM pItem, char ** pszValue, HB_SIZE * pulLen ) { HB_TRACE_STEALTH(HB_TR_DEBUG, ("hb_itemGetWriteCL(%p,%p,%p)", pItem, pszValue, pulLen)); @@ -2014,10 +2014,10 @@ BOOL hb_itemGetWriteCL( PHB_ITEM pItem, char ** pszValue, HB_SIZE * pulLen ) hb_itemUnShareString( pItem ); *pulLen = pItem->item.asString.length; *pszValue = pItem->item.asString.value; - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } /* Internal API, not standard Clipper */ @@ -2054,7 +2054,7 @@ PHB_ITEM hb_itemCloneTo( PHB_ITEM pDest, PHB_ITEM pSource ) /* Internal API, not standard Clipper */ /* Check whether two strings are equal (0), smaller (-1), or greater (1) */ -int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ) +int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, HB_BOOL bForceExact ) { HB_STACK_TLS_PRELOAD const char * szFirst; @@ -2079,7 +2079,7 @@ int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ) ulLenFirst--; while( ulLenSecond > ulLenFirst && szSecond[ ulLenSecond - 1 ] == ' ' ) ulLenSecond--; - bForceExact = TRUE; + bForceExact = HB_TRUE; } ulMinLen = ulLenFirst < ulLenSecond ? ulLenFirst : ulLenSecond; @@ -2133,7 +2133,7 @@ int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ) } /* Check whether two strings are equal (0), smaller (-1), or greater (1), ignore case */ -int hb_itemStrICmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ) +int hb_itemStrICmp( PHB_ITEM pFirst, PHB_ITEM pSecond, HB_BOOL bForceExact ) { HB_STACK_TLS_PRELOAD const char * szFirst; @@ -2158,7 +2158,7 @@ int hb_itemStrICmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ) ulLenFirst--; while( ulLenSecond > ulLenFirst && szSecond[ ulLenSecond - 1 ] == ' ' ) ulLenSecond--; - bForceExact = TRUE; + bForceExact = HB_TRUE; } ulMinLen = ulLenFirst < ulLenSecond ? ulLenFirst : ulLenSecond; @@ -2215,10 +2215,10 @@ int hb_itemStrICmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ) /* converts a numeric to a string with optional width & precision. */ -BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec ) +HB_BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec ) { int iPos, iDot; - BOOL fNeg; + HB_BOOL fNeg; if( iDec < 0 ) { @@ -2258,12 +2258,12 @@ BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec ) if( dNumber < 0 ) { - fNeg = TRUE; + fNeg = HB_TRUE; dFract = modf( -dNumber, &dInt ); } else { - fNeg = FALSE; + fNeg = HB_FALSE; dFract = modf( dNumber, &dInt ); } @@ -2427,13 +2427,13 @@ BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec ) if( iPos < 0 ) { memset( szResult, '*', iSize ); - return FALSE; + return HB_FALSE; } else if( iDot > 0 ) { szResult[ iDot ] = '.'; } - return TRUE; + return HB_TRUE; } /* converts a numeric to a string with optional width & precision. @@ -2499,12 +2499,12 @@ char * hb_itemStr( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ) } /* NOTE: The caller must free the pointer if the bFreeReq param gets set to - TRUE, this trick is required to stay thread safe, while minimize + HB_TRUE, this trick is required to stay thread safe, while minimize memory allocation and buffer copying. As a side effect the caller should never modify the returned buffer since it may point to a constant value. [vszakats] */ -char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) +char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, HB_BOOL * bFreeReq ) { char * buffer; @@ -2516,7 +2516,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) case HB_IT_MEMO: buffer = ( char * ) hb_itemGetCPtr( pItem ); * ulLen = hb_itemGetCLen( pItem ); - * bFreeReq = FALSE; + * bFreeReq = HB_FALSE; break; case HB_IT_DATE: @@ -2529,7 +2529,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) buffer = ( char * ) hb_xgrab( 11 ); hb_dateFormat( szDate, buffer, hb_stackSetStruct()->HB_SET_DATEFORMAT ); * ulLen = strlen( buffer ); - * bFreeReq = TRUE; + * bFreeReq = HB_TRUE; break; } @@ -2546,7 +2546,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) buffer = hb_strdup( szDateTime ); * ulLen = strlen( buffer ); - * bFreeReq = TRUE; + * bFreeReq = HB_TRUE; break; } @@ -2567,13 +2567,13 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) if( buffer ) { * ulLen = strlen( buffer ); - * bFreeReq = TRUE; + * bFreeReq = HB_TRUE; } else { buffer = ( char * ) ""; * ulLen = 0; - * bFreeReq = FALSE; + * bFreeReq = HB_FALSE; } break; } @@ -2581,13 +2581,13 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) case HB_IT_NIL: buffer = ( char * ) "NIL"; * ulLen = 3; - * bFreeReq = FALSE; + * bFreeReq = HB_FALSE; break; case HB_IT_LOGICAL: buffer = ( char * ) ( hb_itemGetL( pItem ) ? ".T." : ".F." ); * ulLen = 3; - * bFreeReq = FALSE; + * bFreeReq = HB_FALSE; break; case HB_IT_POINTER: @@ -2596,7 +2596,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) HB_PTRDIFF addr = ( HB_PTRDIFF ) hb_itemGetPtr( pItem ); * ulLen = size - 1; - * bFreeReq = TRUE; + * bFreeReq = HB_TRUE; buffer = ( char * ) hb_xgrab( size ); buffer[ 0 ] = '0'; buffer[ 1 ] = 'x'; @@ -2613,7 +2613,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) default: buffer = ( char * ) ""; * ulLen = 0; - * bFreeReq = FALSE; + * bFreeReq = HB_FALSE; } return buffer; @@ -2623,7 +2623,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, BOOL * bFreeReq ) being padded. If date, convert to string using hb_dateFormat(). If numeric, convert to unpadded string. Return pointer to string and set string length */ -char * hb_itemPadConv( PHB_ITEM pItem, HB_SIZE * pulSize, BOOL * bFreeReq ) +char * hb_itemPadConv( PHB_ITEM pItem, HB_SIZE * pulSize, HB_BOOL * bFreeReq ) { HB_TRACE_STEALTH(HB_TR_DEBUG, ("hb_itemPadConv(%p, %p, %p)", pItem, pulSize, bFreeReq)); @@ -2673,7 +2673,7 @@ PHB_ITEM hb_itemValToStr( PHB_ITEM pItem ) PHB_ITEM pResult; char * buffer; HB_SIZE ulLen; - BOOL bFreeReq; + HB_BOOL bFreeReq; HB_TRACE(HB_TR_DEBUG, ("hb_itemValToStr(%p)", pItem)); diff --git a/harbour/src/vm/macro.c b/harbour/src/vm/macro.c index 127d9b371d..83a96267cf 100644 --- a/harbour/src/vm/macro.c +++ b/harbour/src/vm/macro.c @@ -115,7 +115,7 @@ static int hb_macroParse( HB_MACRO_PTR pMacro ) pMacro->pCodeInfo = (HB_PCODE_INFO_PTR ) hb_xgrab( sizeof( HB_PCODE_INFO ) ); pMacro->pCodeInfo->lPCodeSize = HB_PCODE_SIZE; pMacro->pCodeInfo->lPCodePos = 0; - pMacro->pCodeInfo->fVParams = FALSE; + pMacro->pCodeInfo->fVParams = HB_FALSE; pMacro->pCodeInfo->pLocals = NULL; pMacro->pCodeInfo->pPrev = NULL; pMacro->pCodeInfo->pCode = ( BYTE * ) hb_xgrab( HB_PCODE_SIZE ); @@ -150,9 +150,9 @@ void hb_macroDelete( HB_MACRO_PTR pMacro ) /* checks if a correct ITEM was passed from the virtual machine eval stack */ -static BOOL hb_macroCheckParam( HB_ITEM_PTR pItem ) +static HB_BOOL hb_macroCheckParam( HB_ITEM_PTR pItem ) { - BOOL bValid = TRUE; + HB_BOOL bValid = HB_TRUE; HB_TRACE(HB_TR_DEBUG, ("hb_macroCheckParam(%p)", pItem)); @@ -160,7 +160,7 @@ static BOOL hb_macroCheckParam( HB_ITEM_PTR pItem ) { HB_ITEM_PTR pResult = hb_errRT_BASE_Subst( EG_ARG, 1065, NULL, "&", 1, pItem ); - bValid = FALSE; + bValid = HB_FALSE; if( pResult ) { HB_STACK_TLS_PRELOAD @@ -423,7 +423,7 @@ void hb_macroGetValue( HB_ITEM_PTR pItem, BYTE iContext, BYTE flags ) { HB_MACRO struMacro; int iStatus; - BOOL fFree; + HB_BOOL fFree; struMacro.mode = HB_MODE_MACRO; struMacro.supported = (flags & HB_SM_RT_MACRO) ? hb_macroFlags() : flags; @@ -687,11 +687,11 @@ void hb_macroPushAliasedValue( HB_ITEM_PTR pAlias, HB_ITEM_PTR pVar, BYTE flags } /* Check for '&' operator and replace it with a macro variable value - * Returns: the passed string if there is no '&' operator (pbNewString:=FALSE) + * Returns: the passed string if there is no '&' operator ( pbNewString := FALSE ) * new string if a valid macro text substitution was found (and sets * pbNewString to TRUE) */ -char * hb_macroExpandString( const char *szString, HB_SIZE ulLength, BOOL *pfNewString ) +char * hb_macroExpandString( const char *szString, HB_SIZE ulLength, HB_BOOL *pfNewString ) { char *szResultString; @@ -705,7 +705,7 @@ char * hb_macroExpandString( const char *szString, HB_SIZE ulLength, BOOL *pfNew return szResultString; } -char * hb_macroTextSymbol( const char *szString, HB_SIZE ulLength, BOOL *pfNewString ) +char * hb_macroTextSymbol( const char *szString, HB_SIZE ulLength, HB_BOOL *pfNewString ) { char *szResult = NULL; @@ -856,7 +856,7 @@ void hb_macroPushSymbol( HB_ITEM_PTR pItem ) if( hb_macroCheckParam( pItem ) ) { char * szString; - BOOL fNewBuffer; + HB_BOOL fNewBuffer; szString = hb_macroTextSymbol( pItem->item.asString.value, pItem->item.asString.length, @@ -1025,7 +1025,7 @@ const char * hb_macroGetType( HB_ITEM_PTR pItem ) * Set macro capabilities if flag > 0 or get current macro capabilities * if flag == 0 */ -ULONG hb_macroSetMacro( BOOL bSet, ULONG flag ) +ULONG hb_macroSetMacro( HB_BOOL bSet, ULONG flag ) { ULONG ulCurrentFlags = hb_macroFlags(); @@ -1092,7 +1092,7 @@ int hb_macroLocalVarGetPos( const char * szVarName, HB_COMP_DECL ) return 0; } -BOOL hb_macroIsValidMacroText( const char * szText, HB_SIZE ulLen ) +HB_BOOL hb_macroIsValidMacroText( const char * szText, HB_SIZE ulLen ) { if( ulLen ) { @@ -1103,12 +1103,12 @@ BOOL hb_macroIsValidMacroText( const char * szText, HB_SIZE ulLen ) char ch = *szText; if( ( ch >= 'A' && ch <= 'Z' ) || ( ch >= 'a' && ch <= 'z' ) || ch == '_' ) - return TRUE; + return HB_TRUE; } } } - return FALSE; + return HB_FALSE; } ULONG hb_macroGenJump( LONG lOffset, HB_COMP_DECL ) @@ -1206,7 +1206,7 @@ static void hb_macroMemvarGenPCode( BYTE bPCode, const char * szVarName, HB_COMP } /* generates the pcode to push a symbol on the virtual machine stack */ -void hb_macroGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL ) +void hb_macroGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COMP_DECL ) { BYTE byBuf[ sizeof( HB_DYNS_PTR ) + 1 ]; HB_DYNS_PTR pSym; @@ -1300,7 +1300,7 @@ void hb_macroGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL ) } /* sends a message to an object */ -void hb_macroGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL ) +void hb_macroGenMessage( const char * szMsgName, HB_BOOL bIsObject, HB_COMP_DECL ) { BYTE byBuf[ sizeof( HB_DYNS_PTR ) + 1 ]; @@ -1316,7 +1316,7 @@ void hb_macroGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL ) } /* generates an underscore-symbol name for a data assignment */ -void hb_macroGenMessageData( const char * szMsg, BOOL bIsObject, HB_COMP_DECL ) +void hb_macroGenMessageData( const char * szMsg, HB_BOOL bIsObject, HB_COMP_DECL ) { char * szResult; int iLen; @@ -1362,7 +1362,7 @@ void hb_macroGenPopMemvar( const char * szVarName, HB_COMP_DECL ) * an aliased variable */ void hb_macroGenPopAliasedVar( const char * szVarName, - BOOL bPushAliasValue, + HB_BOOL bPushAliasValue, const char * szAlias, HB_LONG lWorkarea, HB_COMP_DECL ) { @@ -1388,7 +1388,7 @@ void hb_macroGenPopAliasedVar( const char * szVarName, } else { /* database alias */ - hb_macroGenPushSymbol( szAlias, FALSE, HB_COMP_PARAM ); + hb_macroGenPushSymbol( szAlias, HB_FALSE, HB_COMP_PARAM ); hb_macroMemvarGenPCode( HB_P_MPOPALIASEDFIELD, szVarName, HB_COMP_PARAM ); } } @@ -1412,7 +1412,7 @@ void hb_macroGenPopAliasedVar( const char * szVarName, /* generates the pcode to push a nonaliased variable value to the virtual * machine stack */ -void hb_macroGenPushVar( const char * szVarName, BOOL bMacroVar, HB_COMP_DECL ) +void hb_macroGenPushVar( const char * szVarName, HB_BOOL bMacroVar, HB_COMP_DECL ) { int iVar; @@ -1454,7 +1454,7 @@ void hb_macroGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ) * machine stack */ void hb_macroGenPushAliasedVar( const char * szVarName, - BOOL bPushAliasValue, + HB_BOOL bPushAliasValue, const char * szAlias, HB_LONG lWorkarea, HB_COMP_DECL ) { @@ -1483,7 +1483,7 @@ void hb_macroGenPushAliasedVar( const char * szVarName, } else { /* database alias */ - hb_macroGenPushSymbol( szAlias, FALSE, HB_COMP_PARAM ); + hb_macroGenPushSymbol( szAlias, HB_FALSE, HB_COMP_PARAM ); hb_macroMemvarGenPCode( HB_P_MPUSHALIASEDFIELD, szVarName, HB_COMP_PARAM ); } } @@ -1534,12 +1534,12 @@ void hb_macroGenPushFunSym( const char * szFunName, HB_COMP_DECL ) { /* Abbreviated function name was used - change it for whole name */ - hb_macroGenPushSymbol( szFunction, TRUE, HB_COMP_PARAM ); + hb_macroGenPushSymbol( szFunction, HB_TRUE, HB_COMP_PARAM ); } else { HB_MACRO_DATA->status |= HB_MACRO_UDF; /* this is used in hb_macroGetType */ - hb_macroGenPushSymbol( szFunName, TRUE, HB_COMP_PARAM ); + hb_macroGenPushSymbol( szFunName, HB_TRUE, HB_COMP_PARAM ); } } @@ -1555,7 +1555,7 @@ void hb_macroGenPushFunRef( const char * szFunName, HB_COMP_DECL ) /* if abbreviated function name was used - change it for whole name */ szFunction = hb_compReservedName( szFunName ); - hb_macroGenPushSymbol( szFunction ? szFunction : szFunName, TRUE, HB_COMP_PARAM ); + hb_macroGenPushSymbol( szFunction ? szFunction : szFunName, HB_TRUE, HB_COMP_PARAM ); } /* generates the pcode to push a string on the virtual machine stack */ @@ -1662,7 +1662,7 @@ void hb_macroCodeBlockStart( HB_COMP_DECL ) pCB->pCode = ( BYTE * ) hb_xgrab( HB_PCODE_SIZE ); pCB->lPCodeSize = HB_PCODE_SIZE; pCB->lPCodePos = 0; - pCB->fVParams = FALSE; + pCB->fVParams = HB_FALSE; pCB->pLocals = NULL; } diff --git a/harbour/src/vm/maindll.c b/harbour/src/vm/maindll.c index 7476a1eed0..9f33ade104 100644 --- a/harbour/src/vm/maindll.c +++ b/harbour/src/vm/maindll.c @@ -76,7 +76,7 @@ BOOL WINAPI DllEntryPoint( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserve switch( fdwReason ) { case DLL_PROCESS_ATTACH: - hb_vmInit( FALSE ); /* Don't execute first linked symbol */ + hb_vmInit( HB_FALSE ); /* Don't execute first linked symbol */ break; case DLL_PROCESS_DETACH: diff --git a/harbour/src/vm/maindllp.c b/harbour/src/vm/maindllp.c index 2209d68fac..3097d43bef 100644 --- a/harbour/src/vm/maindllp.c +++ b/harbour/src/vm/maindllp.c @@ -751,10 +751,10 @@ int hb_storvnd( double dNumber, int iParam, ... ) return 0; } -BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ) /* creates a new array */ +HB_BOOL hb_arrayNew( PHB_ITEM pItem, HB_SIZE ulLen ) /* creates a new array */ { HB_ARRAYNEW pArrayNew = ( HB_ARRAYNEW ) hb_getProcAddress( HBTEXT( "_hb_arrayNew" ) ); - return pArrayNew ? pArrayNew( pItem, ulLen ) : FALSE; + return pArrayNew ? pArrayNew( pItem, ulLen ) : HB_FALSE; } HB_SIZE hb_arrayLen( PHB_ITEM pArray ) /* retrives the array len */ @@ -763,52 +763,52 @@ HB_SIZE hb_arrayLen( PHB_ITEM pArray ) /* retrives the array len */ return pArrayLen ? pArrayLen( pArray ) : 0; } -BOOL hb_arrayIsObject( PHB_ITEM pArray ) /* retrives if the array is an object */ +HB_BOOL hb_arrayIsObject( PHB_ITEM pArray ) /* retrives if the array is an object */ { HB_ARRAYISOBJECT pArrayIsObject = ( HB_ARRAYISOBJECT ) hb_getProcAddress( HBTEXT( "_hb_arrayIsObject" ) ); - return pArrayIsObject ? pArrayIsObject( pArray ) : FALSE; + return pArrayIsObject ? pArrayIsObject( pArray ) : HB_FALSE; } -BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ) /* add a new item to the end of an array item */ +HB_BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ) /* add a new item to the end of an array item */ { HB_ARRAYADD pArrayAdd = ( HB_ARRAYADD ) hb_getProcAddress( HBTEXT( "_hb_arrayAdd" ) ); - return pArrayAdd ? pArrayAdd( pArray, pItemValue ) : FALSE; + return pArrayAdd ? pArrayAdd( pArray, pItemValue ) : HB_FALSE; } -BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ) /* insert a nil item into an array, without changing the length */ +HB_BOOL hb_arrayIns( PHB_ITEM pArray, HB_SIZE ulIndex ) /* insert a nil item into an array, without changing the length */ { HB_ARRAYINS pArrayIns = ( HB_ARRAYINS ) hb_getProcAddress( HBTEXT( "_hb_arrayIns" ) ); - return pArrayIns ? pArrayIns( pArray, ulIndex ) : FALSE; + return pArrayIns ? pArrayIns( pArray, ulIndex ) : HB_FALSE; } -BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ) /* delete an array item, without changing length */ +HB_BOOL hb_arrayDel( PHB_ITEM pArray, HB_SIZE ulIndex ) /* delete an array item, without changing length */ { HB_ARRAYDEL pArrayDel = ( HB_ARRAYDEL ) hb_getProcAddress( HBTEXT( "_hb_arrayDel" ) ); - return pArrayDel ? pArrayDel( pArray, ulIndex ) : FALSE; + return pArrayDel ? pArrayDel( pArray, ulIndex ) : HB_FALSE; } -BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ) /* sets the array total length */ +HB_BOOL hb_arraySize( PHB_ITEM pArray, HB_SIZE ulLen ) /* sets the array total length */ { HB_ARRAYSIZE pArraySize = ( HB_ARRAYSIZE ) hb_getProcAddress( HBTEXT( "_hb_arraySize" ) ); - return pArraySize ? pArraySize( pArray, ulLen ) : FALSE; + return pArraySize ? pArraySize( pArray, ulLen ) : HB_FALSE; } -BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) /* retrieve last item in an array */ +HB_BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) /* retrieve last item in an array */ { HB_ARRAYLAST pArrayLast = ( HB_ARRAYLAST ) hb_getProcAddress( HBTEXT( "_hb_arrayLast" ) ); - return pArrayLast ? pArrayLast( pArray, pResult ) : FALSE; + return pArrayLast ? pArrayLast( pArray, pResult ) : HB_FALSE; } -BOOL hb_arraySet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) /* sets an array element */ +HB_BOOL hb_arraySet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) /* sets an array element */ { HB_ARRAYSET pArraySet = ( HB_ARRAYSET ) hb_getProcAddress( HBTEXT( "_hb_arraySet" ) ); - return pArraySet ? pArraySet( pArray, ulIndex, pItem ) : FALSE; + return pArraySet ? pArraySet( pArray, ulIndex, pItem ) : HB_FALSE; } -BOOL hb_arrayGet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) /* retrieves an item */ +HB_BOOL hb_arrayGet( PHB_ITEM pArray, HB_SIZE ulIndex, PHB_ITEM pItem ) /* retrieves an item */ { HB_ARRAYGET pArrayGet = ( HB_ARRAYGET ) hb_getProcAddress( HBTEXT( "_hb_arrayGet" ) ); - return pArrayGet ? pArrayGet( pArray, ulIndex, pItem ) : FALSE; + return pArrayGet ? pArrayGet( pArray, ulIndex, pItem ) : HB_FALSE; } void hb_xinit( void ) /* Initialize fixed memory subsystem */ diff --git a/harbour/src/vm/mainstd.c b/harbour/src/vm/mainstd.c index cf9d91232d..74fe2ad19a 100644 --- a/harbour/src/vm/mainstd.c +++ b/harbour/src/vm/mainstd.c @@ -93,7 +93,7 @@ int main( int argc, char * argv[] ) #endif hb_cmdargInit( argc, argv ); - hb_vmInit( TRUE ); + hb_vmInit( HB_TRUE ); return hb_vmQuit(); } diff --git a/harbour/src/vm/memvars.c b/harbour/src/vm/memvars.c index 91ddfb7a51..2900178e90 100644 --- a/harbour/src/vm/memvars.c +++ b/harbour/src/vm/memvars.c @@ -88,7 +88,7 @@ struct mv_PUBLIC_var_info { int iPos; - BOOL bFound; + HB_BOOL bFound; HB_DYNS_PTR pDynSym; }; @@ -743,7 +743,7 @@ static void hb_memvarRelease( HB_ITEM_PTR pMemvar ) * procedure only. * The scope of released variables are specified using passed name's mask */ -static void hb_memvarReleaseWithMask( const char *szMask, BOOL bInclude ) +static void hb_memvarReleaseWithMask( const char *szMask, HB_BOOL bInclude ) { HB_STACK_TLS_PRELOAD ULONG ulBase = hb_stackGetPrivateStack()->count; @@ -762,7 +762,7 @@ static void hb_memvarReleaseWithMask( const char *szMask, BOOL bInclude ) pMemvar = hb_dynsymGetMemvar( pDynVar ); if( pMemvar ) { - BOOL fMatch = hb_strMatchCaseWildExact( pDynVar->pSymbol->szName, szMask ); + HB_BOOL fMatch = hb_strMatchCaseWildExact( pDynVar->pSymbol->szName, szMask ); if( bInclude ? fMatch : !fMatch ) hb_itemClear( pMemvar ); } @@ -821,12 +821,12 @@ static HB_DYNS_FUNC( hb_memvarClear ) hb_dynsymGetMemvar( pDynSymbol ) ) hb_memvarDetachDynSym( pDynSymbol, NULL ); - return TRUE; + return HB_TRUE; } #endif /* Clear all memvar variables optionally without GetList PUBLIC variable */ -void hb_memvarsClear( BOOL fAll ) +void hb_memvarsClear( HB_BOOL fAll ) { HB_STACK_TLS_PRELOAD PHB_DYNS pGetList; @@ -858,7 +858,7 @@ static HB_DYNS_FUNC( hb_memvarCountPublics ) if( hb_memvarScopeGet( pDynSymbol ) == HB_MV_PUBLIC ) ( * ( ( int * )Cargo ) )++; - return TRUE; + return HB_TRUE; } static ULONG hb_memvarGetBaseOffset( int iProcLevel ) @@ -910,16 +910,16 @@ static int hb_memvarCount( int iScope, int iLevel ) */ static HB_DYNS_FUNC( hb_memvarFindPublicByPos ) { - BOOL bCont = TRUE; + HB_BOOL bCont = HB_TRUE; if( hb_memvarScopeGet( pDynSymbol ) == HB_MV_PUBLIC ) { struct mv_PUBLIC_var_info *pStruPub = (struct mv_PUBLIC_var_info *) Cargo; if( pStruPub->iPos-- == 0 ) { - pStruPub->bFound = TRUE; + pStruPub->bFound = HB_TRUE; pStruPub->pDynSym = pDynSymbol; - bCont = FALSE; + bCont = HB_FALSE; } } @@ -946,7 +946,7 @@ static HB_ITEM_PTR hb_memvarDebugVariable( int iScope, int iPos, const char ** p struct mv_PUBLIC_var_info struPub; struPub.iPos = iPos; - struPub.bFound = FALSE; + struPub.bFound = HB_FALSE; /* enumerate existing dynamic symbols and fill this structure * with info for requested PUBLIC variable */ @@ -986,10 +986,10 @@ static HB_DYNS_FUNC( hb_memvarCountVisible ) pMVInfo->pDyns[ pMVInfo->ulCount++ ] = pDynSymbol; } } - return TRUE; + return HB_TRUE; } -PHB_ITEM hb_memvarSaveInArray( int iScope, BOOL fCopy ) +PHB_ITEM hb_memvarSaveInArray( int iScope, HB_BOOL fCopy ) { HB_STACK_TLS_PRELOAD struct mv_memvarArray_info MVInfo; @@ -1180,7 +1180,7 @@ HB_FUNC( __MVRELEASE ) if( iCount && HB_ISCHAR( 1 ) ) { - BOOL bIncludeVar; + HB_BOOL bIncludeVar; const char * pszMask; pszMask = hb_memvarGetMask( 1 ); @@ -1209,7 +1209,7 @@ HB_FUNC( __MVSCOPE ) HB_FUNC( __MVCLEAR ) { - hb_memvarsClear( FALSE ); + hb_memvarsClear( HB_FALSE ); } HB_FUNC( __MVDBGINFO ) @@ -1350,7 +1350,7 @@ HB_FUNC( __MVPUT ) typedef struct { const char * pszMask; - BOOL bIncludeMask; + HB_BOOL bIncludeMask; BYTE * buffer; HB_FHANDLE fhnd; } MEMVARSAVE_CARGO; @@ -1359,8 +1359,8 @@ typedef struct static HB_DYNS_FUNC( hb_memvarSave ) { - const char * pszMask = ( ( MEMVARSAVE_CARGO * ) Cargo )->pszMask; - BOOL bIncludeMask = ( ( MEMVARSAVE_CARGO * ) Cargo )->bIncludeMask; + const char * pszMask = ( ( MEMVARSAVE_CARGO * ) Cargo )->pszMask; + HB_BOOL bIncludeMask = ( ( MEMVARSAVE_CARGO * ) Cargo )->bIncludeMask; BYTE * buffer = ( ( MEMVARSAVE_CARGO * ) Cargo )->buffer; HB_FHANDLE fhnd = ( ( MEMVARSAVE_CARGO * ) Cargo )->fhnd; PHB_ITEM pMemvar; @@ -1372,7 +1372,7 @@ static HB_DYNS_FUNC( hb_memvarSave ) pMemvar = hb_dynsymGetMemvar( pDynSymbol ); if( pMemvar ) { - BOOL bMatch = hb_strMatchCaseWildExact( pDynSymbol->pSymbol->szName, pszMask ); + HB_BOOL bMatch = hb_strMatchCaseWildExact( pDynSymbol->pSymbol->szName, pszMask ); /* Process it if it matches the passed mask */ if( bIncludeMask ? bMatch : ! bMatch ) @@ -1453,7 +1453,7 @@ static HB_DYNS_FUNC( hb_memvarSave ) } } } - return TRUE; + return HB_TRUE; } HB_FUNC( __MVSAVE ) @@ -1552,12 +1552,12 @@ HB_FUNC( __MVRESTORE ) char szFileName[ HB_PATH_MAX ]; HB_FHANDLE fhnd; - BOOL bAdditive = hb_parl( 2 ); + HB_BOOL bAdditive = hb_parl( 2 ); /* Clear all memory variables if not ADDITIVE */ if( ! bAdditive ) - hb_memvarsClear( FALSE ); + hb_memvarsClear( HB_FALSE ); /* Generate filename */ @@ -1589,7 +1589,7 @@ HB_FUNC( __MVRESTORE ) if( fhnd != FS_ERROR ) { - BOOL bIncludeMask; + HB_BOOL bIncludeMask; BYTE buffer[ HB_MEM_REC_LEN ]; const char * pszMask; char *szName; @@ -1597,7 +1597,7 @@ HB_FUNC( __MVRESTORE ) #ifdef HB_CLP_STRICT pszMask = "*"; - bIncludeMask = TRUE; + bIncludeMask = HB_TRUE; #else pszMask = hb_memvarGetMask( 3 ); bIncludeMask = hb_parldef( 4, 1 ); @@ -1690,7 +1690,7 @@ HB_FUNC( __MVRESTORE ) if( szName ) { - BOOL bMatch = hb_strMatchCaseWildExact( szName, pszMask ); + HB_BOOL bMatch = hb_strMatchCaseWildExact( szName, pszMask ); /* Process it if it matches the passed mask */ if( bIncludeMask ? bMatch : ! bMatch ) @@ -1713,7 +1713,7 @@ HB_FUNC( __MVRESTORE ) hb_itemReturnRelease( pItem ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); if( pError ) hb_itemRelease( pError ); diff --git a/harbour/src/vm/proc.c b/harbour/src/vm/proc.c index f23a14ab8c..87362e575e 100644 --- a/harbour/src/vm/proc.c +++ b/harbour/src/vm/proc.c @@ -77,14 +77,14 @@ HB_FUNC( HB_METHODNAME ) { char szName[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 ]; - hb_retc( hb_procname( hb_parni( 1 ) + 1, szName, TRUE ) ); + hb_retc( hb_procname( hb_parni( 1 ) + 1, szName, HB_TRUE ) ); } HB_FUNC( PROCNAME ) { char szName[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 ]; - hb_retc( hb_procname( hb_parni( 1 ) + 1, szName, FALSE ) ); + hb_retc( hb_procname( hb_parni( 1 ) + 1, szName, HB_FALSE ) ); } HB_FUNC( PROCLINE ) @@ -151,7 +151,7 @@ HB_FUNC( PROCFILE ) /* NOTE: szName size must be an at least: HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 [vszakats] */ #define HB_PROCBUF_LEN ( HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 4 ) -char * hb_procname( int iLevel, char * szName, BOOL fMethodName ) +char * hb_procname( int iLevel, char * szName, HB_BOOL fMethodName ) { long lOffset = hb_stackBaseProcOffset( iLevel ); @@ -221,7 +221,7 @@ char * hb_procname( int iLevel, char * szName, BOOL fMethodName ) * szFile szie must be an at least: * HB_PATH_MAX */ -BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ) +HB_BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ) { long lOffset = hb_stackBaseProcOffset( iLevel ); @@ -281,7 +281,7 @@ BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ) szFile[ 0 ] = '\0'; } - return TRUE; + return HB_TRUE; } if( szName ) @@ -291,5 +291,5 @@ BOOL hb_procinfo( int iLevel, char * szName, USHORT * puiLine, char * szFile ) if( szFile ) szFile[ 0 ] = '\0'; - return FALSE; + return HB_FALSE; } diff --git a/harbour/src/vm/runner.c b/harbour/src/vm/runner.c index 9e832ff3ab..d0e7dfea92 100644 --- a/harbour/src/vm/runner.c +++ b/harbour/src/vm/runner.c @@ -82,8 +82,8 @@ typedef struct { ULONG ulSymbols; /* Number of symbols */ ULONG ulFuncs; /* Number of functions */ - BOOL fInit; /* should be INIT functions executed */ - BOOL fExit; /* should be EXIT functions executed */ + HB_BOOL fInit; /* should be INIT functions executed */ + HB_BOOL fExit; /* should be EXIT functions executed */ LONG lSymStart; /* Startup Symbol */ PHB_SYMB pSymRead; /* Symbols read */ PHB_DYNF pDynFunc; /* Functions read */ @@ -114,7 +114,7 @@ static int hb_hrbReadHead( const char * szBody, ULONG ulBodySize, ULONG * pulBod return HB_PCODE_MKSHORT( pVersion ); } -static BOOL hb_hrbReadValue( const char * szBody, ULONG ulBodySize, ULONG * pulBodyOffset, ULONG * pulValue ) +static HB_BOOL hb_hrbReadValue( const char * szBody, ULONG ulBodySize, ULONG * pulBodyOffset, ULONG * pulValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_hrbReadValue(%p,%lu,%p,%p)", szBody, ulBodySize, pulBodyOffset, pulValue)); @@ -125,11 +125,11 @@ static BOOL hb_hrbReadValue( const char * szBody, ULONG ulBodySize, ULONG * pulB if( *pulValue <= 0x00FFFFFFUL ) { - return TRUE; + return HB_TRUE; } } - return FALSE; + return HB_FALSE; } /* ReadId @@ -173,7 +173,7 @@ static void hb_hrbInitStatic( PHRB_BODY pHrbBody ) { ULONG ul; - pHrbBody->fInit = TRUE; + pHrbBody->fInit = HB_TRUE; /* Initialize static variables first */ for( ul = 0; ul < pHrbBody->ulSymbols; ul++ ) /* Check _INITSTATICS functions */ { @@ -208,8 +208,8 @@ static void hb_hrbInit( PHRB_BODY pHrbBody, int iPCount, PHB_ITEM * pParams ) ULONG ul; int i; - pHrbBody->fInit = FALSE; - pHrbBody->fExit = TRUE; + pHrbBody->fInit = HB_FALSE; + pHrbBody->fExit = HB_TRUE; for( ul = 0; ul < pHrbBody->ulSymbols; ul++ ) /* Check INIT functions */ { @@ -238,8 +238,8 @@ static void hb_hrbExit( PHRB_BODY pHrbBody ) { ULONG ul; - pHrbBody->fExit = FALSE; - pHrbBody->fInit = TRUE; + pHrbBody->fExit = HB_FALSE; + pHrbBody->fInit = HB_TRUE; for( ul = 0; ul < pHrbBody->ulSymbols; ul++ ) { @@ -327,8 +327,8 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, ULONG ulBodySize, USHORT us pHrbBody = ( PHRB_BODY ) hb_xgrab( sizeof( HRB_BODY ) ); - pHrbBody->fInit = FALSE; - pHrbBody->fExit = FALSE; + pHrbBody->fInit = HB_FALSE; + pHrbBody->fExit = HB_FALSE; pHrbBody->lSymStart = -1; pHrbBody->ulFuncs = 0; pHrbBody->pSymRead = NULL; @@ -520,7 +520,7 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, ULONG ulBodySize, USHORT us } pHrbBody->pModuleSymbols = hb_vmRegisterSymbols( pHrbBody->pSymRead, - ( USHORT ) pHrbBody->ulSymbols, "pcode.hrb", 0, TRUE, FALSE ); + ( USHORT ) pHrbBody->ulSymbols, "pcode.hrb", 0, HB_TRUE, HB_FALSE ); if( pHrbBody->pModuleSymbols->pModuleSymbols != pSymRead ) { @@ -531,12 +531,12 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, ULONG ulBodySize, USHORT us pHrbBody->pSymRead = pHrbBody->pModuleSymbols->pModuleSymbols; hb_xfree( pSymRead ); - pHrbBody->fInit = TRUE; + pHrbBody->fInit = HB_TRUE; } else { /* mark symbol table as dynamically allocated so HVM will free it on exit */ - pHrbBody->pModuleSymbols->fAllocated = TRUE; + pHrbBody->pModuleSymbols->fAllocated = HB_TRUE; /* initialize static variables */ hb_hrbInitStatic( pHrbBody ); diff --git a/harbour/src/vm/set.c b/harbour/src/vm/set.c index 1b08b9344a..725810c4d4 100644 --- a/harbour/src/vm/set.c +++ b/harbour/src/vm/set.c @@ -111,9 +111,9 @@ static char set_char( PHB_ITEM pItem, char oldChar ) * Change the setting if the parameter is a logical value, or is * either "ON" or "OFF" (regardless of case) */ -static BOOL set_logical( PHB_ITEM pItem, BOOL bDefault ) +static HB_BOOL set_logical( PHB_ITEM pItem, HB_BOOL bDefault ) { - BOOL bLogical = bDefault; + HB_BOOL bLogical = bDefault; HB_TRACE(HB_TR_DEBUG, ("set_logical(%p)", pItem)); @@ -129,12 +129,12 @@ static BOOL set_logical( PHB_ITEM pItem, BOOL bDefault ) if( ulLen >= 2 && ( ( UCHAR ) szString[ 0 ] == 'O' || ( UCHAR ) szString[ 0 ] == 'o' ) && ( ( UCHAR ) szString[ 1 ] == 'N' || ( UCHAR ) szString[ 1 ] == 'n' ) ) - bLogical = TRUE; + bLogical = HB_TRUE; else if( ulLen >= 3 && ( ( UCHAR ) szString[ 0 ] == 'O' || ( UCHAR ) szString[ 0 ] == 'o' ) && ( ( UCHAR ) szString[ 1 ] == 'F' || ( UCHAR ) szString[ 1 ] == 'f' ) && ( ( UCHAR ) szString[ 2 ] == 'F' || ( UCHAR ) szString[ 2 ] == 'f' ) ) - bLogical = FALSE; + bLogical = HB_FALSE; } } @@ -197,7 +197,7 @@ static void close_handle( PHB_SET_STRUCT pSet, HB_set_enum set_specifier ) } } -static BOOL is_devicename( const char * szFileName ) +static HB_BOOL is_devicename( const char * szFileName ) { if( szFileName && *szFileName ) { @@ -212,34 +212,34 @@ static BOOL is_devicename( const char * szFileName ) ( hb_strnicmp( szFileName, "COM", 3 ) == 0 && szFileName[3] >= '1' && szFileName[3] <= '9' ) ) ) ) { - return TRUE; + return HB_TRUE; } #elif defined( HB_OS_UNIX ) if( strncmp( szFileName, "/dev/", 5 ) == 0 ) - return TRUE; + return HB_TRUE; else { ULONG ulAttr = 0; if( hb_fsGetAttr( szFileName, &ulAttr ) ) { if( ulAttr & ( HB_FA_CHRDEVICE | HB_FA_BLKDEVICE | HB_FA_FIFO | HB_FA_SOCKET ) ) - return TRUE; + return HB_TRUE; } } #endif } - return FALSE; + return HB_FALSE; } static void open_handle( PHB_SET_STRUCT pSet, const char * file_name, - BOOL bAppend, HB_set_enum set_specifier ) + HB_BOOL bAppend, HB_set_enum set_specifier ) { PHB_ITEM pError = NULL; HB_FHANDLE handle, * handle_ptr; HB_ERRCODE uiError; char * szFileName = NULL, ** set_value; const char * def_ext; - BOOL bPipe = FALSE; + HB_BOOL bPipe = HB_FALSE; HB_TRACE(HB_TR_DEBUG, ("open_handle(%p, %s, %d, %d)", pSet, file_name, (int) bAppend, (int) set_specifier)); @@ -277,7 +277,7 @@ static void open_handle( PHB_SET_STRUCT pSet, const char * file_name, if( bPipe ) { szFileName = hb_strdup( file_name ); - bAppend = FALSE; + bAppend = HB_FALSE; } #endif if( ! bPipe ) @@ -327,7 +327,7 @@ static void open_handle( PHB_SET_STRUCT pSet, const char * file_name, handle = hb_fsPOpen( szFileName + 1, "w" ); else { - BOOL bCreate = FALSE; + HB_BOOL bCreate = HB_FALSE; if( bAppend ) { /* Append mode */ @@ -358,10 +358,10 @@ static void open_handle( PHB_SET_STRUCT pSet, const char * file_name, } } else - bCreate = TRUE; /* Otherwise create a new file. */ + bCreate = HB_TRUE; /* Otherwise create a new file. */ } else - bCreate = TRUE; /* Always create a new file for overwrite mode. */ + bCreate = HB_TRUE; /* Always create a new file for overwrite mode. */ if( bCreate ) handle = hb_fsCreate( szFileName, FC_NORMAL ); @@ -396,11 +396,11 @@ static void open_handle( PHB_SET_STRUCT pSet, const char * file_name, return; } -BOOL hb_setSetCentury( BOOL new_century_setting ) +HB_BOOL hb_setSetCentury( HB_BOOL new_century_setting ) { HB_STACK_TLS_PRELOAD PHB_SET_STRUCT pSet = hb_stackSetStruct(); - BOOL old_century_setting = pSet->hb_set_century; + HB_BOOL old_century_setting = pSet->hb_set_century; pSet->hb_set_century = new_century_setting; /* @@ -472,7 +472,7 @@ BOOL hb_setSetCentury( BOOL new_century_setting ) HB_FUNC( __SETCENTURY ) { HB_STACK_TLS_PRELOAD - BOOL old_century_setting = hb_setGetCentury(); + HB_BOOL old_century_setting = hb_setGetCentury(); PHB_ITEM pNewVal = hb_param( 1, HB_IT_ANY ); if( pNewVal ) @@ -525,7 +525,7 @@ HB_FUNC( SET ) case HB_SET_ALTFILE: hb_retc( pSet->HB_SET_ALTFILE ); if( pArg2 && HB_IS_STRING( pArg2 ) ) - open_handle( pSet, hb_itemGetCPtr( pArg2 ), set_logical( pArg3, FALSE ), HB_SET_ALTFILE ); + open_handle( pSet, hb_itemGetCPtr( pArg2 ), set_logical( pArg3, HB_FALSE ), HB_SET_ALTFILE ); break; case HB_SET_AUTOPEN: hb_retl( pSet->HB_SET_AUTOPEN ); @@ -577,9 +577,9 @@ HB_FUNC( SET ) break; case HB_SET_CURSOR: if( args >= 2 && HB_IS_NUMERIC( pArg2 ) ) - hb_retni( hb_conSetCursor( TRUE, hb_itemGetNI( pArg2 ) ) ); + hb_retni( hb_conSetCursor( HB_TRUE, hb_itemGetNI( pArg2 ) ) ); else - hb_retni( hb_conSetCursor( FALSE, 0 ) ); + hb_retni( hb_conSetCursor( HB_FALSE, 0 ) ); break; case HB_SET_DATEFORMAT: hb_retc( pSet->HB_SET_DATEFORMAT ); @@ -705,7 +705,7 @@ HB_FUNC( SET ) case HB_SET_EXTRAFILE: hb_retc( pSet->HB_SET_EXTRAFILE ); if( pArg2 && HB_IS_STRING( pArg2 ) ) - open_handle( pSet, hb_itemGetCPtr( pArg2 ), set_logical( pArg3, FALSE ), HB_SET_EXTRAFILE ); + open_handle( pSet, hb_itemGetCPtr( pArg2 ), set_logical( pArg3, HB_FALSE ), HB_SET_EXTRAFILE ); break; case HB_SET_FIXED: hb_retl( pSet->HB_SET_FIXED ); @@ -801,7 +801,7 @@ HB_FUNC( SET ) hb_retc( pSet->HB_SET_PRINTFILE ); if( pArg2 && HB_IS_STRING( pArg2 ) ) { - open_handle( pSet, hb_itemGetCPtr( pArg2 ), set_logical( pArg3, FALSE ), HB_SET_PRINTFILE ); + open_handle( pSet, hb_itemGetCPtr( pArg2 ), set_logical( pArg3, HB_FALSE ), HB_SET_PRINTFILE ); /* With SET PRINTER TO or Set( _SET_PRINTFILE, "" ) are expected to activate the default printer [jarabal] */ if( pSet->HB_SET_PRINTFILE == NULL ) pSet->HB_SET_PRINTFILE = hb_set_PRINTFILE_default(); @@ -1025,90 +1025,90 @@ void hb_setInitialize( PHB_SET_STRUCT pSet ) { HB_TRACE(HB_TR_DEBUG, ("hb_setInitialize(%p)", pSet)); - pSet->HB_SET_ALTERNATE = FALSE; + pSet->HB_SET_ALTERNATE = HB_FALSE; pSet->HB_SET_ALTFILE = NULL; pSet->hb_set_althan = FS_ERROR; - pSet->HB_SET_AUTOPEN = TRUE; + pSet->HB_SET_AUTOPEN = HB_TRUE; pSet->HB_SET_AUTORDER = 0; pSet->HB_SET_AUTOSHARE = 0; - pSet->HB_SET_BELL = FALSE; - pSet->HB_SET_CANCEL = TRUE; - pSet->hb_set_century = FALSE; - pSet->hb_set_prndevice = FALSE; + pSet->HB_SET_BELL = HB_FALSE; + pSet->HB_SET_CANCEL = HB_TRUE; + pSet->hb_set_century = HB_FALSE; + pSet->hb_set_prndevice = HB_FALSE; pSet->HB_SET_COLOR = ( char * ) hb_xgrab( HB_CLRSTR_LEN + 1 ); hb_strncpy( pSet->HB_SET_COLOR, "W/N,N/W,N/N,N/N,N/W", HB_CLRSTR_LEN ); - pSet->HB_SET_CONFIRM = FALSE; - pSet->HB_SET_CONSOLE = TRUE; + pSet->HB_SET_CONFIRM = HB_FALSE; + pSet->HB_SET_CONSOLE = HB_TRUE; pSet->HB_SET_DATEFORMAT = hb_strdup( "mm/dd/yy" ); pSet->HB_SET_TIMEFORMAT = hb_strdup( "hh:mm:ss.fff" ); /* * Tests shows that Clipper has two different flags to control ALT+D * and ALTD() behavior and on startup these flags are not synchronized. - * When application starts _SET_DEBUG is set to FALSE but debugger + * When application starts _SET_DEBUG is set to HB_FALSE but debugger * can be activated by hitting K_ALT_D or calling ALTD() function without * parameter. It means that some other internal flag enables these * operations. * Because Harbour is using _SET_DEBUG flag only then we have to - * initialize it to TRUE when debugger is linked to keep real Clipper + * initialize it to HB_TRUE when debugger is linked to keep real Clipper * behavior or we will have to add second flag too and try to replicate * exactly unsynchronized behavior of these flags which exists in Clipper. * IMHO it's a bug in Clipper (side effect of some internal solutions) and * we should not try to emulate it [druzus]. */ - /* pSet->HB_SET_DEBUG = FALSE; */ - pSet->HB_SET_DEBUG = hb_dynsymFind( "__DBGENTRY" ) ? TRUE : FALSE; + /* pSet->HB_SET_DEBUG = HB_FALSE; */ + pSet->HB_SET_DEBUG = hb_dynsymFind( "__DBGENTRY" ) ? HB_TRUE : HB_FALSE; pSet->HB_SET_DECIMALS = 2; pSet->HB_SET_DEFAULT = hb_strdup( "" ); - pSet->HB_SET_DELETED = FALSE; + pSet->HB_SET_DELETED = HB_FALSE; pSet->HB_SET_DELIMCHARS = hb_strdup( "::" ); - pSet->HB_SET_DELIMITERS = FALSE; + pSet->HB_SET_DELIMITERS = HB_FALSE; pSet->HB_SET_DEVICE = hb_strdup( "SCREEN" ); #if defined( HB_OS_UNIX ) - pSet->HB_SET_EOF = FALSE; + pSet->HB_SET_EOF = HB_FALSE; #else - pSet->HB_SET_EOF = TRUE; + pSet->HB_SET_EOF = HB_TRUE; #endif pSet->HB_SET_EPOCH = 1900; - pSet->HB_SET_ESCAPE = TRUE; + pSet->HB_SET_ESCAPE = HB_TRUE; pSet->HB_SET_EVENTMASK = INKEY_KEYBOARD; - pSet->HB_SET_EXACT = FALSE; - pSet->HB_SET_EXCLUSIVE = TRUE; - pSet->HB_SET_EXIT = FALSE; - pSet->HB_SET_EXTRA = FALSE; + pSet->HB_SET_EXACT = HB_FALSE; + pSet->HB_SET_EXCLUSIVE = HB_TRUE; + pSet->HB_SET_EXIT = HB_FALSE; + pSet->HB_SET_EXTRA = HB_FALSE; pSet->HB_SET_EXTRAFILE = NULL; pSet->hb_set_extrahan = FS_ERROR; - pSet->HB_SET_FIXED = FALSE; - pSet->HB_SET_FORCEOPT = FALSE; - pSet->HB_SET_HARDCOMMIT = TRUE; - pSet->HB_SET_IDLEREPEAT = TRUE; - pSet->HB_SET_INSERT = FALSE; - pSet->HB_SET_INTENSITY = TRUE; + pSet->HB_SET_FIXED = HB_FALSE; + pSet->HB_SET_FORCEOPT = HB_FALSE; + pSet->HB_SET_HARDCOMMIT = HB_TRUE; + pSet->HB_SET_IDLEREPEAT = HB_TRUE; + pSet->HB_SET_INSERT = HB_FALSE; + pSet->HB_SET_INTENSITY = HB_TRUE; pSet->HB_SET_MARGIN = 0; pSet->HB_SET_MBLOCKSIZE = 64; - pSet->HB_SET_MCENTER = FALSE; + pSet->HB_SET_MCENTER = HB_FALSE; pSet->HB_SET_MESSAGE = 0; pSet->HB_SET_MFILEEXT = hb_strdup( "" ); - pSet->HB_SET_OPTIMIZE = TRUE; + pSet->HB_SET_OPTIMIZE = HB_TRUE; pSet->HB_SET_PATH = hb_strdup( "" ); pSet->hb_set_path = NULL; - pSet->HB_SET_PRINTER = FALSE; + pSet->HB_SET_PRINTER = HB_FALSE; pSet->HB_SET_PRINTFILE = hb_set_PRINTFILE_default(); pSet->hb_set_printhan = FS_ERROR; - pSet->HB_SET_SCOREBOARD = TRUE; - pSet->HB_SET_SCROLLBREAK = TRUE; - pSet->HB_SET_SOFTSEEK = FALSE; - pSet->HB_SET_STRICTREAD = FALSE; + pSet->HB_SET_SCOREBOARD = HB_TRUE; + pSet->HB_SET_SCROLLBREAK = HB_TRUE; + pSet->HB_SET_SOFTSEEK = HB_FALSE; + pSet->HB_SET_STRICTREAD = HB_FALSE; pSet->HB_SET_TYPEAHEAD = HB_DEFAULT_INKEY_BUFSIZE; - pSet->HB_SET_UNIQUE = FALSE; + pSet->HB_SET_UNIQUE = HB_FALSE; pSet->HB_SET_FILECASE = HB_SET_CASE_MIXED; pSet->HB_SET_DIRCASE = HB_SET_CASE_MIXED; pSet->HB_SET_DIRSEPARATOR = HB_OS_PATH_DELIM_CHR; pSet->HB_SET_VIDEOMODE = 0; - pSet->HB_SET_WRAP = FALSE; + pSet->HB_SET_WRAP = HB_FALSE; pSet->HB_SET_DBFLOCKSCHEME = 0; - pSet->HB_SET_DEFEXTENSIONS = TRUE; + pSet->HB_SET_DEFEXTENSIONS = HB_TRUE; pSet->HB_SET_EOL = hb_strdup( hb_conNewLine() ); - pSet->HB_SET_TRIMFILENAME = FALSE; + pSet->HB_SET_TRIMFILENAME = HB_FALSE; pSet->HB_SET_HBOUTLOG = hb_strdup( "hb_out.log" ); pSet->HB_SET_HBOUTLOGINFO = hb_strdup( "" ); pSet->HB_SET_OSCODEPAGE = NULL; @@ -1267,11 +1267,11 @@ int hb_setListenerRemove( int listener ) return listener; } -BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) +HB_BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) { HB_STACK_TLS_PRELOAD PHB_SET_STRUCT pSet = hb_stackSetStruct(); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; char * szValue; int iValue; @@ -1289,8 +1289,8 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) */ if( HB_IS_STRING( pItem ) || HB_IS_NIL( pItem ) ) { - open_handle( pSet, hb_itemGetCPtr( pItem ), FALSE, set_specifier ); - fResult = TRUE; + open_handle( pSet, hb_itemGetCPtr( pItem ), HB_FALSE, set_specifier ); + fResult = HB_TRUE; if( set_specifier == HB_SET_PRINTFILE && pSet->HB_SET_PRINTFILE == NULL ) pSet->HB_SET_PRINTFILE = hb_set_PRINTFILE_default(); } @@ -1300,224 +1300,224 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_ALTERNATE = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_AUTOPEN: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_AUTOPEN = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_BELL: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_BELL = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_CANCEL: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_CANCEL = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_CONFIRM: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_CONFIRM = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_CONSOLE: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_CONSOLE = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DEBUG: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_DEBUG = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DELETED: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_DELETED = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DELIMITERS: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_DELIMITERS = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_EOF: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_EOF = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_ESCAPE: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_ESCAPE = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_EXACT: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_EXACT = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_EXCLUSIVE: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_EXCLUSIVE = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_EXIT: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_EXIT = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_EXTRA: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_EXTRA = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_FIXED: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_FIXED = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_IDLEREPEAT: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_IDLEREPEAT = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_INSERT: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_INSERT = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_INTENSITY: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_INTENSITY = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_MCENTER: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_MCENTER = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_OPTIMIZE: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_OPTIMIZE = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_FORCEOPT: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_FORCEOPT = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_PRINTER: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_PRINTER = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_SCOREBOARD: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_SCOREBOARD = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_SCROLLBREAK: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_SCROLLBREAK = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_SOFTSEEK: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_SOFTSEEK = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_STRICTREAD: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_STRICTREAD = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_UNIQUE: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_UNIQUE = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_WRAP: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_WRAP = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_HARDCOMMIT: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_HARDCOMMIT = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DEFEXTENSIONS: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_DEFEXTENSIONS = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_TRIMFILENAME: if( HB_IS_LOGICAL( pItem ) ) { pSet->HB_SET_TRIMFILENAME = hb_itemGetL( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; @@ -1528,7 +1528,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_DECIMALS = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1539,7 +1539,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_EPOCH = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1550,7 +1550,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_MBLOCKSIZE = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1561,7 +1561,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_DBFLOCKSCHEME = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1572,7 +1572,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_AUTORDER = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1583,15 +1583,15 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_AUTOSHARE = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; case HB_SET_CURSOR: if( HB_IS_NUMERIC( pItem ) ) { - hb_conSetCursor( TRUE, hb_itemGetNI( pItem ) ); - fResult = TRUE; + hb_conSetCursor( HB_TRUE, hb_itemGetNI( pItem ) ); + fResult = HB_TRUE; } break; case HB_SET_EVENTMASK: @@ -1601,7 +1601,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_EVENTMASK = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1612,7 +1612,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_MARGIN = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1623,7 +1623,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( iValue >= 0 ) { pSet->HB_SET_MESSAGE = iValue; - fResult = TRUE; + fResult = HB_TRUE; } } break; @@ -1640,14 +1640,14 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) pSet->HB_SET_TYPEAHEAD = 4096; /* reset keyboard buffer */ hb_inkeyReset(); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_VIDEOMODE: if( HB_IS_NUMERIC( pItem ) ) { pSet->HB_SET_VIDEOMODE = hb_itemGetNI( pItem ); - fResult = TRUE; + fResult = HB_TRUE; } break; @@ -1655,21 +1655,21 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( HB_IS_STRING( pItem ) ) { hb_conSetColor( hb_itemGetCPtr( pItem ) ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_LANGUAGE: if( HB_IS_STRING( pItem ) ) { hb_langSelectID( hb_itemGetCPtr( pItem ) ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_CODEPAGE: if( HB_IS_STRING( pItem ) ) { hb_cdpSelectID( hb_itemGetCPtr( pItem ) ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_FILECASE: @@ -1695,7 +1695,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) pSet->HB_SET_FILECASE = iValue; else pSet->HB_SET_DIRCASE = iValue; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DATEFORMAT: @@ -1718,7 +1718,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) /* CENTURY is not controlled directly by SET, so there is no notification for changing it indirectly via DATE FORMAT. */ pSet->hb_set_century = iYear >= 4; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_TIMEFORMAT: @@ -1728,14 +1728,14 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( pSet->HB_SET_TIMEFORMAT ) hb_xfree( pSet->HB_SET_TIMEFORMAT ); pSet->HB_SET_TIMEFORMAT = szValue; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DIRSEPARATOR: if( hb_itemGetCLen( pItem ) > 0 ) { pSet->HB_SET_DIRSEPARATOR = hb_itemGetCPtr( pItem )[ 0 ]; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DEVICE: @@ -1746,7 +1746,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) hb_xfree( pSet->HB_SET_DEVICE ); pSet->HB_SET_DEVICE = szValue; pSet->hb_set_prndevice = hb_stricmp( szValue, "PRINTER" ) == 0; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_MFILEEXT: @@ -1756,7 +1756,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( pSet->HB_SET_MFILEEXT ) hb_xfree( pSet->HB_SET_MFILEEXT ); pSet->HB_SET_MFILEEXT = szValue; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DEFAULT: @@ -1766,7 +1766,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( pSet->HB_SET_DEFAULT ) hb_xfree( pSet->HB_SET_DEFAULT ); pSet->HB_SET_DEFAULT = szValue; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_PATH: @@ -1781,7 +1781,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) pSet->hb_set_path = NULL; hb_fsAddSearchPath( pSet->HB_SET_PATH, &pSet->hb_set_path ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DELIMCHARS: @@ -1791,7 +1791,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( pSet->HB_SET_DELIMCHARS ) hb_xfree( pSet->HB_SET_DELIMCHARS ); pSet->HB_SET_DELIMCHARS = szValue; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_EOL: @@ -1801,7 +1801,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( pSet->HB_SET_EOL ) hb_xfree( pSet->HB_SET_EOL ); pSet->HB_SET_EOL = szValue; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_HBOUTLOG: @@ -1812,7 +1812,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) hb_xfree( pSet->HB_SET_HBOUTLOG ); pSet->HB_SET_HBOUTLOG = szValue; hb_xsetfilename( pSet->HB_SET_HBOUTLOG ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_HBOUTLOGINFO: @@ -1823,7 +1823,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) hb_xfree( pSet->HB_SET_HBOUTLOGINFO ); pSet->HB_SET_HBOUTLOGINFO = szValue; hb_xsetinfo( pSet->HB_SET_HBOUTLOGINFO ); - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_OSCODEPAGE: @@ -1835,7 +1835,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) hb_xfree( pSet->HB_SET_OSCODEPAGE ); pSet->HB_SET_OSCODEPAGE = szValue; pSet->hb_set_oscp = ( void * ) cdpOS; - fResult = TRUE; + fResult = HB_TRUE; } break; case HB_SET_DBCODEPAGE: @@ -1846,7 +1846,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) if( pSet->HB_SET_DBCODEPAGE ) hb_xfree( pSet->HB_SET_DBCODEPAGE ); pSet->HB_SET_DBCODEPAGE = szValue; - fResult = TRUE; + fResult = HB_TRUE; } break; @@ -1867,9 +1867,9 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) return fResult; } -BOOL hb_setSetItem2( HB_set_enum set_specifier, PHB_ITEM pItem1, PHB_ITEM pItem2 ) +HB_BOOL hb_setSetItem2( HB_set_enum set_specifier, PHB_ITEM pItem1, PHB_ITEM pItem2 ) { - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pItem1 ) { @@ -1886,8 +1886,8 @@ BOOL hb_setSetItem2( HB_set_enum set_specifier, PHB_ITEM pItem1, PHB_ITEM pItem2 hb_setListenerNotify( set_specifier, HB_SET_LISTENER_BEFORE ); open_handle( pSet, hb_itemGetCPtr( pItem1 ), - set_logical( pItem2, FALSE ), set_specifier ); - fResult = TRUE; + set_logical( pItem2, HB_FALSE ), set_specifier ); + fResult = HB_TRUE; if( set_specifier == HB_SET_PRINTFILE && pSet->HB_SET_PRINTFILE == NULL ) pSet->HB_SET_PRINTFILE = hb_set_PRINTFILE_default(); @@ -1901,7 +1901,7 @@ BOOL hb_setSetItem2( HB_set_enum set_specifier, PHB_ITEM pItem1, PHB_ITEM pItem2 return fResult; } -BOOL hb_setGetL( HB_set_enum set_specifier ) +HB_BOOL hb_setGetL( HB_set_enum set_specifier ) { HB_STACK_TLS_PRELOAD PHB_SET_STRUCT pSet = hb_stackSetStruct(); @@ -2019,7 +2019,7 @@ BOOL hb_setGetL( HB_set_enum set_specifier ) } hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, 0 ); - return FALSE; + return HB_FALSE; } const char * hb_setGetCPtr( HB_set_enum set_specifier ) @@ -2248,7 +2248,7 @@ HB_FHANDLE hb_setGetAltHan( void ) return hb_stackSetStruct()->hb_set_althan; } -BOOL hb_setGetCentury( void ) +HB_BOOL hb_setGetCentury( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->hb_set_century; @@ -2266,7 +2266,7 @@ HB_FHANDLE hb_setGetPrintHan( void ) return hb_stackSetStruct()->hb_set_printhan; } -BOOL hb_setGetAlternate( void ) +HB_BOOL hb_setGetAlternate( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_ALTERNATE; @@ -2278,7 +2278,7 @@ const char * hb_setGetAltFile( void ) return hb_stackSetStruct()->HB_SET_ALTFILE; } -BOOL hb_setGetAutOpen( void ) +HB_BOOL hb_setGetAutOpen( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_AUTOPEN; @@ -2296,13 +2296,13 @@ int hb_setGetAutoShare( void ) return hb_stackSetStruct()->HB_SET_AUTOSHARE; } -BOOL hb_setGetBell( void ) +HB_BOOL hb_setGetBell( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_BELL; } -BOOL hb_setGetCancel( void ) +HB_BOOL hb_setGetCancel( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_CANCEL; @@ -2314,13 +2314,13 @@ char * hb_setGetColor( void ) return hb_stackSetStruct()->HB_SET_COLOR; } -BOOL hb_setGetConfirm( void ) +HB_BOOL hb_setGetConfirm( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_CONFIRM; } -BOOL hb_setGetConsole( void ) +HB_BOOL hb_setGetConsole( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_CONSOLE; @@ -2338,7 +2338,7 @@ const char * hb_setGetTimeFormat( void ) return hb_stackSetStruct()->HB_SET_TIMEFORMAT; } -BOOL hb_setGetDebug( void ) +HB_BOOL hb_setGetDebug( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_DEBUG; @@ -2356,7 +2356,7 @@ const char * hb_setGetDefault( void ) return hb_stackSetStruct()->HB_SET_DEFAULT; } -BOOL hb_setGetDeleted( void ) +HB_BOOL hb_setGetDeleted( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_DELETED; @@ -2368,7 +2368,7 @@ const char * hb_setGetDelimChars( void ) return hb_stackSetStruct()->HB_SET_DELIMCHARS; } -BOOL hb_setGetDelimiters( void ) +HB_BOOL hb_setGetDelimiters( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_DELIMITERS; @@ -2380,7 +2380,7 @@ const char * hb_setGetDevice( void ) return hb_stackSetStruct()->HB_SET_DEVICE; } -BOOL hb_setGetEOF( void ) +HB_BOOL hb_setGetEOF( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_EOF; @@ -2392,7 +2392,7 @@ int hb_setGetEpoch( void ) return hb_stackSetStruct()->HB_SET_EPOCH; } -BOOL hb_setGetEscape( void ) +HB_BOOL hb_setGetEscape( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_ESCAPE; @@ -2404,25 +2404,25 @@ int hb_setGetEventMask( void ) return hb_stackSetStruct()->HB_SET_EVENTMASK; } -BOOL hb_setGetExact( void ) +HB_BOOL hb_setGetExact( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_EXACT; } -BOOL hb_setGetExclusive( void ) +HB_BOOL hb_setGetExclusive( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_EXCLUSIVE; } -BOOL hb_setGetExit( void ) +HB_BOOL hb_setGetExit( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_EXIT; } -BOOL hb_setGetExtra( void ) +HB_BOOL hb_setGetExtra( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_EXTRA; @@ -2434,25 +2434,25 @@ const char * hb_setGetExtraFile( void ) return hb_stackSetStruct()->HB_SET_EXTRAFILE; } -BOOL hb_setGetFixed( void ) +HB_BOOL hb_setGetFixed( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_FIXED; } -BOOL hb_setGetIdleRepeat( void ) +HB_BOOL hb_setGetIdleRepeat( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_IDLEREPEAT; } -BOOL hb_setGetInsert( void ) +HB_BOOL hb_setGetInsert( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_INSERT; } -BOOL hb_setGetIntensity( void ) +HB_BOOL hb_setGetIntensity( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_INTENSITY; @@ -2476,7 +2476,7 @@ int hb_setGetMBlockSize( void ) return hb_stackSetStruct()->HB_SET_MBLOCKSIZE; } -BOOL hb_setGetMCenter( void ) +HB_BOOL hb_setGetMCenter( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_MCENTER; @@ -2494,13 +2494,13 @@ const char * hb_setGetMFileExt( void ) return hb_stackSetStruct()->HB_SET_MFILEEXT; } -BOOL hb_setGetOptimize( void ) +HB_BOOL hb_setGetOptimize( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_OPTIMIZE; } -BOOL hb_setGetPrinter( void ) +HB_BOOL hb_setGetPrinter( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_PRINTER; @@ -2512,25 +2512,25 @@ const char * hb_setGetPrintFile( void ) return hb_stackSetStruct()->HB_SET_PRINTFILE; } -BOOL hb_setGetScoreBoard( void ) +HB_BOOL hb_setGetScoreBoard( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_SCOREBOARD; } -BOOL hb_setGetScrollBreak( void ) +HB_BOOL hb_setGetScrollBreak( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_SCROLLBREAK; } -BOOL hb_setGetSoftSeek( void ) +HB_BOOL hb_setGetSoftSeek( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_SOFTSEEK; } -BOOL hb_setGetStrictRead( void ) +HB_BOOL hb_setGetStrictRead( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_STRICTREAD; @@ -2542,7 +2542,7 @@ int hb_setGetTypeAhead( void ) return hb_stackSetStruct()->HB_SET_TYPEAHEAD; } -BOOL hb_setGetUnique( void ) +HB_BOOL hb_setGetUnique( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_UNIQUE; @@ -2572,7 +2572,7 @@ int hb_setGetVideoMode( void ) return hb_stackSetStruct()->HB_SET_VIDEOMODE; } -BOOL hb_setGetWrap( void ) +HB_BOOL hb_setGetWrap( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_WRAP; @@ -2584,19 +2584,19 @@ int hb_setGetDBFLockScheme( void ) return hb_stackSetStruct()->HB_SET_DBFLOCKSCHEME; } -BOOL hb_setGetHardCommit( void ) +HB_BOOL hb_setGetHardCommit( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_HARDCOMMIT; } -BOOL hb_setGetForceOpt( void ) +HB_BOOL hb_setGetForceOpt( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_FORCEOPT; } -BOOL hb_setGetDefExtension( void ) +HB_BOOL hb_setGetDefExtension( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_DEFEXTENSIONS; @@ -2608,7 +2608,7 @@ const char * hb_setGetEOL( void ) return hb_stackSetStruct()->HB_SET_EOL; } -BOOL hb_setGetTrimFileName( void ) +HB_BOOL hb_setGetTrimFileName( void ) { HB_STACK_TLS_PRELOAD return hb_stackSetStruct()->HB_SET_TRIMFILENAME; @@ -2741,7 +2741,7 @@ HB_FHANDLE hb_setGetPrinterHandle( int iType ) } if( pSet->hb_set_printhan == FS_ERROR && pSet->HB_SET_PRINTFILE ) - open_handle( pSet, pSet->HB_SET_PRINTFILE, FALSE, HB_SET_PRINTFILE ); + open_handle( pSet, pSet->HB_SET_PRINTFILE, HB_FALSE, HB_SET_PRINTFILE ); return pSet->hb_set_printhan; } diff --git a/harbour/src/vm/strapi.c b/harbour/src/vm/strapi.c index 64e3cdf680..2719cf84fb 100644 --- a/harbour/src/vm/strapi.c +++ b/harbour/src/vm/strapi.c @@ -258,7 +258,7 @@ const char * hb_itemGetStrUTF8( PHB_ITEM pItem, void ** phString, HB_SIZE * pulL if( HB_IS_STRING( pItem ) ) { PHB_CODEPAGE cdp = hb_vmCDP(); - HB_SIZE ulLen = hb_cdpStrAsUTF8Len( cdp, FALSE, + HB_SIZE ulLen = hb_cdpStrAsUTF8Len( cdp, HB_FALSE, pItem->item.asString.value, pItem->item.asString.length, 0 ); if( pulLen ) @@ -267,7 +267,7 @@ const char * hb_itemGetStrUTF8( PHB_ITEM pItem, void ** phString, HB_SIZE * pulL if( ulLen != pItem->item.asString.length ) { char * pszUtf8 = ( char * ) hb_xgrab( ulLen + 1 ); - hb_cdpStrToUTF8( cdp, FALSE, + hb_cdpStrToUTF8( cdp, HB_FALSE, pItem->item.asString.value, pItem->item.asString.length, pszUtf8, ulLen + 1 ); * phString = ( void * ) pszUtf8; @@ -300,7 +300,7 @@ const HB_WCHAR * hb_itemGetStrU16( PHB_ITEM pItem, int iEndian, { HB_WCHAR * pszU16; PHB_CODEPAGE cdp = hb_vmCDP(); - HB_SIZE ulLen = hb_cdpStrAsU16Len( cdp, FALSE, + HB_SIZE ulLen = hb_cdpStrAsU16Len( cdp, HB_FALSE, pItem->item.asString.value, pItem->item.asString.length, 0 ); if( pulLen ) @@ -313,7 +313,7 @@ const HB_WCHAR * hb_itemGetStrU16( PHB_ITEM pItem, int iEndian, } pszU16 = ( HB_WCHAR * ) hb_xgrab( ( ulLen + 1 ) * sizeof( HB_WCHAR ) ); - hb_cdpStrToU16( cdp, FALSE, iEndian, + hb_cdpStrToU16( cdp, HB_FALSE, iEndian, pItem->item.asString.value, pItem->item.asString.length, pszU16, ulLen + 1 ); @@ -351,12 +351,12 @@ HB_SIZE hb_itemCopyStrUTF8( PHB_ITEM pItem, char * pStrBuffer, HB_SIZE ulSize ) if( HB_IS_STRING( pItem ) ) { if( pStrBuffer ) - ulSize = hb_cdpStrToUTF8( hb_vmCDP(), FALSE, + ulSize = hb_cdpStrToUTF8( hb_vmCDP(), HB_FALSE, pItem->item.asString.value, pItem->item.asString.length, pStrBuffer, ulSize ); else - ulSize = hb_cdpStrAsUTF8Len( hb_vmCDP(), FALSE, + ulSize = hb_cdpStrAsUTF8Len( hb_vmCDP(), HB_FALSE, pItem->item.asString.value, pItem->item.asString.length, ulSize ); return ulSize; @@ -373,12 +373,12 @@ HB_SIZE hb_itemCopyStrU16( PHB_ITEM pItem, int iEndian, HB_WCHAR * pStrBuffer, H if( HB_IS_STRING( pItem ) && ulSize ) { if( pStrBuffer ) - ulSize = hb_cdpStrToU16( hb_vmCDP(), FALSE, iEndian, + ulSize = hb_cdpStrToU16( hb_vmCDP(), HB_FALSE, iEndian, pItem->item.asString.value, pItem->item.asString.length, pStrBuffer, ulSize ); else - ulSize = hb_cdpStrAsU16Len( hb_vmCDP(), FALSE, + ulSize = hb_cdpStrAsU16Len( hb_vmCDP(), HB_FALSE, pItem->item.asString.value, pItem->item.asString.length, ulSize ); return ulSize; @@ -414,9 +414,9 @@ PHB_ITEM hb_itemPutStrLenUTF8( PHB_ITEM pItem, const char * pStr, HB_SIZE ulLen return hb_itemPutC( pItem, NULL ); cdp = hb_vmCDP(); - ulDest = hb_cdpUTF8AsStrLen( cdp, FALSE, pStr, ulLen, 0 ); + ulDest = hb_cdpUTF8AsStrLen( cdp, HB_FALSE, pStr, ulLen, 0 ); pszDest = ( char * ) hb_xgrab( ulDest + 1 ); - hb_cdpUTF8ToStr( cdp, FALSE, pStr, ulLen, pszDest, ulDest + 1 ); + hb_cdpUTF8ToStr( cdp, HB_FALSE, pStr, ulLen, pszDest, ulDest + 1 ); return hb_itemPutCLPtr( pItem, pszDest, ulDest ); } @@ -433,9 +433,9 @@ PHB_ITEM hb_itemPutStrLenU16( PHB_ITEM pItem, int iEndian, const HB_WCHAR * pStr return hb_itemPutC( pItem, NULL ); cdp = hb_vmCDP(); - ulDest = hb_cdpU16AsStrLen( cdp, FALSE, pStr, ulLen, 0 ); + ulDest = hb_cdpU16AsStrLen( cdp, HB_FALSE, pStr, ulLen, 0 ); pszDest = ( char * ) hb_xgrab( ulDest + 1 ); - hb_cdpU16ToStr( cdp, FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 ); + hb_cdpU16ToStr( cdp, HB_FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 ); return hb_itemPutCLPtr( pItem, pszDest, ulDest ); } @@ -470,9 +470,9 @@ PHB_ITEM hb_itemPutStrUTF8( PHB_ITEM pItem, const char * pStr ) cdp = hb_vmCDP(); ulLen = ( HB_SIZE ) strlen( pStr ); - ulDest = hb_cdpUTF8AsStrLen( cdp, FALSE, pStr, ulLen, 0 ); + ulDest = hb_cdpUTF8AsStrLen( cdp, HB_FALSE, pStr, ulLen, 0 ); pszDest = ( char * ) hb_xgrab( ulDest + 1 ); - hb_cdpUTF8ToStr( cdp, FALSE, pStr, ulLen, pszDest, ulDest + 1 ); + hb_cdpUTF8ToStr( cdp, HB_FALSE, pStr, ulLen, pszDest, ulDest + 1 ); return hb_itemPutCLPtr( pItem, pszDest, ulDest ); } @@ -490,9 +490,9 @@ PHB_ITEM hb_itemPutStrU16( PHB_ITEM pItem, int iEndian, const HB_WCHAR * pStr ) cdp = hb_vmCDP(); ulLen = hb_wstrlen( pStr ); - ulDest = hb_cdpU16AsStrLen( cdp, FALSE, pStr, ulLen, 0 ); + ulDest = hb_cdpU16AsStrLen( cdp, HB_FALSE, pStr, ulLen, 0 ); pszDest = ( char * ) hb_xgrab( ulDest + 1 ); - hb_cdpU16ToStr( cdp, FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 ); + hb_cdpU16ToStr( cdp, HB_FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 ); return hb_itemPutCLPtr( pItem, pszDest, ulDest ); } @@ -546,8 +546,8 @@ const HB_WCHAR * hb_arrayGetStrU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndia } -BOOL hb_arraySetStrLen( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, - const char * pStr, HB_SIZE ulLen ) +HB_BOOL hb_arraySetStrLen( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, + const char * pStr, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetStrLen(%p, %lu, %p, %p, %lu)", pArray, ulIndex, cdp, pStr, ulLen)); @@ -555,14 +555,14 @@ BOOL hb_arraySetStrLen( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, { hb_itemPutStrLen( pArray->item.asArray.value->pItems + ulIndex - 1, cdp, pStr, ulLen ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetStrLenUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, - const char * pStr, HB_SIZE ulLen ) +HB_BOOL hb_arraySetStrLenUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, + const char * pStr, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetStrLenUTF8(%p, %lu, %p, %lu)", pArray, ulIndex, pStr, ulLen)); @@ -570,14 +570,14 @@ BOOL hb_arraySetStrLenUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, { hb_itemPutStrLenUTF8( pArray->item.asArray.value->pItems + ulIndex - 1, pStr, ulLen ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetStrLenU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, - const HB_WCHAR * pStr, HB_SIZE ulLen ) +HB_BOOL hb_arraySetStrLenU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, + const HB_WCHAR * pStr, HB_SIZE ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetStrLenU16(%p, %lu, %d, %p, %lu)", pArray, ulIndex, iEndian, pStr, ulLen)); @@ -585,50 +585,50 @@ BOOL hb_arraySetStrLenU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, { hb_itemPutStrLenU16( pArray->item.asArray.value->pItems + ulIndex - 1, iEndian, pStr, ulLen ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetStr( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, const char * pStr ) +HB_BOOL hb_arraySetStr( PHB_ITEM pArray, HB_SIZE ulIndex, void * cdp, const char * pStr ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetStr(%p, %lu, %p, %p)", pArray, ulIndex, cdp, pStr)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutStr( pArray->item.asArray.value->pItems + ulIndex - 1, cdp, pStr ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetStrUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, const char * pStr) +HB_BOOL hb_arraySetStrUTF8( PHB_ITEM pArray, HB_SIZE ulIndex, const char * pStr) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetStrUTF8(%p, %lu, %p)", pArray, ulIndex, pStr)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutStrUTF8( pArray->item.asArray.value->pItems + ulIndex - 1, pStr ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } -BOOL hb_arraySetStrU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, const HB_WCHAR * pStr ) +HB_BOOL hb_arraySetStrU16( PHB_ITEM pArray, HB_SIZE ulIndex, int iEndian, const HB_WCHAR * pStr ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetStrU16(%p, %lu, %d, %p)", pArray, ulIndex, iEndian, pStr)); if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen ) { hb_itemPutStrU16( pArray->item.asArray.value->pItems + ulIndex - 1, iEndian, pStr ); - return TRUE; + return HB_TRUE; } else - return FALSE; + return HB_FALSE; } diff --git a/harbour/src/vm/task.c b/harbour/src/vm/task.c index 8733bc40e9..32c6db9925 100644 --- a/harbour/src/vm/task.c +++ b/harbour/src/vm/task.c @@ -141,8 +141,8 @@ typedef struct _HB_TASKINFO { int id; HB_TASKSTATE state; - BOOL detached; - BOOL stop; + HB_BOOL detached; + HB_BOOL stop; HB_LONG wakeup; @@ -817,7 +817,7 @@ void hb_taskDestroy( void * pTaskPtr ) if( pTask != s_mainTask ) { - pTask->detached = TRUE; + pTask->detached = HB_TRUE; if( pTask->state == TASK_ZOMBIE || pTask->state == TASK_DONE ) hb_taskFree( pTask ); else @@ -863,7 +863,7 @@ int hb_taskJoin( void * pTaskPtr, unsigned long ulMilliSec, void ** pResult ) /* detach given task - it will be removed automatically */ void hb_taskDetach( void * pTask ) { - ( ( PHB_TASKINFO ) pTask )->detached = TRUE; + ( ( PHB_TASKINFO ) pTask )->detached = HB_TRUE; } /* current task quit */ diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index 52012afd9b..991c945660 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -109,7 +109,7 @@ #endif -static volatile BOOL s_fThreadInit = FALSE; +static volatile HB_BOOL s_fThreadInit = HB_FALSE; static PHB_ITEM s_pOnceMutex = NULL; #if !defined( HB_MT_VM ) @@ -149,7 +149,7 @@ static PHB_ITEM s_pOnceMutex = NULL; if( !critical->fInit ) { HB_CRITICAL_INIT( critical->critical.value ); - critical->fInit = TRUE; + critical->fInit = HB_TRUE; } HB_CRITICAL_UNLOCK( s_init_mtx ); } @@ -177,7 +177,7 @@ static PHB_ITEM s_pOnceMutex = NULL; HB_CRITICAL_INIT( cond->critical.value ); cond->waiters = 0; # endif - cond->fInit = TRUE; + cond->fInit = HB_TRUE; } HB_CRITICAL_UNLOCK( s_init_mtx ); } @@ -207,7 +207,7 @@ void hb_threadInit( void ) hb_taskInit(); # endif #endif - s_fThreadInit = TRUE; + s_fThreadInit = HB_TRUE; } } @@ -328,7 +328,7 @@ static void _hb_thread_wait_add( HB_COND_T * cond, PHB_WAIT_LIST pWaiting ) */ /* WaitForSingleObject( pWaiting->cond, 0 ); */ #endif - pWaiting->signaled = FALSE; + pWaiting->signaled = HB_FALSE; if( cond->waiters == NULL ) { @@ -354,7 +354,7 @@ static void _hb_thread_wait_del( HB_COND_T * cond, PHB_WAIT_LIST pWaiting ) } } -static BOOL _hb_thread_cond_signal( HB_COND_T * cond ) +static HB_BOOL _hb_thread_cond_signal( HB_COND_T * cond ) { if( cond->waiters ) { @@ -368,7 +368,7 @@ static BOOL _hb_thread_cond_signal( HB_COND_T * cond ) #elif defined( HB_OS_WIN ) ReleaseSemaphore( pWaiting->cond, 1, NULL ); #endif - pWaiting->signaled = TRUE; + pWaiting->signaled = HB_TRUE; /* signal only single thread */ break; } @@ -377,10 +377,10 @@ static BOOL _hb_thread_cond_signal( HB_COND_T * cond ) while( pWaiting != cond->waiters ); } - return TRUE; + return HB_TRUE; } -static BOOL _hb_thread_cond_broadcast( HB_COND_T * cond ) +static HB_BOOL _hb_thread_cond_broadcast( HB_COND_T * cond ) { if( cond->waiters ) { @@ -394,20 +394,20 @@ static BOOL _hb_thread_cond_broadcast( HB_COND_T * cond ) #elif defined( HB_OS_WIN ) ReleaseSemaphore( pWaiting->cond, 1, NULL ); #endif - pWaiting->signaled = TRUE; + pWaiting->signaled = HB_TRUE; } pWaiting = pWaiting->next; } while( pWaiting != cond->waiters ); } - return TRUE; + return HB_TRUE; } -static BOOL _hb_thread_cond_wait( HB_COND_T * cond, HB_RAWCRITICAL_T * critical, ULONG ulMillisec ) +static HB_BOOL _hb_thread_cond_wait( HB_COND_T * cond, HB_RAWCRITICAL_T * critical, ULONG ulMillisec ) { PHB_WAIT_LIST pWaiting = _hb_thread_wait_list(); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pWaiting ) { @@ -465,7 +465,7 @@ void hb_atomic_inc( volatile HB_COUNTER * pCounter ) ++( *pCounter ); } -BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ) +HB_BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ) { return --( *pCounter ) == 0; } @@ -486,7 +486,7 @@ void hb_atomic_inc( volatile HB_COUNTER * pCounter ) HB_ATOM_INC( pCounter ); } -BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ) +HB_BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ) { return HB_ATOM_DEC( pCounter ) == 0; } @@ -517,9 +517,9 @@ void hb_atomic_inc( volatile HB_COUNTER * pCounter ) hb_threadLeaveCriticalSection( &s_atomicMtx ); } -BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ) +HB_BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ) { - BOOL fResult; + HB_BOOL fResult; hb_threadEnterCriticalSection( &s_atomicMtx ); fResult = --( *pCounter ) == 0; hb_threadLeaveCriticalSection( &s_atomicMtx ); @@ -551,17 +551,17 @@ void hb_threadLeaveCriticalSection( HB_CRITICAL_T * critical ) #endif } -BOOL hb_threadCondSignal( HB_COND_T * cond ) +HB_BOOL hb_threadCondSignal( HB_COND_T * cond ) { #if !defined( HB_MT_VM ) HB_SYMBOL_UNUSED( cond ); - return FALSE; + return HB_FALSE; #elif defined( HB_TASK_THREAD ) HB_COND_SIGNAL( *cond ); - return TRUE; + return HB_TRUE; #elif defined( HB_PTHREAD_API ) @@ -588,22 +588,22 @@ BOOL hb_threadCondSignal( HB_COND_T * cond ) } HB_CRITICAL_UNLOCK( cond->critical.value ); - return TRUE; + return HB_TRUE; #endif } -BOOL hb_threadCondBroadcast( HB_COND_T * cond ) +HB_BOOL hb_threadCondBroadcast( HB_COND_T * cond ) { #if !defined( HB_MT_VM ) HB_SYMBOL_UNUSED( cond ); - return FALSE; + return HB_FALSE; #elif defined( HB_TASK_THREAD ) HB_COND_SIGNALN( *cond, 0 ); - return TRUE; + return HB_TRUE; #elif defined( HB_PTHREAD_API ) @@ -630,18 +630,18 @@ BOOL hb_threadCondBroadcast( HB_COND_T * cond ) } HB_CRITICAL_UNLOCK( cond->critical.value ); - return TRUE; + return HB_TRUE; #endif } -BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ) +HB_BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ) { #if !defined( HB_MT_VM ) HB_SYMBOL_UNUSED( cond ); HB_SYMBOL_UNUSED( mutex ); - return FALSE; + return HB_FALSE; #elif defined( HB_TASK_THREAD ) @@ -661,7 +661,7 @@ BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ) #else - BOOL fResult; + HB_BOOL fResult; if( !cond->fInit ) hb_threadCondInit( cond ); @@ -679,7 +679,7 @@ BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ) HB_CRITICAL_LOCK( mutex->critical.value ); /* There is race condition here and user code should always check if * the wait condition is valid after leaving hb_threadCondWait() - * even if it returns TRUE + * even if it returns HB_TRUE */ if( !fResult ) { @@ -693,14 +693,14 @@ BOOL hb_threadCondWait( HB_COND_T * cond, HB_CRITICAL_T * mutex ) #endif } -BOOL hb_threadCondTimedWait( HB_COND_T * cond, HB_CRITICAL_T * mutex, ULONG ulMilliSec ) +HB_BOOL hb_threadCondTimedWait( HB_COND_T * cond, HB_CRITICAL_T * mutex, ULONG ulMilliSec ) { #if !defined( HB_MT_VM ) HB_SYMBOL_UNUSED( cond ); HB_SYMBOL_UNUSED( mutex ); HB_SYMBOL_UNUSED( ulMilliSec ); - return FALSE; + return HB_FALSE; #elif defined( HB_TASK_THREAD ) @@ -726,7 +726,7 @@ BOOL hb_threadCondTimedWait( HB_COND_T * cond, HB_CRITICAL_T * mutex, ULONG ulMi #else - BOOL fResult; + HB_BOOL fResult; if( !cond->fInit ) hb_threadCondInit( cond ); @@ -744,7 +744,7 @@ BOOL hb_threadCondTimedWait( HB_COND_T * cond, HB_CRITICAL_T * mutex, ULONG ulMi HB_CRITICAL_LOCK( mutex->critical.value ); /* There is race condition here and user code should always check if * the wait condition is valid after leaving hb_threadCondTimedWait() - * even if it returns TRUE + * even if it returns HB_TRUE */ if( !fResult ) { @@ -794,11 +794,11 @@ HB_THREAD_HANDLE hb_threadCreate( HB_THREAD_ID * th_id, PHB_THREAD_STARTFUNC sta return th_h; } -BOOL hb_threadJoin( HB_THREAD_HANDLE th_h ) +HB_BOOL hb_threadJoin( HB_THREAD_HANDLE th_h ) { #if !defined( HB_MT_VM ) HB_SYMBOL_UNUSED( th_h ); - return FALSE; + return HB_FALSE; #elif defined( HB_TASK_THREAD ) return hb_taskJoin( th_h, HB_TASK_INFINITE_WAIT, NULL ) != 0; #elif defined( HB_PTHREAD_API ) @@ -807,9 +807,9 @@ BOOL hb_threadJoin( HB_THREAD_HANDLE th_h ) if( WaitForSingleObject( th_h, INFINITE ) != WAIT_FAILED ) { CloseHandle( th_h ); - return TRUE; + return HB_TRUE; } - return FALSE; + return HB_FALSE; #elif defined( HB_OS_OS2 ) APIRET rc = DosWaitThread( &th_h, DCWW_WAIT ); /* TOFIX: ERROR_INVALID_THREADID is a hack for failing DosWaitThread() @@ -819,18 +819,18 @@ BOOL hb_threadJoin( HB_THREAD_HANDLE th_h ) return rc == NO_ERROR || rc == ERROR_INVALID_THREADID; #else { int iTODO_MT; } - return FALSE; + return HB_FALSE; #endif } -BOOL hb_threadDetach( HB_THREAD_HANDLE th_h ) +HB_BOOL hb_threadDetach( HB_THREAD_HANDLE th_h ) { #if !defined( HB_MT_VM ) HB_SYMBOL_UNUSED( th_h ); - return FALSE; + return HB_FALSE; #elif defined( HB_TASK_THREAD ) hb_taskDetach( th_h ); - return TRUE; + return HB_TRUE; #elif defined( HB_PTHREAD_API ) return pthread_detach( th_h ) == 0; #elif defined( HB_OS_WIN ) @@ -840,7 +840,7 @@ BOOL hb_threadDetach( HB_THREAD_HANDLE th_h ) return rc == NO_ERROR || rc == ERROR_INVALID_THREADID; #else { int iTODO_MT; } - return FALSE; + return HB_FALSE; #endif } @@ -924,7 +924,7 @@ static HB_THREAD_STARTFUNC( hb_threadStartVM ) PHB_ITEM pThItm = ( PHB_ITEM ) Cargo; ULONG ulPCount, ulParam; PHB_THREADSTATE pThread; - BOOL fSend = FALSE; + HB_BOOL fSend = HB_FALSE; pThread = ( PHB_THREADSTATE ) hb_itemGetPtrGC( pThItm, &s_gcThreadFuncs ); @@ -939,7 +939,7 @@ static HB_THREAD_STARTFUNC( hb_threadStartVM ) { hb_vmPushSymbol( &hb_symEval ); hb_vmPush( pStart ); - fSend = TRUE; + fSend = HB_TRUE; } else if( HB_IS_SYMBOL( pStart ) ) { @@ -1020,7 +1020,7 @@ PHB_THREADSTATE hb_threadStateNew( void ) #if defined( HB_COND_HARBOUR_SUPPORT ) # if defined( HB_OS_OS2 ) - DosCreateEventSem( NULL, &pThread->pWaitList.cond, 0L, FALSE ); + DosCreateEventSem( NULL, &pThread->pWaitList.cond, 0L, HB_FALSE ); # elif defined( HB_OS_WIN ) pThread->pWaitList.cond = CreateSemaphore( NULL, 0, 1, NULL ); # endif @@ -1202,10 +1202,10 @@ HB_FUNC( HB_THREADID ) #if defined( HB_MT_VM ) static int hb_threadWait( PHB_THREADSTATE * pThreads, int iThreads, - BOOL fAll, ULONG ulMilliSec ) + HB_BOOL fAll, ULONG ulMilliSec ) { int i, iFinished, iResult = 0; - BOOL fExit = ulMilliSec == 0; + HB_BOOL fExit = ulMilliSec == 0; #if defined( HB_PTHREAD_API ) struct timespec ts; @@ -1275,7 +1275,7 @@ static int hb_threadWait( PHB_THREADSTATE * pThreads, int iThreads, { HB_ULONG curr = hb_dateMilliSeconds(); if( timer <= curr ) - fExit = TRUE; + fExit = HB_TRUE; else ulMilliSec = ( ULONG ) ( timer - curr ); } @@ -1297,7 +1297,7 @@ HB_FUNC( HB_THREADJOIN ) if( pThread ) { HB_STACK_TLS_PRELOAD - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pThread->th_h ) { @@ -1327,12 +1327,12 @@ HB_FUNC( HB_THREADDETACH ) if( pThread ) { HB_STACK_TLS_PRELOAD - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pThread->th_h && hb_threadDetach( pThread->th_h ) ) { pThread->th_h = 0; - fResult = TRUE; + fResult = HB_TRUE; } hb_retl( fResult ); } @@ -1345,13 +1345,13 @@ HB_FUNC( HB_THREADQUITREQUEST ) if( pThread ) { HB_STACK_TLS_PRELOAD - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; #if defined( HB_MT_VM ) if( !pThread->fActive ) { hb_vmThreadQuitRequest( ( void * ) pThread ); - fResult = TRUE; + fResult = HB_TRUE; } #endif hb_retl( fResult ); @@ -1363,7 +1363,7 @@ HB_FUNC( HB_THREADWAIT ) #if defined( HB_MT_VM ) # define HB_THREAD_WAIT_ALLOC 16 HB_STACK_TLS_PRELOAD - BOOL fAll; + HB_BOOL fAll; ULONG ulMilliSec = HB_THREAD_INFINITE_WAIT; PHB_THREADSTATE * pThreads, pAlloc[ HB_THREAD_WAIT_ALLOC ]; int iThreads = -1; @@ -1443,7 +1443,7 @@ HB_FUNC( HB_THREADTERMINATEALL ) * by cross call to hb_threadOnce() from different threads is not possible. * If thread calls hb_threadOnce() with the same variable * recursively from then hb_threadOnce() returns immediately - * returning FALSE without executing . + * returning HB_FALSE without executing . * This function returns logical value indicating if it was 1-st call to * hb_threadOnce() for given variable */ @@ -1453,7 +1453,7 @@ HB_FUNC( HB_THREADONCE ) if( pItem && HB_ISBYREF( 1 ) && ( HB_IS_NIL( pItem ) || HB_IS_LOGICAL( pItem ) ) ) { HB_STACK_TLS_PRELOAD - BOOL fFirstCall = FALSE; + HB_BOOL fFirstCall = HB_FALSE; if( HB_IS_NIL( pItem ) || !hb_itemGetL( pItem ) ) { PHB_ITEM pAction = hb_param( 2, HB_IT_BLOCK | HB_IT_SYMBOL ); @@ -1474,17 +1474,17 @@ HB_FUNC( HB_THREADONCE ) { if( pAction ) { - hb_storl( FALSE, 1 ); + hb_storl( HB_FALSE, 1 ); hb_vmEvalBlock( pAction ); } - hb_storl( TRUE, 1 ); - fFirstCall = TRUE; + hb_storl( HB_TRUE, 1 ); + fFirstCall = HB_TRUE; } hb_threadMutexUnlock( s_pOnceMutex ); } #else - hb_storl( TRUE, 1 ); - fFirstCall = TRUE; + hb_storl( HB_TRUE, 1 ); + fFirstCall = HB_TRUE; if( pAction ) hb_vmEvalBlock( pAction ); #endif @@ -1506,7 +1506,7 @@ HB_FUNC( HB_THREADONCEINIT ) if( pItem && pValue && HB_ISBYREF( 1 ) && !HB_ISBYREF( 2 ) ) { HB_STACK_TLS_PRELOAD - BOOL fInitialized = FALSE; + HB_BOOL fInitialized = HB_FALSE; if( HB_IS_NIL( pItem ) && !HB_IS_NIL( pValue ) ) { @@ -1520,12 +1520,12 @@ HB_FUNC( HB_THREADONCEINIT ) * in unprotected readonly access to pItem variable. */ hb_itemSafeMove( pItem, pValue ); - fInitialized = TRUE; + fInitialized = HB_TRUE; } HB_CRITICAL_UNLOCK( s_once_mtx ); #else hb_itemSafeMove( pItem, pValue ); - fInitialized = TRUE; + fInitialized = HB_TRUE; #endif } hb_retl( fInitialized ); @@ -1737,11 +1737,11 @@ void hb_threadMutexSyncSignal( PHB_ITEM pItemMtx ) } } -BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, - PHB_ITEM pItemSync ) +HB_BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, + PHB_ITEM pItemSync ) { PHB_MUTEX pMutex = hb_mutexPtr( pItemMtx ), pSyncMutex = NULL; - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pMutex ) { @@ -1832,7 +1832,7 @@ BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, if( pMutex->events && hb_arrayLen( pMutex->events ) > 0 ) { hb_arraySize( pMutex->events, hb_arrayLen( pMutex->events ) - 1 ); - fResult = TRUE; + fResult = HB_TRUE; } HB_CRITICAL_UNLOCK( pMutex->mutex ); @@ -1872,10 +1872,10 @@ BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, } #endif /* HB_MT_VM */ -BOOL hb_threadMutexUnlock( PHB_ITEM pItem ) +HB_BOOL hb_threadMutexUnlock( PHB_ITEM pItem ) { PHB_MUTEX pMutex = hb_mutexPtr( pItem ); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pMutex ) { @@ -1884,7 +1884,7 @@ BOOL hb_threadMutexUnlock( PHB_ITEM pItem ) { if( --pMutex->lock_count == 0 ) pMutex->owner = ( HB_THREAD_ID ) 0; - fResult = TRUE; + fResult = HB_TRUE; } #else HB_CRITICAL_LOCK( pMutex->mutex ); @@ -1896,7 +1896,7 @@ BOOL hb_threadMutexUnlock( PHB_ITEM pItem ) if( pMutex->lockers ) HB_COND_SIGNAL( pMutex->cond_l ); } - fResult = TRUE; + fResult = HB_TRUE; } HB_CRITICAL_UNLOCK( pMutex->mutex ); #endif @@ -1904,22 +1904,22 @@ BOOL hb_threadMutexUnlock( PHB_ITEM pItem ) return fResult; } -BOOL hb_threadMutexLock( PHB_ITEM pItem ) +HB_BOOL hb_threadMutexLock( PHB_ITEM pItem ) { PHB_MUTEX pMutex = hb_mutexPtr( pItem ); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pMutex ) { #if !defined( HB_MT_VM ) pMutex->lock_count++; pMutex->owner = ( HB_THREAD_ID ) 1; - fResult = TRUE; + fResult = HB_TRUE; #else if( HB_THREAD_EQUAL( pMutex->owner, HB_THREAD_SELF() ) ) { pMutex->lock_count++; - fResult = TRUE; + fResult = HB_TRUE; } else { @@ -1945,7 +1945,7 @@ BOOL hb_threadMutexLock( PHB_ITEM pItem ) pMutex->lock_count = 1; pMutex->owner = HB_THREAD_SELF(); HB_CRITICAL_UNLOCK( pMutex->mutex ); - fResult = TRUE; + fResult = HB_TRUE; hb_vmLock(); } @@ -1954,10 +1954,10 @@ BOOL hb_threadMutexLock( PHB_ITEM pItem ) return fResult; } -BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ) +HB_BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ) { PHB_MUTEX pMutex = hb_mutexPtr( pItem ); - BOOL fResult = FALSE; + HB_BOOL fResult = HB_FALSE; if( pMutex ) { @@ -1965,12 +1965,12 @@ BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ) HB_SYMBOL_UNUSED( ulMilliSec ); pMutex->lock_count++; pMutex->owner = ( HB_THREAD_ID ) 1; - fResult = TRUE; + fResult = HB_TRUE; #else if( HB_THREAD_EQUAL( pMutex->owner, HB_THREAD_SELF() ) ) { pMutex->lock_count++; - fResult = TRUE; + fResult = HB_TRUE; } else { @@ -2022,7 +2022,7 @@ BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ) { pMutex->lock_count = 1; pMutex->owner = HB_THREAD_SELF(); - fResult = TRUE; + fResult = HB_TRUE; } HB_CRITICAL_UNLOCK( pMutex->mutex ); @@ -2033,7 +2033,7 @@ BOOL hb_threadMutexTimedLock( PHB_ITEM pItem, ULONG ulMilliSec ) return fResult; } -void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, BOOL fWaiting ) +void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, HB_BOOL fWaiting ) { PHB_MUTEX pMutex = hb_mutexPtr( pItem ); @@ -2139,7 +2139,7 @@ void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, BOOL fWaiting ) } } -PHB_ITEM hb_threadMutexSubscribe( PHB_ITEM pItem, BOOL fClear ) +PHB_ITEM hb_threadMutexSubscribe( PHB_ITEM pItem, HB_BOOL fClear ) { PHB_MUTEX pMutex = hb_mutexPtr( pItem ); PHB_ITEM pResult = NULL; @@ -2238,7 +2238,7 @@ PHB_ITEM hb_threadMutexSubscribe( PHB_ITEM pItem, BOOL fClear ) return pResult; } -PHB_ITEM hb_threadMutexTimedSubscribe( PHB_ITEM pItem, ULONG ulMilliSec, BOOL fClear ) +PHB_ITEM hb_threadMutexTimedSubscribe( PHB_ITEM pItem, ULONG ulMilliSec, HB_BOOL fClear ) { PHB_MUTEX pMutex = hb_mutexPtr( pItem ); PHB_ITEM pResult = NULL; @@ -2397,7 +2397,7 @@ HB_FUNC( HB_MUTEXNOTIFY ) PHB_ITEM pItem = hb_mutexParam( 1 ); if( pItem ) - hb_threadMutexNotify( pItem, hb_param( 2, HB_IT_ANY ), FALSE ); + hb_threadMutexNotify( pItem, hb_param( 2, HB_IT_ANY ), HB_FALSE ); } HB_FUNC( HB_MUTEXNOTIFYALL ) @@ -2405,7 +2405,7 @@ HB_FUNC( HB_MUTEXNOTIFYALL ) PHB_ITEM pItem = hb_mutexParam( 1 ); if( pItem ) - hb_threadMutexNotify( pItem, hb_param( 2, HB_IT_ANY ), TRUE ); + hb_threadMutexNotify( pItem, hb_param( 2, HB_IT_ANY ), HB_TRUE ); } HB_FUNC( HB_MUTEXSUBSCRIBE ) @@ -2423,19 +2423,19 @@ HB_FUNC( HB_MUTEXSUBSCRIBE ) double dTimeOut = hb_parnd( 2 ); if( dTimeOut > 0 ) ulMilliSec = ( ULONG ) ( dTimeOut * 1000 ); - pResult = hb_threadMutexTimedSubscribe( pItem, ulMilliSec, FALSE ); + pResult = hb_threadMutexTimedSubscribe( pItem, ulMilliSec, HB_FALSE ); } else - pResult = hb_threadMutexSubscribe( pItem, FALSE ); + pResult = hb_threadMutexSubscribe( pItem, HB_FALSE ); if( pResult ) { hb_itemParamStoreForward( 3, pResult ); hb_itemRelease( pResult ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } @@ -2454,19 +2454,19 @@ HB_FUNC( HB_MUTEXSUBSCRIBENOW ) double dTimeOut = hb_parnd( 2 ); if( dTimeOut > 0 ) ulMilliSec = ( ULONG ) ( dTimeOut * 1000 ); - pResult = hb_threadMutexTimedSubscribe( pItem, ulMilliSec, TRUE ); + pResult = hb_threadMutexTimedSubscribe( pItem, ulMilliSec, HB_TRUE ); } else - pResult = hb_threadMutexSubscribe( pItem, TRUE ); + pResult = hb_threadMutexSubscribe( pItem, HB_TRUE ); if( pResult ) { hb_itemParamStoreForward( 3, pResult ); hb_itemRelease( pResult ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } @@ -2483,23 +2483,23 @@ HB_FUNC( HB_MUTEXQUEUEINFO ) { hb_storni( pMutex->waiters, 2 ); hb_stornl( pMutex->events ? hb_arrayLen( pMutex->events ) : 0, 3 ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); return; } } hb_storni( 0, 2 ); hb_stornl( 0, 3 ); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } HB_FUNC( HB_MTVM ) { HB_STACK_TLS_PRELOAD #if defined( HB_MT_VM ) - hb_retl( TRUE ); + hb_retl( HB_TRUE ); #else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); #endif }