*** empty log message ***
This commit is contained in:
@@ -1,3 +1,54 @@
|
||||
19990728-20:35 CET Victor Szel <info@szelvesz.hu>
|
||||
* Changed all #include <x> to #include "x", where
|
||||
x is a Harbour header file.
|
||||
Many source and header files involved.
|
||||
* include/extend.h - Small cleanups.
|
||||
* include/extend.h - Some functions renamed to be more
|
||||
consistent.
|
||||
source/rtl/arrays.c
|
||||
source/rtl/classes.c
|
||||
source/rtl/codebloc.c
|
||||
source/rtl/dir.c
|
||||
source/rtl/errorapi.c
|
||||
source/rtl/extend.c
|
||||
source/rtl/itemapi.c
|
||||
source/rtl/memvars.c
|
||||
source/rtl/transfrm.c
|
||||
source/tools/debug.c
|
||||
source/vm/hvm.c
|
||||
ItemCopy() -> hb_itemCopy()
|
||||
ItemRelease() -> hb_itemClear()
|
||||
ItemUnRef() -> hb_itemUnRef()
|
||||
GetMethod() -> hb_GetMethod()
|
||||
* include/version.h renamed to hb_ver.h
|
||||
source/rtl/environ.c
|
||||
source/compiler/harbour.y
|
||||
include/Makefile
|
||||
* source/vm/hvm.c - hb_item*() functions moved to source/rtl/itemapi.c
|
||||
* source/vm/hvm.c - Codeblock and memvar management function
|
||||
declarations moved to include/extend.h
|
||||
* source/rtl/strcmp.c/hb_stricmp() moved to source/rtl/strings.c
|
||||
* source/rtl/strcmp.c/hb_itemStrCmp() moved to source/rtl/itemapi.c
|
||||
- source/rtl/strcmp.c removed.
|
||||
source/rtl/makefile
|
||||
makefile.b16
|
||||
makefile.b31
|
||||
makefile.b32
|
||||
makefile.b40
|
||||
makefile.vc
|
||||
- makefile.icc removed (superseded by GNU Make System)
|
||||
+ tests/working/rtl_test.prg - Further improved, it's
|
||||
now fully automatic.
|
||||
! source/rtl/strings.c - LEFT(),RIGHT(),SUBSTR() bugs fixed with
|
||||
some LONG casts for asstring.length.
|
||||
UPPER(),LOWER() LONG -> ULONG
|
||||
* source/compiler/harbour.y
|
||||
source/compiler/harbour.l
|
||||
source/compiler/genobj32.c
|
||||
Some ints changed to BOOL.
|
||||
! tests/working/strsub.prg - "Press a key" changed
|
||||
to "press Enter".
|
||||
|
||||
19990728-19:45 GMT+1 Antonio Linares <alinares@fivetech.com>
|
||||
* include/classes.ch
|
||||
Added support for 'Super' keyword
|
||||
|
||||
@@ -27,7 +27,7 @@ C_HEADERS=\
|
||||
run_exp.h \
|
||||
set.h \
|
||||
super.h \
|
||||
version.h \
|
||||
hbver.h \
|
||||
|
||||
PRG_HEADERS=\
|
||||
box.ch \
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef HB_ERROR_API_
|
||||
#define HB_ERROR_API_
|
||||
|
||||
#include <errorapi.h>
|
||||
#include "errorapi.h"
|
||||
|
||||
#define _errNew hb_errNew
|
||||
#define _errLaunch hb_errLaunch
|
||||
|
||||
@@ -24,14 +24,15 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
V 1.0 1999-04-25 - Initial posting.
|
||||
V 1.11 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.0 ? Initial posting.
|
||||
*/
|
||||
|
||||
#ifndef HB_ERRORAPI_H_
|
||||
#define HB_ERRORAPI_H_
|
||||
|
||||
#include <extend.h>
|
||||
#include <error.ch>
|
||||
#include "extend.h"
|
||||
#include "error.ch"
|
||||
|
||||
/* Error codes (returned from hb_errLaunch()) */
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef HB_EXTEND_API_
|
||||
#define HB_EXTEND_API_
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
#define _parc hb_parc
|
||||
#define _parclen hb_parclen
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <hbdefs.h>
|
||||
#include <hbsetup.h>
|
||||
#include "hbdefs.h"
|
||||
#include "hbsetup.h"
|
||||
|
||||
struct _DYNSYM; /* forward declaration */
|
||||
|
||||
typedef struct /* symbol support structure */
|
||||
{
|
||||
char * szName; /* the name of the symbol */
|
||||
char* szName; /* the name of the symbol */
|
||||
SYMBOLSCOPE cScope; /* the scope of the symbol */
|
||||
HARBOURFUNC pFunPtr; /* function address for function symbol table entries */
|
||||
struct _DYNSYM * pDynSym; /* pointer to its dynamic symbol if defined */
|
||||
@@ -47,7 +47,7 @@ typedef struct /* symbol support structure */
|
||||
#define FS_STATIC 2
|
||||
#define FS_INIT 8
|
||||
#define FS_EXIT 16
|
||||
#define FS_INITEXIT 24
|
||||
#define FS_INITEXIT ( FS_INIT | FS_EXIT )
|
||||
#define FS_MESSAGE 32
|
||||
#define FS_MEMVAR 128
|
||||
|
||||
@@ -81,8 +81,7 @@ struct _HB_BASEARRAY;
|
||||
struct _HB_ITEM;
|
||||
struct _HB_VALUE;
|
||||
|
||||
/* Internal structures that holds data
|
||||
*/
|
||||
/* Internal structures that holds data */
|
||||
struct hb_struArray
|
||||
{
|
||||
struct _HB_BASEARRAY * value;
|
||||
@@ -186,51 +185,50 @@ typedef PHB_ITEM HB_ITEM_PTR;
|
||||
|
||||
typedef struct _HB_BASEARRAY
|
||||
{
|
||||
PHB_ITEM pItems; /* pointer to the array items */
|
||||
ULONG ulLen; /* number of items in the array */
|
||||
WORD wHolders; /* number of holders of this array */
|
||||
WORD wClass; /* offset to the classes base if it is an object */
|
||||
WORD wSuperCast; /* is it a super cast ? */
|
||||
PHB_ITEM pItems; /* pointer to the array items */
|
||||
ULONG ulLen; /* number of items in the array */
|
||||
WORD wHolders; /* number of holders of this array */
|
||||
WORD wClass; /* offset to the classes base if it is an object */
|
||||
WORD wSuperCast; /* is it a super cast ? */
|
||||
} BASEARRAY, * PBASEARRAY;
|
||||
|
||||
typedef struct /* stack managed by the virtual machine */
|
||||
{
|
||||
PHB_ITEM pItems; /* pointer to the stack items */
|
||||
PHB_ITEM pPos; /* pointer to the latest used item */
|
||||
LONG wItems; /* total items that may be holded on the stack */
|
||||
HB_ITEM Return; /* latest returned value */
|
||||
PHB_ITEM pBase; /* stack frame position for the current function call */
|
||||
PHB_ITEM pEvalBase;/* stack frame position for the evaluated codeblock */
|
||||
int iStatics; /* statics base for the current function call */
|
||||
char szDate[ 9 ]; /* last returned date from _pards() yyyymmdd format */
|
||||
PHB_ITEM pItems; /* pointer to the stack items */
|
||||
PHB_ITEM pPos; /* pointer to the latest used item */
|
||||
LONG wItems; /* total items that may be holded on the stack */
|
||||
HB_ITEM Return; /* latest returned value */
|
||||
PHB_ITEM pBase; /* stack frame position for the current function call */
|
||||
PHB_ITEM pEvalBase; /* stack frame position for the evaluated codeblock */
|
||||
int iStatics; /* statics base for the current function call */
|
||||
char szDate[ 9 ]; /* last returned date from _pards() yyyymmdd format */
|
||||
} STACK;
|
||||
|
||||
typedef struct _DYNSYM
|
||||
{
|
||||
HB_HANDLE hArea; /* Workarea number */
|
||||
HB_HANDLE hMemvar; /* Index number into memvars ( publics & privates ) array */
|
||||
PSYMBOL pSymbol; /* pointer to its relative local symbol */
|
||||
HARBOURFUNC pFunPtr; /* Pointer to the function address */
|
||||
} DYNSYM, * PDYNSYM; /* dynamic symbol structure */
|
||||
HB_HANDLE hArea; /* Workarea number */
|
||||
HB_HANDLE hMemvar; /* Index number into memvars ( publics & privates ) array */
|
||||
PSYMBOL pSymbol; /* pointer to its relative local symbol */
|
||||
HARBOURFUNC pFunPtr; /* Pointer to the function address */
|
||||
} DYNSYM, * PDYNSYM; /* dynamic symbol structure */
|
||||
|
||||
/* internal structure for codeblocks */
|
||||
typedef struct _HB_CODEBLOCK
|
||||
{
|
||||
BYTE * pCode; /* codeblock pcode */
|
||||
PHB_ITEM pLocals; /* table with referenced local variables */
|
||||
WORD wLocals; /* number of referenced local variables */
|
||||
PSYMBOL pSymbols; /* codeblocks symbols */
|
||||
ULONG lCounter; /* numer of references to this codeblock */
|
||||
BYTE* pCode; /* codeblock pcode */
|
||||
PHB_ITEM pLocals; /* table with referenced local variables */
|
||||
WORD wLocals; /* number of referenced local variables */
|
||||
PSYMBOL pSymbols; /* codeblocks symbols */
|
||||
ULONG lCounter; /* numer of references to this codeblock */
|
||||
} HB_CODEBLOCK, * HB_CODEBLOCK_PTR;
|
||||
|
||||
typedef struct _HB_VALUE
|
||||
{
|
||||
HB_ITEM item;
|
||||
ULONG counter;
|
||||
HB_HANDLE hPrevMemvar;
|
||||
HB_ITEM item;
|
||||
ULONG counter;
|
||||
HB_HANDLE hPrevMemvar;
|
||||
} HB_VALUE, * HB_VALUE_PTR;
|
||||
|
||||
|
||||
PHB_ITEM hb_param( int iParam, WORD wType ); /* retrieve a generic parameter */
|
||||
char * hb_parc( int iParam, ... ); /* retrieve a string parameter */
|
||||
ULONG hb_parclen( int iParam, ... ); /* retrieve a string parameter length */
|
||||
@@ -240,6 +238,7 @@ double hb_parnd( int iParam, ... ); /* retrieve a numeric parameter as a doubl
|
||||
int hb_parni( int iParam, ... ); /* retrieve a numeric parameter as a integer */
|
||||
long hb_parnl( int iParam, ... ); /* retrieve a numeric parameter as a long */
|
||||
WORD hb_parinfo( int iParam ); /* Determine the param count or data type */
|
||||
ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex );
|
||||
void hb_storc( char * szText, int iParam, ... ); /* stores a szString on a variable by reference */
|
||||
void hb_storclen( char * fixText, WORD wLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */
|
||||
void hb_stords( char * szDate, int iParam, ... ); /* szDate must have yyyymmdd format */
|
||||
@@ -263,10 +262,6 @@ void * hb_xrealloc( void * pMem, ULONG lSize ); /* reallocates memory */
|
||||
void hb_xfree( void * pMem ); /* frees memory */
|
||||
ULONG hb_xsize( void * pMem ); /* returns the size of an allocated memory block */
|
||||
|
||||
void ItemCopy( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
void ItemRelease( PHB_ITEM pItem );
|
||||
PHB_ITEM ItemUnRef( PHB_ITEM pItem ); /* de-references passed variable */
|
||||
|
||||
void hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ); /* creates a new array */
|
||||
void hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* retrieves an item */
|
||||
ULONG hb_arrayLen( PHB_ITEM pArray ); /* retrives the array len */
|
||||
@@ -282,19 +277,43 @@ void hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex );
|
||||
PHB_ITEM hb_arrayClone( PHB_ITEM pArray );
|
||||
void hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue );
|
||||
char * hb_arrayGetDate( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the date value contained on an array element */
|
||||
ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex );
|
||||
|
||||
int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
|
||||
void hb_itemCopy( PHB_ITEM pDest, PHB_ITEM pSource ); /* copies an item to one place to another respecting its containts */
|
||||
void hb_itemClear( PHB_ITEM pItem );
|
||||
PHB_ITEM hb_itemUnRef( PHB_ITEM pItem ); /* de-references passed variable */
|
||||
|
||||
char * hb_str( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert number to string */
|
||||
int hb_stricmp( const char *s1, const char *s2 );
|
||||
BOOL hb_strempty( char * szText, ULONG ulLen );
|
||||
ULONG hb_strAt( char *, long, char *, long );
|
||||
|
||||
HARBOURFUNC GetMethod( PHB_ITEM pObject, PSYMBOL pSymMsg ); /* returns the method pointer of a object class */
|
||||
HARBOURFUNC hb_GetMethod( PHB_ITEM pObject, PSYMBOL pSymMsg ); /* returns the method pointer of a object class */
|
||||
char * hb_GetClassName( PHB_ITEM pObject ); /* retrieves an object class name */
|
||||
ULONG hb_isMessage( PHB_ITEM, char * );
|
||||
|
||||
/* dynamic symbol table management */
|
||||
PDYNSYM hb_GetDynSym( char * szName ); /* finds and creates a dynamic symbol if not found */
|
||||
PDYNSYM hb_NewDynSym( PSYMBOL pSymbol ); /* creates a new dynamic symbol based on a local one */
|
||||
PDYNSYM hb_FindDynSym( char * szName ); /* finds a dynamic symbol */
|
||||
|
||||
HB_CODEBLOCK_PTR hb_CodeblockNew( BYTE *, WORD, WORD *, PSYMBOL );
|
||||
void hb_CodeblockDelete( PHB_ITEM );
|
||||
PHB_ITEM hb_CodeblockGetVar( PHB_ITEM, LONG );
|
||||
PHB_ITEM hb_CodeblockGetRef( PHB_ITEM, PHB_ITEM );
|
||||
void hb_CodeblockEvaluate( PHB_ITEM );
|
||||
void hb_CodeblockCopy( PHB_ITEM, PHB_ITEM );
|
||||
|
||||
/* Initialisation and closing memvars subsystem */
|
||||
void hb_MemvarsInit( void );
|
||||
void hb_MemvarsRelease( void );
|
||||
void hb_MemvarValueIncRef( HB_HANDLE );
|
||||
void hb_MemvarValueDecRef( HB_HANDLE );
|
||||
void hb_MemvarSetValue( PSYMBOL, HB_ITEM_PTR );
|
||||
void hb_MemvarGetValue( HB_ITEM_PTR, PSYMBOL );
|
||||
void hb_MemvarGetRefer( HB_ITEM_PTR, PSYMBOL );
|
||||
void hb_MemvarNewSymbol( PSYMBOL );
|
||||
ULONG hb_MemvarGetPrivatesBase( void );
|
||||
void hb_MemvarSetPrivatesBase( ULONG );
|
||||
|
||||
#endif /* HB_EXTEND_H_ */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
their web site at http://www.gnu.org/).
|
||||
|
||||
V 1.6 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.5 David G. Holm Added my email address.
|
||||
V 1.4 David G. Holm Added copyright and license header,
|
||||
along with a complete version history.
|
||||
@@ -41,7 +42,7 @@
|
||||
#ifndef HB_FILESYS_API_
|
||||
#define HB_FILESYS_API_
|
||||
|
||||
#include <filesys.h>
|
||||
#include "filesys.h"
|
||||
|
||||
#define _fsChDir hb_fsChDir
|
||||
#define _fsChDrv hb_fsChDrv
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
their web site at http://www.gnu.org/).
|
||||
|
||||
V 1.7 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.6 David G. Holm Added my email address.
|
||||
V 1.5 David G. Holm Added copyright and license header,
|
||||
along with a complete version history.
|
||||
@@ -43,8 +44,8 @@
|
||||
#ifndef HB_FILESYS_H_
|
||||
#define HB_FILESYS_H_
|
||||
|
||||
#include <extend.h>
|
||||
#include <fileio.ch>
|
||||
#include "extend.h"
|
||||
#include "fileio.ch"
|
||||
|
||||
typedef void * ERRORP;
|
||||
typedef int FHANDLE;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef HB_FM_API_
|
||||
#define HB_FM_API_
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
#define _xgrab hb_xgrab
|
||||
#define _xrealloc hb_xrealloc
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef HB_GT_API_
|
||||
#define HB_GT_API_
|
||||
|
||||
#include <gtapi.h>
|
||||
#include "gtapi.h"
|
||||
|
||||
#define _gtInit hb_gtInit
|
||||
#define _gtBox hb_gtBox
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
#ifndef HB_GTAPI_H_
|
||||
#define HB_GTAPI_H_
|
||||
|
||||
#include <color.ch>
|
||||
#include <setcurs.ch>
|
||||
#include <box.h>
|
||||
#include "extend.h"
|
||||
#include "color.ch"
|
||||
#include "setcurs.ch"
|
||||
#include "box.h"
|
||||
|
||||
/* maximum length of color string */
|
||||
#define CLR_STRLEN 64
|
||||
@@ -44,8 +45,6 @@
|
||||
* - Zortech C/C++ (16-bit) for DOS 3.0r4
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
|
||||
/* Public interface. These should never change, only be added to. */
|
||||
|
||||
void hb_gtInit(void);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
their web site at http://www.gnu.org/).
|
||||
|
||||
V 1.2 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.1 David G. Holm Committed to CVS.
|
||||
V 1.0 David G. Holm Initial version.
|
||||
*/
|
||||
@@ -36,7 +37,7 @@
|
||||
#ifndef HB_INKEY_H_
|
||||
#define HB_INKEY_H_
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
/* Harbour keyboard support functions */
|
||||
int hb_inkeyGet( void ); /* Extract the next key from the Harbour keyboard buffer */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef HB_ITEM_API_
|
||||
#define HB_ITEM_API_
|
||||
|
||||
#include <itemapi.h>
|
||||
#include "itemapi.h"
|
||||
|
||||
#define _arrayNew hb_arrayNew
|
||||
#define _arrayLen hb_arrayLen
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef HB_ITEMAPI_H_
|
||||
#define HB_ITEMAPI_H_
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef HB_PCODE_H_
|
||||
#define HB_PCODE_H_
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
their web site at http://www.gnu.org/).
|
||||
|
||||
V 1.19 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.18 David G. Holm Added INKEY_EXTENDED to allow some
|
||||
platforms to select between normal
|
||||
and extended key codes.
|
||||
@@ -70,7 +71,7 @@
|
||||
#ifndef HB_SET_H_
|
||||
#define HB_SET_H_
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
HARBOUR HB_SET( void );
|
||||
HARBOUR HB_SETCENTURY( void );
|
||||
|
||||
@@ -17,7 +17,7 @@ harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj dates.obj \
|
||||
errorapi.obj errorsys.obj extend.obj files.obj \
|
||||
hardcr.obj initsymb.obj itemapi.obj math.obj memvars.obj \
|
||||
mathx.obj mtran.obj objfunc.obj set.obj setcolor.obj stringp.obj \
|
||||
strings.obj stringsx.obj strcmp.obj tclass.obj transfrm.obj
|
||||
strings.obj stringsx.obj tclass.obj transfrm.obj
|
||||
|
||||
libs\b16\terminal.lib : console.obj
|
||||
|
||||
@@ -56,7 +56,6 @@ mtran.obj : mtran.c extend.h hbdefs.h
|
||||
objfunc.obj : objfunc.c extend.h hbdefs.h
|
||||
set.obj : set.c extend.h hbdefs.h
|
||||
setcolor.obj : setcolor.c extend.h hbdefs.h init.h pcode.h
|
||||
strcmp.obj : strcmp.c extend.h hbdefs.h
|
||||
stringp.obj : stringp.c extend.h hbdefs.h
|
||||
strings.obj : strings.c extend.h hbdefs.h
|
||||
stringsx.obj : stringsx.c extend.h hbdefs.h
|
||||
|
||||
@@ -19,7 +19,7 @@ harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj copyfile.obj \
|
||||
error.obj errorapi.obj errorsys.obj extend.obj \
|
||||
files.obj gtapi.obj hardcr.obj initsymb.obj itemapi.obj \
|
||||
math.obj memvars.obj mtran.obj msguk.obj objfunc.obj \
|
||||
set.obj setcolor.obj strings.obj strcmp.obj symbols.obj \
|
||||
set.obj setcolor.obj strings.obj symbols.obj \
|
||||
tclass.obj transfrm.obj
|
||||
|
||||
hbtools.lib : dates2.obj datesx.obj debug.obj hb_f.obj io.obj mathx.obj \
|
||||
@@ -65,7 +65,6 @@ mtran.obj : mtran.c extend.h hbdefs.h
|
||||
objfunc.obj : objfunc.prg extend.h hbdefs.h init.h pcode.h
|
||||
set.obj : set.c extend.h hbdefs.h set.h
|
||||
setcolor.obj : setcolor.c extend.h hbdefs.h init.h pcode.h
|
||||
strcmp.obj : strcmp.c extend.h hbdefs.h set.h
|
||||
strings.obj : strings.c extend.h hbdefs.h set.h
|
||||
symbols.obj : symbols.asm
|
||||
tclass.obj : tclass.prg extend.h hbdefs.h init.h pcode.h
|
||||
|
||||
@@ -19,7 +19,7 @@ harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj \
|
||||
hardcr.obj hb_f.obj initsymb.obj inkey.obj itemapi.obj memvars.obj \
|
||||
math.obj mathx.obj msguk.obj mtran.obj objfunc.obj \
|
||||
set.obj setcolor.obj symbols.obj strings.obj stringp.obj \
|
||||
stringsx.obj strcmp.obj tclass.obj transfrm.obj copyfile.obj
|
||||
stringsx.obj tclass.obj transfrm.obj copyfile.obj
|
||||
|
||||
symbols.obj : symbols.asm
|
||||
|
||||
@@ -55,7 +55,6 @@ mtran.obj : mtran.c extend.h hbdefs.h
|
||||
objfunc.obj : objfunc.c extend.h hbdefs.h
|
||||
set.obj : set.c extend.h hbdefs.h
|
||||
setcolor.obj : setcolor.c extend.h hbdefs.h init.h pcode.h
|
||||
strcmp.obj : strcmp.c extend.h hbdefs.h
|
||||
stringp.obj : stringp.c extend.h hbdefs.h
|
||||
strings.obj : strings.c extend.h hbdefs.h
|
||||
stringsx.obj : stringsx.c extend.h hbdefs.h
|
||||
|
||||
@@ -19,7 +19,7 @@ harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj \
|
||||
hardcr.obj hb_f.obj initsymb.obj itemapi.obj memvars.obj \
|
||||
math.obj mathx.obj msguk.obj mtran.obj objfunc.obj \
|
||||
set.obj setcolor.obj symbols.obj strings.obj stringp.obj \
|
||||
stringsx.obj strcmp.obj tclass.obj transfrm.obj copyfile.obj
|
||||
stringsx.obj tclass.obj transfrm.obj copyfile.obj
|
||||
|
||||
symbols.obj : symbols.asm
|
||||
|
||||
@@ -54,7 +54,6 @@ mtran.obj : mtran.c extend.h hbdefs.h
|
||||
objfunc.obj : objfunc.c extend.h hbdefs.h
|
||||
set.obj : set.c extend.h hbdefs.h
|
||||
setcolor.obj : setcolor.c extend.h hbdefs.h init.h pcode.h
|
||||
strcmp.obj : strcmp.c extend.h hbdefs.h
|
||||
stringp.obj : stringp.c extend.h hbdefs.h
|
||||
strings.obj : strings.c extend.h hbdefs.h
|
||||
stringsx.obj : stringsx.c extend.h hbdefs.h
|
||||
|
||||
@@ -77,7 +77,6 @@ HARBOUR_LIB_OBJS = \
|
||||
$(OBJ_DIR)\objfunc.obj \
|
||||
$(OBJ_DIR)\set.obj \
|
||||
$(OBJ_DIR)\setcolor.obj \
|
||||
$(OBJ_DIR)\strcmp.obj \
|
||||
$(OBJ_DIR)\strings.obj \
|
||||
$(OBJ_DIR)\tclass.obj \
|
||||
$(OBJ_DIR)\transfrm.obj
|
||||
@@ -284,9 +283,6 @@ $(OBJ_DIR)\set.obj : $(RTL_DIR)\set.c
|
||||
$(OBJ_DIR)\setcolor.obj : $(RTL_DIR)\setcolor.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
$(OBJ_DIR)\strcmp.obj : $(RTL_DIR)\strcmp.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
$(OBJ_DIR)\strings.obj : $(RTL_DIR)\strings.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <hbdefs.h>
|
||||
#include <compiler.h>
|
||||
#include <extend.h>
|
||||
#include <pcode.h>
|
||||
#include "hbdefs.h"
|
||||
#include "compiler.h"
|
||||
#include "extend.h"
|
||||
#include "pcode.h"
|
||||
|
||||
static void CompiledFileName( FILE * hObjFile, char * szFileName );
|
||||
static void CompilerVersion( FILE * hObjFile, char * szVersion );
|
||||
@@ -56,7 +56,7 @@ static void GenerateSymbolsSegment( FILE * hObjFile );
|
||||
|
||||
extern FUNCTIONS functions, funcalls;
|
||||
extern SYMBOLS symbols;
|
||||
extern int _iQuiet, _iStartProc;
|
||||
extern int _bQuiet, _bStartProc;
|
||||
|
||||
static BYTE prgFunction[] = { 0x68, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,
|
||||
0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x83, 0xC4, 0x08, 0xC3 };
|
||||
@@ -74,7 +74,7 @@ void GenObj32( char * szObjFileName, char * szFileName )
|
||||
return;
|
||||
}
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "\ngenerating Windows/Dos OBJ 32 bits..." );
|
||||
|
||||
CompiledFileName( hObjFile, szFileName );
|
||||
@@ -88,20 +88,20 @@ void GenObj32( char * szObjFileName, char * szFileName )
|
||||
|
||||
fclose( hObjFile );
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "\n%s -> done!\n", szObjFileName );
|
||||
}
|
||||
|
||||
static ULONG GetSymbolsSize( void )
|
||||
{
|
||||
return ( symbols.iCount - ( _iStartProc ? 0: 1 ) ) * sizeof( SYMBOL );
|
||||
return ( symbols.iCount - ( _bStartProc ? 0: 1 ) ) * sizeof( SYMBOL );
|
||||
}
|
||||
|
||||
static PCOMSYMBOL GetFirstSymbol( void )
|
||||
{
|
||||
PCOMSYMBOL pSymbol = symbols.pFirst;
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pSymbol = pSymbol->pNext;
|
||||
|
||||
return pSymbol;
|
||||
@@ -123,7 +123,7 @@ static ULONG GetPCodesSize( void )
|
||||
ULONG ulTotal = 0;
|
||||
PFUNCTION pFunction = functions.pFirst;
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunction = pFunction->pNext;
|
||||
|
||||
while( pFunction )
|
||||
@@ -245,9 +245,9 @@ static void GenerateDataSegment( FILE * hObjFile )
|
||||
|
||||
static void GenerateCodeSegment( FILE * hObjFile )
|
||||
{
|
||||
WORD wFunctions = functions.iCount - ( _iStartProc ? 0: 1 );
|
||||
WORD wFunctions = functions.iCount - ( _bStartProc ? 0: 1 );
|
||||
ULONG ulSize = wFunctions * sizeof( prgFunction );
|
||||
PFUNCTION pFunc = ( _iStartProc ? functions.pFirst: functions.pFirst->pNext );
|
||||
PFUNCTION pFunc = ( _bStartProc ? functions.pFirst: functions.pFirst->pNext );
|
||||
WORD w = 0;
|
||||
|
||||
DefineSegment( hObjFile, 2, /* "_TEXT" position + 1 into localNames */
|
||||
@@ -449,9 +449,9 @@ static void CodeSegment( FILE * hObjFile, BYTE * prgCode, ULONG ulPrgLen, WORD w
|
||||
WORD wTotalLen = ( ulPrgLen * wFunctions ) + 4;
|
||||
ULONG ul;
|
||||
PFUNCTION pFunction = functions.pFirst;
|
||||
ULONG ulPCodeOffset = ( symbols.iCount - ( _iStartProc ? 0: 1 ) ) * sizeof( SYMBOL );
|
||||
ULONG ulPCodeOffset = ( symbols.iCount - ( _bStartProc ? 0: 1 ) ) * sizeof( SYMBOL );
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunction = pFunction->pNext;
|
||||
|
||||
putbyte( 0xA0, hObjFile );
|
||||
@@ -492,7 +492,7 @@ static void DataSegment( FILE * hObjFile, BYTE * symbol, WORD wSymLen, WORD wSym
|
||||
ULONG ulSymbolNameOffset = GetSymbolsSize() + GetPCodesSize();
|
||||
ULONG ulFunctionOffset;
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunction = pFunction->pNext;
|
||||
|
||||
putbyte( 0xA0, hObjFile );
|
||||
|
||||
@@ -65,8 +65,8 @@ int yy_lex_input( char *, int );
|
||||
#define YY_INPUT( buf, result, max_size ) result = yy_lex_input( buf, max_size );
|
||||
|
||||
/* variables defined in harbour.y */
|
||||
extern int _iQuiet;
|
||||
extern int _iRestrictSymbolLength;
|
||||
extern int _bQuiet;
|
||||
extern int _bRestrictSymbolLength;
|
||||
extern WORD _wSeqCounter;
|
||||
extern WORD _wForCounter;
|
||||
extern WORD _wIfCounter;
|
||||
@@ -213,7 +213,7 @@ Separator {SpaceTab}
|
||||
|
||||
{SpaceTab} ;
|
||||
|
||||
\n.* _iState=LOOKUP; yyless( 1 ); ++iLine; if( ! _iQuiet ) printf( "\rline: %i", iLine ); return '\n';
|
||||
\n.* _iState=LOOKUP; yyless( 1 ); ++iLine; if( ! _bQuiet ) printf( "\rline: %i", iLine ); return '\n';
|
||||
%{
|
||||
/* ************************************************************************ */
|
||||
%}
|
||||
@@ -1176,7 +1176,7 @@ Separator {SpaceTab}
|
||||
yytext[yyleng] = 0;
|
||||
|
||||
{
|
||||
if( _iRestrictSymbolLength && strlen( yytext ) > 10 )
|
||||
if( _bRestrictSymbolLength && strlen( yytext ) > 10 )
|
||||
{
|
||||
yytext[ 10 ] = 0;
|
||||
yyleng = 10;
|
||||
@@ -1218,7 +1218,7 @@ Separator {SpaceTab}
|
||||
}
|
||||
|
||||
{Identifier} {
|
||||
if( _iRestrictSymbolLength && strlen( yytext ) > 10 )
|
||||
if( _bRestrictSymbolLength && strlen( yytext ) > 10 )
|
||||
{
|
||||
yytext[ 10 ] = 0;
|
||||
yyleng = 10;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "compiler.h"
|
||||
#include "hberrors.h"
|
||||
#include "hbpp.h"
|
||||
#include "version.h"
|
||||
#include "hbver.h"
|
||||
|
||||
#define debug_msg( x, z )
|
||||
|
||||
@@ -219,7 +219,7 @@ void MessageFix( char * szMsgName ); /* fix a generated message to an object
|
||||
void MessageDupl( char * szMsgName ); /* fix a one generated message to an object and duplicate */
|
||||
void PopId( char * szVarName ); /* generates the pcode to pop a value from the virtual machine stack onto a variable */
|
||||
void PushDouble( double fNumber, BYTE bDec ); /* Pushes a number on the virtual machine stack */
|
||||
void PushFunCall( char * ); /* generates the pcode to push function's call */
|
||||
void PushFunCall( char * ); /* generates the pcode to push function's call */
|
||||
void PushId( char * szVarName ); /* generates the pcode to push a variable value to the virtual machine stack */
|
||||
void PushIdByRef( char * szVarName ); /* generates the pcode to push a variable by reference to the virtual machine stack */
|
||||
void PushInteger( int iNumber ); /* Pushes a integer number on the virtual machine stack */
|
||||
@@ -422,16 +422,17 @@ FILES files;
|
||||
FUNCTIONS functions, funcalls;
|
||||
PFUNCTION _pInitFunc;
|
||||
SYMBOLS symbols;
|
||||
int _iStartProc = 1; /* holds if we need to create the starting procedure */
|
||||
int _iLineNumbers = 1; /* holds if we need pcodes with line numbers */
|
||||
int _iQuiet = 0; /* quiet mode */
|
||||
int _iSyntaxCheckOnly = 0; /* syntax check only */
|
||||
int _iLanguage = LANG_C; /* default Harbour generated output language */
|
||||
int _iRestrictSymbolLength = 0; /* generate 10 chars max symbols length */
|
||||
int _iShortCuts = 1; /* .and. & .or. expressions shortcuts */
|
||||
int _iWarnings = 0; /* enable parse warnings */
|
||||
int _iAutoMemvarAssume = 0; /* holds if undeclared variables are automatically assumed MEMVAR */
|
||||
int _iForceMemvars = 0; /* holds if memvars are assumed when accesing undeclared variable */
|
||||
|
||||
BOOL _bStartProc = TRUE; /* holds if we need to create the starting procedure */
|
||||
BOOL _bLineNumbers = TRUE; /* holds if we need pcodes with line numbers */
|
||||
BOOL _bQuiet = FALSE; /* quiet mode */
|
||||
BOOL _bSyntaxCheckOnly = FALSE; /* syntax check only */
|
||||
int _iLanguage = LANG_C; /* default Harbour generated output language */
|
||||
BOOL _bRestrictSymbolLength = FALSE; /* generate 10 chars max symbols length */
|
||||
BOOL _bShortCuts = TRUE; /* .and. & .or. expressions shortcuts */
|
||||
BOOL _bWarnings = FALSE; /* enable parse warnings */
|
||||
BOOL _bAutoMemvarAssume = FALSE; /* holds if undeclared variables are automatically assumed MEMVAR */
|
||||
BOOL _bForceMemvars = FALSE; /* holds if memvars are assumed when accesing undeclared variable */
|
||||
|
||||
WORD _wSeqCounter = 0;
|
||||
WORD _wForCounter = 0;
|
||||
@@ -440,10 +441,10 @@ WORD _wWhileCounter = 0;
|
||||
WORD _wCaseCounter = 0;
|
||||
LONG _lMessageFix = 0; /* Position of the message which needs to be changed */
|
||||
#ifdef HARBOUR_OBJ_GENERATION
|
||||
int _iObj32 = 0; /* generate OBJ 32 bits */
|
||||
BOOL _bObj32 = FALSE; /* generate OBJ 32 bits */
|
||||
#endif
|
||||
WORD _wStatics = 0; /* number of defined statics variables on the PRG */
|
||||
PRETURN pReturns = 0; /* list of multiple returns from a function */
|
||||
WORD _wStatics = 0; /* number of defined statics variables on the PRG */
|
||||
PRETURN pReturns = 0; /* list of multiple returns from a function */
|
||||
PEXTERN pExterns = 0;
|
||||
PTR_LOOPEXIT pLoops = 0;
|
||||
PATHNAMES *_pIncludePath = NULL;
|
||||
@@ -516,7 +517,7 @@ extern int _iState; /* current parser state (defined in harbour.l */
|
||||
|
||||
Main : { Line(); } Source {
|
||||
FixReturns(); /* fix all previous function returns offsets */
|
||||
if( ! _iQuiet ) printf( "\nsyntax ok\n" );
|
||||
if( ! _bQuiet ) printf( "\nsyntax ok\n" );
|
||||
}
|
||||
|
||||
Source : Crlf
|
||||
@@ -694,7 +695,7 @@ Expression : NIL { PushNil(); }
|
||||
IfInline : IIF '(' Expression ',' { $<iNumber>$ = JumpFalse( 0 ); }
|
||||
IfInlExp ',' { $<iNumber>$ = Jump( 0 ); JumpHere( $<iNumber>5 ); }
|
||||
IfInlExp ')' { JumpHere( $<iNumber>8 );
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
|
||||
@@ -715,7 +716,7 @@ IfInline : IIF '(' Expression ',' { $<iNumber>$ = JumpFalse( 0 ); }
|
||||
IfInlExp ',' { $<iNumber>$ = Jump( 0 ); JumpHere( $<iNumber>5 ); }
|
||||
IfInlExp ')' { JumpHere( $<iNumber>8 );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
|
||||
@@ -843,10 +844,10 @@ Operators : Expression '=' Expression { GenPCode1( HB_P_EQUAL ); } /* comp
|
||||
| Expression '%' Expression { GenPCode1( HB_P_MODULUS ); }
|
||||
| Expression LE Expression { GenPCode1( HB_P_LESSEQUAL ); }
|
||||
| Expression GE Expression { GenPCode1( HB_P_GREATEREQUAL ); }
|
||||
| Expression AND { if( _iShortCuts ){ Duplicate(); $<iNumber>$ = JumpFalse( 0 ); } }
|
||||
Expression { GenPCode1( HB_P_AND ); if( _iShortCuts ) JumpHere( $<iNumber>3 ); }
|
||||
| Expression OR { if( _iShortCuts ){ Duplicate(); $<iNumber>$ = JumpTrue( 0 ); } }
|
||||
Expression { GenPCode1( HB_P_OR ); if( _iShortCuts ) JumpHere( $<iNumber>3 ); }
|
||||
| Expression AND { if( _bShortCuts ){ Duplicate(); $<iNumber>$ = JumpFalse( 0 ); } }
|
||||
Expression { GenPCode1( HB_P_AND ); if( _bShortCuts ) JumpHere( $<iNumber>3 ); }
|
||||
| Expression OR { if( _bShortCuts ){ Duplicate(); $<iNumber>$ = JumpTrue( 0 ); } }
|
||||
Expression { GenPCode1( HB_P_OR ); if( _bShortCuts ) JumpHere( $<iNumber>3 ); }
|
||||
| Expression EQ Expression { GenPCode1( HB_P_EXACTLYEQUAL ); }
|
||||
| Expression NE1 Expression { GenPCode1( HB_P_NOTEQUAL ); }
|
||||
| Expression NE2 Expression { GenPCode1( HB_P_NOTEQUAL ); }
|
||||
@@ -1148,7 +1149,7 @@ void GenError( char* _szErrors[], char cPrefix, int iError, char * szError1, cha
|
||||
|
||||
void GenWarning( int iWarning, char * szWarning1, char * szWarning2 )
|
||||
{
|
||||
if( _iWarnings && iWarning < WARN_ASSIGN_SUSPECT ) /*TODO add switch to set level */
|
||||
if( _bWarnings && iWarning < WARN_ASSIGN_SUSPECT ) /*TODO add switch to set level */
|
||||
{
|
||||
char * szLine = ( char * ) OurMalloc( 160 ); /*2 lines of text */
|
||||
printf( "\r%s(%i) ", files.pLast->szFileName, iLine );
|
||||
@@ -1189,12 +1190,12 @@ int harbour_main( int argc, char * argv[] )
|
||||
{
|
||||
case '1':
|
||||
if( argv[ iArg ][ 2 ] == '0' )
|
||||
_iRestrictSymbolLength = 1;
|
||||
_bRestrictSymbolLength = TRUE;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
case 'A':
|
||||
_iAutoMemvarAssume =1;
|
||||
_bAutoMemvarAssume = TRUE;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
@@ -1220,7 +1221,7 @@ int harbour_main( int argc, char * argv[] )
|
||||
{
|
||||
char * szUpper = yy_strupr( yy_strdup( &argv[ iArg ][ 2 ] ) );
|
||||
if( ! strcmp( szUpper, "OBJ32" ) )
|
||||
_iObj32 = 1;
|
||||
_bObj32 = TRUE;
|
||||
free( szUpper );
|
||||
}
|
||||
break;
|
||||
@@ -1267,12 +1268,12 @@ int harbour_main( int argc, char * argv[] )
|
||||
|
||||
case 'l':
|
||||
case 'L':
|
||||
_iLineNumbers = 0;
|
||||
_bLineNumbers = FALSE;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
case 'N':
|
||||
_iStartProc = 0;
|
||||
_bStartProc = FALSE;
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
@@ -1288,22 +1289,22 @@ int harbour_main( int argc, char * argv[] )
|
||||
|
||||
case 'q':
|
||||
case 'Q':
|
||||
_iQuiet = 1;
|
||||
_bQuiet = TRUE;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
case 'S':
|
||||
_iSyntaxCheckOnly = 1;
|
||||
_bSyntaxCheckOnly = TRUE;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
case 'V':
|
||||
_iForceMemvars =1;
|
||||
_bForceMemvars = TRUE;
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
case 'W':
|
||||
_iWarnings = 1;
|
||||
_bWarnings = TRUE;
|
||||
break;
|
||||
|
||||
case 'y':
|
||||
@@ -1313,7 +1314,7 @@ int harbour_main( int argc, char * argv[] )
|
||||
|
||||
case 'z':
|
||||
case 'Z':
|
||||
_iShortCuts = 0;
|
||||
_bShortCuts = FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1382,7 +1383,7 @@ int harbour_main( int argc, char * argv[] )
|
||||
|
||||
/* Generate the starting procedure frame
|
||||
*/
|
||||
if( _iStartProc )
|
||||
if( _bStartProc )
|
||||
FunDef( yy_strupr( yy_strdup( _pFileName->name ) ), FS_PUBLIC, FUN_PROCEDURE );
|
||||
else
|
||||
/* Don't pass the name of module if the code for starting procedure
|
||||
@@ -1398,9 +1399,9 @@ int harbour_main( int argc, char * argv[] )
|
||||
files.pLast = NULL;
|
||||
|
||||
#ifdef HARBOUR_OBJ_GENERATION
|
||||
if( ! _iSyntaxCheckOnly && ! _iObj32 )
|
||||
if( ! _bSyntaxCheckOnly && ! _bObj32 )
|
||||
#else
|
||||
if( ! _iSyntaxCheckOnly )
|
||||
if( ! _bSyntaxCheckOnly )
|
||||
#endif
|
||||
{
|
||||
if( _pInitFunc )
|
||||
@@ -1454,7 +1455,7 @@ int harbour_main( int argc, char * argv[] )
|
||||
}
|
||||
}
|
||||
#ifdef HARBOUR_OBJ_GENERATION
|
||||
if( _iObj32 )
|
||||
if( _bObj32 )
|
||||
{
|
||||
_pFileName->extension = ".obj";
|
||||
MakeFilename( szFileName, _pFileName );
|
||||
@@ -1703,7 +1704,7 @@ void AddVar( char * szVarName )
|
||||
PVAR pVar, pLastVar;
|
||||
PFUNCTION pFunc =functions.pLast;
|
||||
|
||||
if( ! _iStartProc && functions.iCount <= 1 && iVarScope == VS_LOCAL )
|
||||
if( ! _bStartProc && functions.iCount <= 1 && iVarScope == VS_LOCAL )
|
||||
{
|
||||
/* Variable declaration is outside of function/procedure body.
|
||||
In this case only STATIC and PARAMETERS variables are allowed. */
|
||||
@@ -1760,7 +1761,7 @@ void AddVar( char * szVarName )
|
||||
PCOMSYMBOL pSym;
|
||||
WORD wPos;
|
||||
|
||||
if( _iAutoMemvarAssume || iVarScope == VS_MEMVAR )
|
||||
if( _bAutoMemvarAssume || iVarScope == VS_MEMVAR )
|
||||
{
|
||||
/** add this variable to the list of MEMVAR variables
|
||||
*/
|
||||
@@ -1906,7 +1907,7 @@ int Include( char * szFileName, PATHNAMES *pSearch )
|
||||
{
|
||||
pFileName->path =pSearch->szPath;
|
||||
MakeFilename( szFName, pFileName );
|
||||
yyin = fopen( szFName, "r" );
|
||||
yyin = fopen( szFName, "r" );
|
||||
if( ! yyin )
|
||||
{
|
||||
pSearch = pSearch->pNext;
|
||||
@@ -1920,11 +1921,11 @@ int Include( char * szFileName, PATHNAMES *pSearch )
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( !_iQuiet )
|
||||
if( !_bQuiet )
|
||||
printf( "Harbour compiler build %i (%04d.%02d.%02d)\n", hb_build,
|
||||
hb_year, hb_month, hb_day );
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "\nparsing file %s\n", szFileName );
|
||||
|
||||
pFile = ( PFILE ) OurMalloc( sizeof( _FILE ) );
|
||||
@@ -1962,7 +1963,7 @@ int yywrap( void ) /* handles the EOF of the currently processed file */
|
||||
fclose( files.pLast->handle );
|
||||
files.pLast = ( PFILE ) ( ( PFILE ) files.pLast )->pPrev;
|
||||
iLine = files.pLast->iLine;
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "\nparsing file %s\n", files.pLast->szFileName );
|
||||
#ifdef __cplusplus
|
||||
yy_delete_buffer( (YY_BUFFER_STATE) ( ( PFILE ) pLast )->pBuffer );
|
||||
@@ -1985,7 +1986,7 @@ void Duplicate( void )
|
||||
{
|
||||
GenPCode1( HB_P_DUPLICATE );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -2048,13 +2049,13 @@ void FunDef( char * szFunName, SYMBOLSCOPE cScope, int iType )
|
||||
if( pFunc )
|
||||
{
|
||||
/* The name of a function/procedure is already defined */
|
||||
if( ( pFunc != functions.pFirst ) || _iStartProc )
|
||||
if( ( pFunc != functions.pFirst ) || _bStartProc )
|
||||
/* it is not a starting procedure that was automatically created */
|
||||
GenError( _szCErrors, 'E', ERR_FUNC_DUPL, szFunName, NULL );
|
||||
}
|
||||
|
||||
pFunction = (char * *)RESERVED_FUNC( szFunName );
|
||||
if( pFunction && !( functions.iCount==0 && !_iStartProc ) )
|
||||
if( pFunction && !( functions.iCount==0 && !_bStartProc ) )
|
||||
{
|
||||
/* We are ignoring it when it is the name of PRG file and we are
|
||||
* not creating implicit starting procedure
|
||||
@@ -2134,13 +2135,13 @@ void GenCCode( char *szFileName, char *szName ) /* generates the C languag
|
||||
return;
|
||||
}
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "\nGenerating C language output...\n" );
|
||||
|
||||
fprintf( yyc, "#include \"pcode.h\"\n" );
|
||||
fprintf( yyc, "#include <init.h>\n\n" );
|
||||
fprintf( yyc, "#include \"init.h\"\n\n" );
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunc = pFunc->pNext; /* No implicit starting procedure */
|
||||
|
||||
/* write functions prototypes for PRG defined functions */
|
||||
@@ -2171,7 +2172,7 @@ void GenCCode( char *szFileName, char *szName ) /* generates the C languag
|
||||
yy_strupr( _pFileName->name );
|
||||
fprintf( yyc, "\n\nHB_INIT_SYMBOLS_BEGIN( %s__InitSymbols )\n", _pFileName->name );
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pSym = pSym->pNext; /* starting procedure is always the first symbol */
|
||||
|
||||
wSym = 0; /* symbols counter */
|
||||
@@ -2229,7 +2230,7 @@ void GenCCode( char *szFileName, char *szName ) /* generates the C languag
|
||||
/* Generate functions data
|
||||
*/
|
||||
pFunc = functions.pFirst;
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunc = pFunc->pNext; /* No implicit starting procedure */
|
||||
while( pFunc )
|
||||
{
|
||||
@@ -2854,7 +2855,7 @@ void GenCCode( char *szFileName, char *szName ) /* generates the C languag
|
||||
while( pSym )
|
||||
pSym = KillSymbol( pSym );
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "%s -> done!\n", szFileName );
|
||||
}
|
||||
|
||||
@@ -3022,7 +3023,7 @@ WORD GetVarPos( PVAR pVars, char * szVarName ) /* returns the order + 1 of a var
|
||||
{
|
||||
if( pVars->szName && ! strcmp( pVars->szName, szVarName ) )
|
||||
{
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3158,7 +3159,7 @@ int GetStaticVarPos( char *szVarName )
|
||||
* Note: It is not possible to have global static variables when
|
||||
* implicit starting procedure is defined
|
||||
*/
|
||||
if( !_iStartProc )
|
||||
if( !_bStartProc )
|
||||
{
|
||||
iPos =GetVarPos( functions.pFirst->pStatics, szVarName );
|
||||
if( iPos )
|
||||
@@ -3180,7 +3181,7 @@ WORD GetAliasedVarPos( PVAR pVars, char *szAlias, char *szVarName )
|
||||
{
|
||||
if( pVars->szName && ! strcmp( pVars->szName, szVarName ) )
|
||||
{
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3232,7 +3233,7 @@ int GetFieldVarPos( char *szVarName )
|
||||
/* If not found on the list declared in current function then check
|
||||
* the global list (only if there will be no starting procedure)
|
||||
*/
|
||||
if( ! iVar && ! _iStartProc )
|
||||
if( ! iVar && ! _bStartProc )
|
||||
iVar =GetAliasedVarPos( functions.pFirst->pFields, NULL, szVarName );
|
||||
|
||||
return iVar;
|
||||
@@ -3261,7 +3262,7 @@ int GetMemvarPos( char *szVarName )
|
||||
/* if not found on the list declared in current function then check
|
||||
* the global list (only if there will be no starting procedure)
|
||||
*/
|
||||
if( ! iVar && ! _iStartProc )
|
||||
if( ! iVar && ! _bStartProc )
|
||||
iVar =GetAliasedVarPos( functions.pFirst->pMemvars, NULL, szVarName );
|
||||
|
||||
return iVar;
|
||||
@@ -3269,7 +3270,7 @@ int GetMemvarPos( char *szVarName )
|
||||
|
||||
WORD FixSymbolPos( WORD wCompilePos )
|
||||
{
|
||||
return (_iStartProc ? wCompilePos-1 : wCompilePos-2);
|
||||
return (_bStartProc ? wCompilePos-1 : wCompilePos-2);
|
||||
}
|
||||
|
||||
|
||||
@@ -3319,7 +3320,7 @@ PCOMSYMBOL GetSymbolOrd( WORD wSymbol ) /* returns a symbol based on its index
|
||||
WORD GetFunctionPos( char * szFunctionName ) /* return 0 if not found or order + 1 */
|
||||
{
|
||||
PFUNCTION pFunc = functions.pFirst;
|
||||
WORD wFunction = _iStartProc;
|
||||
WORD wFunction = _bStartProc;
|
||||
|
||||
while( pFunc )
|
||||
{
|
||||
@@ -3343,7 +3344,7 @@ void Inc( void )
|
||||
{
|
||||
GenPCode1( HB_P_INC );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
char sType[2];
|
||||
|
||||
@@ -3374,7 +3375,7 @@ WORD JumpFalse( int iOffset )
|
||||
{
|
||||
GenPCode3( HB_P_JUMPFALSE, LOBYTE( iOffset ), HIBYTE( iOffset ) );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
char sType[2];
|
||||
@@ -3389,9 +3390,9 @@ WORD JumpFalse( int iOffset )
|
||||
|
||||
/* compile time Operand value */
|
||||
if( pStackValType && pStackValType->cType == ' ' )
|
||||
GenWarning( WARN_LOGICAL_SUSPECT, NULL, NULL );
|
||||
GenWarning( WARN_LOGICAL_SUSPECT, NULL, NULL );
|
||||
else if( pStackValType && pStackValType->cType != 'L')
|
||||
GenWarning( WARN_LOGICAL_TYPE, sType, NULL );
|
||||
GenWarning( WARN_LOGICAL_TYPE, sType, NULL );
|
||||
|
||||
/* compile time assignment value has to be released */
|
||||
pFree = pStackValType;
|
||||
@@ -3428,7 +3429,7 @@ WORD JumpTrue( int iOffset )
|
||||
{
|
||||
GenPCode3( HB_P_JUMPTRUE, LOBYTE( iOffset ), HIBYTE( iOffset ) );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
char sType[2];
|
||||
@@ -3443,9 +3444,9 @@ WORD JumpTrue( int iOffset )
|
||||
|
||||
/* compile time Operand value */
|
||||
if( pStackValType && pStackValType->cType == ' ' )
|
||||
GenWarning( WARN_LOGICAL_SUSPECT, NULL, NULL );
|
||||
GenWarning( WARN_LOGICAL_SUSPECT, NULL, NULL );
|
||||
else if( pStackValType && pStackValType->cType != 'L')
|
||||
GenWarning( WARN_LOGICAL_TYPE, sType, NULL );
|
||||
GenWarning( WARN_LOGICAL_TYPE, sType, NULL );
|
||||
|
||||
/* compile time assignment value has to be released */
|
||||
pFree = pStackValType;
|
||||
@@ -3467,7 +3468,7 @@ WORD JumpTrue( int iOffset )
|
||||
|
||||
void Line( void ) /* generates the pcode with the currently compiled source code line */
|
||||
{
|
||||
if( _iLineNumbers )
|
||||
if( _bLineNumbers )
|
||||
GenPCode3( HB_P_LINE, LOBYTE( iLine ), HIBYTE( iLine ) );
|
||||
}
|
||||
|
||||
@@ -3477,14 +3478,14 @@ void LineBody( void ) /* generates the pcode with the currently compiled source
|
||||
/* except EXTERNAL */
|
||||
if( _iState != EXTERN )
|
||||
{
|
||||
if( ! _iStartProc && functions.iCount <= 1 )
|
||||
if( ! _bStartProc && functions.iCount <= 1 )
|
||||
{
|
||||
GenError( _szCErrors, 'E', ERR_OUTSIDE, NULL, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
functions.pLast->bFlags |= FUN_STATEMENTS;
|
||||
if( _iLineNumbers )
|
||||
if( _bLineNumbers )
|
||||
GenPCode3( HB_P_LINE, LOBYTE( iLine ), HIBYTE( iLine ) );
|
||||
}
|
||||
|
||||
@@ -3496,7 +3497,7 @@ void MemvarPCode( BYTE bPCode, char * szVarName )
|
||||
WORD wVar;
|
||||
PCOMSYMBOL pVar;
|
||||
|
||||
if( _iForceMemvars )
|
||||
if( _bForceMemvars )
|
||||
{
|
||||
wVar =GetMemvarPos( szVarName );
|
||||
if( ! wVar )
|
||||
@@ -3537,7 +3538,7 @@ void Message( char * szMsgName ) /* sends a message to an object */
|
||||
pSym->cScope |= FS_MESSAGE;
|
||||
GenPCode3( HB_P_MESSAGE, LOBYTE( wSym ), HIBYTE( wSym ) );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
char cType;
|
||||
@@ -3615,7 +3616,7 @@ void PopId( char * szVarName ) /* generates the pcode to pop a value from the vi
|
||||
}
|
||||
}
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pVarType, pFree;
|
||||
char sType[2];
|
||||
@@ -3628,16 +3629,16 @@ void PopId( char * szVarName ) /* generates the pcode to pop a value from the vi
|
||||
sType[0] = pVarType->cType;
|
||||
sType[1] = 0;
|
||||
|
||||
/* skip back to the assigned value */
|
||||
pStackValType = pStackValType->pPrev;
|
||||
/* skip back to the assigned value */
|
||||
pStackValType = pStackValType->pPrev;
|
||||
}
|
||||
else
|
||||
debug_msg( "\n***PopId() Compile time stack overflow\n", NULL );
|
||||
|
||||
if( pVarType && pStackValType && pVarType->cType != ' ' && pStackValType->cType == ' ' )
|
||||
GenWarning( WARN_ASSIGN_SUSPECT, szVarName, sType );
|
||||
GenWarning( WARN_ASSIGN_SUSPECT, szVarName, sType );
|
||||
else if( pVarType && pStackValType && pVarType->cType != ' ' && pVarType->cType != pStackValType->cType )
|
||||
GenWarning( WARN_ASSIGN_TYPE, szVarName, sType );
|
||||
GenWarning( WARN_ASSIGN_TYPE, szVarName, sType );
|
||||
|
||||
/* compile time variable has to be released */
|
||||
if( pVarType )
|
||||
@@ -3696,7 +3697,7 @@ void PushId( char * szVarName ) /* generates the pcode to push a variable value
|
||||
}
|
||||
}
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3746,7 +3747,7 @@ void PushLogical( int iTrueFalse ) /* pushes a logical value on the virtual mach
|
||||
else
|
||||
GenPCode1( HB_P_FALSE );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3763,7 +3764,7 @@ void PushNil( void )
|
||||
{
|
||||
GenPCode1( HB_P_PUSHNIL );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3783,7 +3784,7 @@ void PushDouble( double dNumber, BYTE bDec )
|
||||
GenPCodeN( ( BYTE * ) &dNumber, sizeof( double ) );
|
||||
GenPCode1( bDec );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3820,7 +3821,7 @@ void PushInteger( int iNumber )
|
||||
else
|
||||
GenPCode1( HB_P_ZERO );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3847,7 +3848,7 @@ void PushLong( long lNumber )
|
||||
else
|
||||
GenPCode1( HB_P_ZERO );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3868,7 +3869,7 @@ void PushString( char * szText )
|
||||
GenPCode3( HB_P_PUSHSTR, LOBYTE(wStrLen), HIBYTE(wStrLen) );
|
||||
GenPCodeN( ( BYTE * ) szText, wStrLen );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
|
||||
@@ -3913,7 +3914,7 @@ void PushSymbol( char * szSymbolName, int iIsFunction )
|
||||
}
|
||||
GenPCode3( HB_P_PUSHSYM, LOBYTE( wSym ), HIBYTE( wSym ) );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pNewStackType;
|
||||
char cType;
|
||||
@@ -3951,7 +3952,7 @@ void Dec( void )
|
||||
{
|
||||
GenPCode1( HB_P_DEC );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
char sType[2];
|
||||
|
||||
@@ -3979,7 +3980,7 @@ void Do( BYTE bParams )
|
||||
{
|
||||
GenPCode3( HB_P_DO, bParams, 0 );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
int i;
|
||||
@@ -3995,7 +3996,7 @@ void Do( BYTE bParams )
|
||||
else
|
||||
debug_msg( "\n***Do() Compile time stack overflow\n", NULL );
|
||||
|
||||
if( pFree )
|
||||
if( pFree )
|
||||
{
|
||||
OurFree( (void *) pFree );
|
||||
}
|
||||
@@ -4045,7 +4046,7 @@ void FixReturns( void ) /* fixes all last defined function returns jumps offsets
|
||||
{
|
||||
PRETURN pLast = pReturns, pDelete;
|
||||
|
||||
if( _iWarnings && functions.pLast )
|
||||
if( _bWarnings && functions.pLast )
|
||||
{
|
||||
PVAR pVar;
|
||||
|
||||
@@ -4116,7 +4117,7 @@ void Function( BYTE bParams )
|
||||
{
|
||||
GenPCode3( HB_P_FUNCTION, bParams, 0 );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
int i;
|
||||
@@ -4132,7 +4133,7 @@ void Function( BYTE bParams )
|
||||
else
|
||||
debug_msg( "\n***Function() parameter %i Compile time stack overflow\n", i );
|
||||
|
||||
if( pFree )
|
||||
if( pFree )
|
||||
{
|
||||
OurFree( (void *) pFree );
|
||||
}
|
||||
@@ -4158,7 +4159,7 @@ void GenArray( WORD wElements )
|
||||
{
|
||||
GenPCode3( HB_P_GENARRAY, LOBYTE( wElements ), HIBYTE( wElements ) );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
WORD wIndex;
|
||||
@@ -4205,7 +4206,7 @@ void GenPCode1( BYTE byte )
|
||||
PFUNCTION pFunc = functions.pLast; /* get the currently defined Clipper function */
|
||||
|
||||
/* Releasing value consumed by HB_P_ARRAYPUT */
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
if( byte == HB_P_PUSHSELF )
|
||||
{
|
||||
@@ -4222,13 +4223,13 @@ void GenPCode1( BYTE byte )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
|
||||
/* Releasing compile time assignment value */
|
||||
/* Releasing compile time assignment value */
|
||||
pFree = pStackValType;
|
||||
debug_msg( "\n***---ArrayPut()\n", NULL );
|
||||
|
||||
if( pStackValType )
|
||||
pStackValType = pStackValType->pPrev;
|
||||
else
|
||||
else
|
||||
debug_msg( "\n***HB_P_ARRAYPUT Compile time stack overflow\n", NULL );
|
||||
|
||||
if( pFree )
|
||||
@@ -4236,7 +4237,7 @@ void GenPCode1( BYTE byte )
|
||||
OurFree( (void *) pFree );
|
||||
}
|
||||
|
||||
/* Releasing compile time array element index value */
|
||||
/* Releasing compile time array element index value */
|
||||
pFree = pStackValType;
|
||||
debug_msg( "\n***---HB_P_ARRAYPUT\n", NULL );
|
||||
|
||||
@@ -4588,7 +4589,7 @@ void CodeBlockEnd()
|
||||
pVar = pCodeblock->pLocals;
|
||||
while( pVar )
|
||||
{
|
||||
if( _iWarnings && pFunc->szName && pVar->szName && ! pVar->iUsed )
|
||||
if( _bWarnings && pFunc->szName && pVar->szName && ! pVar->iUsed )
|
||||
GenWarning( WARN_BLOCKVAR_NOT_USED, pVar->szName, pFunc->szName );
|
||||
|
||||
/* free used variables */
|
||||
@@ -4599,11 +4600,11 @@ void CodeBlockEnd()
|
||||
}
|
||||
OurFree( (void *) pCodeblock );
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
if( pStackValType )
|
||||
/* reusing the place holder of the result value */
|
||||
pStackValType->cType = 'B';
|
||||
/* reusing the place holder of the result value */
|
||||
pStackValType->cType = 'B';
|
||||
else
|
||||
debug_msg( "\n***CodeBlockEnd() Compile time stack overflow\n", NULL );
|
||||
}
|
||||
@@ -4690,7 +4691,7 @@ void StaticDefEnd( WORD wCount )
|
||||
_wStatics += wCount;
|
||||
iVarScope =VS_LOCAL;
|
||||
|
||||
if( _iWarnings )
|
||||
if( _bWarnings )
|
||||
{
|
||||
PSTACK_VAL_TYPE pFree;
|
||||
|
||||
@@ -4921,12 +4922,12 @@ void GenPortObj( char *szFileName, char *szName )
|
||||
if( 0 && szName ) printf("/* just to keep compiler silent */" );
|
||||
#endif
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "\ngenerating portable object file...\n" );
|
||||
|
||||
/* writes the symbol table */
|
||||
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pSym = pSym->pNext; /* starting procedure is always the first symbol */
|
||||
|
||||
lSymbols = 0; /* Count number of symbols */
|
||||
@@ -4941,7 +4942,7 @@ void GenPortObj( char *szFileName, char *szName )
|
||||
fputc( (BYTE) ( ( lSymbols >> 24 ) & 255 ), yyc );
|
||||
|
||||
pSym = symbols.pFirst;
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pSym = pSym->pNext; /* starting procedure is always the first symbol */
|
||||
|
||||
while( pSym )
|
||||
@@ -4979,7 +4980,7 @@ void GenPortObj( char *szFileName, char *szName )
|
||||
}
|
||||
|
||||
pFunc = functions.pFirst;
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunc = pFunc->pNext;
|
||||
|
||||
lSymbols = 0; /* Count number of symbols */
|
||||
@@ -4996,7 +4997,7 @@ void GenPortObj( char *szFileName, char *szName )
|
||||
/* Generate functions data
|
||||
*/
|
||||
pFunc = functions.pFirst;
|
||||
if( ! _iStartProc )
|
||||
if( ! _bStartProc )
|
||||
pFunc = pFunc->pNext; /* No implicit starting procedure */
|
||||
|
||||
while( pFunc )
|
||||
@@ -5195,7 +5196,7 @@ void GenPortObj( char *szFileName, char *szName )
|
||||
|
||||
fclose( yyc );
|
||||
|
||||
if( ! _iQuiet )
|
||||
if( ! _bQuiet )
|
||||
printf( "%s -> done!\n", szFileName );
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#ifndef HB_HARB_H_
|
||||
#define HB_HARB_H_
|
||||
|
||||
#include <hbsetup.h>
|
||||
#include <hbdefs.h>
|
||||
#include "hbsetup.h"
|
||||
#include "hbdefs.h"
|
||||
#include "hbpp.h" /* includes common definitions shared by preprocessor and harbour.y */
|
||||
|
||||
#define PATH_DELIMITER "/\\"
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <hbsetup.h>
|
||||
#include <extend.h>
|
||||
#include <itemapi.h>
|
||||
#include <ctype.h>
|
||||
#include <init.h>
|
||||
#include "hbsetup.h"
|
||||
#include "extend.h"
|
||||
#include "itemapi.h"
|
||||
#include "init.h"
|
||||
#include "harb.h"
|
||||
|
||||
#define SKIPTABSPACES(sptr) while ( *sptr == ' ' || *sptr == '\t' ) (sptr)++
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <extend.h>
|
||||
#include <itemapi.h>
|
||||
#include <ctype.h>
|
||||
#include <init.h>
|
||||
#include "extend.h"
|
||||
#include "itemapi.h"
|
||||
#include "init.h"
|
||||
#include "harb.h"
|
||||
#include <sql.h>
|
||||
#include <sqlext.h>
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
You can contact me at: bruno@issnet.net
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <itemapi.h>
|
||||
#include <errorapi.h>
|
||||
#include <set.h>
|
||||
#include <rdd.api>
|
||||
#include <ctoharb.h>
|
||||
#include <set.ch>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "itemapi.h"
|
||||
#include "errorapi.h"
|
||||
#include "set.h"
|
||||
#include "rdd.api"
|
||||
#include "ctoharb.h"
|
||||
#include "set.ch"
|
||||
|
||||
#define HARBOUR_MAX_RDD_DRIVERNAME_LENGTH 32
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
You can contact me at: bruno@issnet.net
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <rdd.api>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "rdd.api"
|
||||
|
||||
HARBOUR HB_REQUEST_DBFNTX1( void );
|
||||
HARBOUR HB_DBFNTX_GETFUNCTABLE( void );
|
||||
|
||||
@@ -26,7 +26,6 @@ C_SOURCES=\
|
||||
mtran.c \
|
||||
set.c \
|
||||
setcolor.c \
|
||||
strcmp.c \
|
||||
strings.c \
|
||||
transfrm.c \
|
||||
\
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
You can contact me at: alinares@fivetech.com
|
||||
*/
|
||||
|
||||
#include <itemapi.h>
|
||||
#include <extend.h>
|
||||
#include <errorapi.h>
|
||||
#include <ctoharb.h>
|
||||
#include <init.h>
|
||||
#include <dates.h>
|
||||
#include "itemapi.h"
|
||||
#include "extend.h"
|
||||
#include "errorapi.h"
|
||||
#include "ctoharb.h"
|
||||
#include "init.h"
|
||||
#include "dates.h"
|
||||
|
||||
HARBOUR HB_AADD(void);
|
||||
HARBOUR HB_ACLONE(void);
|
||||
@@ -179,7 +179,7 @@ void hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */
|
||||
PBASEARRAY pBaseArray = ( PBASEARRAY ) hb_xgrab( sizeof( BASEARRAY ) );
|
||||
ULONG ul;
|
||||
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
|
||||
pItem->type = IT_ARRAY;
|
||||
|
||||
@@ -204,7 +204,7 @@ void hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue )
|
||||
PBASEARRAY pBaseArray = ( PBASEARRAY ) pArray->item.asArray.value;
|
||||
hb_arraySize( pArray, pBaseArray->ulLen + 1 );
|
||||
pBaseArray = ( PBASEARRAY ) pArray->item.asArray.value;
|
||||
ItemCopy( pBaseArray->pItems + ( pBaseArray->ulLen - 1 ), pValue );
|
||||
hb_itemCopy( pBaseArray->pItems + ( pBaseArray->ulLen - 1 ), pValue );
|
||||
}
|
||||
|
||||
void hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
|
||||
@@ -212,7 +212,7 @@ void hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
|
||||
if( IS_ARRAY( pArray ) )
|
||||
{
|
||||
if( ulIndex <= ( unsigned )hb_arrayLen( pArray ) )
|
||||
ItemCopy( pItem, pArray->item.asArray.value->pItems + ( ulIndex - 1 ) );
|
||||
hb_itemCopy( pItem, pArray->item.asArray.value->pItems + ( ulIndex - 1 ) );
|
||||
else
|
||||
{
|
||||
hb_errorRT_BASE(EG_BOUND, 1132, NULL, hb_ErrorNatDescription(EG_ARRACCESS));
|
||||
@@ -298,10 +298,10 @@ int hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex )
|
||||
void hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult )
|
||||
{
|
||||
if ( pArray->item.asArray.value->ulLen )
|
||||
ItemCopy( pResult, pArray->item.asArray.value->pItems +
|
||||
hb_itemCopy( pResult, pArray->item.asArray.value->pItems +
|
||||
( pArray->item.asArray.value->ulLen - 1 ) );
|
||||
else
|
||||
ItemRelease( pResult );
|
||||
hb_itemClear( pResult );
|
||||
}
|
||||
|
||||
ULONG hb_arrayLen( PHB_ITEM pArray )
|
||||
@@ -320,7 +320,7 @@ void hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
|
||||
if( IS_ARRAY( pArray ) )
|
||||
{
|
||||
if( ulIndex <= ( unsigned )hb_arrayLen( pArray ) )
|
||||
ItemCopy( pArray->item.asArray.value->pItems + ( ulIndex - 1 ), pItem );
|
||||
hb_itemCopy( pArray->item.asArray.value->pItems + ( ulIndex - 1 ), pItem );
|
||||
else
|
||||
{
|
||||
hb_errorRT_BASE(EG_BOUND, 1133, NULL, hb_ErrorNatDescription(EG_ARRASSIGN));
|
||||
@@ -359,7 +359,7 @@ void hb_arraySize( PHB_ITEM pArray, ULONG ulLen )
|
||||
{
|
||||
/* release old items */
|
||||
for( ul = ulLen; ul < pBaseArray->ulLen; ul++ )
|
||||
ItemRelease( pBaseArray->pItems + ul );
|
||||
hb_itemClear( pBaseArray->pItems + ul );
|
||||
|
||||
pBaseArray->pItems = ( PHB_ITEM )hb_xrealloc( pBaseArray->pItems, sizeof( HB_ITEM ) * ulLen );
|
||||
}
|
||||
@@ -387,7 +387,7 @@ void hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG ulStart, ULONG ulCoun
|
||||
pBaseArray = pArray->item.asArray.value;
|
||||
|
||||
for ( ; ulCount > 0; ulCount --, ulStart ++ ) /* set value items */
|
||||
ItemCopy( pBaseArray->pItems + ( ulStart - 1 ), pValue );
|
||||
hb_itemCopy( pBaseArray->pItems + ( ulStart - 1 ), pValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -405,12 +405,12 @@ void hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex )
|
||||
{
|
||||
PBASEARRAY pBaseArray = pArray->item.asArray.value;
|
||||
|
||||
ItemRelease( pBaseArray->pItems + ( ulIndex - 1 ) );
|
||||
hb_itemClear( pBaseArray->pItems + ( ulIndex - 1 ) );
|
||||
|
||||
for ( ulIndex --; ulIndex < ulLen; ulIndex ++ ) /* move items */
|
||||
ItemCopy( pBaseArray->pItems + ulIndex, pBaseArray->pItems + ( ulIndex + 1 ) );
|
||||
hb_itemCopy( pBaseArray->pItems + ulIndex, pBaseArray->pItems + ( ulIndex + 1 ) );
|
||||
|
||||
ItemRelease( pBaseArray->pItems + ( ulLen - 1 ) );
|
||||
hb_itemClear( pBaseArray->pItems + ( ulLen - 1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -433,12 +433,12 @@ void hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex )
|
||||
{
|
||||
PBASEARRAY pBaseArray = pArray->item.asArray.value;
|
||||
|
||||
ItemRelease( pBaseArray->pItems + ( ulLen - 1 ) );
|
||||
hb_itemClear( pBaseArray->pItems + ( ulLen - 1 ) );
|
||||
|
||||
for ( ulLen --; ulLen >= ulIndex; ulLen -- ) /* move items */
|
||||
ItemCopy( pBaseArray->pItems + ulLen, pBaseArray->pItems + ( ulLen - 1 ) );
|
||||
hb_itemCopy( pBaseArray->pItems + ulLen, pBaseArray->pItems + ( ulLen - 1 ) );
|
||||
|
||||
ItemRelease( pBaseArray->pItems + ulLen );
|
||||
hb_itemClear( pBaseArray->pItems + ulLen );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -570,7 +570,7 @@ void hb_arrayRelease( PHB_ITEM pArray )
|
||||
if( !pBaseArray->wSuperCast )
|
||||
{
|
||||
for ( ul = 0; ul < ulLen; ul ++ )
|
||||
ItemRelease( pBaseArray->pItems + ul );
|
||||
hb_itemClear( pBaseArray->pItems + ul );
|
||||
|
||||
if( pBaseArray->pItems )
|
||||
hb_xfree( pBaseArray->pItems );
|
||||
@@ -615,7 +615,7 @@ void hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG ulStart,
|
||||
|
||||
for ( ulTarget --, ulStart --; ulCount > 0; ulCount --, ulStart ++ )
|
||||
{
|
||||
ItemCopy( pDstBaseArray->pItems + ( ulTarget + ulStart ), pSrcBaseArray->pItems + ulStart );
|
||||
hb_itemCopy( pDstBaseArray->pItems + ( ulTarget + ulStart ), pSrcBaseArray->pItems + ulStart );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -678,7 +678,7 @@ HARBOUR HB_AADD( void )
|
||||
if ( pArray )
|
||||
hb_arrayAdd( pArray, pValue );
|
||||
|
||||
ItemCopy( &stack.Return, pValue );
|
||||
hb_itemCopy( &stack.Return, pValue );
|
||||
}
|
||||
|
||||
HARBOUR HB_ASIZE( void )
|
||||
@@ -688,7 +688,7 @@ HARBOUR HB_ASIZE( void )
|
||||
if ( pArray )
|
||||
{
|
||||
hb_arraySize( pArray, hb_parnl( 2 ) );
|
||||
ItemCopy( &stack.Return, pArray ); /* ASize() returns the array itself */
|
||||
hb_itemCopy( &stack.Return, pArray ); /* ASize() returns the array itself */
|
||||
}
|
||||
else
|
||||
hb_ret(); /* QUESTION: Should we raise an error here ? */
|
||||
@@ -711,7 +711,7 @@ HARBOUR HB_AINS( void )
|
||||
if ( pArray )
|
||||
{
|
||||
hb_arrayIns( pArray, hb_parnl( 2 ) );
|
||||
ItemCopy( &stack.Return, pArray ); /* AIns() returns the array itself */
|
||||
hb_itemCopy( &stack.Return, pArray ); /* AIns() returns the array itself */
|
||||
}
|
||||
else
|
||||
hb_ret();
|
||||
@@ -724,7 +724,7 @@ HARBOUR HB_ADEL( void )
|
||||
if ( pArray )
|
||||
{
|
||||
hb_arrayDel( pArray, hb_parnl( 2 ) );
|
||||
ItemCopy( &stack.Return, pArray ); /* ADel() returns the array itself */
|
||||
hb_itemCopy( &stack.Return, pArray ); /* ADel() returns the array itself */
|
||||
}
|
||||
else
|
||||
hb_ret();
|
||||
@@ -737,7 +737,7 @@ HARBOUR HB_AFILL( void )
|
||||
if ( pArray )
|
||||
{
|
||||
hb_arrayFill( pArray, hb_param( 2, IT_ANY ), hb_parnl( 3 ), hb_parnl( 4 ) );
|
||||
ItemCopy( &stack.Return, pArray ); /* AFill() returns the array itself */
|
||||
hb_itemCopy( &stack.Return, pArray ); /* AFill() returns the array itself */
|
||||
}
|
||||
else
|
||||
hb_ret();
|
||||
@@ -761,7 +761,7 @@ HARBOUR HB_AEVAL( void )
|
||||
if ( pArray )
|
||||
{
|
||||
hb_arrayEval( pArray, bBlock, hb_parnl( 3 ), hb_parnl( 4 ) );
|
||||
ItemCopy( &stack.Return, pArray ); /* AEval() returns the array itself */
|
||||
hb_itemCopy( &stack.Return, pArray ); /* AEval() returns the array itself */
|
||||
}
|
||||
else
|
||||
hb_ret();
|
||||
@@ -775,7 +775,7 @@ HARBOUR HB_ACOPY( void )
|
||||
if ( pSrcArray && pDstArray )
|
||||
{
|
||||
hb_arrayCopy( pSrcArray, pDstArray, hb_parnl( 3 ), hb_parnl( 4 ), hb_parnl( 5 ) );
|
||||
ItemCopy( &stack.Return, pDstArray ); /* ACopy() returns the target array */
|
||||
hb_itemCopy( &stack.Return, pDstArray ); /* ACopy() returns the target array */
|
||||
}
|
||||
else
|
||||
hb_ret();
|
||||
@@ -788,8 +788,8 @@ HARBOUR HB_ACLONE( void )
|
||||
if ( pSrcArray )
|
||||
{
|
||||
PHB_ITEM pDstArray = hb_arrayClone( pSrcArray );
|
||||
ItemCopy( &stack.Return, pDstArray ); /* AClone() returns the new array */
|
||||
ItemRelease( pDstArray );
|
||||
hb_itemCopy( &stack.Return, pDstArray ); /* AClone() returns the new array */
|
||||
hb_itemClear( pDstArray );
|
||||
hb_xfree( pDstArray );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
* __WDATAINC
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <errorapi.h>
|
||||
#include <itemapi.h>
|
||||
#include <ctoharb.h>
|
||||
#include <init.h>
|
||||
#include "extend.h"
|
||||
#include "errorapi.h"
|
||||
#include "itemapi.h"
|
||||
#include "ctoharb.h"
|
||||
#include "init.h"
|
||||
|
||||
#define MET_METHOD 0
|
||||
#define MET_DATA 1
|
||||
@@ -108,7 +108,7 @@ static void DictRealloc( PCLASS );
|
||||
static HARBOUR EvalInline( void );
|
||||
static HARBOUR GetClassData( void );
|
||||
static HARBOUR GetData( void );
|
||||
HARBOURFUNC GetMethod( PHB_ITEM, PSYMBOL );
|
||||
HARBOURFUNC hb_GetMethod( PHB_ITEM, PSYMBOL );
|
||||
ULONG hb_isMessage( PHB_ITEM, char *);
|
||||
HARBOUR HB_ISMESSAGE( void );
|
||||
HARBOUR HB_OCLONE( void );
|
||||
@@ -237,7 +237,7 @@ HARBOUR HB_CLASSADD(void)
|
||||
if( pInit && !IS_NIL( pInit )) /* Initializer found */
|
||||
{
|
||||
pNewMeth->pInitValue = hb_itemNew( NULL );
|
||||
ItemCopy( pNewMeth->pInitValue, pInit );
|
||||
hb_itemCopy( pNewMeth->pInitValue, pInit );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -506,7 +506,7 @@ static HARBOUR ClassName( void )
|
||||
PHB_ITEM pItemRef;
|
||||
|
||||
if( IS_BYREF( stack.pBase + 1 ) ) /* Variables by reference */
|
||||
pItemRef = ItemUnRef( stack.pBase + 1 );
|
||||
pItemRef = hb_itemUnRef( stack.pBase + 1 );
|
||||
else
|
||||
pItemRef = stack.pBase + 1;
|
||||
|
||||
@@ -561,7 +561,7 @@ static HARBOUR ClassSel(void)
|
||||
|
||||
if( ( ! wClass ) && IS_BYREF( stack.pBase + 1 ) )
|
||||
{ /* Variables by reference */
|
||||
pItemRef = ItemUnRef( stack.pBase + 1 );
|
||||
pItemRef = hb_itemUnRef( stack.pBase + 1 );
|
||||
if( IS_ARRAY( pItemRef ) )
|
||||
wClass = pItemRef->item.asArray.value->wClass;
|
||||
}
|
||||
@@ -626,7 +626,7 @@ static HARBOUR EvalInline( void )
|
||||
Push( hb_param( w, IT_ANY ) );
|
||||
Do( hb_pcount() + 1 ); /* Self is also an argument */
|
||||
|
||||
ItemRelease( &block ); /* Release block */
|
||||
hb_itemClear( &block ); /* Release block */
|
||||
}
|
||||
|
||||
|
||||
@@ -724,11 +724,11 @@ static HARBOUR GetData( void )
|
||||
|
||||
|
||||
/*
|
||||
* <pFunc> = GetMethod( <pObject>, <pMessage> )
|
||||
* <pFunc> = hb_GetMethod( <pObject>, <pMessage> )
|
||||
*
|
||||
* Internal function to the function pointer of a message of an object
|
||||
*/
|
||||
HARBOURFUNC GetMethod( PHB_ITEM pObject, PSYMBOL pMessage )
|
||||
HARBOURFUNC hb_GetMethod( PHB_ITEM pObject, PSYMBOL pMessage )
|
||||
{
|
||||
WORD wAt, wLimit, wMask;
|
||||
WORD wClass;
|
||||
@@ -795,7 +795,7 @@ HARBOURFUNC GetMethod( PHB_ITEM pObject, PSYMBOL pMessage )
|
||||
ULONG hb_isMessage( PHB_ITEM pObject, char *szString )
|
||||
{
|
||||
PSYMBOL pMessage = hb_GetDynSym( szString )->pSymbol;
|
||||
return( (ULONG) GetMethod( pObject, pMessage ) );
|
||||
return( (ULONG) hb_GetMethod( pObject, pMessage ) );
|
||||
} /* Get funcptr of message */
|
||||
|
||||
|
||||
@@ -831,7 +831,7 @@ HARBOUR HB_OCLONE( void )
|
||||
{
|
||||
PHB_ITEM pDstObject = hb_arrayClone( pSrcObject );
|
||||
|
||||
ItemCopy( &stack.Return, pDstObject );
|
||||
hb_itemCopy( &stack.Return, pDstObject );
|
||||
hb_itemRelease( pDstObject );
|
||||
}
|
||||
else
|
||||
@@ -932,7 +932,7 @@ static HARBOUR SelectSuper( void )
|
||||
pNewBase->wHolders = 1; /* New item is returned */
|
||||
pNewBase->wSuperCast = TRUE; /* Do not dispose pItems !! */
|
||||
/* A bit dirty, but KISS. */
|
||||
ItemCopy( &stack.Return, pSuper );
|
||||
hb_itemCopy( &stack.Return, pSuper );
|
||||
hb_itemRelease( pSuper );
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ static HARBOUR SetClassData( void )
|
||||
{
|
||||
hb_arraySet( pClasses[ wClass - 1 ].pClassDatas,
|
||||
pMethod->wData, pReturn );
|
||||
ItemCopy( &stack.Return, pReturn );
|
||||
hb_itemCopy( &stack.Return, pReturn );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -969,9 +969,9 @@ static HARBOUR SetData( void )
|
||||
|
||||
if( wIndex > ( WORD ) hb_arrayLen( pObject ) )
|
||||
/* Resize needed */
|
||||
hb_arraySize( pObject, wIndex ); /* Make large enough */
|
||||
hb_arraySize( pObject, wIndex ); /* Make large enough */
|
||||
hb_arraySet( pObject, wIndex, pReturn );
|
||||
ItemCopy( &stack.Return, pReturn );
|
||||
hb_itemCopy( &stack.Return, pReturn );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/* The Harbour implementation of codeblocks */
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
#include <string.h>
|
||||
|
||||
extern STACK stack;
|
||||
@@ -205,7 +205,7 @@ PHB_ITEM hb_CodeblockGetVar( PHB_ITEM pItem, LONG iItemPos )
|
||||
{
|
||||
HB_CODEBLOCK_PTR pCBlock = pItem->item.asBlock.value;
|
||||
/* local variables accessed in a codeblock are always stored as reference */
|
||||
return ItemUnRef( pCBlock->pLocals -iItemPos -1 );
|
||||
return hb_itemUnRef( pCBlock->pLocals -iItemPos -1 );
|
||||
}
|
||||
|
||||
/* Get local variable passed by reference
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <hbsetup.h>
|
||||
#include <extend.h>
|
||||
#include <ctoharb.h>
|
||||
#include <init.h>
|
||||
#include <dates.h>
|
||||
#include <set.h>
|
||||
#include "hbsetup.h"
|
||||
#include "extend.h"
|
||||
#include "ctoharb.h"
|
||||
#include "init.h"
|
||||
#include "dates.h"
|
||||
#include "set.h"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include <unistd.h>
|
||||
@@ -61,7 +61,7 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <gtapi.h> /* HARBOUR_USE_GTAPI is checked inside gtapi.h, so that
|
||||
#include "gtapi.h" /* HARBOUR_USE_GTAPI is checked inside gtapi.h, so that
|
||||
we can always get the border styles */
|
||||
|
||||
#define ACCEPT_BUFFER_LEN 256 /*length of input buffer for ACCEPT command */
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
You can contact me at: andij@aonlippo.co.id
|
||||
*/
|
||||
|
||||
#include <itemapi.h>
|
||||
#include <extend.h>
|
||||
#include <errorapi.h>
|
||||
#include <ctoharb.h>
|
||||
#include <filesys.h>
|
||||
#include <init.h>
|
||||
#include "itemapi.h"
|
||||
#include "extend.h"
|
||||
#include "errorapi.h"
|
||||
#include "ctoharb.h"
|
||||
#include "filesys.h"
|
||||
#include "init.h"
|
||||
|
||||
#ifdef OS_UNIX_COMPATIBLE
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
* hb_dow(), HB_DOW()
|
||||
*/
|
||||
|
||||
#include <hbsetup.h>
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <errorapi.h>
|
||||
#include <itemapi.h>
|
||||
#include <set.h>
|
||||
#include <dates.h>
|
||||
#include "hbsetup.h"
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "errorapi.h"
|
||||
#include "itemapi.h"
|
||||
#include "set.h"
|
||||
#include "dates.h"
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__DJGPP__)
|
||||
@@ -94,11 +94,11 @@ double hb__seconds( void )
|
||||
|
||||
_ftime( &tb );
|
||||
oTime = localtime(&tb.time);
|
||||
return( ( oTime->tm_hour * 3600 ) +
|
||||
( oTime->tm_min * 60 ) +
|
||||
oTime->tm_sec +
|
||||
return( ( oTime->tm_hour * 3600 ) +
|
||||
( oTime->tm_min * 60 ) +
|
||||
oTime->tm_sec +
|
||||
( (double) tb.millitm /1000 ) );
|
||||
#else
|
||||
#else
|
||||
time_t t;
|
||||
struct tm *oTime;
|
||||
time(&t);
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
You can contact me at: dezac@corevia.com
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <itemapi.h>
|
||||
#include "extend.h"
|
||||
#include "itemapi.h"
|
||||
#include <ctype.h>
|
||||
#include <init.h>
|
||||
#include "init.h"
|
||||
|
||||
extern STACK stack;
|
||||
|
||||
@@ -46,7 +46,7 @@ HB_INIT_SYMBOLS_END( Descend__InitSymbols );
|
||||
#if ! defined(__GNUC__)
|
||||
#pragma Descend__InitSymbols
|
||||
#endif
|
||||
|
||||
|
||||
char *hb_strdescend( char *string )
|
||||
{
|
||||
char *s;
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCL_DOSERRORS
|
||||
#endif
|
||||
|
||||
#include <hbsetup.h>
|
||||
#include <extend.h>
|
||||
#include "hbsetup.h"
|
||||
#include "extend.h"
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <itemapi.h>
|
||||
#include <init.h>
|
||||
#include "itemapi.h"
|
||||
#include "init.h"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include <sys/types.h>
|
||||
@@ -234,7 +234,7 @@ HARBOUR HB_DIRECTORY( void )
|
||||
}
|
||||
}
|
||||
|
||||
/* redundant
|
||||
/* redundant
|
||||
if (strlen(pfext) < 1)
|
||||
pfext[0] = '\0';
|
||||
*/
|
||||
@@ -341,11 +341,11 @@ HARBOUR HB_DIRECTORY( void )
|
||||
|
||||
ftime = statbuf.st_mtime;
|
||||
ft = localtime(&ftime);
|
||||
sprintf(ddate, "%04d%02d%02d",
|
||||
sprintf(ddate, "%04d%02d%02d",
|
||||
ft->tm_year+1900, ft->tm_mon + 1, ft->tm_mday);
|
||||
|
||||
sprintf(ttime, "%02d:%02d:%02d",
|
||||
ft->tm_hour, ft->tm_min, ft->tm_sec);
|
||||
ft->tm_hour, ft->tm_min, ft->tm_sec);
|
||||
|
||||
/* debug code
|
||||
|
||||
@@ -357,21 +357,21 @@ HARBOUR HB_DIRECTORY( void )
|
||||
|
||||
#if defined(OS_UNIX_COMPATIBLE)
|
||||
/* GNU C on Linux or on other UNIX */
|
||||
aatrib[ 0 ] = '\0';
|
||||
if( S_ISREG(statbuf.st_mode) )
|
||||
strcat( aatrib, "A" );
|
||||
if( S_ISDIR(statbuf.st_mode) )
|
||||
strcat( aatrib, "D" );
|
||||
if( S_ISLNK(statbuf.st_mode) )
|
||||
strcat( aatrib, "L" );
|
||||
if( S_ISCHR(statbuf.st_mode) )
|
||||
strcat( aatrib, "C" );
|
||||
if( S_ISBLK(statbuf.st_mode) )
|
||||
strcat( aatrib, "B" );
|
||||
if( S_ISFIFO(statbuf.st_mode) )
|
||||
strcat( aatrib, "F" );
|
||||
if( S_ISSOCK(statbuf.st_mode) )
|
||||
strcat( aatrib, "K" );
|
||||
aatrib[ 0 ] = '\0';
|
||||
if( S_ISREG(statbuf.st_mode) )
|
||||
strcat( aatrib, "A" );
|
||||
if( S_ISDIR(statbuf.st_mode) )
|
||||
strcat( aatrib, "D" );
|
||||
if( S_ISLNK(statbuf.st_mode) )
|
||||
strcat( aatrib, "L" );
|
||||
if( S_ISCHR(statbuf.st_mode) )
|
||||
strcat( aatrib, "C" );
|
||||
if( S_ISBLK(statbuf.st_mode) )
|
||||
strcat( aatrib, "B" );
|
||||
if( S_ISFIFO(statbuf.st_mode) )
|
||||
strcat( aatrib, "F" );
|
||||
if( S_ISSOCK(statbuf.st_mode) )
|
||||
strcat( aatrib, "K" );
|
||||
#else
|
||||
#if defined(__IBMCPP__)
|
||||
attrib = entry.attrFile;
|
||||
@@ -478,7 +478,7 @@ HARBOUR HB_DIRECTORY( void )
|
||||
closedir( dir );
|
||||
#endif
|
||||
|
||||
ItemCopy( &stack.Return, pdir ); /* DIRECTORY() returns an array */
|
||||
hb_itemCopy( &stack.Return, pdir ); /* DIRECTORY() returns an array */
|
||||
|
||||
hb_itemRelease(pdir);
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
#define INCL_DOSMISC
|
||||
#endif
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <errorapi.h>
|
||||
#include <version.h>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "errorapi.h"
|
||||
#include "hbver.h"
|
||||
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__MSC__) || defined(_MSC_VER) || defined(__DJGPP__)
|
||||
#include <dos.h>
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
You can contact me at: alinares@fivetech.com
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctoharb.h>
|
||||
#include <itemapi.h>
|
||||
#include <errorapi.h>
|
||||
#include "extend.h"
|
||||
#include "ctoharb.h"
|
||||
#include "itemapi.h"
|
||||
#include "errorapi.h"
|
||||
|
||||
extern HB_ITEM errorBlock;
|
||||
extern STACK stack;
|
||||
@@ -39,7 +39,7 @@ PHB_ITEM hb_errNew( void )
|
||||
PushNil();
|
||||
Do( 0 );
|
||||
|
||||
ItemCopy( pReturn, &stack.Return );
|
||||
hb_itemCopy( pReturn, &stack.Return );
|
||||
|
||||
return pReturn;
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
#ifndef __MPW__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <set.h>
|
||||
#include "set.h"
|
||||
#include <stdlib.h>
|
||||
#include <extend.h>
|
||||
#include <dates.h>
|
||||
#include <item.api>
|
||||
#include "extend.h"
|
||||
#include "dates.h"
|
||||
#include "item.api"
|
||||
|
||||
extern STACK stack;
|
||||
|
||||
@@ -62,7 +62,7 @@ PHB_ITEM hb_param( int iParam, WORD wMask )
|
||||
pLocal = stack.pBase + 1 + iParam;
|
||||
|
||||
if( wType & IT_BYREF )
|
||||
return ItemUnRef( pLocal );
|
||||
return hb_itemUnRef( pLocal );
|
||||
else
|
||||
return pLocal;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ char * hb_parc( int iParam, ... )
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
@@ -123,21 +123,21 @@ ULONG hb_parclen( int iParam, ... )
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
pItem = &stack.Return;
|
||||
pItem = &stack.Return;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
return 0;
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
if( wArrayIndex )
|
||||
return hb_arrayGetStringLen( pItem, wArrayIndex );
|
||||
return hb_arrayGetStringLen( pItem, wArrayIndex );
|
||||
else
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
else if( IS_STRING( pItem ) )
|
||||
return pItem->item.asString.length;
|
||||
@@ -162,14 +162,14 @@ char * hb_pards( int iParam, ... )
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
pItem = &stack.Return;
|
||||
pItem = &stack.Return;
|
||||
else if( iParam < -1 )
|
||||
return " ";
|
||||
return " ";
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
@@ -192,7 +192,7 @@ char * hb_pards( int iParam, ... )
|
||||
stack.szDate[ 5 ] = ( lMonth % 10 ) + '0';
|
||||
|
||||
stack.szDate[ 6 ] = ( lDay / 10 ) + '0';
|
||||
stack.szDate[ 7 ] = ( lDay % 10 ) + '0';
|
||||
stack.szDate[ 7 ] = ( lDay % 10 ) + '0';
|
||||
stack.szDate[ 8 ] = 0;
|
||||
|
||||
return stack.szDate; /* this guaranties good behavior when multithreading */
|
||||
@@ -216,14 +216,14 @@ int hb_parl( int iParam, ... )
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
pItem = &stack.Return;
|
||||
pItem = &stack.Return;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
return 0;
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
@@ -255,14 +255,14 @@ double hb_parnd( int iParam, ... )
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
pItem = &stack.Return;
|
||||
pItem = &stack.Return;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
return 0;
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
@@ -281,7 +281,7 @@ double hb_parnd( int iParam, ... )
|
||||
return pItem->item.asDouble.value;
|
||||
|
||||
else
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -299,21 +299,21 @@ int hb_parni( int iParam, ... )
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
pItem = &stack.Return;
|
||||
pItem = &stack.Return;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
return 0;
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
if( wArrayIndex )
|
||||
return (long) hb_arrayGetDouble( pItem, wArrayIndex );
|
||||
else
|
||||
return 0;
|
||||
if( wArrayIndex )
|
||||
return (long) hb_arrayGetDouble( pItem, wArrayIndex );
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
else if( IS_INTEGER( pItem ) )
|
||||
@@ -344,21 +344,21 @@ long hb_parnl( int iParam, ... )
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
pItem = &stack.Return;
|
||||
pItem = &stack.Return;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
return 0;
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_BYREF( pItem ) )
|
||||
pItem = ItemUnRef( pItem );
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
|
||||
if( IS_ARRAY( pItem ) )
|
||||
{
|
||||
if( wArrayIndex )
|
||||
return (long) hb_arrayGetDouble( pItem, wArrayIndex );
|
||||
else
|
||||
return 0;
|
||||
if( wArrayIndex )
|
||||
return (long) hb_arrayGetDouble( pItem, wArrayIndex );
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
else if( IS_INTEGER( pItem ) )
|
||||
@@ -384,9 +384,9 @@ ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex )
|
||||
if( pArray )
|
||||
{
|
||||
if( ! uiArrayIndex )
|
||||
return hb_arrayLen( pArray );
|
||||
return hb_arrayLen( pArray );
|
||||
else
|
||||
return (long) hb_arrayGetType( pArray, uiArrayIndex );
|
||||
return (long) hb_arrayGetType( pArray, uiArrayIndex );
|
||||
}
|
||||
else
|
||||
return 0; /* QUESTION: should we raise an error here ? */
|
||||
@@ -400,12 +400,12 @@ WORD hb_parinfo( int iParam )
|
||||
{
|
||||
if( ( iParam <= hb_pcount() ) || ( iParam == -1 ) )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
return stack.Return.type;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
else
|
||||
return ( stack.pBase + 1 + iParam )->type;
|
||||
if( iParam == -1 )
|
||||
return stack.Return.type;
|
||||
else if( iParam < -1 )
|
||||
return 0;
|
||||
else
|
||||
return ( stack.pBase + 1 + iParam )->type;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
@@ -421,7 +421,7 @@ WORD hb_pcount( void )
|
||||
|
||||
void hb_ret( void )
|
||||
{
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
}
|
||||
|
||||
void hb_reta( ULONG ulLen ) /* undocumented hb_reta() */
|
||||
@@ -433,7 +433,7 @@ void hb_retc( char * szText )
|
||||
{
|
||||
ULONG ulLen = strlen( szText );
|
||||
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
stack.Return.type = IT_STRING;
|
||||
stack.Return.item.asString.length = ulLen;
|
||||
stack.Return.item.asString.value = ( char * ) hb_xgrab( ulLen + 1 );
|
||||
@@ -442,7 +442,7 @@ void hb_retc( char * szText )
|
||||
|
||||
void hb_retclen( char * szText, ULONG ulLen )
|
||||
{
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
stack.Return.type = IT_STRING;
|
||||
stack.Return.item.asString.length = ulLen;
|
||||
stack.Return.item.asString.value = ( char * ) hb_xgrab( ulLen + 1 );
|
||||
@@ -465,7 +465,7 @@ void hb_retds( char * szDate ) /* szDate must have yyyymmdd format */
|
||||
else lDay = lMonth = lYear = 0; /* Date string missing or bad length,
|
||||
so force an empty date */
|
||||
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
|
||||
stack.Return.type = IT_DATE;
|
||||
stack.Return.item.asDate.length = 8;
|
||||
@@ -477,7 +477,7 @@ void hb_retds( char * szDate ) /* szDate must have yyyymmdd format */
|
||||
|
||||
void hb_retnd( double dNumber )
|
||||
{
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
stack.Return.type = IT_DOUBLE;
|
||||
if( dNumber > 10000000000.0 )
|
||||
stack.Return.item.asDouble.length = 20;
|
||||
@@ -489,7 +489,7 @@ void hb_retnd( double dNumber )
|
||||
|
||||
void hb_retni( int iNumber )
|
||||
{
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
stack.Return.type = IT_INTEGER;
|
||||
stack.Return.item.asInteger.length = 10;
|
||||
stack.Return.item.asInteger.decimal = 0;
|
||||
@@ -498,7 +498,7 @@ void hb_retni( int iNumber )
|
||||
|
||||
void hb_retl( int iTrueFalse )
|
||||
{
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
stack.Return.type = IT_LOGICAL;
|
||||
stack.Return.item.asLogical.length = 3;
|
||||
stack.Return.item.asLogical.value = iTrueFalse;
|
||||
@@ -506,7 +506,7 @@ void hb_retl( int iTrueFalse )
|
||||
|
||||
void hb_retnl( long lNumber )
|
||||
{
|
||||
ItemRelease( &stack.Return );
|
||||
hb_itemClear( &stack.Return );
|
||||
stack.Return.type = IT_LONG;
|
||||
stack.Return.item.asLong.length = 10;
|
||||
stack.Return.item.asLong.decimal = 0;
|
||||
@@ -530,7 +530,7 @@ void hb_storc( char * szText, int iParam, ... )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ulLen = strlen( szText );
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_STRING;
|
||||
pItem->item.asString.length = ulLen;
|
||||
pItem->item.asString.value = ( char * ) hb_xgrab( ulLen + 1 );
|
||||
@@ -555,8 +555,8 @@ void hb_storc( char * szText, int iParam, ... )
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
ulLen = strlen( szText );
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_STRING;
|
||||
pItemRef->item.asString.length = ulLen;
|
||||
pItemRef->item.asString.value = ( char * ) hb_xgrab( ulLen + 1 );
|
||||
@@ -580,7 +580,7 @@ void hb_storclen( char * fixText, WORD wLength, int iParam, ... )
|
||||
if( iParam == -1 )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_STRING;
|
||||
pItem->item.asString.length = wLength;
|
||||
pItem->item.asString.value = ( char * ) hb_xgrab( wLength + 1 );
|
||||
@@ -605,8 +605,8 @@ void hb_storclen( char * fixText, WORD wLength, int iParam, ... )
|
||||
}
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_STRING;
|
||||
pItemRef->item.asString.length = wLength;
|
||||
pItemRef->item.asString.value = ( char * ) hb_xgrab( wLength + 1 );
|
||||
@@ -643,7 +643,7 @@ void hb_stords( char * szDate, int iParam, ... ) /* szDate must have yyyymmdd fo
|
||||
if( iParam == -1 )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_DATE;
|
||||
pItem->item.asDate.length = 8;
|
||||
pItem->item.asDate.value = hb_dateEncode( lDay, lMonth, lYear );
|
||||
@@ -664,8 +664,8 @@ void hb_stords( char * szDate, int iParam, ... ) /* szDate must have yyyymmdd fo
|
||||
}
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_DATE;
|
||||
pItemRef->item.asDate.length = 8;
|
||||
pItemRef->item.asDate.value = hb_dateEncode( lDay, lMonth, lYear );
|
||||
@@ -687,16 +687,16 @@ void hb_storl( int iLogical, int iParam, ... )
|
||||
{
|
||||
if( iParam == -1 )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ItemRelease( pItem );
|
||||
pItem->type = IT_LOGICAL;
|
||||
pItem->item.asLogical.length = 3;
|
||||
pItem->item.asLogical.value = iLogical;
|
||||
pItem = &stack.Return;
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_LOGICAL;
|
||||
pItem->item.asLogical.length = 3;
|
||||
pItem->item.asLogical.value = iLogical;
|
||||
}
|
||||
else if( iParam < -1 )
|
||||
return;
|
||||
return;
|
||||
else
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
pItem = stack.pBase + 1 + iParam;
|
||||
|
||||
if( IS_ARRAY( pItem ) && wArrayIndex )
|
||||
{
|
||||
@@ -709,8 +709,8 @@ void hb_storl( int iLogical, int iParam, ... )
|
||||
}
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_LOGICAL;
|
||||
pItemRef->item.asLogical.length = 3;
|
||||
pItemRef->item.asLogical.value = iLogical;
|
||||
@@ -733,7 +733,7 @@ void hb_storni( int iValue, int iParam, ... )
|
||||
if( iParam == -1 )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_INTEGER;
|
||||
pItem->item.asInteger.length = 10;
|
||||
pItem->item.asInteger.decimal = 0;
|
||||
@@ -756,8 +756,8 @@ void hb_storni( int iValue, int iParam, ... )
|
||||
}
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_INTEGER;
|
||||
pItemRef->item.asInteger.length = 10;
|
||||
pItemRef->item.asInteger.decimal = 0;
|
||||
@@ -781,7 +781,7 @@ void hb_stornl( long lValue, int iParam, ... )
|
||||
if( iParam == -1 )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_LONG;
|
||||
pItem->item.asLong.length = 10;
|
||||
pItem->item.asLong.decimal = 0;
|
||||
@@ -804,8 +804,8 @@ void hb_stornl( long lValue, int iParam, ... )
|
||||
}
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_LONG;
|
||||
pItemRef->item.asLong.length = 10;
|
||||
pItemRef->item.asLong.decimal = 0;
|
||||
@@ -829,7 +829,7 @@ void hb_stornd( double dValue, int iParam, ... )
|
||||
if( iParam == -1 )
|
||||
{
|
||||
pItem = &stack.Return;
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_DOUBLE;
|
||||
if( dValue > 10000000000.0 )
|
||||
pItem->item.asDouble.length = 20;
|
||||
@@ -858,8 +858,8 @@ void hb_stornd( double dValue, int iParam, ... )
|
||||
}
|
||||
else if( IS_BYREF( pItem ) )
|
||||
{
|
||||
pItemRef = ItemUnRef( pItem );
|
||||
ItemRelease( pItemRef );
|
||||
pItemRef = hb_itemUnRef( pItem );
|
||||
hb_itemClear( pItemRef );
|
||||
pItemRef->type = IT_DOUBLE;
|
||||
if( dValue > 10000000000.0 )
|
||||
pItemRef->item.asDouble.length = 20;
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <filesys.h>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "filesys.h"
|
||||
#include <string.h>
|
||||
#include <errorapi.h>
|
||||
#include "errorapi.h"
|
||||
|
||||
#if defined(__CYGNUS__)
|
||||
#include <mingw32/share.h>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <dos.h>
|
||||
#include <gtapi.h>
|
||||
#include "gtapi.h"
|
||||
|
||||
#if defined(__POWERC) || (defined(__TURBOC__) && !defined(__BORLANDC__)) || \
|
||||
(defined(__ZTC__) && !defined(__SC__))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <os2.h>
|
||||
#include <gtapi.h>
|
||||
#include "gtapi.h"
|
||||
|
||||
#ifndef KBDTRF_FINAL_CHAR_IN
|
||||
#define KBDTRF_FINAL_CHAR_IN FINAL_CHAR_IN
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#include <windows.h>
|
||||
#include <gtapi.h>
|
||||
#include "gtapi.h"
|
||||
|
||||
#if ! defined(__GNUC__)
|
||||
#ifdef __CYGWIN32__
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/* TODO: include any standard headers here */
|
||||
|
||||
#include <gtapi.h>
|
||||
#include "gtapi.h"
|
||||
|
||||
void gtInit(void)
|
||||
{
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
* changed to allow unlimited color pairs.
|
||||
*/
|
||||
|
||||
#include <set.h>
|
||||
#include <gtapi.h>
|
||||
#include "set.h"
|
||||
#include "gtapi.h"
|
||||
|
||||
/* TODO: functions not implemented yet
|
||||
int hb_gtPostExt(void);
|
||||
@@ -64,7 +64,7 @@ int *_Color; /* masks: 0x0007 Background
|
||||
0x0800 Underline background
|
||||
0x8000 Underline foreground
|
||||
*/
|
||||
int _ColorCount;
|
||||
int _ColorCount;
|
||||
|
||||
/* gt API functions */
|
||||
|
||||
@@ -114,7 +114,7 @@ int hb_gtBox (USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, char
|
||||
for (tmp = 0; *pbyFrame && tmp < 9; tmp++) cPadChar = pszBox[tmp] = *pbyFrame++;
|
||||
while (tmp < 8) pszBox[tmp++] = cPadChar;
|
||||
pszBox[tmp] = '\0';
|
||||
|
||||
|
||||
/* Ensure that box is drawn from top left to bottom right. */
|
||||
if( uiTop > uiBottom )
|
||||
{
|
||||
@@ -397,10 +397,10 @@ int hb_gtGetColorStr(char * fpColorString)
|
||||
{
|
||||
if( ( nColor & 1 ) != 0 )
|
||||
sColors[k++] = 'B';
|
||||
|
||||
|
||||
if( ( nColor & 2 ) != 0 )
|
||||
sColors[k++] = 'G';
|
||||
|
||||
|
||||
if( ( nColor & 4 ) != 0 )
|
||||
sColors[k++] = 'R';
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
You can contact me at: dezac@corevia.com
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
#include <ctype.h>
|
||||
#include <init.h>
|
||||
#include "init.h"
|
||||
|
||||
#define CHR_HARD1 (char)141
|
||||
#define CHR_HARD2 (char)10
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
their web site at http://www.gnu.org/).
|
||||
|
||||
V 1.3 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.2 Gonzalo Diethelm ?
|
||||
V 1.1 David G. Holm Committed to CVS.
|
||||
V 1.0 David G. Holm Initial version.
|
||||
*/
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
You can contact me at: alinares@fivetech.com
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <itemapi.h>
|
||||
#include <ctoharb.h>
|
||||
#include <dates.h>
|
||||
#include <set.h>
|
||||
#include "extend.h"
|
||||
#include "itemapi.h"
|
||||
#include "ctoharb.h"
|
||||
#include "dates.h"
|
||||
#include "set.h"
|
||||
|
||||
extern STACK stack;
|
||||
extern SYMBOL symEval;
|
||||
@@ -39,7 +39,7 @@ BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem )
|
||||
{
|
||||
memset( pEvalInfo, 0, sizeof( EVALINFO ) );
|
||||
pEvalInfo->pItems[ 0 ] = hb_itemNew( 0 );
|
||||
ItemCopy( pEvalInfo->pItems[ 0 ], pItem );
|
||||
hb_itemCopy( pEvalInfo->pItems[ 0 ], pItem );
|
||||
bResult = TRUE;
|
||||
}
|
||||
return bResult;
|
||||
@@ -57,7 +57,7 @@ BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PHB_ITEM pItem )
|
||||
if( ! pEvalInfo->pItems[ w ] )
|
||||
{
|
||||
pEvalInfo->pItems[ w ] = hb_itemNew( 0 );
|
||||
ItemCopy( pEvalInfo->pItems[ w ], pItem );
|
||||
hb_itemCopy( pEvalInfo->pItems[ w ], pItem );
|
||||
bResult = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ PHB_ITEM hb_evalLaunch( PEVALINFO pEvalInfo )
|
||||
Push( pEvalInfo->pItems[ w++ ] );
|
||||
Do( w - 1 );
|
||||
pResult = hb_itemNew( 0 );
|
||||
ItemCopy( pResult, &stack.Return );
|
||||
hb_itemCopy( pResult, &stack.Return );
|
||||
}
|
||||
else if( IS_BLOCK( pEvalInfo->pItems[ 0 ] ) )
|
||||
{
|
||||
@@ -105,7 +105,7 @@ PHB_ITEM hb_evalLaunch( PEVALINFO pEvalInfo )
|
||||
Push( pEvalInfo->pItems[ w++ ] );
|
||||
Do( w - 1 );
|
||||
pResult = hb_itemNew( 0 );
|
||||
ItemCopy( pResult, &stack.Return );
|
||||
hb_itemCopy( pResult, &stack.Return );
|
||||
}
|
||||
}
|
||||
return pResult;
|
||||
@@ -129,7 +129,7 @@ PHB_ITEM hb_itemParam( WORD wParam )
|
||||
PHB_ITEM pNew = hb_itemNew( 0 );
|
||||
|
||||
if( hb_param( wParam, IT_ANY ) )
|
||||
ItemCopy(pNew, hb_param( wParam, IT_ANY ));
|
||||
hb_itemCopy(pNew, hb_param( wParam, IT_ANY ));
|
||||
|
||||
return pNew;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ BOOL hb_itemRelease( PHB_ITEM pItem )
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
ItemRelease(pItem);
|
||||
hb_itemClear(pItem);
|
||||
hb_xfree( pItem );
|
||||
bResult = TRUE;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ PHB_ITEM hb_itemArrayPut( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
|
||||
PHB_ITEM hb_itemPutC( PHB_ITEM pItem, char * szText )
|
||||
{
|
||||
if( pItem )
|
||||
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
|
||||
hb_itemClear( pItem ); /* warning: this is hvm.c one not this one */
|
||||
else
|
||||
pItem = hb_itemNew(0);
|
||||
|
||||
@@ -188,7 +188,7 @@ PHB_ITEM hb_itemPutC( PHB_ITEM pItem, char * szText )
|
||||
PHB_ITEM hb_itemPutCL( PHB_ITEM pItem, char * nszText, ULONG ulLen )
|
||||
{
|
||||
if( pItem )
|
||||
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
|
||||
hb_itemClear( pItem ); /* warning: this is hvm.c one not this one */
|
||||
else
|
||||
pItem = hb_itemNew(0);
|
||||
|
||||
@@ -311,7 +311,7 @@ long hb_itemGetNL( PHB_ITEM pItem )
|
||||
PHB_ITEM hb_itemReturn( PHB_ITEM pItem )
|
||||
{
|
||||
if( pItem )
|
||||
ItemCopy(&stack.Return, pItem);
|
||||
hb_itemCopy(&stack.Return, pItem);
|
||||
|
||||
return pItem;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ PHB_ITEM hb_itemPutDS( PHB_ITEM pItem, char *szDate )
|
||||
long lDay, lMonth, lYear;
|
||||
|
||||
if( pItem )
|
||||
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
|
||||
hb_itemClear( pItem ); /* warning: this is hvm.c one not this one */
|
||||
else
|
||||
pItem = hb_itemNew(0);
|
||||
|
||||
@@ -330,7 +330,7 @@ PHB_ITEM hb_itemPutDS( PHB_ITEM pItem, char *szDate )
|
||||
lYear = ((szDate[ 0 ] - '0') * 1000) + ((szDate[ 1 ] - '0') * 100)
|
||||
+ ((szDate[ 2 ] - '0') * 10) + (szDate[ 3 ] - '0');
|
||||
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
pItem->type = IT_DATE;
|
||||
pItem->item.asDate.length = 8;
|
||||
/* QUESTION: Is this ok ? we are going to use a long to store the date */
|
||||
@@ -344,7 +344,7 @@ PHB_ITEM hb_itemPutDS( PHB_ITEM pItem, char *szDate )
|
||||
PHB_ITEM hb_itemPutL( PHB_ITEM pItem, BOOL bValue )
|
||||
{
|
||||
if( pItem )
|
||||
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
|
||||
hb_itemClear( pItem ); /* warning: this is hvm.c one not this one */
|
||||
else
|
||||
pItem = hb_itemNew(0);
|
||||
|
||||
@@ -357,7 +357,7 @@ PHB_ITEM hb_itemPutL( PHB_ITEM pItem, BOOL bValue )
|
||||
PHB_ITEM hb_itemPutND( PHB_ITEM pItem, double dNumber )
|
||||
{
|
||||
if( pItem )
|
||||
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
|
||||
hb_itemClear( pItem ); /* warning: this is hvm.c one not this one */
|
||||
else
|
||||
pItem = hb_itemNew(0);
|
||||
|
||||
@@ -372,7 +372,7 @@ PHB_ITEM hb_itemPutND( PHB_ITEM pItem, double dNumber )
|
||||
PHB_ITEM hb_itemPutNL( PHB_ITEM pItem, long lNumber )
|
||||
{
|
||||
if( pItem )
|
||||
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
|
||||
hb_itemClear( pItem ); /* warning: this is hvm.c one not this one */
|
||||
else
|
||||
pItem = hb_itemNew(0);
|
||||
|
||||
@@ -399,3 +399,158 @@ WORD hb_itemType( PHB_ITEM pItem )
|
||||
{
|
||||
return pItem->type;
|
||||
}
|
||||
|
||||
/* Internal API, not standard Clipper */
|
||||
|
||||
void hb_itemClear( PHB_ITEM pItem )
|
||||
{
|
||||
if( IS_STRING( pItem ) )
|
||||
{
|
||||
if( pItem->item.asString.value )
|
||||
{
|
||||
hb_xfree( pItem->item.asString.value );
|
||||
pItem->item.asString.value = NULL;
|
||||
}
|
||||
pItem->item.asString.length = 0;
|
||||
}
|
||||
else if( IS_ARRAY( pItem ) && pItem->item.asArray.value )
|
||||
{
|
||||
if( --( pItem->item.asArray.value )->wHolders == 0 )
|
||||
hb_arrayRelease( pItem );
|
||||
}
|
||||
else if( IS_BLOCK( pItem ) )
|
||||
{
|
||||
hb_CodeblockDelete( pItem );
|
||||
}
|
||||
else if( IS_MEMVAR( pItem ) )
|
||||
hb_MemvarValueDecRef( pItem->item.asMemvar.value );
|
||||
|
||||
pItem->type = IT_NIL;
|
||||
}
|
||||
|
||||
/* Internal API, not standard Clipper */
|
||||
|
||||
void hb_itemCopy( PHB_ITEM pDest, PHB_ITEM pSource )
|
||||
{
|
||||
hb_itemClear( pDest );
|
||||
|
||||
if( pDest == pSource )
|
||||
{
|
||||
printf( "an item was going to be copied to itself from hb_itemCopy()\n" );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
memcpy( pDest, pSource, sizeof( HB_ITEM ) );
|
||||
|
||||
if( IS_STRING( pSource ) )
|
||||
{
|
||||
pDest->item.asString.value = ( char * ) hb_xgrab( pSource->item.asString.length + 1 );
|
||||
memcpy( pDest->item.asString.value, pSource->item.asString.value, pSource->item.asString.length );
|
||||
pDest->item.asString.value[ pSource->item.asString.length ] = 0;
|
||||
}
|
||||
|
||||
else if( IS_ARRAY( pSource ) )
|
||||
( pSource->item.asArray.value )->wHolders++;
|
||||
|
||||
else if( IS_BLOCK( pSource ) )
|
||||
{
|
||||
hb_CodeblockCopy( pDest, pSource );
|
||||
}
|
||||
else if( IS_MEMVAR( pSource ) )
|
||||
{
|
||||
hb_MemvarValueIncRef( pSource->item.asMemvar.value );
|
||||
}
|
||||
}
|
||||
|
||||
/* Internal API, not standard Clipper */
|
||||
/* De-references item passed by the reference */
|
||||
|
||||
PHB_ITEM hb_itemUnRef( PHB_ITEM pItem )
|
||||
{
|
||||
while( IS_BYREF( pItem ) )
|
||||
{
|
||||
if( IS_MEMVAR( pItem ) )
|
||||
{
|
||||
HB_VALUE_PTR pValue;
|
||||
|
||||
pValue =*(pItem->item.asMemvar.itemsbase) + pItem->item.asMemvar.offset +
|
||||
pItem->item.asMemvar.value;
|
||||
pItem =&pValue->item;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( pItem->item.asRefer.value >= 0 )
|
||||
pItem =*(pItem->item.asRefer.itemsbase) + pItem->item.asRefer.offset +
|
||||
pItem->item.asRefer.value;
|
||||
else
|
||||
{
|
||||
/* local variable referenced in a codeblock
|
||||
*/
|
||||
pItem =hb_CodeblockGetRef( *(pItem->item.asRefer.itemsbase) + pItem->item.asRefer.offset,
|
||||
pItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
/* Internal API, not standard Clipper */
|
||||
|
||||
/*
|
||||
* StrCmp. String comparision functions
|
||||
*
|
||||
* hb_itemStrCmp : Copyright (C) 1999 Eddie Runia (eddie@runia.com)
|
||||
*/
|
||||
|
||||
/* Check whether two strings are equal (0), smaller (-1), or greater (1) */
|
||||
int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact )
|
||||
{
|
||||
char *szFirst = pFirst->item.asString.value;
|
||||
char *szSecond = pSecond->item.asString.value;
|
||||
ULONG lLenFirst = pFirst->item.asString.length;
|
||||
ULONG lLenSecond = pSecond->item.asString.length;
|
||||
long lMinLen;
|
||||
long lCounter;
|
||||
int iRet = 0; /* Current status */
|
||||
|
||||
if (hb_set.HB_SET_EXACT && !bForceExact)
|
||||
{ /* SET EXACT ON and not using == */
|
||||
/* Don't include trailing spaces */
|
||||
while( lLenFirst > 0 && szFirst[ lLenFirst - 1 ] == ' ') lLenFirst--;
|
||||
while( lLenSecond > 0 && szSecond[ lLenSecond - 1 ] == ' ') lLenSecond--;
|
||||
}
|
||||
lMinLen = lLenFirst < lLenSecond ? lLenFirst : lLenSecond;
|
||||
if( lMinLen ) /* One of the strings is empty */
|
||||
{
|
||||
for( lCounter = 0; lCounter < lMinLen && !iRet; lCounter++ )
|
||||
{
|
||||
if( *szFirst != *szSecond ) /* Difference found */
|
||||
iRet = (*szFirst < *szSecond) ? -1 : 1;
|
||||
else /* TODO : #define some constants*/
|
||||
{
|
||||
szFirst++;
|
||||
szSecond++;
|
||||
}
|
||||
}
|
||||
if( hb_set.HB_SET_EXACT || bForceExact || lLenSecond > lCounter )
|
||||
{ /* Force an exact comparison */
|
||||
if( !iRet && lLenFirst != lLenSecond )
|
||||
/* If length is different ! */
|
||||
iRet = (lLenFirst < lLenSecond) ? -1 : 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( lLenFirst != lLenSecond ) /* Both empty ? */
|
||||
{
|
||||
if( hb_set.HB_SET_EXACT || bForceExact )
|
||||
iRet = (lLenFirst < lLenSecond) ? -1 : 1;
|
||||
else
|
||||
iRet = (lLenSecond == 0) ? 0 : -1;
|
||||
}
|
||||
else
|
||||
iRet = 0; /* Both empty => Equal ! */
|
||||
}
|
||||
return(iRet);
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
See doc/hdr_tpl.txt, Version 1.2 or later, for licensing terms.
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <set.h>
|
||||
#include <errorapi.h>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "set.h"
|
||||
#include "errorapi.h"
|
||||
#include <math.h>
|
||||
|
||||
extern STACK stack;
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <string.h>
|
||||
#include <errorapi.h>
|
||||
#include <error.ch>
|
||||
#include "extend.h"
|
||||
#include "errorapi.h"
|
||||
#include "error.ch"
|
||||
|
||||
#define VS_PRIVATE 64
|
||||
#define VS_PUBLIC 128
|
||||
@@ -88,7 +88,7 @@ void hb_MemvarsRelease( void )
|
||||
{
|
||||
if( _globalTable[ ulCnt ].counter )
|
||||
{
|
||||
ItemRelease( &_globalTable[ ulCnt ].item );
|
||||
hb_itemClear( &_globalTable[ ulCnt ].item );
|
||||
_globalTable[ ulCnt ].counter =0;
|
||||
}
|
||||
--ulCnt;
|
||||
@@ -178,7 +178,7 @@ HB_HANDLE hb_MemvarValueNew( HB_ITEM_PTR pSource, int iTrueMemvar )
|
||||
if( pSource )
|
||||
{
|
||||
if( iTrueMemvar )
|
||||
ItemCopy( &pValue->item, pSource );
|
||||
hb_itemCopy( &pValue->item, pSource );
|
||||
else
|
||||
memcpy( &pValue->item, pSource, sizeof(HB_ITEM) );
|
||||
}
|
||||
@@ -297,7 +297,7 @@ void hb_MemvarValueDecRef( HB_HANDLE hValue )
|
||||
{
|
||||
if( --pValue->counter == 0 )
|
||||
{
|
||||
ItemRelease( &pValue->item );
|
||||
hb_itemClear( &pValue->item );
|
||||
if( _globalFirstFree > hValue )
|
||||
{
|
||||
if( (_globalLastFree - hValue) == 1 )
|
||||
@@ -356,9 +356,9 @@ void hb_MemvarSetValue( PSYMBOL pMemvarSymb, HB_ITEM_PTR pItem )
|
||||
/* value is already created */
|
||||
HB_ITEM_PTR pSetItem = &_globalTable[ pDyn->hMemvar ].item;
|
||||
if( IS_BYREF(pSetItem) )
|
||||
ItemCopy( ItemUnRef(pSetItem), pItem );
|
||||
hb_itemCopy( hb_itemUnRef(pSetItem), pItem );
|
||||
else
|
||||
ItemCopy( pSetItem, pItem );
|
||||
hb_itemCopy( pSetItem, pItem );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -388,9 +388,9 @@ void hb_MemvarGetValue( HB_ITEM_PTR pItem, PSYMBOL pMemvarSymb )
|
||||
*/
|
||||
HB_ITEM_PTR pGetItem = &_globalTable[ pDyn->hMemvar ].item;
|
||||
if( IS_BYREF(pGetItem) )
|
||||
ItemCopy( pItem, ItemUnRef(pGetItem) );
|
||||
hb_itemCopy( pItem, hb_itemUnRef(pGetItem) );
|
||||
else
|
||||
ItemCopy( pItem, pGetItem );
|
||||
hb_itemCopy( pItem, pGetItem );
|
||||
}
|
||||
else /* variable is not initialized */
|
||||
hb_errorRT_BASE( EG_NOVAR, 1003, NULL, pMemvarSymb->szName );
|
||||
@@ -582,7 +582,7 @@ HARBOUR HB___MVPUBLIC( void )
|
||||
{
|
||||
hb_arrayGet( pMemvar, j, &VarItem );
|
||||
hb_MemvarCreateFromItem( &VarItem, VS_PUBLIC, NULL );
|
||||
ItemRelease( &VarItem );
|
||||
hb_itemClear( &VarItem );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -655,7 +655,7 @@ HARBOUR HB___MVPRIVATE( void )
|
||||
{
|
||||
hb_arrayGet( pMemvar, j, &VarItem );
|
||||
hb_MemvarCreateFromItem( &VarItem, VS_PRIVATE, NULL );
|
||||
ItemRelease( &VarItem );
|
||||
hb_itemClear( &VarItem );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -718,7 +718,7 @@ HARBOUR HB___MVXRELEASE( void )
|
||||
{
|
||||
hb_arrayGet( pMemvar, j, &VarItem );
|
||||
hb_MemvarRelease( &VarItem );
|
||||
ItemRelease( &VarItem );
|
||||
hb_itemClear( &VarItem );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
You can contact me at: dezac@corevia.com
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#define CHR_HARD1 (char)141
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Language support unit for Basque
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Urtarrila", "Otsaila", "Martxoa",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Xaner", "Febrer", "Mars",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Czech language module (2 char. ISO language code: CZ) */
|
||||
/* Codepage: Latin II - 852 */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] =
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Czech language module (2 char. ISO language code: CZ) */
|
||||
/* Codepage: Czech - Kamenickych (CS2) */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] =
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"januari", "februari", "maart",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Codepage: N/A
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Jaunaro", "Februaro", "Marto",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Janvier", "F‚vrier", "Mars",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Xaneiro", "Febreiro", "Marzal",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Januar", "Februar", "März",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/* TODO: Decide which codepage to use, and how to implement the whole
|
||||
codepage issue */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] =
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Indonesian language module */
|
||||
/* Codepage: N/A */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Januari", "Februari", "Maret",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Gennaio", "Febbraio", "Marzo",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/* Korea language module */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"1월", "2월", "3월",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Polish language module - Polskoj©zyczny modu<64> dla Harbour */
|
||||
/* Codepage: Latin II - 852 */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Styczeä", "Luty", "Marzec",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Polish language module - Polskojęzyczny moduł dla Harbour */
|
||||
/* Codepage: ISO-8859-2 */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Styczeń", "Luty", "Marzec",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Polish language module - Polskoj‘zyczny modu’ dla Harbour */
|
||||
/* Codepage: Mazowia */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Stycze¤", "Luty", "Marzec",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Janeiro", "Fevereiro", "Março",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"ßíâàðü", "Ôåâðàëü", "Ìàðò",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Ÿ¢ àì", "”¥¢à «ì", "Œ àâ",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"Enero", "Febrero", "Marzo",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* English language module */
|
||||
/* Codepage: N/A */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] = {
|
||||
"January", "February", "March",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* Serbian language module (2 char. ISO language code: YU) */
|
||||
/* Codepage: Latin II - 852 */
|
||||
|
||||
#include <hbdefs.h>
|
||||
#include "hbdefs.h"
|
||||
|
||||
char *hb_monthsname[ 12 ] =
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
their web site at http://www.gnu.org/).
|
||||
|
||||
V 1.51 Victor Szel #include <x> changed to #include "x".
|
||||
V 1.49 Paul Tucker Changed parameter passing checks
|
||||
in call to hb_setColor() to account
|
||||
for no or NIL parameters.
|
||||
@@ -160,15 +161,15 @@
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <errorapi.h>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "errorapi.h"
|
||||
#include <fcntl.h>
|
||||
#ifndef __MPW__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <set.h>
|
||||
#include <inkey.h>
|
||||
#include "set.h"
|
||||
#include "inkey.h"
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef O_BINARY
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
*/
|
||||
|
||||
#include "pcode.h"
|
||||
#include <init.h>
|
||||
#include <set.h>
|
||||
#include "init.h"
|
||||
#include "set.h"
|
||||
#ifdef HARBOUR_USE_GTAPI
|
||||
#include <gtapi.h>
|
||||
#include "gtapi.h"
|
||||
#else
|
||||
static char old_string[ sizeof( hb_set.HB_SET_COLOR ) ];
|
||||
#endif
|
||||
@@ -45,7 +45,7 @@ char *hb_setColor( char *sColor )
|
||||
|
||||
if( sColor != (char *)0 )
|
||||
{
|
||||
#ifdef HARBOUR_USE_GTAPI
|
||||
#ifdef HARBOUR_USE_GTAPI
|
||||
hb_gtSetColorStr( sColor );
|
||||
#else
|
||||
strncpy (hb_set.HB_SET_COLOR, sColor, sizeof( hb_set.HB_SET_COLOR ) );
|
||||
@@ -53,7 +53,7 @@ char *hb_setColor( char *sColor )
|
||||
hb_strUpper( hb_set.HB_SET_COLOR, strlen( hb_set.HB_SET_COLOR ) );
|
||||
#endif
|
||||
}
|
||||
#ifdef HARBOUR_USE_GTAPI
|
||||
#ifdef HARBOUR_USE_GTAPI
|
||||
return hb_set.HB_SET_COLOR;
|
||||
#else
|
||||
return old_string;
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
You can contact me at: alinares@fivetech.com
|
||||
*/
|
||||
|
||||
#include <hbsetup.h>
|
||||
#include <dates.h>
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <itemapi.h>
|
||||
#include <errorapi.h>
|
||||
#include "hbsetup.h"
|
||||
#include "dates.h"
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "itemapi.h"
|
||||
#include "errorapi.h"
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <set.h>
|
||||
#include "set.h"
|
||||
|
||||
extern STACK stack;
|
||||
|
||||
@@ -119,6 +119,36 @@ BOOL hb_strempty( char * szText, ULONG ulLen )
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
/* Harbour Project source code
|
||||
http://www.Harbour-Project.org/
|
||||
The following function is Copyright 1999 David G. Holm <dholm@jsd-llc.com>:
|
||||
hb_stricmp().
|
||||
See doc/hdr_tpl.txt, Version 1.2 or later, for licensing terms.
|
||||
*/
|
||||
|
||||
int hb_stricmp( const char *s1, const char *s2 )
|
||||
{
|
||||
int rc = 0, c1, c2;
|
||||
USHORT l1, l2, count;
|
||||
l1 = strlen( s1 );
|
||||
l2 = strlen( s2 );
|
||||
if( l1 < l2 ) count = l1;
|
||||
else count = l2;
|
||||
while( rc == 0 && count > 0 )
|
||||
{
|
||||
count--;
|
||||
c1 = toupper( *s1++ );
|
||||
c2 = toupper( *s2++ );
|
||||
if( c1 != c2 ) rc = ( c1 < c2 ? -1 : 1 );
|
||||
}
|
||||
if( rc == 0 && l1 != l2 )
|
||||
{
|
||||
if( l1 < l2 ) rc = -1;
|
||||
else rc = 1;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* determines if first char of string is letter */
|
||||
/* TEST: QOUT( "isalpha( 'hello' ) = ", isalpha( 'hello' ) ) */
|
||||
/* TEST: QOUT( "isalpha( '12345' ) = ", isalpha( '12345' ) ) */
|
||||
@@ -607,10 +637,10 @@ HARBOUR HB_LEFT( void )
|
||||
|
||||
if( pLen )
|
||||
{
|
||||
long lLen = hb_parnl(2);
|
||||
LONG lLen = hb_parnl(2);
|
||||
|
||||
if( lLen > pText->item.asString.length )
|
||||
lLen = pText->item.asString.length;
|
||||
if( lLen > (LONG)pText->item.asString.length )
|
||||
lLen = (LONG)pText->item.asString.length;
|
||||
|
||||
else if( lLen < 0 )
|
||||
lLen = 0;
|
||||
@@ -647,10 +677,10 @@ HARBOUR HB_RIGHT( void )
|
||||
|
||||
if( pLen )
|
||||
{
|
||||
long lLen = hb_parnl(2);
|
||||
LONG lLen = hb_parnl(2);
|
||||
|
||||
if( lLen > pText->item.asString.length )
|
||||
lLen = pText->item.asString.length;
|
||||
if( lLen > (LONG)pText->item.asString.length )
|
||||
lLen = (LONG)pText->item.asString.length;
|
||||
|
||||
else if( lLen < 0 )
|
||||
lLen = 0;
|
||||
@@ -687,11 +717,11 @@ HARBOUR HB_SUBSTR( void )
|
||||
|
||||
if( pText && pPos )
|
||||
{
|
||||
long lPos = hb_parnl(2);
|
||||
LONG lPos = hb_parnl(2);
|
||||
|
||||
if( lPos < 0 )
|
||||
{
|
||||
lPos += pText->item.asString.length;
|
||||
lPos += (LONG)pText->item.asString.length;
|
||||
if( lPos < 0 )
|
||||
lPos = 0;
|
||||
}
|
||||
@@ -700,20 +730,20 @@ HARBOUR HB_SUBSTR( void )
|
||||
lPos--;
|
||||
}
|
||||
|
||||
if( lPos < pText->item.asString.length )
|
||||
if( lPos < (LONG)pText->item.asString.length )
|
||||
{
|
||||
PHB_ITEM pLen = hb_param(3, IT_NUMERIC);
|
||||
long lLen;
|
||||
LONG lLen;
|
||||
|
||||
if( pLen )
|
||||
{
|
||||
lLen = hb_parnl(3);
|
||||
|
||||
if( lLen > pText->item.asString.length - lPos )
|
||||
lLen = pText->item.asString.length - lPos;
|
||||
if( lLen > (LONG)pText->item.asString.length - lPos )
|
||||
lLen = (LONG)pText->item.asString.length - lPos;
|
||||
}
|
||||
else
|
||||
lLen = pText->item.asString.length - lPos;
|
||||
lLen = (LONG)pText->item.asString.length - lPos;
|
||||
|
||||
if( lLen > 0 )
|
||||
hb_retclen(pText->item.asString.value + lPos, lLen);
|
||||
@@ -753,9 +783,9 @@ HARBOUR HB_LOWER( void )
|
||||
|
||||
if( pText )
|
||||
{
|
||||
long lLen = pText->item.asString.length;
|
||||
ULONG ulLen = pText->item.asString.length;
|
||||
|
||||
hb_retclen(hb_strLower(pText->item.asString.value, lLen), lLen);
|
||||
hb_retclen(hb_strLower(pText->item.asString.value, ulLen), ulLen);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -787,9 +817,9 @@ HARBOUR HB_UPPER( void )
|
||||
|
||||
if( pText )
|
||||
{
|
||||
long lLen = pText->item.asString.length;
|
||||
ULONG ulLen = pText->item.asString.length;
|
||||
|
||||
hb_retclen(hb_strUpper(pText->item.asString.value, lLen), lLen);
|
||||
hb_retclen(hb_strUpper(pText->item.asString.value, ulLen), ulLen);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
* partial copyright with regards to string handling
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <init.h>
|
||||
#include <errorapi.h>
|
||||
#include <ctoharb.h>
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "errorapi.h"
|
||||
#include "ctoharb.h"
|
||||
#include <ctype.h>
|
||||
#include <dates.h>
|
||||
#include <set.h>
|
||||
#include "dates.h"
|
||||
#include "set.h"
|
||||
|
||||
/* */
|
||||
/* Transform( xValue, cPicture ) */
|
||||
@@ -621,21 +621,21 @@ HARBOUR HB_TRANSFORM( void )
|
||||
{
|
||||
pItem = NumDefault( (double) pExp->item.asInteger.value );
|
||||
hb_retclen( pItem->item.asString.value, pItem->item.asInteger.length );
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
break;
|
||||
}
|
||||
case IT_LONG:
|
||||
{
|
||||
pItem = NumDefault( (double) pExp->item.asLong.value );
|
||||
hb_retclen( pItem->item.asString.value, pItem->item.asLong.length );
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
break;
|
||||
}
|
||||
case IT_DOUBLE:
|
||||
{
|
||||
pItem = NumDefault( (double) pExp->item.asDouble.value );
|
||||
hb_retclen( pItem->item.asString.value, pItem->item.asDouble.length );
|
||||
ItemRelease( pItem );
|
||||
hb_itemClear( pItem );
|
||||
break;
|
||||
}
|
||||
case IT_DATE:
|
||||
|
||||
@@ -24,10 +24,9 @@
|
||||
*/
|
||||
|
||||
#include "pcode.h"
|
||||
|
||||
#include <errorapi.h>
|
||||
#include "errorapi.h"
|
||||
#include "init.h"
|
||||
#include <stdio.h>
|
||||
#include <init.h>
|
||||
|
||||
/* #if INTEL32 */
|
||||
static BYTE prgFunction[] = { 0x68, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_ASCIISUM( void )
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_ASCPOS( void )
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_ATDIFF( void )
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_CHAREVEN( void )
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_CHARMIX( void )
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_CHARODD( void )
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_CHRCOUNT( void )
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_CHRFIRST( void )
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_CHRTOTAL( void )
|
||||
{
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
HB_EOM(), HB_BOM(), HB_WOM(), HB_DOY(), HB_WOY(), HB_EOY(), HB_BOY()
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <errorapi.h>
|
||||
#include <init.h>
|
||||
#include <itemapi.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <dates.h>
|
||||
#include "extend.h"
|
||||
#include "errorapi.h"
|
||||
#include "init.h"
|
||||
#include "itemapi.h"
|
||||
#include "dates.h"
|
||||
|
||||
HARBOUR HB_ADAYS(void);
|
||||
HARBOUR HB_AMONTHS(void);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
#include <time.h>
|
||||
|
||||
HARBOUR HB_DATETIME( void )
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
* $Date$ 1999/05/06
|
||||
* $End$ */
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctoharb.h>
|
||||
#include <ctype.h>
|
||||
#include <itemapi.h>
|
||||
#include "extend.h"
|
||||
#include "ctoharb.h"
|
||||
#include "itemapi.h"
|
||||
|
||||
extern STACK stack; /* External data used */
|
||||
extern HB_ITEM aStatics;
|
||||
@@ -57,7 +57,7 @@ HARBOUR HB___ASTATIC(void)
|
||||
{
|
||||
PHB_ITEM pStatics = hb_arrayClone( &aStatics );
|
||||
|
||||
ItemCopy( &stack.Return, pStatics );
|
||||
hb_itemCopy( &stack.Return, pStatics );
|
||||
hb_itemRelease( pStatics );
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ void AddToArray( PHB_ITEM pItem, PHB_ITEM pReturn, WORD wPos )
|
||||
sprintf( pTemp->item.asString.value, "[%s]", pItem->item.asSymbol.value->szName );
|
||||
|
||||
hb_itemArrayPut( pReturn, wPos, pTemp );
|
||||
ItemRelease( pTemp ); /* Get rid of temporary str.*/
|
||||
hb_itemClear( pTemp ); /* Get rid of temporary str.*/
|
||||
hb_xfree( pTemp );
|
||||
}
|
||||
else /* Normal types */
|
||||
@@ -138,7 +138,7 @@ HARBOUR HB___AGLOBALSTACK(void)
|
||||
for( pItem = stack.pItems; pItem <= stack.pPos; pItem++ )
|
||||
AddToArray( pItem, pReturn, wPos++ );
|
||||
hb_itemReturn( pReturn );
|
||||
ItemRelease( pReturn );
|
||||
hb_itemClear( pReturn );
|
||||
hb_xfree( pReturn );
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ HARBOUR HB___ASTACK(void)
|
||||
for( pItem = pBase; pItem < stack.pBase; pItem++ )
|
||||
AddToArray( pItem, pReturn, wPos++ );
|
||||
hb_itemReturn( pReturn );
|
||||
ItemRelease( pReturn );
|
||||
hb_itemClear( pReturn );
|
||||
hb_xfree( pReturn );
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ HARBOUR HB___APARAM(void)
|
||||
for( pItem = pBase+2; wLen--; pItem++ )
|
||||
AddToArray( pItem, pReturn, wPos++ );
|
||||
hb_itemReturn( pReturn );
|
||||
ItemRelease( pReturn );
|
||||
hb_itemClear( pReturn );
|
||||
hb_xfree( pReturn );
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* please run $(HARBOUR)\tests\working\testhbf.prg for testing */
|
||||
|
||||
#include <filesys.api>
|
||||
#include "filesys.api"
|
||||
|
||||
#define b_size 1024
|
||||
#define c_size 4096
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -41,7 +41,7 @@ HARBOUR HB_RENFILE(void)
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
*
|
||||
*
|
||||
* $SYNTAX$
|
||||
* CD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -49,7 +49,7 @@ HARBOUR HB_RENFILE(void)
|
||||
* $RETURNS$
|
||||
* .T. IF SUCEFUL
|
||||
* .F. IF NOT
|
||||
*
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
* CHANGE THE CURRENT DIRECTORY
|
||||
* $EXAMPLES$
|
||||
@@ -58,9 +58,9 @@ HARBOUR HB_RENFILE(void)
|
||||
* ELSE
|
||||
* RETURN(.F.)
|
||||
* ENDIF
|
||||
*
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
*
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h internal.h
|
||||
* $END$
|
||||
@@ -74,7 +74,7 @@ HARBOUR HB_RENFILE(void)
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
*
|
||||
*
|
||||
* $SYNTAX$
|
||||
* MD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -82,7 +82,7 @@ HARBOUR HB_RENFILE(void)
|
||||
* $RETURNS$
|
||||
* .T. IF SUCEFUL
|
||||
* .F. IF NOT
|
||||
*
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
* CREATE A DIRECTORY
|
||||
* $EXAMPLES$
|
||||
@@ -91,9 +91,9 @@ HARBOUR HB_RENFILE(void)
|
||||
* ELSE
|
||||
* RETURN(.F.)
|
||||
* ENDIF
|
||||
*
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
*
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h internal.h
|
||||
* $END$
|
||||
@@ -105,7 +105,7 @@ HARBOUR HB_RENFILE(void)
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
*
|
||||
*
|
||||
* $SYNTAX$
|
||||
* RD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -113,7 +113,7 @@ HARBOUR HB_RENFILE(void)
|
||||
* $RETURNS$
|
||||
* .T. IF SUCEFUL
|
||||
* .F. IF NOT
|
||||
*
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
* REMOVE A DIRECTORY
|
||||
* $EXAMPLES$
|
||||
@@ -122,9 +122,9 @@ HARBOUR HB_RENFILE(void)
|
||||
* ELSE
|
||||
* RETURN(.F.)
|
||||
* ENDIF
|
||||
*
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
*
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h internal.h
|
||||
* $END$
|
||||
@@ -168,7 +168,7 @@ HARBOUR HB_RD(void)
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
*
|
||||
*
|
||||
* $SYNTAX$
|
||||
* RD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -176,7 +176,7 @@ HARBOUR HB_RD(void)
|
||||
* $RETURNS$
|
||||
* .T. IF SUCEFUL
|
||||
* .F. IF NOT
|
||||
*
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
* VERIFY IF A FILE EXISTS
|
||||
* $EXAMPLES$
|
||||
@@ -185,9 +185,9 @@ HARBOUR HB_RD(void)
|
||||
* ELSE
|
||||
* RETURN(.F.)
|
||||
* ENDIF
|
||||
*
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
*
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h internal.h
|
||||
* $END$
|
||||
@@ -207,7 +207,7 @@ HARBOUR HB_FILE(void)
|
||||
_retl(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
_retl(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
#include <math.h>
|
||||
|
||||
#ifndef M_PI_2
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_STRCOUNT( void )
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_STRCSPN( void )
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
* $END$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_STRDIFF( void )
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <extend.h>
|
||||
#include "extend.h"
|
||||
|
||||
HARBOUR HB_GT_STREXPAND( void )
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user