From e4ddd5f914df780cedb05f30954d4489d6e52f43 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 13 Jun 2009 22:44:34 +0000 Subject: [PATCH] 2009-06-13 23:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbxbp/hbxbp.hbc + Added gtgui as default GT on win/wce systems. * include/extend.api * include/hbsetup.ch * include/hbapi.h + Added new HB_LEGACY_LEVEL3 macro to wrap legacy constructs to be deprecated in the next major release. Currently legacy IS*() parameter type checking macros are marked as such, ones present in CA-Cl*pper retained in extend.api even when this macro off. ; NOTE: It's recommended for 3rd party developers to start using new HB_IS*() macros. They work the same as Clipper compatible IS*() macros, but got a HB_ prefix: ISNUM( 1 ) -> HB_ISNUM( 1 ) (not to be confused with HB_IS_*() macros which accept a PHB_ITEM) Here's a little batch which helps this process: --- gsar -o -s:x20ISNUM( -r:x20HB_ISNUM( *.c *.cpp gsar -o -s:x20ISCHAR( -r:x20HB_ISCHAR( *.c *.cpp gsar -o -s:x20ISLOG( -r:x20HB_ISLOG( *.c *.cpp gsar -o -s:x20ISARRAY( -r:x20HB_ISARRAY( *.c *.cpp gsar -o -s:x20ISBYREF( -r:x20HB_ISBYREF( *.c *.cpp gsar -o -s:x20ISDATE( -r:x20HB_ISDATE( *.c *.cpp gsar -o -s:x20ISDATETIME( -r:x20HB_ISDATETIME( *.c *.cpp gsar -o -s:x20ISNIL( -r:x20HB_ISNIL( *.c *.cpp gsar -o -s:x20ISTIMESTAMP( -r:x20HB_ISTIMESTAMP( *.c *.cpp gsar -o -s:x20ISBLOCK( -r:x20HB_ISBLOCK( *.c *.cpp gsar -o -s:x20ISPOINTER( -r:x20HB_ISPOINTER( *.c *.cpp gsar -o -s:x20ISSYMBOL( -r:x20HB_ISSYMBOL( *.c *.cpp gsar -o -s:x20ISOBJECT( -r:x20HB_ISOBJECT( *.c *.cpp gsar -o -s:x20ISHASH( -r:x20HB_ISHASH( *.c *.cpp gsar -o -s!ISNUM( -r!HB_ISNUM( *.c *.cpp gsar -o -s!ISCHAR( -r!HB_ISCHAR( *.c *.cpp gsar -o -s!ISLOG( -r!HB_ISLOG( *.c *.cpp gsar -o -s!ISARRAY( -r!HB_ISARRAY( *.c *.cpp gsar -o -s!ISBYREF( -r!HB_ISBYREF( *.c *.cpp gsar -o -s!ISDATE( -r!HB_ISDATE( *.c *.cpp gsar -o -s!ISDATETIME( -r!HB_ISDATETIME( *.c *.cpp gsar -o -s!ISNIL( -r!HB_ISNIL( *.c *.cpp gsar -o -s!ISTIMESTAMP( -r!HB_ISTIMESTAMP( *.c *.cpp gsar -o -s!ISBLOCK( -r!HB_ISBLOCK( *.c *.cpp gsar -o -s!ISPOINTER( -r!HB_ISPOINTER( *.c *.cpp gsar -o -s!ISSYMBOL( -r!HB_ISSYMBOL( *.c *.cpp gsar -o -s!ISOBJECT( -r!HB_ISOBJECT( *.c *.cpp gsar -o -s!ISHASH( -r!HB_ISHASH( *.c *.cpp --- * source/rtl/hbinet.c * Formatting. % Minor optimizations. * source/debug/dbgentry.c * source/rdd/dbcmd.c * source/rdd/dbcmd53.c * source/rdd/dbcmdx.c * source/rdd/dbdetach.c * source/rdd/dbsql.c * source/rdd/hbsix/sxfname.c * source/rdd/hbsix/sxord.c * source/rdd/hbsix/sxtable.c * source/rdd/usrrdd/usrrdd.c * source/rtl/at.c * source/rtl/box.c * source/rtl/cdpapi.c * source/rtl/chrasc.c * source/rtl/colorind.c * source/rtl/console.c * source/rtl/copyfile.c * source/rtl/dateshb.c * source/rtl/dirdrive.c * source/rtl/diskspac.c * source/rtl/disksphb.c * source/rtl/errapi.c * source/rtl/filesys.c * source/rtl/fscopy.c * source/rtl/fssize.c * source/rtl/fstemp.c * source/rtl/gete.c * source/rtl/gtfunc.c * source/rtl/gx.c * source/rtl/hbbit.c * source/rtl/hbgtcore.c * source/rtl/hbhex.c * source/rtl/hbi18n1.c * source/rtl/hbinet.c * source/rtl/hbprocfn.c * source/rtl/hbrandom.c * source/rtl/hbregex.c * source/rtl/hbstrsh.c * source/rtl/hbtoken.c * source/rtl/hbzlib.c * source/rtl/hbzlibgz.c * source/rtl/inkey.c * source/rtl/itemseri.c * source/rtl/left.c * source/rtl/math.c * source/rtl/maxrow.c * source/rtl/mlcfunc.c * source/rtl/mouse53.c * source/rtl/mousex.c * source/rtl/mtran.c * source/rtl/natmsg.c * source/rtl/padc.c * source/rtl/padl.c * source/rtl/padr.c * source/rtl/philes.c * source/rtl/philes53.c * source/rtl/rat.c * source/rtl/replic.c * source/rtl/right.c * source/rtl/round.c * source/rtl/run.c * source/rtl/saverest.c * source/rtl/scroll.c * source/rtl/setcolor.c * source/rtl/setcurs.c * source/rtl/setpos.c * source/rtl/shadow.c * source/rtl/strc.c * source/rtl/strmatch.c * source/rtl/strpeek.c * source/rtl/strtoexp.c * source/rtl/strtran.c * source/rtl/stuff.c * source/rtl/substr.c * source/rtl/tone.c * source/rtl/trace.c * source/rtl/transfrm.c * source/rtl/valtype.c * source/rtl/word.c * source/vm/arrayshb.c * source/vm/asort.c * source/vm/classes.c * source/vm/cmdarg.c * source/vm/eval.c * source/vm/hashfunc.c * source/vm/hvm.c * source/vm/memvars.c * source/vm/proc.c * source/vm/thread.c * IS*() -> HB_IS*() macro rename. (pass 1 - sf.net SVN works badly today, so I've split the commit to raise the chances of a successfully finished one) --- harbour/ChangeLog | 171 +++++++++++- harbour/contrib/hbxbp/hbxbp.hbc | 2 + harbour/include/extend.api | 10 + harbour/include/hbapi.h | 33 +-- harbour/include/hbsetup.ch | 3 + harbour/source/debug/dbgentry.c | 2 +- harbour/source/rdd/dbcmd.c | 60 ++--- harbour/source/rdd/dbcmd53.c | 4 +- harbour/source/rdd/dbcmdx.c | 2 +- harbour/source/rdd/dbdetach.c | 8 +- harbour/source/rdd/dbsql.c | 10 +- harbour/source/rdd/hbsix/sxfname.c | 4 +- harbour/source/rdd/hbsix/sxord.c | 18 +- harbour/source/rdd/hbsix/sxtable.c | 16 +- harbour/source/rdd/usrrdd/usrrdd.c | 34 +-- harbour/source/rtl/at.c | 4 +- harbour/source/rtl/box.c | 4 +- harbour/source/rtl/cdpapi.c | 22 +- harbour/source/rtl/chrasc.c | 2 +- harbour/source/rtl/colorind.c | 2 +- harbour/source/rtl/console.c | 18 +- harbour/source/rtl/copyfile.c | 2 +- harbour/source/rtl/dateshb.c | 12 +- harbour/source/rtl/dirdrive.c | 6 +- harbour/source/rtl/diskspac.c | 4 +- harbour/source/rtl/disksphb.c | 4 +- harbour/source/rtl/errapi.c | 8 +- harbour/source/rtl/filesys.c | 2 +- harbour/source/rtl/fscopy.c | 2 +- harbour/source/rtl/fssize.c | 4 +- harbour/source/rtl/fstemp.c | 4 +- harbour/source/rtl/gete.c | 4 +- harbour/source/rtl/gtfunc.c | 16 +- harbour/source/rtl/gx.c | 6 +- harbour/source/rtl/hbbit.c | 2 +- harbour/source/rtl/hbgtcore.c | 12 +- harbour/source/rtl/hbhex.c | 6 +- harbour/source/rtl/hbi18n1.c | 8 +- harbour/source/rtl/hbinet.c | 403 +++++++++++++---------------- harbour/source/rtl/hbprocfn.c | 14 +- harbour/source/rtl/hbrandom.c | 10 +- harbour/source/rtl/hbregex.c | 8 +- harbour/source/rtl/hbstrsh.c | 2 +- harbour/source/rtl/hbtoken.c | 4 +- harbour/source/rtl/hbzlib.c | 14 +- harbour/source/rtl/hbzlibgz.c | 20 +- harbour/source/rtl/inkey.c | 24 +- harbour/source/rtl/itemseri.c | 2 +- harbour/source/rtl/left.c | 2 +- harbour/source/rtl/math.c | 8 +- harbour/source/rtl/maxrow.c | 4 +- harbour/source/rtl/mlcfunc.c | 10 +- harbour/source/rtl/mouse53.c | 16 +- harbour/source/rtl/mousex.c | 6 +- harbour/source/rtl/mtran.c | 4 +- harbour/source/rtl/natmsg.c | 2 +- harbour/source/rtl/padc.c | 2 +- harbour/source/rtl/padl.c | 2 +- harbour/source/rtl/padr.c | 2 +- harbour/source/rtl/philes.c | 48 ++-- harbour/source/rtl/philes53.c | 2 +- harbour/source/rtl/rat.c | 4 +- harbour/source/rtl/replic.c | 2 +- harbour/source/rtl/right.c | 2 +- harbour/source/rtl/round.c | 2 +- harbour/source/rtl/run.c | 2 +- harbour/source/rtl/saverest.c | 6 +- harbour/source/rtl/scroll.c | 16 +- harbour/source/rtl/setcolor.c | 8 +- harbour/source/rtl/setcurs.c | 2 +- harbour/source/rtl/setpos.c | 2 +- harbour/source/rtl/shadow.c | 2 +- harbour/source/rtl/strc.c | 4 +- harbour/source/rtl/strmatch.c | 4 +- harbour/source/rtl/strpeek.c | 4 +- harbour/source/rtl/strtoexp.c | 2 +- harbour/source/rtl/strtran.c | 4 +- harbour/source/rtl/stuff.c | 2 +- harbour/source/rtl/substr.c | 4 +- harbour/source/rtl/tone.c | 4 +- harbour/source/rtl/trace.c | 4 +- harbour/source/rtl/transfrm.c | 2 +- harbour/source/rtl/valtype.c | 24 +- harbour/source/rtl/word.c | 2 +- harbour/source/vm/arrayshb.c | 38 +-- harbour/source/vm/asort.c | 4 +- harbour/source/vm/classes.c | 10 +- harbour/source/vm/cmdarg.c | 4 +- harbour/source/vm/eval.c | 2 +- harbour/source/vm/hashfunc.c | 6 +- harbour/source/vm/hvm.c | 6 +- harbour/source/vm/memvars.c | 14 +- harbour/source/vm/proc.c | 4 +- harbour/source/vm/thread.c | 14 +- 94 files changed, 734 insertions(+), 616 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index afe6438dfb..a708ff4b23 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,15 +17,164 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-13 23:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbxbp/hbxbp.hbc + + Added gtgui as default GT on win/wce systems. + + * include/extend.api + * include/hbsetup.ch + * include/hbapi.h + + Added new HB_LEGACY_LEVEL3 macro to wrap legacy + constructs to be deprecated in the next major release. + Currently legacy IS*() parameter type checking macros + are marked as such, ones present in CA-Cl*pper retained + in extend.api even when this macro off. + + ; NOTE: It's recommended for 3rd party developers to + start using new HB_IS*() macros. They work + the same as Clipper compatible IS*() macros, + but got a HB_ prefix: ISNUM( 1 ) -> HB_ISNUM( 1 ) + (not to be confused with HB_IS_*() macros which + accept a PHB_ITEM) + Here's a little batch which helps this process: + --- + gsar -o -s:x20ISNUM( -r:x20HB_ISNUM( *.c *.cpp + gsar -o -s:x20ISCHAR( -r:x20HB_ISCHAR( *.c *.cpp + gsar -o -s:x20ISLOG( -r:x20HB_ISLOG( *.c *.cpp + gsar -o -s:x20ISARRAY( -r:x20HB_ISARRAY( *.c *.cpp + gsar -o -s:x20ISBYREF( -r:x20HB_ISBYREF( *.c *.cpp + gsar -o -s:x20ISDATE( -r:x20HB_ISDATE( *.c *.cpp + gsar -o -s:x20ISDATETIME( -r:x20HB_ISDATETIME( *.c *.cpp + gsar -o -s:x20ISNIL( -r:x20HB_ISNIL( *.c *.cpp + gsar -o -s:x20ISTIMESTAMP( -r:x20HB_ISTIMESTAMP( *.c *.cpp + gsar -o -s:x20ISBLOCK( -r:x20HB_ISBLOCK( *.c *.cpp + gsar -o -s:x20ISPOINTER( -r:x20HB_ISPOINTER( *.c *.cpp + gsar -o -s:x20ISSYMBOL( -r:x20HB_ISSYMBOL( *.c *.cpp + gsar -o -s:x20ISOBJECT( -r:x20HB_ISOBJECT( *.c *.cpp + gsar -o -s:x20ISHASH( -r:x20HB_ISHASH( *.c *.cpp + gsar -o -s!ISNUM( -r!HB_ISNUM( *.c *.cpp + gsar -o -s!ISCHAR( -r!HB_ISCHAR( *.c *.cpp + gsar -o -s!ISLOG( -r!HB_ISLOG( *.c *.cpp + gsar -o -s!ISARRAY( -r!HB_ISARRAY( *.c *.cpp + gsar -o -s!ISBYREF( -r!HB_ISBYREF( *.c *.cpp + gsar -o -s!ISDATE( -r!HB_ISDATE( *.c *.cpp + gsar -o -s!ISDATETIME( -r!HB_ISDATETIME( *.c *.cpp + gsar -o -s!ISNIL( -r!HB_ISNIL( *.c *.cpp + gsar -o -s!ISTIMESTAMP( -r!HB_ISTIMESTAMP( *.c *.cpp + gsar -o -s!ISBLOCK( -r!HB_ISBLOCK( *.c *.cpp + gsar -o -s!ISPOINTER( -r!HB_ISPOINTER( *.c *.cpp + gsar -o -s!ISSYMBOL( -r!HB_ISSYMBOL( *.c *.cpp + gsar -o -s!ISOBJECT( -r!HB_ISOBJECT( *.c *.cpp + gsar -o -s!ISHASH( -r!HB_ISHASH( *.c *.cpp + --- + + * source/rtl/hbinet.c + * Formatting. + % Minor optimizations. + + * source/debug/dbgentry.c + * source/rdd/dbcmd.c + * source/rdd/dbcmd53.c + * source/rdd/dbcmdx.c + * source/rdd/dbdetach.c + * source/rdd/dbsql.c + * source/rdd/hbsix/sxfname.c + * source/rdd/hbsix/sxord.c + * source/rdd/hbsix/sxtable.c + * source/rdd/usrrdd/usrrdd.c + * source/rtl/at.c + * source/rtl/box.c + * source/rtl/cdpapi.c + * source/rtl/chrasc.c + * source/rtl/colorind.c + * source/rtl/console.c + * source/rtl/copyfile.c + * source/rtl/dateshb.c + * source/rtl/dirdrive.c + * source/rtl/diskspac.c + * source/rtl/disksphb.c + * source/rtl/errapi.c + * source/rtl/filesys.c + * source/rtl/fscopy.c + * source/rtl/fssize.c + * source/rtl/fstemp.c + * source/rtl/gete.c + * source/rtl/gtfunc.c + * source/rtl/gx.c + * source/rtl/hbbit.c + * source/rtl/hbgtcore.c + * source/rtl/hbhex.c + * source/rtl/hbi18n1.c + * source/rtl/hbinet.c + * source/rtl/hbprocfn.c + * source/rtl/hbrandom.c + * source/rtl/hbregex.c + * source/rtl/hbstrsh.c + * source/rtl/hbtoken.c + * source/rtl/hbzlib.c + * source/rtl/hbzlibgz.c + * source/rtl/inkey.c + * source/rtl/itemseri.c + * source/rtl/left.c + * source/rtl/math.c + * source/rtl/maxrow.c + * source/rtl/mlcfunc.c + * source/rtl/mouse53.c + * source/rtl/mousex.c + * source/rtl/mtran.c + * source/rtl/natmsg.c + * source/rtl/padc.c + * source/rtl/padl.c + * source/rtl/padr.c + * source/rtl/philes.c + * source/rtl/philes53.c + * source/rtl/rat.c + * source/rtl/replic.c + * source/rtl/right.c + * source/rtl/round.c + * source/rtl/run.c + * source/rtl/saverest.c + * source/rtl/scroll.c + * source/rtl/setcolor.c + * source/rtl/setcurs.c + * source/rtl/setpos.c + * source/rtl/shadow.c + * source/rtl/strc.c + * source/rtl/strmatch.c + * source/rtl/strpeek.c + * source/rtl/strtoexp.c + * source/rtl/strtran.c + * source/rtl/stuff.c + * source/rtl/substr.c + * source/rtl/tone.c + * source/rtl/trace.c + * source/rtl/transfrm.c + * source/rtl/valtype.c + * source/rtl/word.c + * source/vm/arrayshb.c + * source/vm/asort.c + * source/vm/classes.c + * source/vm/cmdarg.c + * source/vm/eval.c + * source/vm/hashfunc.c + * source/vm/hvm.c + * source/vm/memvars.c + * source/vm/proc.c + * source/vm/thread.c + * IS*() -> HB_IS*() macro rename. + (pass 1 - sf.net SVN works badly today, so I've split + the commit to raise the chances of a successfully + finished one) + 2009-06-13 15:28 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbxbp/tests/demoxbp.prg - ! Added AppSys() call as it is required for Xbase++ to flag + ! Added AppSys() call as it is required for Xbase++ to flag that application is GUI one. 2009-06-13 15:26 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbxbp/xbp_temp.prg + Added missing functions. - + 2009-06-13 14:28 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbxbp/xbp.ch * harbour/contrib/hbxbp/xbpdialog.prg @@ -36,21 +185,21 @@ * harbour/contrib/hbxbp/tests/demoxbp.prg + Implemented XbpMenuBar() | XbpMenu() classes. + Implemented :setColorFG() | :setColorBG() for all widgets. - - /* - Almost all the features of XbpMenuBar() and XbpMenu() + + /* + Almost all the features of XbpMenuBar() and XbpMenu() classes are implemented with the exception of following: TODO: XbpMenu*() : beginMenu - callback : endMenu - callback - : selectItem() - method + : selectItem() - method : setItem() - method : insItem()[P] - method - Prompts-OK Submenu-NotOK : XBPMENUBAR_MIA_FRAMED - 4th parameter of - NOTE: I could not find how or with which method Xbase++ is - setting a menu item both with 'text' and 'bitmap'. It is + NOTE: I could not find how or with which method Xbase++ is + setting a menu item both with 'text' and 'bitmap'. It is done via separate calls. So I have extended the slot of property ( whereever applicable ) as: +"|"+cCaption which is parsed and then both objects @@ -60,14 +209,14 @@ in the menu's or not but in Harbour you can set them for indivisual menu basis. - REQUEST: Please test the code both with Xbase++ and Harbour and + REQUEST: Please test the code both with Xbase++ and Harbour and report on the list any differeces. I want to set these right from the very begining. NEXT: Working on XbpToolbar() class. - */ - + */ + 2009-06-13 14:19 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbqt/generator/hbqtgen.prg * harbour/contrib/hbqt/generator/qt45.qtp diff --git a/harbour/contrib/hbxbp/hbxbp.hbc b/harbour/contrib/hbxbp/hbxbp.hbc index 581ad49f12..7ed68dea1e 100644 --- a/harbour/contrib/hbxbp/hbxbp.hbc +++ b/harbour/contrib/hbxbp/hbxbp.hbc @@ -4,3 +4,5 @@ libs=hbxbp hbcs=../hbqt/hbqt.hbc + +{allwin}gt=gtgui diff --git a/harbour/include/extend.api b/harbour/include/extend.api index fd3cb1be08..ddd939493a 100644 --- a/harbour/include/extend.api +++ b/harbour/include/extend.api @@ -91,6 +91,16 @@ typedef PHB_ITEM ITEM; #define PCOUNT hb_pcount() #define ALENGTH( n ) hb_parinfa( n, 0 ) +#ifndef HB_LEGACY_LEVEL3 + #define ISCHAR( n ) HB_ISCHAR( n ) + #define ISNUM( n ) HB_ISNUM( n ) + #define ISLOG( n ) HB_ISLOG( n ) + #define ISDATE( n ) HB_ISDATE( n ) + #define ISMEMO( n ) HB_ISMEMO( n ) + #define ISBYREF( n ) HB_ISBYREF( n ) + #define ISARRAY( n ) HB_ISARRAY( n ) +#endif + /* Functions */ #define _parc hb_parc diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index df1051a0c2..8cc086fbbd 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -240,22 +240,23 @@ HB_EXTERN_BEGIN #define HB_ISDATETIME( n ) ( hb_param( n, HB_IT_DATETIME ) != NULL ) /* Not available in CA-Cl*pper. */ /* Compatibility #defines, deprecated */ -#define ISNIL( n ) HB_ISNIL( n ) -#define ISCHAR( n ) HB_ISCHAR( n ) -#define ISNUM( n ) HB_ISNUM( n ) -#define ISLOG( n ) HB_ISLOG( n ) -#define ISDATE( n ) HB_ISDATE( n ) -#define ISTIMESTAMP( n ) HB_ISTIMESTAMP( n ) -#define ISMEMO( n ) HB_ISMEMO( n ) -#define ISBYREF( n ) HB_ISBYREF( n ) -#define ISARRAY( n ) HB_ISARRAY( n ) -#define ISOBJECT( n ) HB_ISOBJECT( n ) -#define ISBLOCK( n ) HB_ISBLOCK( n ) -#define ISPOINTER( n ) HB_ISPOINTER( n ) -#define ISHASH( n ) HB_ISHASH( n ) -#define ISSYMBOL( n ) HB_ISSYMBOL( n ) -#define ISDATETIME( n ) HB_ISDATETIME( n ) - +#ifdef HB_LEGACY_LEVEL3 + #define ISNIL( n ) HB_ISNIL( n ) + #define ISCHAR( n ) HB_ISCHAR( n ) + #define ISNUM( n ) HB_ISNUM( n ) + #define ISLOG( n ) HB_ISLOG( n ) + #define ISDATE( n ) HB_ISDATE( n ) + #define ISTIMESTAMP( n ) HB_ISTIMESTAMP( n ) + #define ISMEMO( n ) HB_ISMEMO( n ) + #define ISBYREF( n ) HB_ISBYREF( n ) + #define ISARRAY( n ) HB_ISARRAY( n ) + #define ISOBJECT( n ) HB_ISOBJECT( n ) + #define ISBLOCK( n ) HB_ISBLOCK( n ) + #define ISPOINTER( n ) HB_ISPOINTER( n ) + #define ISHASH( n ) HB_ISHASH( n ) + #define ISSYMBOL( n ) HB_ISSYMBOL( n ) + #define ISDATETIME( n ) HB_ISDATETIME( n ) +#endif #ifdef _HB_API_INTERNAL_ diff --git a/harbour/include/hbsetup.ch b/harbour/include/hbsetup.ch index c9d0a6c3f4..517acaa235 100644 --- a/harbour/include/hbsetup.ch +++ b/harbour/include/hbsetup.ch @@ -82,4 +82,7 @@ #define HB_LEGACY_LEVEL2 #endif +/* Future level of legacy cleanup */ +#define HB_LEGACY_LEVEL3 + #endif /* HB_SETUP_CH_ */ diff --git a/harbour/source/debug/dbgentry.c b/harbour/source/debug/dbgentry.c index 4d24aefb4a..abf67cf021 100644 --- a/harbour/source/debug/dbgentry.c +++ b/harbour/source/debug/dbgentry.c @@ -1665,7 +1665,7 @@ HB_FUNC( __DBGGETEXPRVALUE ) { PHB_ITEM pItem; - if( ISCHAR( 2 ) ) + if( HB_ISCHAR( 2 ) ) pItem = hb_dbgGetExpressionValue( hb_parptr( 1 ), hb_parc( 2 ) ); else pItem = hb_dbgGetWatchValue( hb_parptr( 1 ), hb_parni( 2 ) - 1 ); diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index fae256cc74..ed9a53ea03 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -206,35 +206,35 @@ HB_FUNC( DBEVAL ) } pEvalInfo.dbsci.itmCobFor = hb_param( 2, HB_IT_BLOCK ); - if( !pEvalInfo.dbsci.itmCobFor && !ISNIL( 2 ) ) + if( !pEvalInfo.dbsci.itmCobFor && ! HB_ISNIL( 2 ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } pEvalInfo.dbsci.itmCobWhile = hb_param( 3, HB_IT_BLOCK ); - if( !pEvalInfo.dbsci.itmCobWhile && !ISNIL( 3 ) ) + if( !pEvalInfo.dbsci.itmCobWhile && ! HB_ISNIL( 3 ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } pEvalInfo.dbsci.lNext = hb_param( 4, HB_IT_NUMERIC ); - if( !pEvalInfo.dbsci.lNext && !ISNIL( 4 ) ) + if( !pEvalInfo.dbsci.lNext && ! HB_ISNIL( 4 ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } pEvalInfo.dbsci.itmRecID = hb_param( 5, HB_IT_NUMERIC ); - if( !pEvalInfo.dbsci.itmRecID && !ISNIL( 5 ) ) + if( !pEvalInfo.dbsci.itmRecID && ! HB_ISNIL( 5 ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } pEvalInfo.dbsci.fRest = hb_param( 6, HB_IT_LOGICAL ); - if( !pEvalInfo.dbsci.fRest && !ISNIL( 6 ) ) + if( !pEvalInfo.dbsci.fRest && ! HB_ISNIL( 6 ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; @@ -280,7 +280,7 @@ HB_FUNC( DBAPPEND ) if( pArea ) { - BOOL bUnLockAll = ISLOG( 1 ) ? hb_parl( 1 ) : TRUE; + BOOL bUnLockAll = HB_ISLOG( 1 ) ? hb_parl( 1 ) : TRUE; HB_ERRCODE errCode; /* Clipper clears NETERR flag before APPEND */ @@ -350,7 +350,7 @@ HB_FUNC( DBCREATE ) szFileName = hb_parc( 1 ); pStruct = hb_param( 2, HB_IT_ARRAY ); szDriver = hb_parc( 3 ); - fKeepOpen = ISLOG( 4 ); + fKeepOpen = HB_ISLOG( 4 ); fCurrArea = fKeepOpen && !hb_parl( 4 ); szAlias = hb_parc( 5 ); pDelim = hb_param( 6, HB_IT_ANY ); @@ -477,7 +477,7 @@ HB_FUNC( __DBOPENSDF ) szFileName = hb_parc( 1 ); pStruct = hb_param( 2, HB_IT_ARRAY ); szDriver = hb_parc( 3 ); - fKeepOpen = ISLOG( 4 ); + fKeepOpen = HB_ISLOG( 4 ); fCurrArea = fKeepOpen && !hb_parl( 4 ); szAlias = hb_parc( 5 ); pDelim = hb_param( 6, HB_IT_ANY ); @@ -694,7 +694,7 @@ HB_FUNC( DBRLOCK ) DBLOCKINFO dbLockInfo; dbLockInfo.fResult = FALSE; dbLockInfo.itmRecID = hb_param( 1, HB_IT_ANY ); - if( !dbLockInfo.itmRecID || ISNIL( 1 ) ) + if( !dbLockInfo.itmRecID || HB_ISNIL( 1 ) ) dbLockInfo.uiMethod = DBLM_EXCLUSIVE; else dbLockInfo.uiMethod = DBLM_MULTIPLE; @@ -736,11 +736,11 @@ HB_FUNC( DBSEEK ) if( pArea ) { - if( !ISNIL( 1 ) ) + if( ! HB_ISNIL( 1 ) ) { PHB_ITEM pKey = hb_param( 1, HB_IT_ANY ); - BOOL bSoftSeek = ISLOG( 2 ) ? ( BOOL ) hb_parl( 2 ) : hb_setGetSoftSeek(); - BOOL bFindLast = ISLOG( 3 ) ? hb_parl( 3 ) : FALSE, fFound = FALSE; + BOOL bSoftSeek = HB_ISLOG( 2 ) ? ( BOOL ) hb_parl( 2 ) : hb_setGetSoftSeek(); + BOOL bFindLast = HB_ISLOG( 3 ) ? hb_parl( 3 ) : FALSE, fFound = FALSE; if( SELF_SEEK( pArea, bSoftSeek, pKey, bFindLast ) == HB_SUCCESS ) { if( SELF_FOUND( pArea, &fFound ) != HB_SUCCESS ) @@ -834,7 +834,7 @@ HB_FUNC( DBSKIP ) { AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) - SELF_SKIP( pArea, ISNUM( 1 ) ? hb_parnl( 1 ) : 1 ); + SELF_SKIP( pArea, HB_ISNUM( 1 ) ? hb_parnl( 1 ) : 1 ); else hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME ); } @@ -894,7 +894,7 @@ HB_FUNC( DBUSEAREA ) { hb_retl( hb_rddOpenTable( hb_parc( 3 ), hb_parc( 2 ), hb_parl( 1 ) ? 0 : hb_rddGetCurrentWorkAreaNumber(), - hb_parc( 4 ), ISLOG( 5 ) ? hb_parl( 5 ) : !hb_setGetExclusive(), + hb_parc( 4 ), HB_ISLOG( 5 ) ? hb_parl( 5 ) : !hb_setGetExclusive(), hb_parl( 6 ), hb_parc( 7 ), hb_parnl( 8 ), NULL, NULL ) == HB_SUCCESS ); } @@ -1114,7 +1114,7 @@ HB_FUNC( NETERR ) { hb_retl( hb_rddGetNetErr() ); - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_rddSetNetErr( hb_parl( 1 ) ); } @@ -1195,7 +1195,7 @@ HB_FUNC( ORDCONDSET ) pItem = hb_param( 2, HB_IT_BLOCK ); lpdbOrdCondInfo->itmCobFor = pItem ? hb_itemNew( pItem ) : NULL; - lpdbOrdCondInfo->fAll = !ISLOG( 3 ) || hb_parl( 3 ); + lpdbOrdCondInfo->fAll = ! HB_ISLOG( 3 ) || hb_parl( 3 ); lpdbOrdCondInfo->abWhile = hb_parclen( 17 ) > 0 ? ( BYTE * ) hb_strdup( hb_parc( 17 ) ) : NULL; @@ -1206,9 +1206,9 @@ HB_FUNC( ORDCONDSET ) lpdbOrdCondInfo->itmCobEval = pItem ? hb_itemNew( pItem ) : NULL; lpdbOrdCondInfo->lStep = hb_parnl( 6 ); - lpdbOrdCondInfo->itmStartRecID = ISNIL( 7 ) ? NULL : hb_itemNew( hb_param( 7, HB_IT_ANY ) ); + lpdbOrdCondInfo->itmStartRecID = HB_ISNIL( 7 ) ? NULL : hb_itemNew( hb_param( 7, HB_IT_ANY ) ); lpdbOrdCondInfo->lNextCount = hb_parnl( 8 ); - lpdbOrdCondInfo->itmRecID = ISNIL( 9 ) ? NULL : hb_itemNew( hb_param( 9, HB_IT_ANY ) ); + lpdbOrdCondInfo->itmRecID = HB_ISNIL( 9 ) ? NULL : hb_itemNew( hb_param( 9, HB_IT_ANY ) ); lpdbOrdCondInfo->fRest = hb_parl( 10 ); lpdbOrdCondInfo->fDescending = hb_parl( 11 ); /* 12th parameter is always nil in CL5.3, in CL5.2 it's compound flag */ @@ -1268,7 +1268,7 @@ HB_FUNC( ORDCREATE ) dbOrderInfo.abBagName = ( BYTE * ) hb_parcx( 1 ); dbOrderInfo.atomBagName = ( BYTE * ) hb_parcx( 2 ); dbOrderInfo.itmOrder = NULL; - dbOrderInfo.fUnique = ISLOG( 5 ) ? ( BOOL ) hb_parl( 5 ) : hb_setGetUnique(); + dbOrderInfo.fUnique = HB_ISLOG( 5 ) ? ( BOOL ) hb_parl( 5 ) : hb_setGetUnique(); dbOrderInfo.abExpr = hb_param( 3, HB_IT_STRING ); if( ( ( dbOrderInfo.abBagName == NULL || strlen( ( char * ) dbOrderInfo.abBagName ) == 0 ) && ( dbOrderInfo.atomBagName == NULL || strlen( ( char * ) dbOrderInfo.atomBagName ) == 0 ) ) || @@ -1419,7 +1419,7 @@ HB_FUNC( ORDLISTADD ) if( !pOrderInfo.atomBagName ) { - if( !ISNIL( 1 ) ) + if( ! HB_ISNIL( 1 ) ) hb_errRT_DBCMD( EG_ARG, EDBCMD_ORDLSTADD_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } @@ -1503,8 +1503,8 @@ HB_FUNC( ORDNUMBER ) memset( &pOrderInfo, 0, sizeof( DBORDERINFO ) ); pOrderInfo.itmOrder = hb_param( 1, HB_IT_STRING ); pOrderInfo.atomBagName = hb_param( 2, HB_IT_STRING ); - if( !( pOrderInfo.itmOrder || ISNIL( 1 ) ) || - !( pOrderInfo.atomBagName || ISNIL( 2 ) ) ) + if( !( pOrderInfo.itmOrder || HB_ISNIL( 1 ) ) || + !( pOrderInfo.atomBagName || HB_ISNIL( 2 ) ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_REL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; @@ -1699,7 +1699,7 @@ HB_FUNC( ORDSCOPE ) pInfo.itmResult = hb_itemNew( NULL ); if( iScope == 2 ) { - if( hb_pcount() > 1 && !ISNIL( 2 ) ) + if( hb_pcount() > 1 && ! HB_ISNIL( 2 ) ) { uiAction = DBOI_SCOPESET; pInfo.itmNewVal = hb_param( 2, HB_IT_ANY); @@ -1712,7 +1712,7 @@ HB_FUNC( ORDSCOPE ) uiAction = ( iScope == 0 ) ? DBOI_SCOPETOP : DBOI_SCOPEBOTTOM; if( hb_pcount() > 1 ) { - if( ISNIL( 2 ) ) + if( HB_ISNIL( 2 ) ) uiAction = ( iScope == 0 ) ? DBOI_SCOPETOPCLEAR : DBOI_SCOPEBOTTOMCLEAR; else pInfo.itmNewVal = hb_param( 2, HB_IT_ANY); @@ -1770,7 +1770,7 @@ HB_FUNC( DBSETRELATION ) USHORT uiChildArea; char * szAlias = NULL; - if( hb_pcount() < 2 || ( !( hb_parinfo( 1 ) & HB_IT_NUMERIC ) && ( hb_parinfo( 1 ) != HB_IT_STRING ) ) || !( ISNIL( 4 ) || ISLOG( 4 ) ) ) + if( hb_pcount() < 2 || ( !( hb_parinfo( 1 ) & HB_IT_NUMERIC ) && ( hb_parinfo( 1 ) != HB_IT_STRING ) ) || !( HB_ISNIL( 4 ) || HB_ISLOG( 4 ) ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_REL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; @@ -1870,7 +1870,7 @@ HB_FUNC( __DBARRANGE ) dbSortInfo.dbtri.dbsci.itmCobWhile = hb_param( 4, HB_IT_BLOCK ); dbSortInfo.dbtri.dbsci.lpstrWhile = NULL; dbSortInfo.dbtri.dbsci.lNext = hb_param( 5, HB_IT_NUMERIC ); - dbSortInfo.dbtri.dbsci.itmRecID = ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ); + dbSortInfo.dbtri.dbsci.itmRecID = HB_ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ); dbSortInfo.dbtri.dbsci.fRest = hb_param( 7, HB_IT_LOGICAL ); dbSortInfo.dbtri.dbsci.fIgnoreFilter = dbSortInfo.dbtri.dbsci.fLast = @@ -1945,7 +1945,7 @@ HB_FUNC( __DBARRANGE ) /* __dbTrans( nDstArea, aFieldsStru, bFor, bWhile, nNext, nRecord, lRest ) */ HB_FUNC( __DBTRANS ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { USHORT uiSrcArea, uiDstArea; AREAP pSrcArea, pDstArea; @@ -1974,7 +1974,7 @@ HB_FUNC( __DBTRANS ) dbTransInfo.dbsci.itmCobWhile = hb_param( 4, HB_IT_BLOCK ); dbTransInfo.dbsci.lpstrWhile = NULL; dbTransInfo.dbsci.lNext = hb_param( 5, HB_IT_NUMERIC ); - dbTransInfo.dbsci.itmRecID = ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ); + dbTransInfo.dbsci.itmRecID = HB_ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ); dbTransInfo.dbsci.fRest = hb_param( 7, HB_IT_LOGICAL ); dbTransInfo.dbsci.fIgnoreFilter = TRUE; @@ -2015,7 +2015,7 @@ HB_FUNC( __DBAPP ) hb_param( 4, HB_IT_BLOCK ), /* cobWhile */ NULL, /* lpStrWhile */ hb_param( 5, HB_IT_NUMERIC ), /* Next */ - ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ), /* RecID */ + HB_ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ), /* RecID */ hb_param( 7, HB_IT_LOGICAL ), /* Rest */ hb_parc( 10 ), /* Codepage */ hb_param( 11, HB_IT_ANY ) ) ); /* Delimiter */ @@ -2038,7 +2038,7 @@ HB_FUNC( __DBCOPY ) hb_param( 4, HB_IT_BLOCK ), /* cobWhile */ NULL, /* lpStrWhile */ hb_param( 5, HB_IT_NUMERIC ), /* Next */ - ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ), /* RecID */ + HB_ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ), /* RecID */ hb_param( 7, HB_IT_LOGICAL ), /* Rest */ hb_parc( 10 ), /* Codepage */ hb_param( 11, HB_IT_ANY ) ) ); /* Delimiter */ diff --git a/harbour/source/rdd/dbcmd53.c b/harbour/source/rdd/dbcmd53.c index 0435d8ed92..0f2ef09217 100644 --- a/harbour/source/rdd/dbcmd53.c +++ b/harbour/source/rdd/dbcmd53.c @@ -159,7 +159,7 @@ HB_FUNC( ORDFINDREC ) memset( &pOrderInfo, 0, sizeof( DBORDERINFO ) ); pOrderInfo.itmNewVal = hb_param( 1 , HB_IT_NUMERIC ); pOrderInfo.itmResult = hb_itemPutL( NULL, FALSE ); - SELF_ORDINFO( pArea, ISLOG( 2 ) && hb_parl( 2 ) ? DBOI_FINDRECCONT : + SELF_ORDINFO( pArea, HB_ISLOG( 2 ) && hb_parl( 2 ) ? DBOI_FINDRECCONT : DBOI_FINDREC, &pOrderInfo ); hb_itemReturnRelease( pOrderInfo.itmResult ); } @@ -171,7 +171,7 @@ HB_FUNC( ORDSKIPRAW ) { AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) - SELF_SKIPRAW( pArea, ISNUM( 1 ) ? hb_parnl( 1 ) : 1 ); + SELF_SKIPRAW( pArea, HB_ISNUM( 1 ) ? hb_parnl( 1 ) : 1 ); else hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME ); } diff --git a/harbour/source/rdd/dbcmdx.c b/harbour/source/rdd/dbcmdx.c index c032a3740d..05225ffa7c 100644 --- a/harbour/source/rdd/dbcmdx.c +++ b/harbour/source/rdd/dbcmdx.c @@ -138,7 +138,7 @@ HB_FUNC( DBSKIPPER ) if( SELF_RECCOUNT( pArea, &ulRecords ) == HB_SUCCESS && ulRecords > 0 ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) lRecs = hb_parnl( 1 ); if( lRecs == 0 ) diff --git a/harbour/source/rdd/dbdetach.c b/harbour/source/rdd/dbdetach.c index 53a54fcbf9..0074a79294 100644 --- a/harbour/source/rdd/dbdetach.c +++ b/harbour/source/rdd/dbdetach.c @@ -105,12 +105,12 @@ HB_FUNC( HB_DBREQUEST ) BOOL fNewArea, fWait; AREAP pArea; - if( ISNIL( 1 ) || ISCHAR( 1 ) ) + if( HB_ISNIL( 1 ) || HB_ISCHAR( 1 ) ) { szAlias = hb_parc( 1 ); - fNewArea = ISLOG( 2 ) && hb_parl( 2 ); - fWait = ISLOG( 4 ) && hb_parl( 4 ); - pCargo = ISBYREF( 3 ) ? hb_itemNew( NULL ) : NULL; + fNewArea = HB_ISLOG( 2 ) && hb_parl( 2 ); + fWait = HB_ISLOG( 4 ) && hb_parl( 4 ); + pCargo = HB_ISBYREF( 3 ) ? hb_itemNew( NULL ) : NULL; pArea = hb_rddRequestArea( szAlias, pCargo, fNewArea, fWait ); if( pArea ) diff --git a/harbour/source/rdd/dbsql.c b/harbour/source/rdd/dbsql.c index 5eda75f033..2a58bc602c 100644 --- a/harbour/source/rdd/dbsql.c +++ b/harbour/source/rdd/dbsql.c @@ -354,11 +354,11 @@ HB_FUNC( __DBSQL ) PHB_ITEM pFor = hb_param( 5, HB_IT_BLOCK ); PHB_ITEM pWhile = hb_param( 6, HB_IT_BLOCK ); PHB_ITEM pNext = hb_param( 7, HB_IT_NUMERIC ); - PHB_ITEM pRecord = ISNIL( 8 ) ? NULL : hb_param( 8, HB_IT_ANY ); - BOOL fRest = pWhile != NULL || ( ISLOG( 9 ) && hb_parl( 9 ) ); - BOOL fAppend = ISLOG( 10 ) && hb_parl( 10 ); - BOOL fInsert = ISLOG( 11 ) && hb_parl( 11 ); - BOOL fRecno = ISLOG( 12 ) && hb_parl( 12 ); + PHB_ITEM pRecord = HB_ISNIL( 8 ) ? NULL : hb_param( 8, HB_IT_ANY ); + BOOL fRest = pWhile != NULL || ( HB_ISLOG( 9 ) && hb_parl( 9 ) ); + BOOL fAppend = HB_ISLOG( 10 ) && hb_parl( 10 ); + BOOL fInsert = HB_ISLOG( 11 ) && hb_parl( 11 ); + BOOL fRecno = HB_ISLOG( 12 ) && hb_parl( 12 ); char * szSep = hb_parcx( 13 ); char * szDelim = hb_parcx( 14 ); char * szEsc = hb_parcx( 15 ); diff --git a/harbour/source/rdd/hbsix/sxfname.c b/harbour/source/rdd/hbsix/sxfname.c index 0023639b9e..723484dfad 100644 --- a/harbour/source/rdd/hbsix/sxfname.c +++ b/harbour/source/rdd/hbsix/sxfname.c @@ -70,9 +70,9 @@ HB_FUNC( SX_FNAMEPARSER ) pFileName = hb_fsFNameSplit( szFileName ); - if( !ISLOG( 2 ) || !hb_parl( 2 ) ) + if( ! HB_ISLOG( 2 ) || ! hb_parl( 2 ) ) pFileName->szPath = NULL; - if( !ISLOG( 3 ) || !hb_parl( 3 ) ) + if( ! HB_ISLOG( 3 ) || ! hb_parl( 3 ) ) pFileName->szExtension = NULL; if( !hb_setGetTrimFileName() ) diff --git a/harbour/source/rdd/hbsix/sxord.c b/harbour/source/rdd/hbsix/sxord.c index fcaf88eb63..b5c082873c 100644 --- a/harbour/source/rdd/hbsix/sxord.c +++ b/harbour/source/rdd/hbsix/sxord.c @@ -91,15 +91,15 @@ static BOOL hb_sxOrdParam( LPDBORDERINFO pInfo ) { memset( pInfo, 0, sizeof( DBORDERINFO ) ); - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { pInfo->itmOrder = hb_param( 1, HB_IT_STRING ); pInfo->atomBagName = hb_param( 2, HB_IT_STRING ); } - else if( ISNUM( 1 ) ) + else if( HB_ISNUM( 1 ) ) { pInfo->itmOrder = hb_param( 1, HB_IT_NUMERIC ); - if( ! ISNIL( 2 ) ) /* hb_pcount() > 2 */ + if( ! HB_ISNIL( 2 ) ) /* hb_pcount() > 2 */ { pInfo->atomBagName = hb_param( 2, HB_IT_NUMERIC ); if( hb_parni( 2 ) <= 0 ) @@ -296,7 +296,7 @@ HB_FUNC( SX_CLRSCOPE ) if( hb_sxOrdParam( &Info ) ) { - int iScope = ISNUM( 1 ) ? hb_parni( 1 ) : 2; + int iScope = HB_ISNUM( 1 ) ? hb_parni( 1 ) : 2; Info.itmResult = hb_itemNew( NULL ); if( iScope ) SELF_ORDINFO( pArea, DBOI_SCOPEBOTTOMCLEAR, &Info ); @@ -319,7 +319,7 @@ HB_FUNC( SX_SETSCOPE ) { int iScope = hb_parni( 1 ); Info.itmResult = hb_itemNew( NULL ); - if( !ISNIL( 2 ) ) + if( ! HB_ISNIL( 2 ) ) Info.itmNewVal = hb_param( 2, HB_IT_ANY ); SELF_ORDINFO( pArea, ( USHORT ) ( iScope ? DBOI_SCOPEBOTTOM : DBOI_SCOPETOP ), &Info ); hb_itemReturnRelease( Info.itmResult ); @@ -461,7 +461,7 @@ HB_FUNC( SX_INDEXTYPE ) DBORDERINFO Info; if( hb_sxOrdParam( &Info ) ) { - if( hb_pcount() == 1 && ISCHAR( 1 ) ) + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { Info.atomBagName = Info.itmOrder; Info.itmOrder = NULL; @@ -559,7 +559,7 @@ HB_FUNC( SX_KEYSKIP ) if( pArea ) { - if( SELF_SKIPRAW( pArea, ISNUM( 1 ) ? hb_parnl( 1 ) : 1 ) == HB_SUCCESS ) + if( SELF_SKIPRAW( pArea, HB_ISNUM( 1 ) ? hb_parnl( 1 ) : 1 ) == HB_SUCCESS ) { if( SELF_EOF( pArea, &fBEof ) == HB_SUCCESS && !fBEof ) fResult = SELF_BOF( pArea, &fBEof ) == HB_SUCCESS && !fBEof; @@ -652,7 +652,7 @@ HB_FUNC( SX_SEEKLAST ) if( pArea && hb_pcount() > 0 ) { PHB_ITEM pKey = hb_param( 1, HB_IT_ANY ); - BOOL bSoftSeek = ISLOG( 2 ) && hb_parl( 2 ); + BOOL bSoftSeek = HB_ISLOG( 2 ) && hb_parl( 2 ); if( SELF_SEEK( pArea, bSoftSeek, pKey, TRUE ) == HB_SUCCESS ) { @@ -683,7 +683,7 @@ HB_FUNC( SX_WILDSEEK ) { AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); char * szPattern = hb_parc( 1 ); - BOOL fCont = ISLOG( 2 ) && hb_parl( 2 ); + BOOL fCont = HB_ISLOG( 2 ) && hb_parl( 2 ); BOOL fFound = FALSE; int iOrder = 0; diff --git a/harbour/source/rdd/hbsix/sxtable.c b/harbour/source/rdd/hbsix/sxtable.c index 840738f688..9057634955 100644 --- a/harbour/source/rdd/hbsix/sxtable.c +++ b/harbour/source/rdd/hbsix/sxtable.c @@ -199,7 +199,7 @@ HB_FUNC( SX_ROLLBACK ) int iArea = 0; AREAP pArea; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { iArea = hb_parni( 1 ); fRollChild = iArea == 0; @@ -289,7 +289,7 @@ HB_FUNC( SX_SETPASS ) if( iPCount >=1 ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) @@ -303,8 +303,8 @@ HB_FUNC( SX_SETPASS ) } else if( iPCount >= 2 || iPCount <= 4 ) { - if( ISCHAR( 1 ) && ISNUM( 2 ) && ( iPCount < 3 || ISCHAR( 3 ) ) && - ( iPCount < 4 || ISNUM( 4 ) ) ) + if( HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) && ( iPCount < 3 || HB_ISCHAR( 3 ) ) && + ( iPCount < 4 || HB_ISNUM( 4 ) ) ) { /* Set pending password for table which will be open * 3-rd and 4-th parameters are optional Harbour extensions @@ -327,7 +327,7 @@ HB_FUNC( SX_SETPASS ) hb_itemRelease( pItem ); } } - else if( iPCount == 2 && ISNUM( 1 ) && ISCHAR( 2 ) ) + else if( iPCount == 2 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) ) { AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) @@ -474,11 +474,11 @@ HB_FUNC( _SXOPENINIT ) hb_itemRelease( pItem ); if( pInfo ) { - if( ISLOG( 2 ) ) + if( HB_ISLOG( 2 ) ) pInfo->fShared = hb_parl( 2 ); - if( ISLOG( 3 ) ) + if( HB_ISLOG( 3 ) ) pInfo->fReadonly = hb_parl( 2 ); - if( ISCHAR( 4 ) ) + if( HB_ISCHAR( 4 ) ) { char * szAlias = hb_parc( 1 ); if( szAlias && szAlias[ 0 ] ) diff --git a/harbour/source/rdd/usrrdd/usrrdd.c b/harbour/source/rdd/usrrdd/usrrdd.c index abd919caee..9b9bacf369 100644 --- a/harbour/source/rdd/usrrdd/usrrdd.c +++ b/harbour/source/rdd/usrrdd/usrrdd.c @@ -2902,7 +2902,7 @@ HB_FUNC( USRRDD_ID ) { AREAP pArea; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -2915,7 +2915,7 @@ HB_FUNC( USRRDD_AREADATA ) { AREAP pArea; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -2936,7 +2936,7 @@ HB_FUNC( USRRDD_AREARESULT ) { AREAP pArea; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -2958,9 +2958,9 @@ HB_FUNC( USRRDD_SETBOF ) { AREAP pArea; - if( ISLOG( 2 ) ) + if( HB_ISLOG( 2 ) ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -2974,9 +2974,9 @@ HB_FUNC( USRRDD_SETEOF ) { AREAP pArea; - if( ISLOG( 2 ) ) + if( HB_ISLOG( 2 ) ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -2990,9 +2990,9 @@ HB_FUNC( USRRDD_SETFOUND ) { AREAP pArea; - if( ISLOG( 2 ) ) + if( HB_ISLOG( 2 ) ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -3006,9 +3006,9 @@ HB_FUNC( USRRDD_SETTOP ) { AREAP pArea; - if( ISLOG( 2 ) ) + if( HB_ISLOG( 2 ) ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -3022,9 +3022,9 @@ HB_FUNC( USRRDD_SETBOTTOM ) { AREAP pArea; - if( ISLOG( 2 ) ) + if( HB_ISLOG( 2 ) ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -3058,7 +3058,7 @@ static AREAP hb_usrGetAreaParam( int iParams ) if( iParams <= hb_pcount() ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pArea = hb_usrGetAreaPointer( hb_parni( 1 ) ); else pArea = ( AREAP ) hb_parptr( 1 ); @@ -3346,11 +3346,11 @@ HB_FUNC_UR_SUPER( PUTREC ) if( pArea ) { - if( ISPOINTER( 2 ) ) + if( HB_ISPOINTER( 2 ) ) { hb_retni( SUPER_PUTREC( pArea, ( BYTE * ) hb_parptr( 2 ) ) ); } - else if( ISCHAR( 2 ) ) + else if( HB_ISCHAR( 2 ) ) { hb_retni( SUPER_PUTREC( pArea, ( BYTE * ) hb_parc( 2 ) ) ); } @@ -4063,7 +4063,7 @@ HB_FUNC_UR_SUPER( COMPILE ) if( pArea ) { - if( ISCHAR( 2 ) ) + if( HB_ISCHAR( 2 ) ) { hb_retni( SUPER_COMPILE( pArea, ( BYTE * ) hb_parc( 2 ) ) ); } diff --git a/harbour/source/rtl/at.c b/harbour/source/rtl/at.c index 2c1c149d5b..7c5ea23933 100644 --- a/harbour/source/rtl/at.c +++ b/harbour/source/rtl/at.c @@ -64,8 +64,8 @@ HB_FUNC( HB_AT ) if( pText && pSub ) { ULONG ulTextLength = hb_itemGetCLen( pText ); - ULONG ulStart = ISNUM( 3 ) ? hb_parnl( 3 ) : 1; - ULONG ulEnd = ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulTextLength; + ULONG ulStart = HB_ISNUM( 3 ) ? hb_parnl( 3 ) : 1; + ULONG ulEnd = HB_ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulTextLength; ULONG ulPos; if( ulStart > ulTextLength || ulEnd < ulStart ) diff --git a/harbour/source/rtl/box.c b/harbour/source/rtl/box.c index 0576ba3456..51fabf3e4e 100644 --- a/harbour/source/rtl/box.c +++ b/harbour/source/rtl/box.c @@ -72,7 +72,7 @@ HB_FUNC( DISPBOX ) if( pszColor ) iColor = hb_gtColorToN( pszColor ); - else if( ISNUM( 6 ) ) + else if( HB_ISNUM( 6 ) ) iColor = hb_parni( 6 ); else iColor = -1; @@ -126,7 +126,7 @@ HB_FUNC( HB_DISPBOX ) if( pszColor ) iColor = hb_gtColorToN( pszColor ); - else if( ISNUM( 6 ) ) + else if( HB_ISNUM( 6 ) ) iColor = hb_parni( 6 ); else iColor = -1; diff --git a/harbour/source/rtl/cdpapi.c b/harbour/source/rtl/cdpapi.c index 69fda11ed7..cbf679c810 100644 --- a/harbour/source/rtl/cdpapi.c +++ b/harbour/source/rtl/cdpapi.c @@ -1186,7 +1186,7 @@ HB_FUNC( HB_CDPSELECT ) { hb_retc( hb_cdpID() ); - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_cdpSelectID( hb_parc( 1 ) ); } @@ -1252,7 +1252,7 @@ HB_FUNC( HB_STRTOUTF8 ) if( ulLen ) { - PHB_CODEPAGE cdp = ISCHAR( 2 ) ? hb_cdpFind( hb_parc( 2 ) ) : hb_vmCDP(); + PHB_CODEPAGE cdp = HB_ISCHAR( 2 ) ? hb_cdpFind( hb_parc( 2 ) ) : hb_vmCDP(); if( cdp ) { @@ -1270,7 +1270,7 @@ HB_FUNC( HB_STRTOUTF8 ) HB_FUNC( HB_UTF8CHR ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { char utf8Char[ HB_MAX_UTF8 ]; int iLen; @@ -1295,7 +1295,7 @@ HB_FUNC( HB_UTF8TOSTR ) if( ulLen ) { - PHB_CODEPAGE cdp = ISCHAR( 2 ) ? hb_cdpFind( hb_parc( 2 ) ) : hb_vmCDP(); + PHB_CODEPAGE cdp = HB_ISCHAR( 2 ) ? hb_cdpFind( hb_parc( 2 ) ) : hb_vmCDP(); if( cdp ) { @@ -1320,7 +1320,7 @@ HB_FUNC( HB_UTF8SUBSTR ) char *szString = hb_parc( 1 ); int iPCount = hb_pcount(); - if( szString && ( iPCount < 2 || ( ISNUM( 2 ) && ( iPCount < 3 || ISNUM( 3 ) ) ) ) ) + if( szString && ( iPCount < 2 || ( HB_ISNUM( 2 ) && ( iPCount < 3 || HB_ISNUM( 3 ) ) ) ) ) { char *szDest = NULL; ULONG ulLen = hb_parclen( 1 ), ulDest = 0; @@ -1352,7 +1352,7 @@ HB_FUNC( HB_UTF8LEFT ) { char *szString = hb_parc( 1 ); - if( szString && ISNUM( 2 ) ) + if( szString && HB_ISNUM( 2 ) ) { LONG lLen = hb_parnl( 2 ); ULONG ulDest = 0; @@ -1375,7 +1375,7 @@ HB_FUNC( HB_UTF8RIGHT ) { char *szString = hb_parc( 1 ); - if( szString && ISNUM( 2 ) ) + if( szString && HB_ISNUM( 2 ) ) { LONG lLen = hb_parnl( 2 ), lFrom; ULONG ulLen = hb_parclen( 1 ), ulDest = 0; @@ -1403,7 +1403,7 @@ HB_FUNC( HB_UTF8PEEK ) { char *szString = hb_parc( 1 ); - if( szString && ISNUM( 2 ) ) + if( szString && HB_ISNUM( 2 ) ) { ULONG ulPos = hb_parnl( 2 ); ULONG ulLen = hb_parclen( 1 ); @@ -1421,7 +1421,7 @@ HB_FUNC( HB_UTF8POKE ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); - if( pText && ISNUM( 2 ) && ISNUM( 3 ) ) + if( pText && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { char *szString = hb_itemGetCPtr( pText ); ULONG ulLen = hb_parclen( 1 ), ulPos; @@ -1451,7 +1451,7 @@ HB_FUNC( HB_UTF8POKE ) memcpy( szResult, szString, ulPos ); u16toutf8( ( BYTE * ) & szResult[ulPos], uc ); memcpy( szResult + ulPos + n, szString + ulPos + n2, ulLen - ulPos - n2 ); - if( ISBYREF( 1 ) ) + if( HB_ISBYREF( 1 ) ) hb_storclen( szResult, ulLen - n2 + n, 1 ); hb_retclen_buffer( szResult, ulLen - n2 + n ); } @@ -1467,7 +1467,7 @@ HB_FUNC( HB_UTF8STUFF ) { char *szString = hb_parc( 1 ); - if( szString && ISNUM( 2 ) && ISNUM( 3 ) && ISCHAR( 4 ) ) + if( szString && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISCHAR( 4 ) ) { ULONG ulLen = hb_parclen( 1 ); ULONG ulPos = hb_parnl( 2 ); diff --git a/harbour/source/rtl/chrasc.c b/harbour/source/rtl/chrasc.c index cd206c0936..dbf06a14d8 100644 --- a/harbour/source/rtl/chrasc.c +++ b/harbour/source/rtl/chrasc.c @@ -57,7 +57,7 @@ /* converts an ASCII code to a character value */ HB_FUNC( CHR ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { /* NOTE: CA-Cl*pper's compiler optimizer will be wrong for those CHR() cases where the passed parameter is a constant which diff --git a/harbour/source/rtl/colorind.c b/harbour/source/rtl/colorind.c index eae9ca889c..b0a31e1263 100644 --- a/harbour/source/rtl/colorind.c +++ b/harbour/source/rtl/colorind.c @@ -54,7 +54,7 @@ HB_FUNC( HB_COLORINDEX ) { - if( ISCHAR( 1 ) && ISNUM( 2 ) ) + if( HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) ) { char * pszColor = hb_parc( 1 ); ULONG ulColorPos; diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 8c9b2ac054..eb0bb80907 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -479,13 +479,13 @@ static void hb_conDevPos( SHORT iRow, SHORT iCol ) HB_FUNC( DEVPOS ) /* Sets the screen and/or printer position */ { - if( ISNUM( 1 ) && ISNUM( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) hb_conDevPos( ( SHORT ) hb_parni( 1 ), ( SHORT ) hb_parni( 2 ) ); } HB_FUNC( SETPRC ) /* Sets the current printer row and column positions */ { - if( hb_pcount() == 2 && ISNUM( 1 ) && ISNUM( 2 ) ) + if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) { PHB_PRNPOS pPrnPos = hb_prnPos(); pPrnPos->row = ( USHORT ) hb_parni( 1 ); @@ -499,7 +499,7 @@ HB_FUNC( DEVOUT ) /* writes a single value to the current device (screen or prin ULONG ulLen; BOOL fFree; - if( ISCHAR( 2 ) ) + if( HB_ISCHAR( 2 ) ) { char szOldColor[ HB_CLRSTR_LEN ]; @@ -530,7 +530,7 @@ HB_FUNC( DISPOUT ) /* writes a single value to the screen, but is not affected b ULONG ulLen; BOOL bFreeReq; - if( ISCHAR( 2 ) ) + if( HB_ISCHAR( 2 ) ) { char szOldColor[ HB_CLRSTR_LEN ]; @@ -567,7 +567,7 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position ULONG ulLen; BOOL bFreeReq; - if( ISCHAR( 4 ) ) + if( HB_ISCHAR( 4 ) ) { char szOldColor[ HB_CLRSTR_LEN ]; @@ -607,9 +607,9 @@ HB_FUNC( HB_DISPOUTAT ) pszString = hb_itemStringCon( hb_param( 3, HB_IT_ANY ), &ulLen, &bFreeReq ); - if( ISCHAR( 4 ) ) + if( HB_ISCHAR( 4 ) ) iColor = hb_gtColorToN( hb_parc( 4 ) ); - else if( ISNUM( 4 ) ) + else if( HB_ISNUM( 4 ) ) iColor = hb_parni( 4 ); else iColor = -1; @@ -631,9 +631,9 @@ HB_FUNC( HB_DISPOUTATBOX ) ULONG nStringLen = hb_parclen( 3 ); int iColor; - if( ISCHAR( 4 ) ) + if( HB_ISCHAR( 4 ) ) iColor = hb_gtColorToN( hb_parc( 4 ) ); - else if( ISNUM( 4 ) ) + else if( HB_ISNUM( 4 ) ) iColor = hb_parni( 4 ); else iColor = hb_gtGetCurrColor(); diff --git a/harbour/source/rtl/copyfile.c b/harbour/source/rtl/copyfile.c index b6fb0f47a0..0c9af3bbca 100644 --- a/harbour/source/rtl/copyfile.c +++ b/harbour/source/rtl/copyfile.c @@ -152,7 +152,7 @@ static BOOL hb_copyfile( const char * szSource, const char * szDest ) HB_FUNC( __COPYFILE ) { - if( ISCHAR( 1 ) && ISCHAR( 2 ) ) + if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) { if( ! hb_copyfile( hb_parc( 1 ), hb_parc( 2 ) ) ) hb_retl( FALSE ); diff --git a/harbour/source/rtl/dateshb.c b/harbour/source/rtl/dateshb.c index 325b95b1f9..5f340c571d 100644 --- a/harbour/source/rtl/dateshb.c +++ b/harbour/source/rtl/dateshb.c @@ -79,7 +79,7 @@ HB_FUNC( CTOD ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_retdl( hb_dateUnformat( hb_parc( 1 ), hb_setGetDateFormat() ) ); else hb_errRT_BASE_SubstR( EG_ARG, 1119, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -87,7 +87,7 @@ HB_FUNC( CTOD ) HB_FUNC( HB_CTOD ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { const char * szFormat = hb_parc( 2 ); @@ -101,7 +101,7 @@ HB_FUNC( HB_CTOD ) HB_FUNC( DTOC ) { - if( ISDATETIME( 1 ) ) + if( HB_ISDATETIME( 1 ) ) { char szDate[ 9 ]; char szFormatted[ 11 ]; @@ -114,7 +114,7 @@ HB_FUNC( DTOC ) HB_FUNC( HB_DTOC ) { - if( ISDATETIME( 1 ) ) + if( HB_ISDATETIME( 1 ) ) { char szDate[ 9 ]; char szFormatted[ 11 ]; @@ -130,7 +130,7 @@ HB_FUNC( HB_DTOC ) HB_FUNC( DTOS ) { - if( ISDATETIME( 1 ) ) + if( HB_ISDATETIME( 1 ) ) { char szDate[ 9 ]; @@ -376,7 +376,7 @@ HB_FUNC( HB_TSTOSTR ) char szBuffer[ 24 ]; hb_timeStampStr( szBuffer, lDate, lTime ); - if( ISLOG( 2 ) && hb_parl( 2 ) ) + if( HB_ISLOG( 2 ) && hb_parl( 2 ) ) { if( lTime == 0 ) { diff --git a/harbour/source/rtl/dirdrive.c b/harbour/source/rtl/dirdrive.c index 4d6b701b97..dbbdfad209 100644 --- a/harbour/source/rtl/dirdrive.c +++ b/harbour/source/rtl/dirdrive.c @@ -59,7 +59,7 @@ HB_FUNC( DIRCHANGE ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_retni( hb_fsChDir( ( BYTE * ) hb_parc( 1 ) ) ? 0 : hb_fsError() ); else hb_retni( F_ERROR ); @@ -70,7 +70,7 @@ HB_FUNC( DIRCHANGE ) HB_FUNC( MAKEDIR ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_retni( hb_fsMkDir( ( BYTE * ) hb_parc( 1 ) ) ? 0 : hb_fsError() ); else hb_retni( F_ERROR ); @@ -78,7 +78,7 @@ HB_FUNC( MAKEDIR ) HB_FUNC( DIRREMOVE ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_retni( hb_fsRmDir( ( BYTE * ) hb_parc( 1 ) ) ? 0 : hb_fsError() ); else hb_retni( F_ERROR ); diff --git a/harbour/source/rtl/diskspac.c b/harbour/source/rtl/diskspac.c index e2a4909b8a..0f6009d2c0 100644 --- a/harbour/source/rtl/diskspac.c +++ b/harbour/source/rtl/diskspac.c @@ -84,7 +84,7 @@ HB_FUNC( DISKSPACE ) #if defined(HB_OS_DOS) { - USHORT uiDrive = ISNUM( 1 ) ? hb_parni( 1 ) : 0; + USHORT uiDrive = HB_ISNUM( 1 ) ? hb_parni( 1 ) : 0; union REGS regs; regs.HB_XREGS.dx = uiDrive; @@ -177,7 +177,7 @@ HB_FUNC( DISKSPACE ) } #elif defined(HB_OS_OS2) { - USHORT uiDrive = ISNUM( 1 ) ? hb_parni( 1 ) : 0; + USHORT uiDrive = HB_ISNUM( 1 ) ? hb_parni( 1 ) : 0; struct _FSALLOCATE fsa; /* Query level 1 info from filesystem */ diff --git a/harbour/source/rtl/disksphb.c b/harbour/source/rtl/disksphb.c index ac4c906d22..db8f380d80 100644 --- a/harbour/source/rtl/disksphb.c +++ b/harbour/source/rtl/disksphb.c @@ -71,7 +71,7 @@ HB_FUNC( HB_DISKSPACE ) { char szPathBuf[ 4 ]; char * szPath = hb_parc( 1 ); - USHORT uiType = ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : HB_DISK_AVAIL; + USHORT uiType = HB_ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : HB_DISK_AVAIL; double dSpace = 0.0; if( uiType > HB_DISK_TOTAL ) @@ -80,7 +80,7 @@ HB_FUNC( HB_DISKSPACE ) if( !szPath ) { #ifdef HB_OS_HAS_DRIVE_LETTER - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { szPathBuf[ 0 ] = ( char ) hb_parni( 1 ) + 'A' - 1; szPathBuf[ 1 ] = HB_OS_DRIVE_DELIM_CHR; diff --git a/harbour/source/rtl/errapi.c b/harbour/source/rtl/errapi.c index bbea57d6da..de079428bd 100644 --- a/harbour/source/rtl/errapi.c +++ b/harbour/source/rtl/errapi.c @@ -200,7 +200,7 @@ HB_FUNC_STATIC( CANDEFAULT ) HB_FUNC_STATIC( _CANDEFAULT ) { - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) { PHB_ITEM pError = hb_stackSelfItem(); BOOL fCan = hb_parl( 1 ); @@ -222,7 +222,7 @@ HB_FUNC_STATIC( CANRETRY ) HB_FUNC_STATIC( _CANRETRY ) { - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) { PHB_ITEM pError = hb_stackSelfItem(); BOOL fCan = hb_parl( 1 ); @@ -244,7 +244,7 @@ HB_FUNC_STATIC( CANSUBST ) HB_FUNC_STATIC( _CANSUBST ) { - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) { PHB_ITEM pError = hb_stackSelfItem(); BOOL fCan = hb_parl( 1 ); @@ -501,7 +501,7 @@ HB_FUNC( DOSERROR ) hb_retni( pErrData->uiErrorDOS ); - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) pErrData->uiErrorDOS = ( USHORT ) hb_parni( 1 ); } diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 5bf9b75426..b95ee4bb89 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -3273,5 +3273,5 @@ static BOOL hb_fsDisableWaitLocks( int iSet ) HB_FUNC( HB_DISABLEWAITLOCKS ) { - hb_retl( hb_fsDisableWaitLocks( ISLOG( 1 ) ? ( hb_parl( 1 ) ? 1 : 0 ) : -1 ) ); + hb_retl( hb_fsDisableWaitLocks( HB_ISLOG( 1 ) ? ( hb_parl( 1 ) ? 1 : 0 ) : -1 ) ); } diff --git a/harbour/source/rtl/fscopy.c b/harbour/source/rtl/fscopy.c index 1b61903845..e8938f9ebc 100644 --- a/harbour/source/rtl/fscopy.c +++ b/harbour/source/rtl/fscopy.c @@ -96,7 +96,7 @@ HB_FUNC( HB_FCOPY ) { USHORT uiError = 2; - if( ISCHAR( 1 ) && ISCHAR( 2 ) ) + if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) { hb_retni( hb_fsCopy( ( BYTE * ) hb_parc( 1 ), ( BYTE * ) hb_parc( 2 ) ) ? 0 : F_ERROR ); diff --git a/harbour/source/rtl/fssize.c b/harbour/source/rtl/fssize.c index 682b45fb4c..c433f33ce6 100644 --- a/harbour/source/rtl/fssize.c +++ b/harbour/source/rtl/fssize.c @@ -140,6 +140,6 @@ HB_FOFFSET hb_fsFSize( BYTE * pszFileName, BOOL bUseDirEntry ) HB_FUNC( HB_FSIZE ) { - hb_retnint( ISCHAR( 1 ) ? hb_fsFSize( ( BYTE * ) hb_parc( 1 ), - ISLOG( 2 ) ? hb_parl( 2 ) : TRUE ) : 0 ); + hb_retnint( HB_ISCHAR( 1 ) ? hb_fsFSize( ( BYTE * ) hb_parc( 1 ), + HB_ISLOG( 2 ) ? hb_parl( 2 ) : TRUE ) : 0 ); } diff --git a/harbour/source/rtl/fstemp.c b/harbour/source/rtl/fstemp.c index 511ed5562f..2913097221 100644 --- a/harbour/source/rtl/fstemp.c +++ b/harbour/source/rtl/fstemp.c @@ -281,7 +281,7 @@ HB_FUNC( HB_FTEMPCREATE ) hb_retnint( ( HB_NHANDLE ) hb_fsCreateTemp( ( BYTE * ) hb_parc( 1 ), ( BYTE * ) hb_parc( 2 ), - ( ULONG ) ( ISNUM( 3 ) ? ( ULONG ) hb_parnl( 3 ) : FC_NORMAL ), + ( ULONG ) ( HB_ISNUM( 3 ) ? ( ULONG ) hb_parnl( 3 ) : FC_NORMAL ), szName ) ); hb_storc( ( char * ) szName, 4 ); @@ -300,7 +300,7 @@ HB_FUNC( HB_FTEMPCREATEEX ) ( BYTE * ) hb_parc( 2 ), ( BYTE * ) hb_parc( 3 ), ( BYTE * ) hb_parc( 4 ), - ( ULONG ) ( ISNUM( 5 ) ? ( ULONG ) hb_parnl( 5 ) : FC_NORMAL ) ) ); + ( ULONG ) ( HB_ISNUM( 5 ) ? ( ULONG ) hb_parnl( 5 ) : FC_NORMAL ) ) ); hb_storc( ( char * ) szName, 1 ); } diff --git a/harbour/source/rtl/gete.c b/harbour/source/rtl/gete.c index 76e507c20e..f078edb3a8 100644 --- a/harbour/source/rtl/gete.c +++ b/harbour/source/rtl/gete.c @@ -177,7 +177,7 @@ HB_FUNC( HB_GETENV ) szValue = hb_getenv( pszName ); if( szValue && szValue[ 0 ] != '\0' ) { - if( ! ISLOG( 3 ) || hb_parl( 3 ) ) + if( ! HB_ISLOG( 3 ) || hb_parl( 3 ) ) { /* Convert from OS codepage */ BOOL fFree; @@ -216,7 +216,7 @@ HB_FUNC( HB_SETENV ) char * pszValue = hb_parc( 2 ); BOOL fFreeName = FALSE, fFreeVal = FALSE; - if( ( ! ISLOG( 3 ) || hb_parl( 3 ) ) ) + if( ( ! HB_ISLOG( 3 ) || hb_parl( 3 ) ) ) { pszName = ( char * ) hb_osEncode( ( BYTE * ) pszName, &fFreeName ); if( pszValue ) diff --git a/harbour/source/rtl/gtfunc.c b/harbour/source/rtl/gtfunc.c index a38243d0a9..649de08a59 100644 --- a/harbour/source/rtl/gtfunc.c +++ b/harbour/source/rtl/gtfunc.c @@ -56,9 +56,9 @@ HB_FUNC( HB_SETDISPCP ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { - if( hb_pcount() == 2 && ISLOG( 2 ) ) + if( hb_pcount() == 2 && HB_ISLOG( 2 ) ) hb_gtSetDispCP( hb_parc( 1 ), NULL, hb_parl( 2 ) ); else hb_gtSetDispCP( hb_parc( 1 ), hb_parc( 2 ), hb_parl( 3 ) ); @@ -69,7 +69,7 @@ HB_FUNC( HB_SETDISPCP ) HB_FUNC( HB_SETKEYCP ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_gtSetKeyCP( hb_parc( 1 ), hb_parc( 2 ) ); else hb_errRT_BASE_SubstR( EG_ARG, 1089, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -77,9 +77,9 @@ HB_FUNC( HB_SETKEYCP ) HB_FUNC( HB_SETTERMCP ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { - if( hb_pcount() == 2 && ISLOG( 2 ) ) + if( hb_pcount() == 2 && HB_ISLOG( 2 ) ) { hb_gtSetDispCP( hb_parc( 1 ), NULL, hb_parl( 2 ) ); hb_gtSetKeyCP( hb_parc( 1 ), NULL ); @@ -96,7 +96,7 @@ HB_FUNC( HB_SETTERMCP ) HB_FUNC( HB_GTINFO ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { HB_GT_INFO gtInfo; @@ -121,8 +121,8 @@ HB_FUNC( HB_GTALERT ) { hb_retni( hb_gtAlert( hb_param( 1, HB_IT_ANY ), hb_param( 2, HB_IT_ANY ), - ISCHAR( 3 ) ? hb_gtColorToN( hb_parc( 3 ) ) : hb_parni( 3 ) /* iClrNorm */, - ISCHAR( 4 ) ? hb_gtColorToN( hb_parc( 4 ) ) : hb_parni( 4 ) /* iClrHigh */, + HB_ISCHAR( 3 ) ? hb_gtColorToN( hb_parc( 3 ) ) : hb_parni( 3 ) /* iClrNorm */, + HB_ISCHAR( 4 ) ? hb_gtColorToN( hb_parc( 4 ) ) : hb_parni( 4 ) /* iClrHigh */, hb_parnd( 5 ) ) ); } diff --git a/harbour/source/rtl/gx.c b/harbour/source/rtl/gx.c index 95cabb8d80..db947de816 100644 --- a/harbour/source/rtl/gx.c +++ b/harbour/source/rtl/gx.c @@ -71,7 +71,7 @@ HB_FUNC( ISCOLOR ) HB_FUNC( NOSNOW ) { - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_gtSetSnowFlag( hb_parl( 1 ) ); } @@ -80,9 +80,9 @@ HB_FUNC( SETMODE ) USHORT uiRows, uiCols; hb_gtScrDim( &uiRows, &uiCols ); - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) uiRows = ( USHORT ) hb_parni( 1 ); - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) uiCols = ( USHORT ) hb_parni( 2 ); hb_retl( hb_gtSetMode( uiRows, uiCols ) == HB_SUCCESS ); diff --git a/harbour/source/rtl/hbbit.c b/harbour/source/rtl/hbbit.c index 1789b8da54..357ffa34f9 100644 --- a/harbour/source/rtl/hbbit.c +++ b/harbour/source/rtl/hbbit.c @@ -62,7 +62,7 @@ static BOOL hb_numParam( int iParam, HB_LONG * plNum ) { - if( ISNUM( iParam ) ) + if( HB_ISNUM( iParam ) ) { *plNum = hb_parnint( iParam ); return TRUE; diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index d16e1a3065..3c8738bca4 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -3401,9 +3401,9 @@ PHB_GT hb_gt_ItemBase( PHB_ITEM pItemGT ) HB_FUNC( HB_GTRELOAD ) { hb_retl( hb_gtReload( hb_parc( 1 ), - ISNUM( 2 ) ? hb_numToHandle( hb_parnint( 1 ) ) : HB_STDIN_HANDLE, - ISNUM( 3 ) ? hb_numToHandle( hb_parnint( 2 ) ) : HB_STDOUT_HANDLE, - ISNUM( 4 ) ? hb_numToHandle( hb_parnint( 3 ) ) : HB_STDERR_HANDLE ) ); + HB_ISNUM( 2 ) ? hb_numToHandle( hb_parnint( 1 ) ) : HB_STDIN_HANDLE, + HB_ISNUM( 3 ) ? hb_numToHandle( hb_parnint( 2 ) ) : HB_STDOUT_HANDLE, + HB_ISNUM( 4 ) ? hb_numToHandle( hb_parnint( 3 ) ) : HB_STDERR_HANDLE ) ); } HB_FUNC( HB_GTCREATE ) @@ -3411,9 +3411,9 @@ HB_FUNC( HB_GTCREATE ) void * hGT; hGT = hb_gtCreate( hb_parc( 1 ), - ISNUM( 2 ) ? hb_numToHandle( hb_parnint( 1 ) ) : HB_STDIN_HANDLE, - ISNUM( 3 ) ? hb_numToHandle( hb_parnint( 2 ) ) : HB_STDOUT_HANDLE, - ISNUM( 4 ) ? hb_numToHandle( hb_parnint( 3 ) ) : HB_STDERR_HANDLE ); + HB_ISNUM( 2 ) ? hb_numToHandle( hb_parnint( 1 ) ) : HB_STDIN_HANDLE, + HB_ISNUM( 3 ) ? hb_numToHandle( hb_parnint( 2 ) ) : HB_STDOUT_HANDLE, + HB_ISNUM( 4 ) ? hb_numToHandle( hb_parnint( 3 ) ) : HB_STDERR_HANDLE ); if( hGT ) { diff --git a/harbour/source/rtl/hbhex.c b/harbour/source/rtl/hbhex.c index 8ff55e8882..05bd11f5cc 100644 --- a/harbour/source/rtl/hbhex.c +++ b/harbour/source/rtl/hbhex.c @@ -93,7 +93,7 @@ HB_FUNC( HB_NUMTOHEX ) BOOL fDefaultLen; char ret[ 33 ]; - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { iLen = hb_parni( 2 ); iLen = ( iLen < 1 ) ? 1 : ( ( iLen > 32 ) ? 32 : iLen ); @@ -105,9 +105,9 @@ HB_FUNC( HB_NUMTOHEX ) fDefaultLen = 1; } - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) ulNum = hb_parnint( 1 ); - else if( ISPOINTER( 1 ) ) + else if( HB_ISPOINTER( 1 ) ) ulNum = ( HB_PTRDIFF ) hb_parptr( 1 ); else { diff --git a/harbour/source/rtl/hbi18n1.c b/harbour/source/rtl/hbi18n1.c index 149d87acea..40b05f5d96 100644 --- a/harbour/source/rtl/hbi18n1.c +++ b/harbour/source/rtl/hbi18n1.c @@ -902,8 +902,8 @@ HB_FUNC( HB_I18N_CODEPAGE ) if( pI18N ) hb_retc( hb_i18n_setcodepage( pI18N, hb_parc( iParam ), - ISLOG( iParam + 1 ) && hb_parl( iParam + 1 ), - ISLOG( iParam + 2 ) && hb_parl( iParam + 2 ) ) ); + HB_ISLOG( iParam + 1 ) && hb_parl( iParam + 1 ), + HB_ISLOG( iParam + 2 ) && hb_parl( iParam + 2 ) ) ); else hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -919,7 +919,7 @@ HB_FUNC( HB_I18N_PLURALFORM ) { PHB_ITEM pOldForm = hb_itemNew( NULL ); PHB_ITEM pForm = hb_param( iParam, HB_IT_STRING | HB_IT_BLOCK ); - BOOL fBase = ISLOG( iParam + 1 ) && hb_parl( iParam + 1 ); + BOOL fBase = HB_ISLOG( iParam + 1 ) && hb_parl( iParam + 1 ); if( hb_i18n_getpluralform( pI18N, pOldForm, fBase ) ) hb_itemReturn( pOldForm ); @@ -997,7 +997,7 @@ HB_FUNC( HB_I18N_SET ) if( hb_pcount() > 0 ) { - if( ISNIL( 1 ) ) + if( HB_ISNIL( 1 ) ) hb_vmSetI18N( NULL ); else { diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index e2cb7f7f32..bb814233c0 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -115,8 +115,8 @@ #include #include - #if !defined(h_errno) - #if defined(__WATCOMC__) + #if ! defined( h_errno ) + #if defined( __WATCOMC__ ) #define h_errno errno #else extern int h_errno; @@ -278,7 +278,7 @@ static void hb_inetLinuxSigusrHandle( int sig ) /* JC1: we need it volatile to be minimally thread safe. */ static volatile int s_iSessions = 0; -static BOOL hb_inetIsOpen( HB_SOCKET_STRUCT *Socket ) +static BOOL hb_inetIsOpen( HB_SOCKET_STRUCT * Socket ) { if( Socket->com == ( HB_SOCKET_T ) -1 ) { @@ -290,7 +290,7 @@ static BOOL hb_inetIsOpen( HB_SOCKET_STRUCT *Socket ) /* Useful utility function to have a timeout; */ -static int hb_selectReadSocket( HB_SOCKET_STRUCT *Socket ) +static int hb_selectReadSocket( HB_SOCKET_STRUCT * Socket ) { fd_set set; struct timeval tv; @@ -299,7 +299,7 @@ static int hb_selectReadSocket( HB_SOCKET_STRUCT *Socket ) hb_vmUnlock(); FD_ZERO( &set ); - FD_SET(Socket->com, &set); + FD_SET( Socket->com, &set ); if( Socket->timeout == -1 ) { @@ -307,8 +307,8 @@ static int hb_selectReadSocket( HB_SOCKET_STRUCT *Socket ) } else { - tv.tv_sec = Socket->timeout/ 1000; - tv.tv_usec = (Socket->timeout % 1000) * 1000; + tv.tv_sec = Socket->timeout / 1000; + tv.tv_usec = ( Socket->timeout % 1000 ) * 1000; iResult = select( Socket->com + 1, &set, NULL, NULL, &tv ); } @@ -317,7 +317,7 @@ static int hb_selectReadSocket( HB_SOCKET_STRUCT *Socket ) return iResult > 0 ? FD_ISSET( Socket->com, &set ) : 0; } -static int hb_selectWriteSocket( HB_SOCKET_STRUCT *Socket ) +static int hb_selectWriteSocket( HB_SOCKET_STRUCT * Socket ) { fd_set set; struct timeval tv; @@ -326,7 +326,7 @@ static int hb_selectWriteSocket( HB_SOCKET_STRUCT *Socket ) hb_vmUnlock(); FD_ZERO( &set ); - FD_SET(Socket->com, &set); + FD_SET( Socket->com, &set ); if( Socket->timeout == -1 ) { @@ -334,8 +334,8 @@ static int hb_selectWriteSocket( HB_SOCKET_STRUCT *Socket ) } else { - tv.tv_sec = Socket->timeout/ 1000; - tv.tv_usec = (Socket->timeout % 1000) * 1000; + tv.tv_sec = Socket->timeout / 1000; + tv.tv_usec = ( Socket->timeout % 1000 ) * 1000; iResult = select( Socket->com + 1, NULL, &set, NULL, &tv ); } @@ -344,8 +344,8 @@ static int hb_selectWriteSocket( HB_SOCKET_STRUCT *Socket ) return iResult > 0 ? FD_ISSET( Socket->com, &set ) : 0; } -#if defined(HB_OS_WIN) -static int hb_selectWriteExceptSocket( HB_SOCKET_STRUCT *Socket ) +#if defined( HB_OS_WIN ) +static int hb_selectWriteExceptSocket( HB_SOCKET_STRUCT * Socket ) { fd_set set, eset; struct timeval tv; @@ -354,9 +354,9 @@ static int hb_selectWriteExceptSocket( HB_SOCKET_STRUCT *Socket ) hb_vmUnlock(); FD_ZERO( &set ); - FD_SET(Socket->com, &set); + FD_SET( Socket->com, &set ); FD_ZERO( &eset ); - FD_SET(Socket->com, &eset); + FD_SET( Socket->com, &eset ); if( Socket->timeout == -1 ) { @@ -364,9 +364,9 @@ static int hb_selectWriteExceptSocket( HB_SOCKET_STRUCT *Socket ) } else { - tv.tv_sec = Socket->timeout/ 1000; - tv.tv_usec = (Socket->timeout % 1000) * 1000; - iResult = select(Socket->com + 1, NULL, &set, &eset, &tv); + tv.tv_sec = Socket->timeout / 1000; + tv.tv_usec = ( Socket->timeout % 1000 ) * 1000; + iResult = select( Socket->com + 1, NULL, &set, &eset, &tv ); } hb_vmLock(); @@ -381,16 +381,16 @@ static int hb_selectWriteExceptSocket( HB_SOCKET_STRUCT *Socket ) #endif /*** Utilty to access host DNS */ -static struct hostent * hb_getHosts( char * name, HB_SOCKET_STRUCT *Socket ) +static struct hostent * hb_getHosts( char * name, HB_SOCKET_STRUCT * Socket ) { - struct hostent *Host = NULL; + struct hostent * Host = NULL; hb_vmUnlock(); /* TOFIX: make it MT safe */ /* let's see if name is an IP address; not necessary on Linux */ -#if defined(HB_OS_WIN) || defined(HB_OS_OS2) +#if defined( HB_OS_WIN ) || defined( HB_OS_OS2 ) { ULONG ulAddr; @@ -398,31 +398,25 @@ static struct hostent * hb_getHosts( char * name, HB_SOCKET_STRUCT *Socket ) if( ulAddr == INADDR_NONE ) { if( strcmp( "255.255.255.255", name ) == 0 ) - { - Host = gethostbyaddr( (const char*) &ulAddr, sizeof( ulAddr ), AF_INET ); - } + Host = gethostbyaddr( ( const char * ) &ulAddr, sizeof( ulAddr ), AF_INET ); } else - { - Host = gethostbyaddr( (const char*) &ulAddr, sizeof( ulAddr ), AF_INET ); - } + Host = gethostbyaddr( ( const char * ) &ulAddr, sizeof( ulAddr ), AF_INET ); } #endif if( Host == NULL ) - { Host = gethostbyname( name ); - } if( Host == NULL && Socket ) { -#if defined(HB_OS_WIN) +#if defined( HB_OS_WIN ) HB_SOCKET_SET_ERROR2( Socket, WSAGetLastError() , "Generic error in gethostbyname()" ); WSASetLastError( 0 ); -#elif defined(HB_OS_OS2) || defined(HB_OS_HPUX) || defined(__WATCOMC__) +#elif defined( HB_OS_OS2 ) || defined( HB_OS_HPUX ) || defined( __WATCOMC__ ) HB_SOCKET_SET_ERROR2( Socket, h_errno, "Generic error in gethostbyname()" ); #else - HB_SOCKET_SET_ERROR2( Socket, h_errno, (char *) hstrerror( h_errno ) ); + HB_SOCKET_SET_ERROR2( Socket, h_errno, ( char * ) hstrerror( h_errno ) ); #endif } @@ -434,7 +428,7 @@ static struct hostent * hb_getHosts( char * name, HB_SOCKET_STRUCT *Socket ) /*** Setup the non-blocking method **/ -static void hb_socketSetNonBlocking( HB_SOCKET_STRUCT *Socket ) +static void hb_socketSetNonBlocking( HB_SOCKET_STRUCT * Socket ) { #if defined( HB_OS_WIN ) ULONG mode = 1; @@ -454,7 +448,7 @@ static void hb_socketSetNonBlocking( HB_SOCKET_STRUCT *Socket ) /*** Setup the blocking method **/ -static void hb_socketSetBlocking( HB_SOCKET_STRUCT *Socket ) +static void hb_socketSetBlocking( HB_SOCKET_STRUCT * Socket ) { #if defined( HB_OS_WIN ) ULONG mode = 0; @@ -473,10 +467,10 @@ static void hb_socketSetBlocking( HB_SOCKET_STRUCT *Socket ) /*** Utility to connect to a defined remote address ***/ -static int hb_socketConnect( HB_SOCKET_STRUCT *Socket ) +static int hb_socketConnect( HB_SOCKET_STRUCT * Socket ) { int iErr1; - #if ! defined(HB_OS_WIN) + #if ! defined( HB_OS_WIN ) int iErrval; socklen_t iErrvalLen; #endif @@ -484,15 +478,15 @@ static int hb_socketConnect( HB_SOCKET_STRUCT *Socket ) hb_vmUnlock(); - setsockopt( Socket->com, SOL_SOCKET, SO_KEEPALIVE, (const char *) &iOpt , sizeof( iOpt )); + setsockopt( Socket->com, SOL_SOCKET, SO_KEEPALIVE, ( const char * ) &iOpt , sizeof( iOpt ) ); /* we'll be using a nonblocking function */ hb_socketSetNonBlocking( Socket ); - iErr1 = connect( Socket->com, (struct sockaddr *) (void *) &Socket->remote, sizeof(Socket->remote) ); + iErr1 = connect( Socket->com, ( struct sockaddr * ) ( void * ) &Socket->remote, sizeof( Socket->remote ) ); if( iErr1 != 0 ) { -#if defined(HB_OS_WIN) +#if defined( HB_OS_WIN ) if( WSAGetLastError() != WSAEWOULDBLOCK ) #else if( errno != EINPROGRESS ) @@ -504,7 +498,7 @@ static int hb_socketConnect( HB_SOCKET_STRUCT *Socket ) { /* Now we wait for socket connection or timeout */ -#if defined(HB_OS_WIN) +#if defined( HB_OS_WIN ) iErr1 = hb_selectWriteExceptSocket( Socket ); if( iErr1 == 2 ) { @@ -522,7 +516,7 @@ static int hb_socketConnect( HB_SOCKET_STRUCT *Socket ) iErr1 = getsockopt( Socket->com, SOL_SOCKET, SO_ERROR, - (void *) &iErrval, + ( void * ) &iErrval, &iErrvalLen ); @@ -555,15 +549,15 @@ static int hb_socketConnect( HB_SOCKET_STRUCT *Socket ) static HB_GARBAGE_FUNC( hb_inetSocketFinalize ) { - HB_SOCKET_STRUCT *Socket = ( HB_SOCKET_STRUCT *) Cargo; + HB_SOCKET_STRUCT * Socket = ( HB_SOCKET_STRUCT * ) Cargo; if( Socket->com != ( HB_SOCKET_T ) -1 ) { #if defined( HB_OS_WIN ) shutdown( Socket->com, SD_BOTH ); - #elif defined(HB_OS_OS2) + #elif defined( HB_OS_OS2 ) shutdown( Socket->com, SO_RCV_SHUTDOWN + SO_SND_SHUTDOWN ); - #elif !defined(__WATCOMC__) + #elif !defined( __WATCOMC__ ) shutdown( Socket->com, SHUT_RDWR ); #endif @@ -590,10 +584,10 @@ HB_FUNC( HB_INETINIT ) } else { - #if defined(HB_OS_WIN) - #define HB_MKWORD( l, h ) ((WORD)(((BYTE)(l)) | (((WORD)((BYTE)(h))) << 8))) + #if defined( HB_OS_WIN ) + #define HB_MKWORD( l, h ) ((WORD)(((BYTE)(l)) | (((WORD)((BYTE)(h))) << 8))) WSADATA wsadata; - WSAStartup( HB_MKWORD(1,1), &wsadata ); + WSAStartup( HB_MKWORD( 1, 1 ), &wsadata ); #elif defined( HB_INET_LINUX_INTERRUPT ) signal( HB_INET_LINUX_INTERRUPT, hb_inetLinuxSigusrHandle ); #endif @@ -605,7 +599,7 @@ HB_FUNC( HB_INETCLEANUP ) { if( --s_iSessions == 0 ) { - #if defined(HB_OS_WIN) + #if defined( HB_OS_WIN ) WSACleanup(); #endif } @@ -618,17 +612,17 @@ HB_FUNC( HB_INETCLEANUP ) HB_FUNC( HB_INETCREATE ) { PHB_ITEM pSocket = NULL; - HB_SOCKET_STRUCT *Socket; + HB_SOCKET_STRUCT * Socket; HB_SOCKET_INIT( Socket, pSocket ); - if( ISNUM( 1 ) ) - Socket->timeout = hb_parni(1); + if( HB_ISNUM( 1 ) ) + Socket->timeout = hb_parni( 1 ); hb_itemReturnRelease( pSocket ); } HB_FUNC( HB_INETCLOSE ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -638,9 +632,9 @@ HB_FUNC( HB_INETCLOSE ) #if defined( HB_OS_WIN ) shutdown( Socket->com, SD_BOTH ); - #elif defined(HB_OS_OS2) + #elif defined( HB_OS_OS2 ) shutdown( Socket->com, SO_RCV_SHUTDOWN + SO_SND_SHUTDOWN ); - #elif !defined(__WATCOMC__) + #elif !defined( __WATCOMC__ ) shutdown( Socket->com, SHUT_RDWR ); #endif @@ -659,14 +653,14 @@ HB_FUNC( HB_INETCLOSE ) HB_FUNC( HB_INETFD ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); else { hb_retnint( Socket->com ); - if( ISLOG( 2 ) && hb_parl( 2 ) ) + if( HB_ISLOG( 2 ) && hb_parl( 2 ) ) Socket->com = ( HB_SOCKET_T ) -1; } } @@ -677,7 +671,7 @@ HB_FUNC( HB_INETFD ) HB_FUNC( HB_INETSTATUS ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -689,7 +683,7 @@ HB_FUNC( HB_INETSTATUS ) /* Prepared, but still not used; being in wait for comments HB_FUNC( HB_INETSTATUSDESC ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) { @@ -709,7 +703,7 @@ HB_FUNC( HB_INETSTATUSDESC ) HB_FUNC( HB_INETERRORCODE ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -719,7 +713,7 @@ HB_FUNC( HB_INETERRORCODE ) HB_FUNC( HB_INETERRORDESC ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) { @@ -732,7 +726,7 @@ HB_FUNC( HB_INETERRORDESC ) HB_FUNC( HB_INETCLEARERROR ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -743,7 +737,7 @@ HB_FUNC( HB_INETCLEARERROR ) HB_FUNC( HB_INETCOUNT ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -753,7 +747,7 @@ HB_FUNC( HB_INETCOUNT ) HB_FUNC( HB_INETADDRESS ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); char *addr; if( Socket == NULL ) @@ -767,7 +761,7 @@ HB_FUNC( HB_INETADDRESS ) HB_FUNC( HB_INETPORT ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -778,12 +772,12 @@ HB_FUNC( HB_INETPORT ) HB_FUNC( HB_INETTIMEOUT ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket ) { hb_retni( Socket->timeout ); - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) Socket->timeout = hb_parni( 2 ); } else @@ -792,7 +786,7 @@ HB_FUNC( HB_INETTIMEOUT ) HB_FUNC( HB_INETCLEARTIMEOUT ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -802,21 +796,21 @@ HB_FUNC( HB_INETCLEARTIMEOUT ) HB_FUNC( HB_INETTIMELIMIT ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); else { hb_retnl( Socket->timelimit ); - if( ISNUM( 2 ) ) - Socket->timelimit = hb_parnl(2); + if( HB_ISNUM( 2 ) ) + Socket->timelimit = hb_parnl( 2 ); } } HB_FUNC( HB_INETCLEARTIMELIMIT ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -826,7 +820,7 @@ HB_FUNC( HB_INETCLEARTIMELIMIT ) HB_FUNC( HB_INETPERIODCALLBACK ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); PHB_ITEM pExec = hb_param( 2, HB_IT_ARRAY | HB_IT_BLOCK | HB_IT_SYMBOL ); if( Socket == NULL ) @@ -846,7 +840,7 @@ HB_FUNC( HB_INETPERIODCALLBACK ) HB_FUNC( HB_INETCLEARPERIODCALLBACK ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -863,7 +857,7 @@ HB_FUNC( HB_INETGETSNDBUFSIZE ) if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) hb_retni( -1 ); else { @@ -884,7 +878,7 @@ HB_FUNC( HB_INETGETRCVBUFSIZE ) if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) hb_retni( -1 ); else { @@ -905,7 +899,7 @@ HB_FUNC( HB_INETSETSNDBUFSIZE ) if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) hb_retni( -1 ); else { @@ -925,7 +919,7 @@ HB_FUNC( HB_INETSETRCVBUFSIZE ) if( Socket == NULL ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) hb_retni( -1 ); else { @@ -947,18 +941,18 @@ HB_FUNC( HB_INETSETRCVBUFSIZE ) static void s_inetRecvInternal( int iMode ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING ); char *buffer; int iLen, iMaxLen, iReceived; int iTimeElapsed; - if( Socket == NULL || pBuffer == NULL || !ISBYREF( 2 ) ) + if( Socket == NULL || pBuffer == NULL || ! HB_ISBYREF( 2 ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { hb_retni( 0 ); return; @@ -968,7 +962,7 @@ static void s_inetRecvInternal( int iMode ) buffer = hb_itemGetCPtr( pBuffer ); iLen = hb_itemGetCLen( pBuffer ); - if( ISNIL( 3 ) ) + if( HB_ISNIL( 3 ) ) { iMaxLen = iLen; } @@ -1063,9 +1057,9 @@ HB_FUNC( HB_INETRECVALL ) } -static void s_inetRecvPattern( const char *szPattern ) +static void s_inetRecvPattern( const char * szPattern ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); PHB_ITEM pResult = hb_param( 2, HB_IT_BYREF ); PHB_ITEM pMaxSize = hb_param( 3, HB_IT_NUMERIC ); PHB_ITEM pBufferSize = hb_param( 4, HB_IT_NUMERIC ); @@ -1081,35 +1075,20 @@ static void s_inetRecvPattern( const char *szPattern ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { hb_retni( 0 ); return; } - if( pBufferSize ) - { - iBufferSize = hb_itemGetNI( pBufferSize ); - } - else - { - iBufferSize = 80; - } - - if( pMaxSize ) - { - iMax = hb_itemGetNI( pMaxSize ); - } - else - { - iMax = 0; - } + iBufferSize = pBufferSize ? hb_itemGetNI( pBufferSize ) : 0; + iMax = pMaxSize ? hb_itemGetNI( pMaxSize ) : 0; hb_vmUnlock(); HB_SOCKET_ZERO_ERROR( Socket ); - Buffer = (char *) hb_xgrab( iBufferSize ); + Buffer = ( char * ) hb_xgrab( iBufferSize ); iAllocated = iBufferSize; iTimeElapsed = 0; iPatLen = ( int ) strlen( szPattern ); @@ -1160,9 +1139,7 @@ static void s_inetRecvPattern( const char *szPattern ) } } else - { break; - } } while( iMax == 0 || iPos < iMax ); @@ -1171,9 +1148,7 @@ static void s_inetRecvPattern( const char *szPattern ) if( iLen <= 0 ) { if( pResult ) - { hb_itemPutNI( pResult, iLen ); - } if( iLen == 0 ) { @@ -1188,7 +1163,7 @@ static void s_inetRecvPattern( const char *szPattern ) HB_SOCKET_SET_ERROR( Socket ); } - hb_xfree( (void *) Buffer ); + hb_xfree( ( void * ) Buffer ); } else { @@ -1198,9 +1173,7 @@ static void s_inetRecvPattern( const char *szPattern ) Socket->count = iPos; if( pResult ) - { hb_itemPutNI( pResult, iPos ); - } hb_retclen_buffer( Buffer, iPos ); } @@ -1209,11 +1182,9 @@ static void s_inetRecvPattern( const char *szPattern ) HB_SOCKET_SET_ERROR2( Socket, -3, "Buffer overrun" ); if( pResult ) - { hb_itemPutNI( pResult, -2 ); - } - hb_xfree( (void *) Buffer ); + hb_xfree( ( void * ) Buffer ); hb_retc( NULL ); } } @@ -1226,7 +1197,7 @@ HB_FUNC( HB_INETRECVLINE ) HB_FUNC( HB_INETRECVENDBLOCK ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); PHB_ITEM pProto = hb_param( 2, HB_IT_ARRAY | HB_IT_STRING ); PHB_ITEM pResult = hb_param( 3, HB_IT_BYREF ); PHB_ITEM pMaxSize = hb_param( 4, HB_IT_NUMERIC ); @@ -1246,13 +1217,12 @@ HB_FUNC( HB_INETRECVENDBLOCK ) int ifindproto = 0; BOOL bProtoFound; - if( Socket == NULL ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { if( pResult ) hb_itemPutNI( pResult, -1 ); @@ -1264,15 +1234,15 @@ HB_FUNC( HB_INETRECVENDBLOCK ) { if( HB_IS_ARRAY( pProto ) ) { - iprotos = (int) hb_arrayLen( pProto ); + iprotos = ( int ) hb_arrayLen( pProto ); if( iprotos <= 0 ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - Proto = (char**) hb_xgrab( sizeof(char*) * iprotos ); - iprotosize = (int *) hb_xgrab( sizeof(int) * iprotos ); + Proto = ( char ** ) hb_xgrab( sizeof( char * ) * iprotos ); + iprotosize = ( int * ) hb_xgrab( sizeof( int ) * iprotos ); for( i = 0; i < iprotos; i++ ) { @@ -1282,20 +1252,20 @@ HB_FUNC( HB_INETRECVENDBLOCK ) } else { - Proto = (char**) hb_xgrab( sizeof(char*) ); - iprotosize = (int *) hb_xgrab( sizeof(int) ); - Proto[0] = hb_itemGetCPtr( pProto ); - iprotosize[0] = hb_itemGetCLen( pProto ); - iprotos = 1; + Proto = ( char ** ) hb_xgrab( sizeof( char * ) ); + iprotosize = ( int * ) hb_xgrab( sizeof( int ) ); + Proto[ 0 ] = hb_itemGetCPtr( pProto ); + iprotosize[ 0 ] = hb_itemGetCLen( pProto ); + iprotos = 1; } } else { - Proto = (char**) hb_xgrab( sizeof(char*) ); - iprotosize = (int *) hb_xgrab( sizeof(int) ); - Proto[0] = (char *) "\r\n"; - iprotos = 1; - iprotosize[0] = 2; + Proto = ( char ** ) hb_xgrab( sizeof( char * ) ); + iprotosize = ( int * ) hb_xgrab( sizeof( int ) ); + Proto[ 0 ] = ( char * ) "\r\n"; + iprotos = 1; + iprotosize[ 0 ] = 2; } iBufferSize = pBufferSize ? hb_itemGetNI( pBufferSize ) : 80; @@ -1305,7 +1275,7 @@ HB_FUNC( HB_INETRECVENDBLOCK ) HB_SOCKET_ZERO_ERROR( Socket ); - Buffer = (char *) hb_xgrab( iBufferSize ); + Buffer = ( char * ) hb_xgrab( iBufferSize ); iAllocated = iBufferSize; do @@ -1351,24 +1321,26 @@ HB_FUNC( HB_INETRECVENDBLOCK ) for( protos = 0; protos < iprotos; protos++ ) { - if( cChar == Proto[protos][iprotosize[protos] - 1] && iprotosize[protos] <= iPos ) + if( cChar == Proto[ protos ][ iprotosize[ protos ] - 1 ] && iprotosize[ protos ] <= iPos ) { bProtoFound = 1; - for( iPosProto = 0; iPosProto < ( iprotosize[protos] - 1 ); iPosProto++ ) + for( iPosProto = 0; iPosProto < ( iprotosize[ protos ] - 1 ); iPosProto++ ) { - if( Proto[protos][iPosProto] != Buffer[ ( iPos - iprotosize[protos] ) + iPosProto + 1 ] ) + if( Proto[ protos ][ iPosProto ] != Buffer[ ( iPos - iprotosize[ protos ] ) + iPosProto + 1 ] ) { bProtoFound = 0; break; } } - if(bProtoFound) + + if( bProtoFound ) { ifindproto = protos; break; } } } + if( bProtoFound ) break; @@ -1384,9 +1356,7 @@ HB_FUNC( HB_INETRECVENDBLOCK ) if( iLen <= 0 ) { if( pResult ) - { hb_itemPutNI( pResult, iLen ); - } if( iLen == 0 ) { @@ -1411,22 +1381,18 @@ HB_FUNC( HB_INETRECVENDBLOCK ) Socket->count = iPos; if( pResult ) - { - hb_itemPutNI( pResult, iPos - (iprotosize[ifindproto]-1) ); - } + hb_itemPutNI( pResult, iPos - ( iprotosize[ ifindproto ] - 1 ) ); - hb_retclen_buffer( Buffer, iPos - (iprotosize[ifindproto]-1) ); + hb_retclen_buffer( Buffer, iPos - ( iprotosize[ ifindproto ] - 1 ) ); } else { HB_SOCKET_SET_ERROR2( Socket, -1, "Buffer overrun" ); if( pResult ) - { hb_itemPutNI( pResult, -2 ); - } - hb_xfree( (void *) Buffer ); + hb_xfree( ( void * ) Buffer ); hb_retc( NULL ); } } @@ -1437,35 +1403,35 @@ HB_FUNC( HB_INETRECVENDBLOCK ) HB_FUNC( HB_INETDATAREADY ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); int iVal; fd_set rfds; - struct timeval tv = {0,0}; + struct timeval tv = { 0, 0 }; - if( Socket == NULL || ( hb_pcount() > 1 && ! ISNUM( 2 ) ) ) + if( Socket == NULL || ( hb_pcount() > 1 && ! HB_ISNUM( 2 ) ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { hb_retl( FALSE ); return; } - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { iVal = hb_parni( 2 ); tv.tv_sec = iVal / 1000; - tv.tv_usec = (iVal % 1000) * 1000; + tv.tv_usec = ( iVal % 1000 ) * 1000; } hb_vmUnlock(); HB_SOCKET_ZERO_ERROR( Socket ); - FD_ZERO(&rfds); - FD_SET(Socket->com, &rfds); + FD_ZERO( &rfds ); + FD_SET( Socket->com, &rfds ); iVal = select( Socket->com + 1, &rfds, NULL, NULL, &tv ); /* Don't rely on the value of tv now! */ @@ -1483,9 +1449,9 @@ HB_FUNC( HB_INETDATAREADY ) static void s_inetSendInternal( int iMode ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING ); - char *Buffer; + char * Buffer; int iLen, iSent, iSend; if( Socket == NULL || pBuffer == NULL ) @@ -1493,7 +1459,7 @@ static void s_inetSendInternal( int iMode ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { hb_retni( 0 ); return; @@ -1501,7 +1467,7 @@ static void s_inetSendInternal( int iMode ) Buffer = hb_itemGetCPtr( pBuffer ); iSend = ( int ) hb_itemGetCLen( pBuffer ); - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { iLen = hb_parni( 3 ); if( iLen < iSend ) @@ -1563,7 +1529,7 @@ HB_FUNC( HB_INETSENDALL ) HB_FUNC( HB_INETGETHOSTS ) { char * szHost = hb_parc( 1 ); - struct hostent *Host; + struct hostent * Host; char ** cHosts; int iCount = 0; @@ -1605,7 +1571,7 @@ HB_FUNC( HB_INETGETHOSTS ) HB_FUNC( HB_INETGETALIAS ) { char * szHost = hb_parc( 1 ); - struct hostent *Host; + struct hostent * Host; char ** cHosts; int iCount = 0; @@ -1650,7 +1616,7 @@ HB_FUNC( HB_INETGETALIAS ) HB_FUNC( HB_INETSERVER ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 2 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 2 ); PHB_ITEM pSocket = NULL; char * szAddress; int iPort; @@ -1658,7 +1624,7 @@ HB_FUNC( HB_INETSERVER ) int iListen; /* Parameter error checking */ - if( ! ISNUM( 1 ) || ( Socket == NULL && !ISNIL( 2 ) ) ) + if( ! HB_ISNUM( 1 ) || ( Socket == NULL && ! HB_ISNIL( 2 ) ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; @@ -1670,7 +1636,7 @@ HB_FUNC( HB_INETSERVER ) HB_SOCKET_INIT( Socket, pSocket ); /* Creates comm socket */ -#if defined(HB_OS_WIN) +#if defined( HB_OS_WIN ) Socket->com = socket( AF_INET, SOCK_STREAM, 0 ); #else Socket->com = socket( PF_INET, SOCK_STREAM, 0 ); @@ -1690,7 +1656,7 @@ HB_FUNC( HB_INETSERVER ) /* hb_socketSetNonBlocking( Socket ); */ /* Reusable socket; under unix, do not wait it is unused */ - setsockopt( Socket->com, SOL_SOCKET, SO_REUSEADDR, (const char *) &iOpt, sizeof( iOpt ) ); + setsockopt( Socket->com, SOL_SOCKET, SO_REUSEADDR, ( const char * ) &iOpt, sizeof( iOpt ) ); iPort = htons( hb_parni( 1 ) ); @@ -1700,11 +1666,11 @@ HB_FUNC( HB_INETSERVER ) szAddress = hb_parc( 2 ); Socket->remote.sin_addr.s_addr = szAddress ? inet_addr( szAddress ) : INADDR_ANY; - iListen = ISNUM( 3 ) ? hb_parni( 3 ) : 10; + iListen = HB_ISNUM( 3 ) ? hb_parni( 3 ) : 10; hb_vmUnlock(); - if( bind( Socket->com, (struct sockaddr *) (void *) &Socket->remote, sizeof(Socket->remote) ) ) + if( bind( Socket->com, ( struct sockaddr * ) ( void * ) &Socket->remote, sizeof( Socket->remote ) ) ) { HB_SOCKET_SET_ERROR( Socket ); HB_INET_CLOSE( Socket->com ); @@ -1727,11 +1693,11 @@ HB_FUNC( HB_INETSERVER ) HB_FUNC( HB_INETACCEPT ) { -#if !defined(EAGAIN) -#define EAGAIN -1 +#ifndef EAGAIN + #define EAGAIN -1 #endif - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); - HB_SOCKET_STRUCT *NewSocket; + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * NewSocket; HB_SOCKET_T incoming = 0; int iError = EAGAIN; struct sockaddr_in si_remote; @@ -1742,10 +1708,8 @@ HB_FUNC( HB_INETACCEPT ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) - { + else if( ! hb_inetIsOpen( Socket ) ) return; - } hb_vmUnlock(); @@ -1767,11 +1731,11 @@ HB_FUNC( HB_INETACCEPT ) { /* On error (e.g. async connection closed) , com will be -1 and errno == 22 (invalid argument ) */ - incoming = accept( Socket->com, (struct sockaddr *) (void *) &si_remote, &Len ); + incoming = accept( Socket->com, ( struct sockaddr * ) ( void * ) &si_remote, &Len ); if( incoming == ( HB_SOCKET_T ) -1 ) { -#if defined(HB_OS_WIN) +#if defined( HB_OS_WIN ) iError = WSAGetLastError(); #else iError = errno; @@ -1780,9 +1744,8 @@ HB_FUNC( HB_INETACCEPT ) else iError = 0; } - /* Timeout expired */ else - iError = -1; + iError = -1; /* Timeout expired */ } hb_vmLock(); @@ -1815,12 +1778,12 @@ HB_FUNC( HB_INETACCEPT ) HB_FUNC( HB_INETCONNECT ) { char * szHost = hb_parc( 1 ); - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 3 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 3 ); PHB_ITEM pSocket = NULL; - struct hostent *Host; + struct hostent * Host; int iPort; - if( szHost == NULL || !ISNUM( 2 ) || ( Socket == NULL && !ISNIL( 3 ) ) ) + if( szHost == NULL || ! HB_ISNUM( 2 ) || ( Socket == NULL && ! HB_ISNIL( 3 ) ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; @@ -1845,7 +1808,7 @@ HB_FUNC( HB_INETCONNECT ) if( Host ) { /* Creates comm socket */ -#if defined(HB_OS_WIN) +#if defined( HB_OS_WIN ) Socket->com = socket( AF_INET, SOCK_STREAM, 0); #else Socket->com = socket( PF_INET, SOCK_STREAM, 0); @@ -1861,7 +1824,7 @@ HB_FUNC( HB_INETCONNECT ) Socket->remote.sin_family = AF_INET; Socket->remote.sin_port= iPort; - Socket->remote.sin_addr.s_addr = (*(UINT *)Host->h_addr_list[0]); + Socket->remote.sin_addr.s_addr = ( * ( UINT * ) Host->h_addr_list[ 0 ] ); hb_socketConnect( Socket ); } @@ -1877,11 +1840,11 @@ HB_FUNC( HB_INETCONNECT ) HB_FUNC( HB_INETCONNECTIP ) { char * szHost = hb_parc( 1 ); - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 3 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 3 ); PHB_ITEM pSocket = NULL; int iPort = hb_parni( 2 ); - if( szHost == NULL || iPort == 0 || ( Socket == NULL && !ISNIL( 3 ) ) ) + if( szHost == NULL || iPort == 0 || ( Socket == NULL && ! HB_ISNIL( 3 ) ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; @@ -1902,10 +1865,10 @@ HB_FUNC( HB_INETCONNECTIP ) } /* Creates comm socket */ -#if defined(HB_OS_WIN) - Socket->com = socket( AF_INET, SOCK_STREAM, 0); +#if defined( HB_OS_WIN ) + Socket->com = socket( AF_INET, SOCK_STREAM, 0 ); #else - Socket->com = socket( PF_INET, SOCK_STREAM, 0); + Socket->com = socket( PF_INET, SOCK_STREAM, 0 ); #endif if( Socket->com == ( HB_SOCKET_T ) -1 ) @@ -1917,7 +1880,7 @@ HB_FUNC( HB_INETCONNECTIP ) iPort = htons( iPort ); Socket->remote.sin_family = AF_INET; - Socket->remote.sin_port= iPort; + Socket->remote.sin_port = iPort; Socket->remote.sin_addr.s_addr = inet_addr( szHost ); hb_socketConnect( Socket ); @@ -1935,14 +1898,14 @@ HB_FUNC( HB_INETCONNECTIP ) HB_FUNC( HB_INETDGRAMBIND ) { - HB_SOCKET_STRUCT *Socket; + HB_SOCKET_STRUCT * Socket; PHB_ITEM pSocket = NULL; - int iPort = hb_parni(1); + int iPort = hb_parni( 1 ); int iOpt = 1; char * szAddress; /* Parameter error checking */ - if( iPort == 0 || ( hb_pcount() > 3 && ! ISCHAR( 4 ) ) ) + if( iPort == 0 || ( hb_pcount() > 3 && ! HB_ISCHAR( 4 ) ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; @@ -1951,11 +1914,11 @@ HB_FUNC( HB_INETDGRAMBIND ) HB_SOCKET_INIT( Socket, pSocket ); /* Creates comm socket */ - #if defined(HB_OS_WIN) - Socket->com = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); - #else - Socket->com = socket( PF_INET, SOCK_DGRAM, 0 ); - #endif +#if defined( HB_OS_WIN ) + Socket->com = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); +#else + Socket->com = socket( PF_INET, SOCK_DGRAM, 0 ); +#endif if( Socket->com == ( HB_SOCKET_T ) -1 ) { @@ -1965,13 +1928,13 @@ HB_FUNC( HB_INETDGRAMBIND ) } /* Reusable socket; under unix, do not wait it is unused */ - setsockopt( Socket->com, SOL_SOCKET, SO_REUSEADDR, (const char *) &iOpt, sizeof( iOpt )); + setsockopt( Socket->com, SOL_SOCKET, SO_REUSEADDR, ( const char * ) &iOpt, sizeof( iOpt ) ); /* Setting broadcast if needed. */ if( hb_parl( 3 ) ) { iOpt = 1; - setsockopt( Socket->com, SOL_SOCKET, SO_BROADCAST, (const char *) &iOpt, sizeof( iOpt )); + setsockopt( Socket->com, SOL_SOCKET, SO_BROADCAST, ( const char * ) &iOpt, sizeof( iOpt ) ); } /* Binding here */ @@ -1985,7 +1948,7 @@ HB_FUNC( HB_INETDGRAMBIND ) hb_vmUnlock(); - if( bind( Socket->com, (struct sockaddr *) (void *) &Socket->remote, sizeof(Socket->remote) ) ) + if( bind( Socket->com, ( struct sockaddr * ) ( void * ) &Socket->remote, sizeof( Socket->remote ) ) ) { HB_SOCKET_SET_ERROR( Socket ); HB_INET_CLOSE( Socket->com ); @@ -2005,7 +1968,7 @@ HB_FUNC( HB_INETDGRAMBIND ) struct in_addr imr_interface; /* local IP address of interface */ }; - struct ip_mreq mreq ; + struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = inet_addr( hb_parc( 4 ) ); /* HELLO_GROUP */ mreq.imr_interface.s_addr = htonl( INADDR_ANY ); @@ -2019,7 +1982,7 @@ HB_FUNC( HB_INETDGRAMBIND ) # define IPPROTO_IP 0 #endif - if( setsockopt( Socket->com, IPPROTO_IP, IP_ADD_MEMBERSHIP, (const char *) &mreq, sizeof( mreq ) ) < 0 ) + if( setsockopt( Socket->com, IPPROTO_IP, IP_ADD_MEMBERSHIP, ( const char * ) &mreq, sizeof( mreq ) ) < 0 ) { HB_SOCKET_SET_ERROR( Socket ); } @@ -2032,18 +1995,18 @@ HB_FUNC( HB_INETDGRAMBIND ) HB_FUNC( HB_INETDGRAM ) { - HB_SOCKET_STRUCT *Socket; + HB_SOCKET_STRUCT * Socket; PHB_ITEM pSocket = NULL; int iOpt = 1; HB_SOCKET_INIT( Socket, pSocket ); /* Creates comm socket */ - #if defined(HB_OS_WIN) - Socket->com = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); - #else - Socket->com = socket( PF_INET, SOCK_DGRAM, 0 ); - #endif +#if defined( HB_OS_WIN ) + Socket->com = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); +#else + Socket->com = socket( PF_INET, SOCK_DGRAM, 0 ); +#endif if( Socket->com == ( HB_SOCKET_T ) -1 ) { @@ -2056,7 +2019,7 @@ HB_FUNC( HB_INETDGRAM ) if( hb_parl( 1 ) ) { iOpt = 1; - setsockopt( Socket->com, SOL_SOCKET, SO_BROADCAST, (const char *) &iOpt, sizeof( iOpt )); + setsockopt( Socket->com, SOL_SOCKET, SO_BROADCAST, ( const char * ) &iOpt, sizeof( iOpt ) ); } /* we'll be using non blocking sockets in all functions */ /* hb_socketSetNonBlocking( Socket ); */ @@ -2066,12 +2029,12 @@ HB_FUNC( HB_INETDGRAM ) HB_FUNC( HB_INETDGRAMSEND ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); char * szAddress = hb_parc( 2 ); int iPort = hb_parni( 3 ); PHB_ITEM pBuffer = hb_param( 4, HB_IT_STRING ); int iLen; - char *szBuffer ; + char * szBuffer; if( Socket == NULL || szAddress == NULL || iPort == 0 || pBuffer == NULL ) @@ -2079,7 +2042,7 @@ HB_FUNC( HB_INETDGRAMSEND ) hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { Socket->count = 0; hb_retni( 0 ); @@ -2092,7 +2055,7 @@ HB_FUNC( HB_INETDGRAMSEND ) szBuffer = hb_itemGetCPtr( pBuffer ); iLen = ( int ) hb_itemGetCLen( pBuffer ); - if( ISNUM( 5 ) ) + if( HB_ISNUM( 5 ) ) { int iMaxLen = hb_parni( 5 ); @@ -2108,7 +2071,7 @@ HB_FUNC( HB_INETDGRAMSEND ) if( hb_selectWriteSocket( Socket ) ) { Socket->count = sendto( Socket->com, szBuffer, iLen, 0, - (const struct sockaddr *) (void *) &Socket->remote, sizeof( Socket->remote ) ); + ( const struct sockaddr * ) ( void * ) &Socket->remote, sizeof( Socket->remote ) ); } hb_vmLock(); @@ -2124,26 +2087,25 @@ HB_FUNC( HB_INETDGRAMSEND ) Socket->count = 0; HB_SOCKET_SET_ERROR( Socket ); } - } HB_FUNC( HB_INETDGRAMRECV ) { - HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 ); + HB_SOCKET_STRUCT * Socket = HB_PARSOCKET( 1 ); PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING ); int iTimeElapsed = 0; int iLen, iMaxLen; - char *Buffer; + char * Buffer; BOOL fRepeat; socklen_t iDtLen = ( socklen_t ) sizeof( struct sockaddr ); - if( Socket == NULL || pBuffer == NULL || !ISBYREF( 2 ) ) + if( Socket == NULL || pBuffer == NULL || ! HB_ISBYREF( 2 ) ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); return; } - else if( !hb_inetIsOpen( Socket ) ) + else if( ! hb_inetIsOpen( Socket ) ) { Socket->count = 0; hb_retni( -1 ); @@ -2153,14 +2115,7 @@ HB_FUNC( HB_INETDGRAMRECV ) pBuffer = hb_itemUnShare( pBuffer ); Buffer = hb_itemGetCPtr( pBuffer ); - if( ISNUM( 3 ) ) - { - iMaxLen = hb_parni( 3 ); - } - else - { - iMaxLen = ( int ) hb_itemGetCLen( pBuffer ); - } + iMaxLen = HB_ISNUM( 3 ) ? hb_parni( 3 ) : ( int ) hb_itemGetCLen( pBuffer ); hb_vmUnlock(); @@ -2173,7 +2128,7 @@ HB_FUNC( HB_INETDGRAMRECV ) if( hb_selectReadSocket( Socket ) ) { iLen = recvfrom( Socket->com, Buffer, iMaxLen, 0, - (struct sockaddr *) (void *) &Socket->remote, &iDtLen ); + ( struct sockaddr * ) ( void * ) &Socket->remote, &iDtLen ); } iTimeElapsed += Socket->timeout; if( Socket->caPeriodic ) @@ -2205,9 +2160,7 @@ HB_FUNC( HB_INETDGRAMRECV ) Socket->count = 0; } else - { Socket->count = iLen; - } hb_vmLock(); diff --git a/harbour/source/rtl/hbprocfn.c b/harbour/source/rtl/hbprocfn.c index 07503a43ac..aaa4691a95 100644 --- a/harbour/source/rtl/hbprocfn.c +++ b/harbour/source/rtl/hbprocfn.c @@ -69,11 +69,11 @@ HB_FUNC( HB_PROCESSOPEN ) ULONG ulPID; if( szName && - ( pStdIn || ISNIL( 2 ) ) && - ( pStdOut || ISNIL( 3 ) ) && - ( pStdErr || ISNIL( 4 ) ) && - ( ISLOG( 5 ) || ISNIL( 5 ) ) && - ( ISBYREF( 6 ) || ISNIL( 6 ) ) && + ( pStdIn || HB_ISNIL( 2 ) ) && + ( pStdOut || HB_ISNIL( 3 ) ) && + ( pStdErr || HB_ISNIL( 4 ) ) && + ( HB_ISLOG( 5 ) || HB_ISNIL( 5 ) ) && + ( HB_ISBYREF( 6 ) || HB_ISNIL( 6 ) ) && ( !pStdIn || ( pStdIn != pStdOut && pStdIn != pStdErr ) ) ) { phStdIn = pStdIn ? &hStdIn : NULL; @@ -102,7 +102,7 @@ HB_FUNC( HB_PROCESSVALUE ) { HB_FHANDLE hProcess = hb_numToHandle( hb_parnint( 1 ) ); - if( hProcess != 0 && hProcess != FS_ERROR && ( hb_pcount() < 2 || ISLOG( 2 ) ) ) + if( hProcess != 0 && hProcess != FS_ERROR && ( hb_pcount() < 2 || HB_ISLOG( 2 ) ) ) hb_retni( hb_fsProcessValue( hProcess, hb_pcount() < 2 || hb_parl( 2 ) ) ); else hb_errRT_BASE_SubstR( EG_ARG, 4001, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -112,7 +112,7 @@ HB_FUNC( HB_PROCESSCLOSE ) { HB_FHANDLE hProcess = hb_numToHandle( hb_parnint( 1 ) ); - if( hProcess != 0 && hProcess != FS_ERROR && ( hb_pcount() < 2 || ISLOG( 2 ) ) ) + if( hProcess != 0 && hProcess != FS_ERROR && ( hb_pcount() < 2 || HB_ISLOG( 2 ) ) ) hb_retl( hb_fsProcessClose( hProcess, hb_pcount() < 2 || hb_parl( 2 ) ) ); else hb_errRT_BASE_SubstR( EG_ARG, 4001, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/rtl/hbrandom.c b/harbour/source/rtl/hbrandom.c index f0d72d66bf..7ebe827d01 100644 --- a/harbour/source/rtl/hbrandom.c +++ b/harbour/source/rtl/hbrandom.c @@ -73,9 +73,9 @@ HB_FUNC( HB_RANDOM ) { double dRnd = hb_random_num(); - if( ! ISNUM( 1 ) ) + if( ! HB_ISNUM( 1 ) ) hb_retnd( dRnd ); - else if( ! ISNUM( 2 ) ) + else if( ! HB_ISNUM( 2 ) ) hb_retnd( dRnd * hb_parnd( 1 ) ); else { @@ -103,9 +103,9 @@ HB_FUNC( HB_RANDOMINT ) { double dRnd = hb_random_num(); - if( ! ISNUM( 1 ) ) + if( ! HB_ISNUM( 1 ) ) hb_retni( dRnd >= 0.5 ? 0 : 1 ); - else if( ! ISNUM( 2 ) ) + else if( ! HB_ISNUM( 2 ) ) hb_retnint( ( HB_LONG ) ( 1 + ( dRnd * hb_parnint( 1 ) ) ) ); else { @@ -123,7 +123,7 @@ HB_FUNC( HB_RANDOMINT ) HB_FUNC( HB_RANDOMSEED ) { - srand( ISNUM( 1 ) ? ( unsigned ) hb_parni( 1 ) : ( unsigned ) hb_dateMilliSeconds() ); + srand( HB_ISNUM( 1 ) ? ( unsigned ) hb_parni( 1 ) : ( unsigned ) hb_dateMilliSeconds() ); s_fInit = TRUE; } diff --git a/harbour/source/rtl/hbregex.c b/harbour/source/rtl/hbregex.c index ef2e65bb1b..0472f873f6 100644 --- a/harbour/source/rtl/hbregex.c +++ b/harbour/source/rtl/hbregex.c @@ -166,7 +166,7 @@ HB_FUNC( HB_REGEXCOMP ) int iFlags = HBREG_EXTENDED; PHB_REGEX pRegEx; - if( ISLOG( 2 ) && !hb_parl( 2 ) ) + if( HB_ISLOG( 2 ) && !hb_parl( 2 ) ) iFlags |= HBREG_ICASE; if( hb_parl( 3 ) ) iFlags |= HBREG_NEWLINE; @@ -204,7 +204,7 @@ HB_FUNC( HB_ATX ) pszString = hb_itemGetCPtr( pString ); ulLen = hb_itemGetCLen( pString ); pRegEx = hb_regexGet( hb_param( 1, HB_IT_ANY ), - ISLOG( 3 ) && !hb_parl( 3 ) ? HBREG_ICASE : 0 ); + HB_ISLOG( 3 ) && !hb_parl( 3 ) ? HBREG_ICASE : 0 ); if( !pRegEx ) return; @@ -261,7 +261,7 @@ static BOOL hb_regex( int iRequest ) return FALSE; } pRegEx = hb_regexGet( hb_param( 1, HB_IT_ANY ), - ( ISLOG( 3 ) && !hb_parl( 3 ) ? HBREG_ICASE : 0 ) | + ( HB_ISLOG( 3 ) && !hb_parl( 3 ) ? HBREG_ICASE : 0 ) | ( hb_parl( 4 ) ? HBREG_NEWLINE : 0 ) ); if( !pRegEx ) return FALSE; @@ -364,7 +364,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 = !ISLOG( 7 ) || hb_parl( 7 ); /* if TRUE returns only matches and sub-matches, not positions */ + BOOL fOnlyMatch = ! HB_ISLOG( 7 ) || hb_parl( 7 ); /* if TRUE returns only matches and sub-matches, not positions */ ULONG ulOffSet = 0; int iCount = 0; int iSO, iEO; diff --git a/harbour/source/rtl/hbstrsh.c b/harbour/source/rtl/hbstrsh.c index fa1993b309..69b0add393 100644 --- a/harbour/source/rtl/hbstrsh.c +++ b/harbour/source/rtl/hbstrsh.c @@ -60,7 +60,7 @@ HB_FUNC( HB_STRSHRINK ) if( pText ) { long lLen = hb_itemGetCLen( pText ); - long lShrinkBy = ISNUM( 2 ) ? hb_parnl( 2 ) : 1; + long lShrinkBy = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 1; if( lShrinkBy > 0 ) { diff --git a/harbour/source/rtl/hbtoken.c b/harbour/source/rtl/hbtoken.c index 292b27e142..633d0f14c5 100644 --- a/harbour/source/rtl/hbtoken.c +++ b/harbour/source/rtl/hbtoken.c @@ -217,10 +217,10 @@ static BOOL hb_tokenParam( int iParam, ULONG ulSkip, while( ulLen && szLine[ ulLen - 1 ] == szDelim[ 0 ] ) --ulLen; } - if( ISLOG( iParam + 1 ) && hb_parl( iParam + 1 ) ) + if( HB_ISLOG( iParam + 1 ) && hb_parl( iParam + 1 ) ) { iFlags |= _HB_TOK_RESPECT_DQUOTE | _HB_TOK_RESPECT_SQUOTE; - if( ISLOG( iParam + 2 ) && hb_parl( iParam + 2 ) ) + if( HB_ISLOG( iParam + 2 ) && hb_parl( iParam + 2 ) ) iFlags &= ~_HB_TOK_RESPECT_SQUOTE; } } diff --git a/harbour/source/rtl/hbzlib.c b/harbour/source/rtl/hbzlib.c index 93a8c61aff..e042193055 100644 --- a/harbour/source/rtl/hbzlib.c +++ b/harbour/source/rtl/hbzlib.c @@ -104,9 +104,9 @@ HB_FUNC( HB_ZLIBVERSION ) */ HB_FUNC( HB_ZCOMPRESSBOUND ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_retnint( compressBound( hb_parclen( 1 ) ) ); - else if( ISNUM( 1 ) ) + else if( HB_ISNUM( 1 ) ) hb_retnint( compressBound( ( uLong ) hb_parnint( 1 ) ) ); else hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -135,7 +135,7 @@ HB_FUNC( HB_ZCOMPRESS ) if( ulLen ) { - PHB_ITEM pBuffer = ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL; + PHB_ITEM pBuffer = HB_ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL; uLong ulDstLen; char * pDest; int iResult; @@ -148,14 +148,14 @@ HB_FUNC( HB_ZCOMPRESS ) } else { - ulDstLen = ISNUM( 2 ) ? ( uLong ) hb_parnint( 2 ) : + ulDstLen = HB_ISNUM( 2 ) ? ( uLong ) hb_parnint( 2 ) : compressBound( ulLen ); pDest = ( char * ) hb_xalloc( ulDstLen + 1 ); } if( pDest ) { - if( ISNUM( 4 ) ) + if( HB_ISNUM( 4 ) ) iResult = compress2( ( Bytef * ) pDest, &ulDstLen, ( Bytef * ) szData, ulLen, hb_parni( 4 ) ); else iResult = compress( ( Bytef * ) pDest, &ulDstLen, ( Bytef * ) szData, ulLen ); @@ -191,7 +191,7 @@ HB_FUNC( HB_ZCOMPRESS ) */ HB_FUNC( HB_ZUNCOMPRESS ) { - PHB_ITEM pBuffer = ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL; + PHB_ITEM pBuffer = HB_ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL; char * szData = hb_parc( 1 ); if( szData ) @@ -212,7 +212,7 @@ HB_FUNC( HB_ZUNCOMPRESS ) } else { - ulDstLen = ISNUM( 2 ) ? ( uLong ) hb_parnint( 2 ) : + ulDstLen = HB_ISNUM( 2 ) ? ( uLong ) hb_parnint( 2 ) : hb_zlibUncompressedSize( szData, ulLen ); pDest = ( char * ) hb_xalloc( ulDstLen + 1 ); } diff --git a/harbour/source/rtl/hbzlibgz.c b/harbour/source/rtl/hbzlibgz.c index c08b8f0d23..e84645f250 100644 --- a/harbour/source/rtl/hbzlibgz.c +++ b/harbour/source/rtl/hbzlibgz.c @@ -104,7 +104,7 @@ HB_FUNC( HB_GZOPEN ) HB_FUNC( HB_GZDOPEN ) { char * cMode = hb_parc( 2 ); - if( ISNUM( 1 ) && cMode ) + if( HB_ISNUM( 1 ) && cMode ) { gzFile gz = gzdopen( hb_parni( 1 ), cMode ); if( gz ) @@ -141,7 +141,7 @@ HB_FUNC( HB_GZCLOSE ) */ HB_FUNC( HB_GZSETPARAMS ) { - if( ISNUM( 2 ) && ISNUM( 3 ) ) + if( HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { gzFile gz = hb_gzParam( 1 ); if( gz ) @@ -156,7 +156,7 @@ HB_FUNC( HB_GZSETPARAMS ) */ HB_FUNC( HB_GZREAD ) { - PHB_ITEM pBuffer = ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL; + PHB_ITEM pBuffer = HB_ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL; if( pBuffer ) { @@ -164,7 +164,7 @@ HB_FUNC( HB_GZREAD ) if( gz ) { pBuffer = hb_itemUnShareString( pBuffer ); - hb_retni( gzread( gz, hb_itemGetCPtr( pBuffer ), ISNUM( 3 ) ? + hb_retni( gzread( gz, hb_itemGetCPtr( pBuffer ), HB_ISNUM( 3 ) ? ( ULONG ) hb_parnl( 3 ) : hb_itemGetCLen( pBuffer ) ) ); } } @@ -182,7 +182,7 @@ HB_FUNC( HB_GZWRITE ) { gzFile gz = hb_gzParam( 1 ); if( gz ) - hb_retni( gzwrite( gz, szData, ISNUM( 3 ) ? + hb_retni( gzwrite( gz, szData, HB_ISNUM( 3 ) ? ( ULONG ) hb_parnl( 3 ) : hb_parclen( 2 ) ) ); } else @@ -236,7 +236,7 @@ HB_FUNC( HB_GZPUTS ) */ HB_FUNC( HB_GZPUTC ) { - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { gzFile gz = hb_gzParam( 1 ); if( gz ) @@ -261,7 +261,7 @@ HB_FUNC( HB_GZGETC ) */ HB_FUNC( HB_GZUNGETC ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { gzFile gz = hb_gzParam( 2 ); if( gz ) @@ -278,7 +278,7 @@ HB_FUNC( HB_GZFLUSH ) { gzFile gz = hb_gzParam( 1 ); if( gz ) - hb_retni( gzflush( gz, ISNUM( 2 ) ? hb_parni( 2 ) : Z_SYNC_FLUSH ) ); + hb_retni( gzflush( gz, HB_ISNUM( 2 ) ? hb_parni( 2 ) : Z_SYNC_FLUSH ) ); } /* @@ -286,11 +286,11 @@ HB_FUNC( HB_GZFLUSH ) */ HB_FUNC( HB_GZSEEK ) { - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { gzFile gz = hb_gzParam( 1 ); if( gz ) - hb_retnint( gzseek( gz, ( z_off_t ) hb_parnint( 2 ), ISNUM( 3 ) ? + hb_retnint( gzseek( gz, ( z_off_t ) hb_parnint( 2 ), HB_ISNUM( 3 ) ? hb_parni( 3 ) : SEEK_SET ) ); } else diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index 48a7131fdf..1625904926 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -107,9 +107,9 @@ HB_FUNC( INKEY ) do { - iKey = hb_inkey( uiPCount == 1 || ( uiPCount > 1 && ISNUM( 1 ) ), + iKey = hb_inkey( uiPCount == 1 || ( uiPCount > 1 && HB_ISNUM( 1 ) ), hb_parnd( 1 ), - ISNUM( 2 ) ? hb_parni( 2 ) : hb_setGetEventMask() ); + HB_ISNUM( 2 ) ? hb_parni( 2 ) : hb_setGetEventMask() ); if( iKey == 0 || !pInkeyBlock || !pInkeyBlock->after ) break; @@ -169,7 +169,7 @@ HB_FUNC( __KEYBOARD ) /* Clear the typeahead buffer without reallocating the keyboard buffer */ hb_inkeyReset(); - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_inkeySetText( hb_parc( 1 ), hb_parclen( 1 ) ); } @@ -180,15 +180,15 @@ HB_FUNC( HB_KEYCLEAR ) HB_FUNC( HB_KEYPUT ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hb_inkeyPut( hb_parni( 1 ) ); } - else if( ISCHAR( 1 ) ) + else if( HB_ISCHAR( 1 ) ) { hb_inkeySetText( hb_parc( 1 ), hb_parclen( 1 ) ); } - else if( ISARRAY( 1 ) ) + else if( HB_ISARRAY( 1 ) ) { PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); ULONG ulIndex; @@ -212,15 +212,15 @@ HB_FUNC( HB_KEYPUT ) HB_FUNC( HB_KEYINS ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hb_inkeyIns( hb_parni( 1 ) ); } - else if( ISCHAR( 1 ) ) + else if( HB_ISCHAR( 1 ) ) { hb_inkeySetText( hb_parc( 1 ), hb_parclen( 1 ) ); } - else if( ISARRAY( 1 ) ) + else if( HB_ISARRAY( 1 ) ) { PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); ULONG ulIndex; @@ -244,16 +244,16 @@ HB_FUNC( HB_KEYINS ) HB_FUNC( NEXTKEY ) { - hb_retni( hb_inkeyNext( ISNUM( 1 ) ? hb_parni( 1 ) : hb_setGetEventMask() ) ); + hb_retni( hb_inkeyNext( HB_ISNUM( 1 ) ? hb_parni( 1 ) : hb_setGetEventMask() ) ); } HB_FUNC( LASTKEY ) { - hb_retni( hb_inkeyLast( ISNUM( 1 ) ? hb_parni( 1 ) : INKEY_ALL ) ); + hb_retni( hb_inkeyLast( HB_ISNUM( 1 ) ? hb_parni( 1 ) : INKEY_ALL ) ); } HB_FUNC( HB_SETLASTKEY ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) hb_retni( hb_inkeySetLast( hb_parni( 1 ) ) ); } diff --git a/harbour/source/rtl/itemseri.c b/harbour/source/rtl/itemseri.c index b0897172f0..4573157f04 100644 --- a/harbour/source/rtl/itemseri.c +++ b/harbour/source/rtl/itemseri.c @@ -1225,7 +1225,7 @@ HB_FUNC( HB_SERIALIZE ) if( pItem ) { ULONG ulSize; - char * pBuffer = hb_itemSerialize( pItem, ISLOG( 2 ) && hb_parl( 2 ), &ulSize ); + char * pBuffer = hb_itemSerialize( pItem, HB_ISLOG( 2 ) && hb_parl( 2 ), &ulSize ); hb_retclen_buffer( pBuffer, ulSize ); } } diff --git a/harbour/source/rtl/left.c b/harbour/source/rtl/left.c index 9a05dd0e9e..2dd785377a 100644 --- a/harbour/source/rtl/left.c +++ b/harbour/source/rtl/left.c @@ -60,7 +60,7 @@ HB_FUNC( LEFT ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); - if( pText && ISNUM( 2 ) ) + if( pText && HB_ISNUM( 2 ) ) { long lLen = hb_parnl( 2 ); if( lLen <= 0 ) diff --git a/harbour/source/rtl/math.c b/harbour/source/rtl/math.c index 0ea25b8b2a..ccdee6d608 100644 --- a/harbour/source/rtl/math.c +++ b/harbour/source/rtl/math.c @@ -448,7 +448,7 @@ HB_FUNC( HB_MATHERMODE ) /* ([]) -> */ hb_retni( hb_mathGetErrMode() ); /* set new mode */ - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) hb_mathSetErrMode( hb_parni( 1 ) ); } @@ -651,7 +651,7 @@ HB_FUNC( HB_MATHERBLOCK ) /* ([]) -> */ HB_FUNC( EXP ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { HB_MATH_EXCEPTION hb_exc; double dResult, dArg = hb_parnd( 1 ); @@ -680,7 +680,7 @@ HB_FUNC( EXP ) HB_FUNC( LOG ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { HB_MATH_EXCEPTION hb_exc; double dResult, dArg = hb_parnd( 1 ); @@ -721,7 +721,7 @@ HB_FUNC( LOG ) HB_FUNC( SQRT ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { HB_MATH_EXCEPTION hb_exc; double dResult, dArg = hb_parnd( 1 ); diff --git a/harbour/source/rtl/maxrow.c b/harbour/source/rtl/maxrow.c index 5d4679a165..7d7e10c8d9 100644 --- a/harbour/source/rtl/maxrow.c +++ b/harbour/source/rtl/maxrow.c @@ -79,7 +79,7 @@ HB_FUNC( MAXROW ) /* Return the maximum screen/window row number (zero origin) * * in CT3, [druzus] */ - if( ISLOG( 1 ) && hb_parl( 1 ) ) + if( HB_ISLOG( 1 ) && hb_parl( 1 ) ) { USHORT uiRows, uiCols; hb_gtScrDim( &uiRows, &uiCols ); @@ -94,7 +94,7 @@ HB_FUNC( MAXCOL ) /* Return the maximum screen/window column number (zero origin { #ifdef HB_COMPAT_CT3 /* See notes about MaxRow(.T.) above */ - if( ISLOG( 1 ) && hb_parl( 1 ) ) + if( HB_ISLOG( 1 ) && hb_parl( 1 ) ) { USHORT uiRows, uiCols; hb_gtScrDim( &uiRows, &uiCols ); diff --git a/harbour/source/rtl/mlcfunc.c b/harbour/source/rtl/mlcfunc.c index 8937f33070..18da265a95 100644 --- a/harbour/source/rtl/mlcfunc.c +++ b/harbour/source/rtl/mlcfunc.c @@ -178,7 +178,7 @@ static PHB_EOL_INFO hb_mlGetEOLs( int iParam, int * piEOLs ) iEOLs = 1; } } - else if( ISARRAY( iParam ) ) + else if( HB_ISARRAY( iParam ) ) { PHB_ITEM pArray = hb_param( iParam, HB_IT_ARRAY ); ULONG ulSize = hb_arrayLen( pArray ); @@ -228,7 +228,7 @@ static char * hb_mlGetParams( int iParAdd, ULONG * pulLen, ULONG * pulLineLength char * pszString = hb_parc( 1 ); if( pszString ) { - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { if( hb_parnd( 2 ) <= 0 ) return NULL; @@ -237,8 +237,8 @@ static char * hb_mlGetParams( int iParAdd, ULONG * pulLen, ULONG * pulLineLength else * pulLineLength = 79; * pulLen = hb_parclen( 1 ); - * pulTabSize = ISNUM( 3 + iParAdd ) ? hb_parnl( 3 + iParAdd ) : 4; - * pfWordWrap = ISLOG( 4 + iParAdd ) ? hb_parl( 4 + iParAdd ) : TRUE; + * pulTabSize = HB_ISNUM( 3 + iParAdd ) ? hb_parnl( 3 + iParAdd ) : 4; + * pfWordWrap = HB_ISLOG( 4 + iParAdd ) ? hb_parl( 4 + iParAdd ) : TRUE; * pEOLs = hb_mlGetEOLs( 5 + iParAdd, piEOLs ); #ifdef HB_C52_STRICT if( * pulLineLength > 254 ) @@ -381,7 +381,7 @@ HB_FUNC( MLCTOPOS ) if( pszString ) { - if( ulLineLength > 4 && ulLine && ISNUM( 4 ) ) + if( ulLineLength > 4 && ulLine && HB_ISNUM( 4 ) ) { while( --ulLine && ulOffset < ulLen ) ulOffset = hb_mlGetLine( pszString, ulLen, ulOffset, diff --git a/harbour/source/rtl/mouse53.c b/harbour/source/rtl/mouse53.c index 42f7545c56..887552455f 100644 --- a/harbour/source/rtl/mouse53.c +++ b/harbour/source/rtl/mouse53.c @@ -79,13 +79,13 @@ HB_FUNC( MSETCURSOR ) { hb_retl( hb_mouseGetCursor() ); - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_mouseSetCursor( hb_parl( 1 ) ); } HB_FUNC( MROW ) { - if( ISLOG( 1 ) && hb_parl( 1 ) ) + if( HB_ISLOG( 1 ) && hb_parl( 1 ) ) { int iRow, iCol; @@ -98,7 +98,7 @@ HB_FUNC( MROW ) HB_FUNC( MCOL ) { - if( ISLOG( 1 ) && hb_parl( 1 ) ) + if( HB_ISLOG( 1 ) && hb_parl( 1 ) ) { int iRow, iCol; @@ -111,7 +111,7 @@ HB_FUNC( MCOL ) HB_FUNC( MSETPOS ) { - if( ISNUM( 1 ) && ISNUM( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) hb_mouseSetPos( hb_parni( 1 ), hb_parni( 2 ) ); } @@ -129,7 +129,7 @@ HB_FUNC( MDBLCLK ) { hb_retni( hb_mouseGetDoubleClickSpeed() ); - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hb_mouseSetDoubleClickSpeed( hb_parni( 1 ) ); } @@ -152,7 +152,7 @@ HB_FUNC( MSAVESTATE ) HB_FUNC( MRESTSTATE ) { - if( ISCHAR( 1 ) && hb_parclen( 1 ) == ( ULONG ) hb_mouseStorageSize() ) + if( HB_ISCHAR( 1 ) && hb_parclen( 1 ) == ( ULONG ) hb_mouseStorageSize() ) { hb_mouseRestoreState( ( BYTE * ) hb_parc( 1 ) ); } @@ -162,8 +162,8 @@ HB_FUNC( MSETBOUNDS ) { hb_mouseSetBounds( hb_parni( 1 ), /* Defaults to zero on bad type */ hb_parni( 2 ), /* Defaults to zero on bad type */ - ISNUM( 3 ) ? hb_parni( 3 ) : hb_gtMaxRow(), - ISNUM( 4 ) ? hb_parni( 4 ) : hb_gtMaxCol() ); + HB_ISNUM( 3 ) ? hb_parni( 3 ) : hb_gtMaxRow(), + HB_ISNUM( 4 ) ? hb_parni( 4 ) : hb_gtMaxCol() ); } #endif diff --git a/harbour/source/rtl/mousex.c b/harbour/source/rtl/mousex.c index 2bf5ac0ed2..1bc55aa412 100644 --- a/harbour/source/rtl/mousex.c +++ b/harbour/source/rtl/mousex.c @@ -69,11 +69,11 @@ HB_FUNC( SETMOUSE ) hb_retl( hb_mouseGetCursor() ); - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_mouseSetCursor( hb_parl( 1 ) ); - fRow = ISNUM( 2 ); - fCol = ISNUM( 3 ); + fRow = HB_ISNUM( 2 ); + fCol = HB_ISNUM( 3 ); if( fRow || fCol ) { diff --git a/harbour/source/rtl/mtran.c b/harbour/source/rtl/mtran.c index 15d4ead967..96cbf620c1 100644 --- a/harbour/source/rtl/mtran.c +++ b/harbour/source/rtl/mtran.c @@ -94,8 +94,8 @@ HB_FUNC( MEMOTRAN ) if( pString ) { char * pszResult = ( char * ) hb_xgrab( hb_itemGetCLen( pString ) + 1 ); - char cHardcr = ISCHAR( 2 ) ? *hb_parc( 2 ) : ';'; - char cSoftcr = ISCHAR( 3 ) ? *hb_parc( 3 ) : ' '; + char cHardcr = HB_ISCHAR( 2 ) ? *hb_parc( 2 ) : ';'; + char cSoftcr = HB_ISCHAR( 3 ) ? *hb_parc( 3 ) : ' '; ULONG ulResultLen; hb_strMemotran( pszResult, &ulResultLen, hb_itemGetCPtr( pString ), hb_itemGetCLen( pString ), cHardcr, cSoftcr ); diff --git a/harbour/source/rtl/natmsg.c b/harbour/source/rtl/natmsg.c index 7c80013e76..8ac229a71f 100644 --- a/harbour/source/rtl/natmsg.c +++ b/harbour/source/rtl/natmsg.c @@ -110,7 +110,7 @@ HB_FUNC( __NATMSG ) if( hb_pcount() == 0 ) /* TODO: Replace this with Language API call. */ hb_retc( "Invalid argument" ); - else if( ISNUM( 1 ) ) + else if( HB_ISNUM( 1 ) ) hb_retc( hb_nationGetMsg( hb_parni( 1 ) ) ); else hb_retc( NULL ); diff --git a/harbour/source/rtl/padc.c b/harbour/source/rtl/padc.c index c504081a19..45fca7ec8d 100644 --- a/harbour/source/rtl/padc.c +++ b/harbour/source/rtl/padc.c @@ -81,7 +81,7 @@ HB_FUNC( PADC ) char cPad; long ulPad = ( ( ULONG ) lLen - ulSize ) >> 1; - cPad = ( ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' ); + cPad = ( HB_ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' ); hb_xmemset( szResult, cPad, ulPad ); hb_xmemcpy( szResult + ulPad, szText, ulSize ); hb_xmemset( szResult + ulPad + ulSize, cPad, diff --git a/harbour/source/rtl/padl.c b/harbour/source/rtl/padl.c index 06cd995c77..b9d24bac28 100644 --- a/harbour/source/rtl/padl.c +++ b/harbour/source/rtl/padl.c @@ -80,7 +80,7 @@ HB_FUNC( PADL ) char * szResult = ( char * ) hb_xgrab( lLen + 1 ); char cPad; - cPad = ( ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' ); + cPad = ( HB_ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' ); hb_xmemset( szResult, cPad, ( ULONG ) lLen - ulSize ); hb_xmemcpy( szResult + ( ULONG ) lLen - ulSize, szText, ulSize ); diff --git a/harbour/source/rtl/padr.c b/harbour/source/rtl/padr.c index a0e9e8a732..b395d08dd3 100644 --- a/harbour/source/rtl/padr.c +++ b/harbour/source/rtl/padr.c @@ -80,7 +80,7 @@ HB_FUNC( PADR ) char * szResult = ( char * ) hb_xgrab( lLen + 1 ); char cPad; - cPad = ( ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' ); + cPad = ( HB_ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' ); hb_xmemcpy( szResult, szText, ulSize ); hb_xmemset( szResult + ulSize, cPad, ( ULONG ) lLen - ulSize ); diff --git a/harbour/source/rtl/philes.c b/harbour/source/rtl/philes.c index d0931b7164..125c6f0cbf 100644 --- a/harbour/source/rtl/philes.c +++ b/harbour/source/rtl/philes.c @@ -61,10 +61,10 @@ HB_FUNC( FOPEN ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { hb_retnint( ( HB_NHANDLE ) hb_fsOpen( ( BYTE * ) hb_parc( 1 ), - ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : FO_READ | FO_COMPAT ) ); + HB_ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : FO_READ | FO_COMPAT ) ); hb_fsSetFError( hb_fsError() ); } else @@ -77,10 +77,10 @@ HB_FUNC( FOPEN ) HB_FUNC( FCREATE ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { hb_retnint( ( HB_NHANDLE ) hb_fsCreate( ( BYTE * ) hb_parc( 1 ), - ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL ) ); + HB_ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL ) ); hb_fsSetFError( hb_fsError() ); } else @@ -92,11 +92,11 @@ HB_FUNC( FCREATE ) HB_FUNC( HB_FCREATE ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { hb_retnint( ( HB_NHANDLE ) hb_fsCreateEx( ( BYTE * ) hb_parc( 1 ), - ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL, - ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FO_COMPAT ) ); + HB_ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL, + HB_ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FO_COMPAT ) ); hb_fsSetFError( hb_fsError() ); } else @@ -112,7 +112,7 @@ HB_FUNC( FREAD ) USHORT uiError = 0; ULONG ulRead = 0; - if( ISNUM( 1 ) && pBuffer && ISBYREF( 2 ) && ISNUM( 3 ) ) + if( HB_ISNUM( 1 ) && pBuffer && HB_ISBYREF( 2 ) && HB_ISNUM( 3 ) ) { ulRead = hb_parnl( 3 ); @@ -147,11 +147,11 @@ HB_FUNC( FWRITE ) { USHORT uiError = 0; - if( ISNUM( 1 ) && ISCHAR( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) ) { ULONG nLen = hb_parclen( 2 ); - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { ULONG nWrite = ( ULONG ) hb_parnl( 3 ); if( nWrite < nLen ) @@ -176,7 +176,7 @@ HB_FUNC( FERROR ) HB_FUNC( FCLOSE ) { USHORT uiError = 0; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hb_fsClose( hb_numToHandle( hb_parnint( 1 ) ) ); uiError = hb_fsError(); @@ -191,7 +191,7 @@ HB_FUNC( FERASE ) { USHORT uiError = 3; - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { hb_retni( hb_fsDelete( ( BYTE * ) hb_parc( 1 ) ) ? 0 : F_ERROR ); uiError = hb_fsError(); @@ -205,7 +205,7 @@ HB_FUNC( FRENAME ) { USHORT uiError = 2; - if( ISCHAR( 1 ) && ISCHAR( 2 ) ) + if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) { hb_retni( hb_fsRename( ( BYTE * ) hb_parc( 1 ), ( BYTE * ) hb_parc( 2 ) ) ? 0 : F_ERROR ); @@ -220,11 +220,11 @@ HB_FUNC( FSEEK ) { USHORT uiError = 0; - if( ISNUM( 1 ) && ISNUM( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) { hb_retnint( hb_fsSeekLarge( hb_numToHandle( hb_parnint( 1 ) ), hb_parnint( 2 ), - ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FS_SET ) ); + HB_ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FS_SET ) ); uiError = hb_fsError(); } else @@ -237,7 +237,7 @@ HB_FUNC( FREADSTR ) { USHORT uiError = 0; - if( ISNUM( 1 ) && ISNUM( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) { ULONG ulToRead = ( ULONG ) hb_parnl( 2 ); @@ -318,7 +318,7 @@ HB_FUNC( HB_FEOF ) { USHORT uiError = 6; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hb_retl( hb_fsEof( hb_numToHandle( hb_parnint( 1 ) ) ) ); uiError = hb_fsError(); @@ -332,7 +332,7 @@ HB_FUNC( HB_FCOMMIT ) { USHORT uiError = 6; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hb_fsCommit( hb_numToHandle( hb_parnint( 1 ) ) ); uiError = hb_fsError(); @@ -346,7 +346,7 @@ HB_FUNC( HB_FLOCK ) USHORT uiError = 0; BOOL fResult = FALSE; - if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { fResult = hb_fsLockLarge( hb_numToHandle( hb_parnint( 1 ) ), ( HB_FOFFSET ) hb_parnint( 2 ), @@ -363,7 +363,7 @@ HB_FUNC( HB_FUNLOCK ) USHORT uiError = 0; BOOL fResult = FALSE; - if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { fResult = hb_fsLockLarge( hb_numToHandle( hb_parnint( 1 ) ), ( HB_FOFFSET ) hb_parnint( 2 ), @@ -393,13 +393,13 @@ HB_FUNC( HB_FSETDATETIME ) { LONG lDate = -1, lTime = -1; - if( ISTIMESTAMP( 2 ) ) + if( HB_ISTIMESTAMP( 2 ) ) hb_partdt( &lDate, &lTime, 2 ); else { - if( ISDATE( 2 ) ) + if( HB_ISDATE( 2 ) ) lDate = hb_pardl( 2 ); - if( ISCHAR( 3 ) ) + if( HB_ISCHAR( 3 ) ) { int iHour, iMinutes, iSeconds, iMSec; if( hb_timeStrGet( hb_parc( 3 ), &iHour, &iMinutes, &iSeconds, &iMSec ) ) @@ -416,7 +416,7 @@ HB_FUNC( HB_FGETDATETIME ) if( hb_fsGetFileTime( ( UCHAR * ) hb_parcx( 1 ), &lJulian, &lMillisec ) ) { - if( ISBYREF( 3 ) ) + if( HB_ISBYREF( 3 ) ) { char buf[ 13 ]; hb_timeStr( buf, lMillisec ); diff --git a/harbour/source/rtl/philes53.c b/harbour/source/rtl/philes53.c index 18ae673680..64d28aef87 100644 --- a/harbour/source/rtl/philes53.c +++ b/harbour/source/rtl/philes53.c @@ -60,7 +60,7 @@ HB_FUNC( FSETDEVMOD ) { /* C53 checks only number of parameters: hb_pcount() == 2 */ - if( ISNUM( 1 ) && ISNUM( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) { hb_fsSetDevMode( hb_numToHandle( hb_parnint( 1 ) ), ( USHORT ) hb_parni( 2 ) ); hb_fsSetFError( hb_fsError() ); diff --git a/harbour/source/rtl/rat.c b/harbour/source/rtl/rat.c index dfa47f9359..adecda5fdc 100644 --- a/harbour/source/rtl/rat.c +++ b/harbour/source/rtl/rat.c @@ -98,7 +98,7 @@ HB_FUNC( HB_RAT ) BOOL bFound = FALSE; long lStart; - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { lStart = hb_parnl( 3 ); if( lStart >= 1 ) @@ -109,7 +109,7 @@ HB_FUNC( HB_RAT ) else lStart = 0; - if( ISNUM( 4 ) ) + if( HB_ISNUM( 4 ) ) { long lEnd = hb_parnl( 4 ); diff --git a/harbour/source/rtl/replic.c b/harbour/source/rtl/replic.c index 6995bcc878..ed96c4b70e 100644 --- a/harbour/source/rtl/replic.c +++ b/harbour/source/rtl/replic.c @@ -58,7 +58,7 @@ HB_FUNC( REPLICATE ) { - if( ISCHAR( 1 ) && ISNUM( 2 ) ) + if( HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) ) { long lTimes = hb_parnl( 2 ); diff --git a/harbour/source/rtl/right.c b/harbour/source/rtl/right.c index 92538f5686..96db9f2a46 100644 --- a/harbour/source/rtl/right.c +++ b/harbour/source/rtl/right.c @@ -60,7 +60,7 @@ HB_FUNC( RIGHT ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); - if( pText && ISNUM( 2 ) ) + if( pText && HB_ISNUM( 2 ) ) { long lLen = hb_parnl( 2 ); if( lLen <= 0 ) diff --git a/harbour/source/rtl/round.c b/harbour/source/rtl/round.c index b7b4678cd3..8a7bc0febc 100644 --- a/harbour/source/rtl/round.c +++ b/harbour/source/rtl/round.c @@ -94,7 +94,7 @@ HB_FUNC( ROUND ) { PHB_ITEM pNumber = hb_param( 1, HB_IT_NUMERIC ); - if( pNumber && ISNUM( 2 ) ) + if( pNumber && HB_ISNUM( 2 ) ) { int iDec = hb_parni( 2 ); diff --git a/harbour/source/rtl/run.c b/harbour/source/rtl/run.c index 63c01fbecd..35f3acff91 100644 --- a/harbour/source/rtl/run.c +++ b/harbour/source/rtl/run.c @@ -60,7 +60,7 @@ HB_FUNC( __RUN ) { - if( ISCHAR( 1 ) && hb_gtSuspend() == 0 ) + if( HB_ISCHAR( 1 ) && hb_gtSuspend() == 0 ) { char * pszCommand = hb_itemGetC( hb_param( 1, HB_IT_STRING ) ); BOOL fFree; diff --git a/harbour/source/rtl/saverest.c b/harbour/source/rtl/saverest.c index 96900fbc33..80d3fbdf0f 100644 --- a/harbour/source/rtl/saverest.c +++ b/harbour/source/rtl/saverest.c @@ -62,13 +62,13 @@ static void hb_getScreenRange( USHORT * pusMin, USHORT * pusMax, { iMax = hb_gtMaxRow(); iFrom = hb_parni( 1 ); - iTo = ISNUM( 3 ) ? hb_parni( 3 ) : iMax; + iTo = HB_ISNUM( 3 ) ? hb_parni( 3 ) : iMax; } else { iMax = hb_gtMaxCol(); iFrom = hb_parni( 2 ); - iTo = ISNUM( 4 ) ? hb_parni( 4 ) : iMax; + iTo = HB_ISNUM( 4 ) ? hb_parni( 4 ) : iMax; } if( iFrom < 0 ) @@ -112,7 +112,7 @@ HB_FUNC( SAVESCREEN ) HB_FUNC( RESTSCREEN ) { - if( ISCHAR( 5 ) ) + if( HB_ISCHAR( 5 ) ) { USHORT uiTop, uiLeft, uiBottom, uiRight; BOOL fNoCheck = FALSE; diff --git a/harbour/source/rtl/scroll.c b/harbour/source/rtl/scroll.c index 405370fbd2..4b25f5f5cd 100644 --- a/harbour/source/rtl/scroll.c +++ b/harbour/source/rtl/scroll.c @@ -79,7 +79,7 @@ HB_FUNC( SCROLL ) else if( iLeft > iMaxCol ) iLeft = iMaxCol; - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { iBottom = hb_parni( 3 ); if( iBottom < 0 ) @@ -90,7 +90,7 @@ HB_FUNC( SCROLL ) else iBottom = iMaxRow; - if( ISNUM( 4 ) ) + if( HB_ISNUM( 4 ) ) { iRight = hb_parni( 4 ); if( iRight < 0 ) @@ -135,7 +135,7 @@ HB_FUNC( HB_SCROLL ) else if( iLeft > iMaxCol ) iLeft = iMaxCol; - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { iBottom = hb_parni( 3 ); if( iBottom < 0 ) @@ -146,7 +146,7 @@ HB_FUNC( HB_SCROLL ) else iBottom = iMaxRow; - if( ISNUM( 4 ) ) + if( HB_ISNUM( 4 ) ) { iRight = hb_parni( 4 ); if( iRight < 0 ) @@ -157,16 +157,16 @@ HB_FUNC( HB_SCROLL ) else iRight = iMaxCol; - if( ISNUM( 7 ) ) + if( HB_ISNUM( 7 ) ) iColor = hb_parni( 7 ); - else if( ISCHAR( 7 ) ) + else if( HB_ISCHAR( 7 ) ) iColor = hb_gtColorToN( hb_parc( 7 ) ); else iColor = -1; - if( ISNUM( 8 ) ) + if( HB_ISNUM( 8 ) ) iChar = hb_parni( 8 ); - else if( ISCHAR( 8 ) ) + else if( HB_ISCHAR( 8 ) ) iChar = ( UCHAR ) hb_parc( 8 )[0]; else iChar = -1; diff --git a/harbour/source/rtl/setcolor.c b/harbour/source/rtl/setcolor.c index 149e52cc06..acd84f5d4c 100644 --- a/harbour/source/rtl/setcolor.c +++ b/harbour/source/rtl/setcolor.c @@ -76,7 +76,7 @@ HB_FUNC( SETCOLOR ) HB_FUNC( COLORSELECT ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) hb_gtColorSelect( ( USHORT ) hb_parni( 1 ) ); } @@ -86,7 +86,7 @@ HB_FUNC( SETBLINK ) hb_gtGetBlink( &bPreviousBlink ); - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_gtSetBlink( hb_parl( 1 ) ); hb_retl( bPreviousBlink ); @@ -94,7 +94,7 @@ HB_FUNC( SETBLINK ) HB_FUNC( HB_COLORTON ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) hb_retni( hb_gtColorToN( hb_parc( 1 ) ) ); else hb_retni( 0 ); @@ -102,7 +102,7 @@ HB_FUNC( HB_COLORTON ) HB_FUNC( HB_NTOCOLOR ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { char szColorString[ 10 ]; int colors[ 1 ]; diff --git a/harbour/source/rtl/setcurs.c b/harbour/source/rtl/setcurs.c index 0ac64ec937..ef5029d685 100644 --- a/harbour/source/rtl/setcurs.c +++ b/harbour/source/rtl/setcurs.c @@ -75,6 +75,6 @@ HB_FUNC( SETCURSOR ) hb_retni( uiCursor ); - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) hb_gtSetCursor( ( USHORT ) hb_parni( 1 ) ); } diff --git a/harbour/source/rtl/setpos.c b/harbour/source/rtl/setpos.c index 4c228deb45..0f8612e823 100644 --- a/harbour/source/rtl/setpos.c +++ b/harbour/source/rtl/setpos.c @@ -66,7 +66,7 @@ HB_FUNC( SETPOS ) /* Sets the screen position */ { - if( ISNUM( 1 ) && ISNUM( 2 ) ) + if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) hb_gtSetPos( ( SHORT ) hb_parni( 1 ), ( SHORT ) hb_parni( 2 ) ); } diff --git a/harbour/source/rtl/shadow.c b/harbour/source/rtl/shadow.c index b84b79bf51..a6a255207c 100644 --- a/harbour/source/rtl/shadow.c +++ b/harbour/source/rtl/shadow.c @@ -60,7 +60,7 @@ HB_FUNC( HB_SHADOW ) ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 3 ), ( USHORT ) hb_parni( 4 ), - ISNUM( 5 ) ? ( BYTE ) hb_parni( 5 ) : 7 ); + HB_ISNUM( 5 ) ? ( BYTE ) hb_parni( 5 ) : 7 ); } HB_FUNC( HB_CLRAREA ) diff --git a/harbour/source/rtl/strc.c b/harbour/source/rtl/strc.c index b474df3aaa..b6bcdf3341 100644 --- a/harbour/source/rtl/strc.c +++ b/harbour/source/rtl/strc.c @@ -93,7 +93,7 @@ HB_FUNC( HB_STRCDECODE ) if( pText ) { ULONG ulLen = hb_itemGetCLen( pText ); - BOOL fCont = ISLOG( 2 ) && hb_parl( 2 ); + BOOL fCont = HB_ISLOG( 2 ) && hb_parl( 2 ); if( ulLen > 0 ) { const char * pszSrc = hb_itemGetCPtr( pText ); @@ -148,7 +148,7 @@ HB_FUNC( HB_STRCDECODE ) --ulLen; } } - if( ulLen == 0 && ( !fCont || ISBYREF( 2 ) ) ) + if( ulLen == 0 && ( !fCont || HB_ISBYREF( 2 ) ) ) { hb_retclen_buffer( pszDst, ulDst ); hb_storl( fCont, 2 ); diff --git a/harbour/source/rtl/strmatch.c b/harbour/source/rtl/strmatch.c index 828ac9e959..cb668acfd4 100644 --- a/harbour/source/rtl/strmatch.c +++ b/harbour/source/rtl/strmatch.c @@ -316,7 +316,7 @@ BOOL hb_strMatchFile( const char * szString, const char * szPattern ) HB_FUNC( HB_WILDMATCH ) { - hb_retl( ( ! ISCHAR( 1 ) || ! ISCHAR( 2 ) ) ? FALSE : + hb_retl( ( ! HB_ISCHAR( 1 ) || ! HB_ISCHAR( 2 ) ) ? FALSE : hb_parl( 3 ) ? hb_strMatchWildExact( hb_parc( 2 ), hb_parc( 1 ) ) : hb_strMatchWild( hb_parc( 2 ), hb_parc( 1 ) ) ); } @@ -328,6 +328,6 @@ HB_FUNC( HB_WILDMATCHI ) HB_FUNC( HB_FILEMATCH ) { - hb_retl( ( ! ISCHAR( 1 ) || ! ISCHAR( 2 ) ) ? FALSE : + hb_retl( ( ! HB_ISCHAR( 1 ) || ! HB_ISCHAR( 2 ) ) ? FALSE : hb_strMatchFile( hb_parc( 1 ), hb_parc( 2 ) ) ); } diff --git a/harbour/source/rtl/strpeek.c b/harbour/source/rtl/strpeek.c index b81649d1cd..7784fcb6c1 100644 --- a/harbour/source/rtl/strpeek.c +++ b/harbour/source/rtl/strpeek.c @@ -60,7 +60,7 @@ HB_FUNC( STRPEEK ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); - if( pText && ISNUM( 2 ) ) + if( pText && HB_ISNUM( 2 ) ) { ULONG ulPos = hb_parnl( 2 ); @@ -78,7 +78,7 @@ HB_FUNC( STRPOKE ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); - if( pText && ISNUM( 2 ) && ISNUM( 3 ) ) + if( pText && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { ULONG ulPos = hb_parnl( 2 ); diff --git a/harbour/source/rtl/strtoexp.c b/harbour/source/rtl/strtoexp.c index 34d4e104ac..a0feb817c8 100644 --- a/harbour/source/rtl/strtoexp.c +++ b/harbour/source/rtl/strtoexp.c @@ -90,7 +90,7 @@ HB_FUNC( HB_STRTOEXP ) break; } } - if( iType == 7 || ( ISLOG( 2 ) && hb_parl( 2 ) ) ) + if( iType == 7 || ( HB_ISLOG( 2 ) && hb_parl( 2 ) ) ) { ulRet = ulLen + 3 + uQ; pDst = pszResult = ( char * ) hb_xgrab( ulRet + 1 ); diff --git a/harbour/source/rtl/strtran.c b/harbour/source/rtl/strtran.c index d46f9aa43f..7fe255b3b5 100644 --- a/harbour/source/rtl/strtran.c +++ b/harbour/source/rtl/strtran.c @@ -77,7 +77,7 @@ HB_FUNC( STRTRAN ) const char * szReplace; ULONG ulStart; - ulStart = ( ISNUM( 4 ) ? hb_parnl( 4 ) : 1 ); + ulStart = ( HB_ISNUM( 4 ) ? hb_parnl( 4 ) : 1 ); if( !ulStart ) { @@ -102,7 +102,7 @@ HB_FUNC( STRTRAN ) ulReplace = 0; } - if( ISNUM( 5 ) ) + if( HB_ISNUM( 5 ) ) { ulCount = hb_parnl( 5 ); bAll = FALSE; diff --git a/harbour/source/rtl/stuff.c b/harbour/source/rtl/stuff.c index e480c2c443..a7770d5098 100644 --- a/harbour/source/rtl/stuff.c +++ b/harbour/source/rtl/stuff.c @@ -55,7 +55,7 @@ /* replaces characters in a string */ HB_FUNC( STUFF ) { - if( ISCHAR( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISCHAR( 4 ) ) + if( HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISCHAR( 4 ) ) { char * szText = hb_parc( 1 ); ULONG ulText = hb_parclen( 1 ); diff --git a/harbour/source/rtl/substr.c b/harbour/source/rtl/substr.c index 8ad1550df8..18e30ed1b7 100644 --- a/harbour/source/rtl/substr.c +++ b/harbour/source/rtl/substr.c @@ -60,7 +60,7 @@ HB_FUNC( SUBSTR ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); - if( pText && ISNUM( 2 ) ) + if( pText && HB_ISNUM( 2 ) ) { long lPos = hb_parnl( 2 ); long lSize = ( long ) hb_itemGetCLen( pText ); @@ -82,7 +82,7 @@ HB_FUNC( SUBSTR ) if( hb_pcount() >= 3 ) { - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { lLen = hb_parnl( 3 ); diff --git a/harbour/source/rtl/tone.c b/harbour/source/rtl/tone.c index b7987bd17b..162fe1c250 100644 --- a/harbour/source/rtl/tone.c +++ b/harbour/source/rtl/tone.c @@ -55,6 +55,6 @@ HB_FUNC( TONE ) { - if( ISNUM( 1 ) ) - hb_gtTone( hb_parnd( 1 ), ( ISNUM( 2 ) ? hb_parnd( 2 ) : 1.0 ) ); + if( HB_ISNUM( 1 ) ) + hb_gtTone( hb_parnd( 1 ), ( HB_ISNUM( 2 ) ? hb_parnd( 2 ) : 1.0 ) ); } diff --git a/harbour/source/rtl/trace.c b/harbour/source/rtl/trace.c index ff2a9b96fa..4c3580e61e 100644 --- a/harbour/source/rtl/trace.c +++ b/harbour/source/rtl/trace.c @@ -55,12 +55,12 @@ HB_FUNC( HB_TRACESTATE ) { - hb_retni( hb_tracestate( ISNUM( 1 ) ? hb_parni( 1 ) : -1 ) ); + hb_retni( hb_tracestate( HB_ISNUM( 1 ) ? hb_parni( 1 ) : -1 ) ); } HB_FUNC( HB_TRACELEVEL ) { - hb_retni( hb_tracelevel( ISNUM( 1 ) ? hb_parni( 1 ) : -1 ) ); + hb_retni( hb_tracelevel( HB_ISNUM( 1 ) ? hb_parni( 1 ) : -1 ) ); } HB_FUNC( HB_TRACESTRING ) diff --git a/harbour/source/rtl/transfrm.c b/harbour/source/rtl/transfrm.c index 91b556a26c..b0e00c2c8f 100644 --- a/harbour/source/rtl/transfrm.c +++ b/harbour/source/rtl/transfrm.c @@ -966,7 +966,7 @@ HB_FUNC( TRANSFORM ) hb_retclen_buffer( szResult, ( ulParamS && ulResultPos > ulParamS ) ? ulParamS : ulResultPos ); } } - else if( pPic || ISNIL( 2 ) ) /* Picture is an empty string or NIL */ + else if( pPic || HB_ISNIL( 2 ) ) /* Picture is an empty string or NIL */ { if( HB_IS_STRING( pValue ) ) { diff --git a/harbour/source/rtl/valtype.c b/harbour/source/rtl/valtype.c index eed1651d87..ab9b6d2aa3 100644 --- a/harbour/source/rtl/valtype.c +++ b/harbour/source/rtl/valtype.c @@ -88,52 +88,52 @@ HB_FUNC( HB_ISBYREF ) HB_FUNC( HB_ISNIL ) { - hb_retl( ISNIL( 1 ) ); + hb_retl( HB_ISNIL( 1 ) ); } HB_FUNC( HB_ISNUMERIC ) { - hb_retl( ISNUM( 1 ) ); + hb_retl( HB_ISNUM( 1 ) ); } HB_FUNC( HB_ISLOGICAL ) { - hb_retl( ISLOG( 1 ) ); + hb_retl( HB_ISLOG( 1 ) ); } HB_FUNC( HB_ISDATE ) { - hb_retl( ISDATE( 1 ) ); + hb_retl( HB_ISDATE( 1 ) ); } HB_FUNC( HB_ISDATETIME ) { - hb_retl( ISDATETIME( 1 ) ); + hb_retl( HB_ISDATETIME( 1 ) ); } HB_FUNC( HB_ISTIMESTAMP ) { - hb_retl( ISTIMESTAMP( 1 ) ); + hb_retl( HB_ISTIMESTAMP( 1 ) ); } HB_FUNC( HB_ISBLOCK ) { - hb_retl( ISBLOCK( 1 ) ); + hb_retl( HB_ISBLOCK( 1 ) ); } HB_FUNC( HB_ISPOINTER ) { - hb_retl( ISPOINTER( 1 ) ); + hb_retl( HB_ISPOINTER( 1 ) ); } HB_FUNC( HB_ISSYMBOL ) { - hb_retl( ISSYMBOL( 1 ) ); + hb_retl( HB_ISSYMBOL( 1 ) ); } HB_FUNC( HB_ISSTRING ) { - hb_retl( ISCHAR( 1 ) ); + hb_retl( HB_ISCHAR( 1 ) ); } HB_FUNC( HB_ISCHAR ) @@ -153,12 +153,12 @@ HB_FUNC( HB_ISARRAY ) HB_FUNC( HB_ISOBJECT ) { - hb_retl( ISOBJECT( 1 ) ); + hb_retl( HB_ISOBJECT( 1 ) ); } HB_FUNC( HB_ISHASH ) { - hb_retl( ISHASH( 1 ) ); + hb_retl( HB_ISHASH( 1 ) ); } HB_FUNC( HB_ISNULL ) diff --git a/harbour/source/rtl/word.c b/harbour/source/rtl/word.c index e4a45fca6d..3e2c4d47d5 100644 --- a/harbour/source/rtl/word.c +++ b/harbour/source/rtl/word.c @@ -59,7 +59,7 @@ HB_FUNC( WORD ) { - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) hb_retni( hb_parni( 1 ) ); else hb_errRT_BASE( EG_ARG, 1091, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/vm/arrayshb.c b/harbour/source/vm/arrayshb.c index 41338d4fda..88a2788655 100644 --- a/harbour/source/vm/arrayshb.c +++ b/harbour/source/vm/arrayshb.c @@ -90,7 +90,7 @@ HB_FUNC( ARRAY ) for( iParam = 1; iParam <= iPCount; iParam++ ) { - if( ! ISNUM( iParam ) ) + if( ! HB_ISNUM( iParam ) ) { bError = TRUE; break; @@ -137,7 +137,7 @@ HB_FUNC( ASIZE ) { PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); - if( pArray && ISNUM( 2 ) ) + if( pArray && HB_ISNUM( 2 ) ) { long lSize = hb_parnl( 2 ); @@ -213,7 +213,7 @@ HB_FUNC( AFILL ) LONG lStart = hb_parnl( 3 ), lCount = hb_parnl( 4 ); /* Explicy lCount of 0 - Nothing to do! */ - if( ISNUM( 4 ) && lCount == 0 ) + if( HB_ISNUM( 4 ) && lCount == 0 ) return; /* Clipper aborts if negative start. */ else if( lStart < 0 ) @@ -234,8 +234,8 @@ HB_FUNC( AFILL ) ulCount = ( ULONG ) lCount; hb_arrayFill( pArray, pValue, - ISNUM( 3 ) ? &ulStart : NULL, - ISNUM( 4 ) ? &ulCount : NULL ); + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL ); } } else @@ -260,8 +260,8 @@ HB_FUNC( ASCAN ) ULONG ulCount = hb_parnl( 4 ); hb_retnint( hb_arrayScan( pArray, pValue, - ISNUM( 3 ) ? &ulStart : NULL, - ISNUM( 4 ) ? &ulCount : NULL, + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, FALSE ) ); } else @@ -280,8 +280,8 @@ HB_FUNC( HB_ASCAN ) ULONG ulCount = hb_parnl( 4 ); hb_retnint( hb_arrayScan( pArray, pValue, - ISNUM( 3 ) ? &ulStart : NULL, - ISNUM( 4 ) ? &ulCount : NULL, + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, hb_parl( 5 ) ) ); } else @@ -299,8 +299,8 @@ HB_FUNC( HB_RASCAN ) ULONG ulCount = hb_parnl( 4 ); hb_retnint( hb_arrayRevScan( pArray, pValue, - ISNUM( 3 ) ? &ulStart : NULL, - ISNUM( 4 ) ? &ulCount : NULL, + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, hb_parl( 5 ) ) ); } else @@ -318,7 +318,7 @@ HB_FUNC( HB_AINS ) if( lPos == 0 ) lPos = 1; - if( ISLOG( 4 ) && hb_parl( 4 ) ) + if( HB_ISLOG( 4 ) && hb_parl( 4 ) ) { ULONG ulLen = hb_arrayLen( pArray ) + 1; if( lPos >= 1 && ( ULONG ) lPos <= ulLen ) @@ -327,7 +327,7 @@ HB_FUNC( HB_AINS ) if( hb_arrayIns( pArray, lPos ) ) { - if( ! ISNIL( 3 ) ) + if( ! HB_ISNIL( 3 ) ) hb_arraySet( pArray, lPos, hb_param( 3, HB_IT_ANY ) ); } @@ -348,7 +348,7 @@ HB_FUNC( HB_ADEL ) if( hb_arrayDel( pArray, lPos ) ) { - if( ISLOG( 3 ) && hb_parl( 3 ) ) + if( HB_ISLOG( 3 ) && hb_parl( 3 ) ) hb_arraySize( pArray, hb_arrayLen( pArray ) - 1 ); } @@ -371,8 +371,8 @@ HB_FUNC( AEVAL ) hb_arrayEval( pArray, pBlock, - ISNUM( 3 ) ? &ulStart : NULL, - ISNUM( 4 ) ? &ulCount : NULL ); + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL ); hb_itemReturn( hb_stackItemFromBase( 1 ) ); /* AEval() returns the array itself */ } @@ -396,9 +396,9 @@ HB_FUNC( ACOPY ) hb_arrayCopy( pSrcArray, pDstArray, - ISNUM( 3 ) ? &ulStart : NULL, - ISNUM( 4 ) ? &ulCount : NULL, - ISNUM( 5 ) ? &ulTarget : NULL ); + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, + HB_ISNUM( 5 ) ? &ulTarget : NULL ); } hb_itemReturn( hb_stackItemFromBase( 2 ) ); /* ACopy() returns the target array */ diff --git a/harbour/source/vm/asort.c b/harbour/source/vm/asort.c index 47eda4e96a..df0c1bb303 100644 --- a/harbour/source/vm/asort.c +++ b/harbour/source/vm/asort.c @@ -260,8 +260,8 @@ HB_FUNC( ASORT ) ULONG ulCount = hb_parnl( 3 ); hb_arraySort( pArray, - ISNUM( 2 ) ? &ulStart : NULL, - ISNUM( 3 ) ? &ulCount : NULL, + HB_ISNUM( 2 ) ? &ulStart : NULL, + HB_ISNUM( 3 ) ? &ulCount : NULL, hb_param( 4, HB_IT_BLOCK ) ); hb_itemReturn( pArray ); /* ASort() returns the array itself */ diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 61f900019b..83a3eed376 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -1791,7 +1791,7 @@ PHB_SYMB hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pMessage, if( pMsg == s___msgEnumIndex.pDynSym ) { hb_itemPutNL( hb_stackReturnItem(), pEnum->item.asEnum.offset ); - if( hb_pcount() > 0 && ISNUM( 1 ) ) + if( hb_pcount() > 0 && HB_ISNUM( 1 ) ) pEnum->item.asEnum.offset = hb_itemGetNL( hb_param( 1, HB_IT_ANY ) ); return &s___msgEnumIndex; } @@ -4133,7 +4133,7 @@ HB_FUNC( __CLSSYNCWAIT ) } } - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { double dTimeOut = hb_parnd( 2 ); if( dTimeOut > 0 ) @@ -4254,7 +4254,7 @@ static HARBOUR hb___msgClassSel( void ) nParam = hb_pcount() > 0 ? ( USHORT ) hb_parni( 1 ) : HB_MSGLISTALL; nScope = hb_pcount() > 1 ? ( USHORT ) hb_parni( 2 ) : 0; - lFull = hb_pcount() > 2 && ISLOG( 3 ) && hb_parl( 3 ); + lFull = hb_pcount() > 2 && HB_ISLOG( 3 ) && hb_parl( 3 ); pReturn = hb_itemArrayNew( pClass->uiMethods ); do @@ -4876,7 +4876,7 @@ HB_FUNC( __CLSGETPROPERTIES ) ULONG ulLimit, ulCount; USHORT uiScope = HB_OO_CLSTP_PERSIST; - if( ISLOG( 2 ) && hb_parl( 2 ) ) + if( HB_ISLOG( 2 ) && hb_parl( 2 ) ) uiScope |= HB_OO_CLSTP_EXPORTED; ulCount = 0; @@ -4977,7 +4977,7 @@ HB_FUNC( __CLSUNLOCKDEF ) PHB_ITEM pClsDst = hb_param( 1, HB_IT_BYREF ), pClsSrc = hb_param( 2, HB_IT_ANY ); - if( pClsDst && pClsSrc && HB_IS_NIL( pClsDst ) && !ISBYREF( 2 ) ) + if( pClsDst && pClsSrc && HB_IS_NIL( pClsDst ) && ! HB_ISBYREF( 2 ) ) { /* intentional low level hack to eliminate race condition in * unprotected readonly access. diff --git a/harbour/source/vm/cmdarg.c b/harbour/source/vm/cmdarg.c index 0bc61b722b..0d951d4cc7 100644 --- a/harbour/source/vm/cmdarg.c +++ b/harbour/source/vm/cmdarg.c @@ -388,14 +388,14 @@ int hb_cmdargNum( const char * pszName ) HB_FUNC( HB_ARGCHECK ) { - hb_retl( ISCHAR( 1 ) ? hb_cmdargCheck( hb_parc( 1 ) ) : FALSE ); + hb_retl( HB_ISCHAR( 1 ) ? hb_cmdargCheck( hb_parc( 1 ) ) : FALSE ); } /* Returns the value of an internal switch */ HB_FUNC( HB_ARGSTRING ) { - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) { char * pszValue = hb_cmdargString( hb_parc( 1 ) ); diff --git a/harbour/source/vm/eval.c b/harbour/source/vm/eval.c index 54db30526b..d32a1e2cb4 100644 --- a/harbour/source/vm/eval.c +++ b/harbour/source/vm/eval.c @@ -576,7 +576,7 @@ HB_FUNC( HB_EXECMSG ) { int iParams = hb_pcount(); - if( iParams >= 2 && ISSYMBOL( 1 ) ) + if( iParams >= 2 && HB_ISSYMBOL( 1 ) ) { PHB_ITEM pBase = hb_stackBaseItem(); pBase->item.asSymbol.paramcnt = pBase->item.asSymbol.paramdeclcnt = 0; diff --git a/harbour/source/vm/hashfunc.c b/harbour/source/vm/hashfunc.c index 176f5447bd..45580819dd 100644 --- a/harbour/source/vm/hashfunc.c +++ b/harbour/source/vm/hashfunc.c @@ -309,7 +309,7 @@ HB_FUNC( HB_HCOPY ) ulStart = hb_parnl( 3 ); if( !ulStart ) ++ulStart; - ulCount = ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulLen - ulStart + 1; + ulCount = HB_ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulLen - ulStart + 1; while( ulCount-- ) { @@ -382,7 +382,7 @@ HB_FUNC( HB_HEVAL ) ulStart = hb_parnl( 3 ); if( !ulStart ) ++ulStart; - ulCount = ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulLen - ulStart + 1; + ulCount = HB_ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulLen - ulStart + 1; while( ulCount-- ) { @@ -421,7 +421,7 @@ HB_FUNC( HB_HSCAN ) ulStart = hb_parnl( 3 ); if( !ulStart ) ++ulStart; - ulCount = ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulLen - ulStart + 1; + ulCount = HB_ISNUM( 4 ) ? ( ULONG ) hb_parnl( 4 ) : ulLen - ulStart + 1; if( HB_IS_BLOCK( pValue ) ) { diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 580b961da5..8711601a28 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -11286,7 +11286,7 @@ HB_FUNC( __SETPROFILER ) hb_retl( FALSE ); #else hb_retl( hb_bProfiler ); - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_bProfiler = hb_parl( 1 ); #endif } @@ -11300,7 +11300,7 @@ HB_FUNC( __TRACEPRGCALLS ) HB_STACK_TLS_PRELOAD #if defined( HB_PRG_TRACE ) hb_retl( hb_bTracePrgCalls ); - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) hb_bTracePrgCalls = hb_parl( 1 ); #else hb_retl( FALSE ); @@ -11343,7 +11343,7 @@ HB_FUNC( ERRORLEVEL ) hb_retni( s_nErrorLevel ); - /* NOTE: This should be ISNUM( 1 ), but it's sort of a Clipper bug that it + /* NOTE: This should be HB_ISNUM( 1 ), but it's sort of a Clipper bug that it accepts other types also and considers them zero. [vszakats] */ if( hb_pcount() >= 1 ) diff --git a/harbour/source/vm/memvars.c b/harbour/source/vm/memvars.c index c5574b206b..b98dc3d106 100644 --- a/harbour/source/vm/memvars.c +++ b/harbour/source/vm/memvars.c @@ -467,7 +467,7 @@ void hb_memvarGetRefer( HB_ITEM_PTR pItem, PHB_SYMB pMemvarSymb ) if( pMemvar ) { - if( HB_IS_BYREF( pMemvar ) && !HB_IS_ENUM( pMemvar ) ) + if( HB_IS_BYREF( pMemvar ) && ! HB_IS_ENUM( pMemvar ) ) hb_itemCopy( pItem, pMemvar ); else { @@ -492,7 +492,7 @@ void hb_memvarGetRefer( HB_ITEM_PTR pItem, PHB_SYMB pMemvarSymb ) pMemvar = hb_dynsymGetMemvar( pDyn ); if( pMemvar ) { - if( HB_IS_BYREF( pMemvar ) && !HB_IS_ENUM( pMemvar ) ) + if( HB_IS_BYREF( pMemvar ) && ! HB_IS_ENUM( pMemvar ) ) hb_itemCopy( pItem, pMemvar ); else { @@ -1178,7 +1178,7 @@ HB_FUNC( __MVRELEASE ) HB_STACK_TLS_PRELOAD int iCount = hb_pcount(); - if( iCount && ISCHAR( 1 ) ) + if( iCount && HB_ISCHAR( 1 ) ) { BOOL bIncludeVar; const char * pszMask; @@ -1461,7 +1461,7 @@ HB_FUNC( __MVSAVE ) HB_STACK_TLS_PRELOAD /* Clipper also checks for the number of arguments here */ - if( hb_pcount() == 3 && ISCHAR( 1 ) && ISCHAR( 2 ) && ISLOG( 3 ) ) + if( hb_pcount() == 3 && HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && HB_ISLOG( 3 ) ) { PHB_ITEM pError = NULL; PHB_FNAME pFileName; @@ -1534,9 +1534,9 @@ HB_FUNC( __MVRESTORE ) /* Clipper checks for the number of arguments here here, but we cannot in Harbour since we have two optional parameters as an extension. */ #ifdef HB_C52_STRICT - if( hb_pcount() == 2 && ISCHAR( 1 ) && ISLOG( 2 ) ) + if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISLOG( 2 ) ) #else - if( ISCHAR( 1 ) && ISLOG( 2 ) ) + if( HB_ISCHAR( 1 ) && HB_ISLOG( 2 ) ) #endif { HB_STACK_TLS_PRELOAD @@ -1593,7 +1593,7 @@ HB_FUNC( __MVRESTORE ) bIncludeMask = TRUE; #else pszMask = hb_memvarGetMask( 3 ); - bIncludeMask = !ISLOG( 4 ) || hb_parl( 4 ); + bIncludeMask = ! HB_ISLOG( 4 ) || hb_parl( 4 ); #endif while( hb_fsRead( fhnd, buffer, HB_MEM_REC_LEN ) == HB_MEM_REC_LEN ) diff --git a/harbour/source/vm/proc.c b/harbour/source/vm/proc.c index 02e21637e2..c8bc2560a7 100644 --- a/harbour/source/vm/proc.c +++ b/harbour/source/vm/proc.c @@ -107,11 +107,11 @@ HB_FUNC( PROCFILE ) #ifndef HB_C52_STRICT PHB_SYMB pSym = NULL; - if( ISSYMBOL( 1 ) ) + if( HB_ISSYMBOL( 1 ) ) { pSym = hb_itemGetSymbol( hb_param( 1, HB_IT_SYMBOL ) ); } - else if( ISCHAR( 1 ) ) + else if( HB_ISCHAR( 1 ) ) { PHB_DYNS pDynSym = hb_dynsymFindName( hb_parc( 1 ) ); diff --git a/harbour/source/vm/thread.c b/harbour/source/vm/thread.c index ac0c1ef87c..1207fcb112 100644 --- a/harbour/source/vm/thread.c +++ b/harbour/source/vm/thread.c @@ -1221,7 +1221,7 @@ HB_FUNC( HB_THREADWAIT ) int iThreads = -1; pThreads = pAlloc; - if( ISARRAY( 1 ) ) + if( HB_ISARRAY( 1 ) ) { PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY ); int iLen = ( int ) hb_arrayLen( pArray ), i; @@ -1252,13 +1252,13 @@ HB_FUNC( HB_THREADWAIT ) if( iThreads > 0 ) { - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { double dTimeOut = hb_parnd( 2 ); ulMilliSec = dTimeOut > 0 ? ( ULONG ) ( dTimeOut * 1000 ) : 0; } - if( ISLOG( 3 ) ) + if( HB_ISLOG( 3 ) ) fAll = hb_parl( 3 ); hb_retni( hb_threadWait( pThreads, iThreads, fAll, ulMilliSec ) ); @@ -1303,7 +1303,7 @@ HB_FUNC( HB_THREADTERMINATEALL ) HB_FUNC( HB_THREADONCE ) { PHB_ITEM pItem = hb_param( 1, HB_IT_ANY ); - if( pItem && ISBYREF( 1 ) && ( HB_IS_NIL( pItem ) || HB_IS_LOGICAL( pItem ) ) ) + if( pItem && HB_ISBYREF( 1 ) && ( HB_IS_NIL( pItem ) || HB_IS_LOGICAL( pItem ) ) ) { HB_STACK_TLS_PRELOAD BOOL fFirstCall = FALSE; @@ -2216,7 +2216,7 @@ HB_FUNC( HB_MUTEXLOCK ) if( pItem ) { HB_STACK_TLS_PRELOAD - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { ULONG ulMilliSec = 0; double dTimeOut = hb_parnd( 2 ); @@ -2265,7 +2265,7 @@ HB_FUNC( HB_MUTEXSUBSCRIBE ) HB_STACK_TLS_PRELOAD PHB_ITEM pResult; - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { ULONG ulMilliSec = 0; double dTimeOut = hb_parnd( 2 ); @@ -2296,7 +2296,7 @@ HB_FUNC( HB_MUTEXSUBSCRIBENOW ) HB_STACK_TLS_PRELOAD PHB_ITEM pResult; - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { ULONG ulMilliSec = 0; double dTimeOut = hb_parnd( 2 );