diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 41aefc4a0f..1192fdcb61 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,33 @@ +19990803-12:22 GMT+1 Victor Szel + ! include/rddapi.h + ITEM -> PHB_ITEM + #ifdef COMMENT -> #ifdef 0 + + include/error.api + ERRORP definition added. + ! include/itemapi.h - HB_EVAL_PARAM_MAX_ set back to 9 + + include/*.api - #include all the things they include in original + CA-Cl*pper. (*.api, clipdefs.h) + Some other CA-Cl*pper compatible typedefs added. + + include/fm.api - Some Clipper'87 compatible memory alloc functions + added, also contained in CA-Cl*pper. + _exmgrab(), _exmback (anyone using these ? 8-) + ! include/filesys.h + source/rtl/files.c + ERRORP -> PHB_ITEM + * source/rtl/files.c -> source/rtl/filesys.c + source/rtl/Makefile + makefile.* + ! makefile.b31 - Fixed a bug where filesys.obj depended on extend.c + + include/filesys.api + include/extend.api - Some more CA-Cl*pper defines added. + * source/rtl/gt/gtwin.c + __CYGWIN32__ -> __CYGWIN__ + Since Cygnus's wrote somewhere that the "32" will be removed + in the future versions of Cygwin GCC. + * include/gtapi.h - Platform detection code moved to + include/hbsetup.h + BTW, it seems that it's not used anywhere yet. + 19990803-04:50 EDT Paul Tucker * source/rtl/codebloc.c source/rtl/memvars.c + #include "itemapi.h" diff --git a/harbour/include/assert.ch b/harbour/include/assert.ch index f9d138b43f..0bc8fb1c49 100644 --- a/harbour/include/assert.ch +++ b/harbour/include/assert.ch @@ -26,4 +26,3 @@ #endif /* NDEBUG */ #endif /* _ASSERT_CH */ - diff --git a/harbour/include/caundoc.api b/harbour/include/caundoc.api index 57a25bccfd..ce854f15e5 100644 --- a/harbour/include/caundoc.api +++ b/harbour/include/caundoc.api @@ -10,10 +10,11 @@ #ifndef HB_CAUNDOC_API_ #define HB_CAUNDOC_API_ -/* Undocumented TSUPPORT API */ - +#include "clipdefs.h" #include "filesys.h" +/* Undocumented TSUPPORT API */ + #define _tcreat hb_fsCreate #define _tunlink hb_fsDelete #define _topen hb_fsOpen diff --git a/harbour/include/clipdefs.h b/harbour/include/clipdefs.h index c1f50f6530..da60f0fb21 100644 --- a/harbour/include/clipdefs.h +++ b/harbour/include/clipdefs.h @@ -13,12 +13,21 @@ #include "hbdefs.h" -/* old types */ +/* Types moved here from *.api files */ + +typedef PHB_ITEM ERRORP; +typedef double XDOUBLE; +typedef PHB_ITEM ITEM; +typedef PEVALINFO EVALINFOP; + +/* Old types */ + typedef BYTE byte; typedef USHORT quant; typedef BOOL Boolean; -/* new types */ +/* New types */ + typedef BYTE* BYTEP; typedef BYTEP PBYTE; typedef BYTEP BYTEPP; diff --git a/harbour/include/dbstruct.ch b/harbour/include/dbstruct.ch index 522683f36b..73ef316076 100644 --- a/harbour/include/dbstruct.ch +++ b/harbour/include/dbstruct.ch @@ -15,4 +15,3 @@ #define DBS_ALEN 4 #endif /* _DBSTRUCT_CH */ - diff --git a/harbour/include/directry.ch b/harbour/include/directry.ch index c1f4832022..2edb3d4d0e 100644 --- a/harbour/include/directry.ch +++ b/harbour/include/directry.ch @@ -16,4 +16,3 @@ #define F_LEN 5 #endif /* _DIRECTRY_CH */ - diff --git a/harbour/include/error.api b/harbour/include/error.api index 2212890ebb..c7214f0e39 100644 Binary files a/harbour/include/error.api and b/harbour/include/error.api differ diff --git a/harbour/include/errorapi.h b/harbour/include/errorapi.h index 87b21ab338..6dddcbd9c7 100644 --- a/harbour/include/errorapi.h +++ b/harbour/include/errorapi.h @@ -107,4 +107,3 @@ extern void hb_errorInternal ( ULONG ulCode ); extern char * hb_errorNatDescription ( ULONG ulGenCode ); /* Reads error description in national language */ #endif /* HB_ERRORAPI_H_ */ - diff --git a/harbour/include/extend.api b/harbour/include/extend.api index 7617c7b90d..f9074cc45d 100644 --- a/harbour/include/extend.api +++ b/harbour/include/extend.api @@ -8,8 +8,26 @@ #ifndef HB_EXTEND_API_ #define HB_EXTEND_API_ +#include "clipdefs.h" #include "extend.h" +/* Compatible defines */ + +#define UNDEF IT_NIL +#define CHARACTER IT_STRING +#define NUMERIC IT_NUMERIC +#define LOGICAL IT_LOGICAL +#define DATE IT_DATE +#define ALIAS IT_ALIAS +#define MPTR IT_BYREF /* or'ed with type when passed by reference */ +#define MEMO IT_MEMO +#define WORD ( IT_INTEGER | IT_LONG ) +#define ARRAY IT_ARRAY +#define BLOCK IT_BLOCK +#define DOUBLE IT_DOUBLE + +/* Functions */ + #define _parc hb_parc #define _parclen hb_parclen #define _parcsiz hb_parcsiz diff --git a/harbour/include/filesys.api b/harbour/include/filesys.api index 87fa760c67..6f639d7415 100644 --- a/harbour/include/filesys.api +++ b/harbour/include/filesys.api @@ -48,7 +48,24 @@ #ifndef HB_FILESYS_API_ #define HB_FILESYS_API_ +#include "clipdefs.h" #include "filesys.h" +#include "error.api" + +/* Compatible types */ + +typedef FHANDLE fhandle; +typedef FHANDLE * FHANDLEP; + +/* DOS predefined standard handles */ + +#define STDIN 0 +#define STDOUT 1 +#define STDERR 2 +#define STDAUX 3 +#define STDPRN 4 + +/* Functions */ #define _fsChDir hb_fsChDir #define _fsChDrv hb_fsChDrv diff --git a/harbour/include/filesys.h b/harbour/include/filesys.h index b8d8f25396..0900202ee8 100644 --- a/harbour/include/filesys.h +++ b/harbour/include/filesys.h @@ -50,7 +50,6 @@ #include "extend.h" #include "fileio.ch" -typedef void * ERRORP; typedef int FHANDLE; typedef PBYTE BYTEP; @@ -64,7 +63,7 @@ extern BYTE hb_fsCurDrv ( void ); extern void hb_fsDelete ( BYTEP fpFilename ); extern USHORT hb_fsError ( void ); extern FHANDLE hb_fsExtOpen ( BYTEP fpFilename, BYTEP fpDefExt, - USHORT uiFlags, BYTEP fpPaths, ERRORP pError ); + USHORT uiFlags, BYTEP fpPaths, PHB_ITEM pError ); extern USHORT hb_fsIsDrv ( BYTE nDrive ); extern BOOL hb_fsLock ( FHANDLE hFileHandle, ULONG ulStart, ULONG ulLength, USHORT uiMode ); diff --git a/harbour/include/fm.api b/harbour/include/fm.api index 5e1f738b0d..a7f57c254a 100644 --- a/harbour/include/fm.api +++ b/harbour/include/fm.api @@ -8,10 +8,18 @@ #ifndef HB_FM_API_ #define HB_FM_API_ +#include "clipdefs.h" #include "extend.h" +/* Functions */ + #define _xalloc hb_xalloc #define _xgrab hb_xgrab #define _xfree hb_xfree +/* Nant*cket Clipper Summer 87 compatible */ + +#define _exmgrab hb_xgrab +#define _exmback(p, s) hb_xfree(p) + #endif /* HB_FM_API_ */ diff --git a/harbour/include/gt.api b/harbour/include/gt.api index 693710ff43..77bc860aca 100644 --- a/harbour/include/gt.api +++ b/harbour/include/gt.api @@ -8,6 +8,7 @@ #ifndef HB_GT_API_ #define HB_GT_API_ +#include "clipdefs.h" #include "gtapi.h" #define _gtBox hb_gtBox diff --git a/harbour/include/gtapi.h b/harbour/include/gtapi.h index 0a7185b7e1..f8800a8282 100644 --- a/harbour/include/gtapi.h +++ b/harbour/include/gtapi.h @@ -2,6 +2,38 @@ * $Id$ */ +/* + GTAPI.H; Screen drawing, cursor and keyboard routines for text mode + 16-bit and 32-bit MS-DOS, 16-bit and 32-bit OS/2, and 32-bit + Windows 95/NT applications. + + This module is based on VIDMGR by Andrew Clarke and modified for + the Harbour project + + GTAPI has been compiled and tested with the following C compilers: + + - Turbo C++ (16-bit) for DOS 3.0 + - Borland C++ (16-bit) for DOS 3.1 + - Borland C++ (16-bit) for DOS 4.5 + - Borland C++ (32-bit) for OS/2 1.0 + - Cygnus GNU C (32-bit) for Windows 95/NT b14.0 + - DJGPP GNU C (32-bit) for DOS 2.0 + - EMX GNU C (32-bit) for OS/2 & DOS 0.9b + - IBM VisualAge C/C++ 3.0 (32-bit) for OS/2 + - Microsoft C/C++ (16-bit) for OS/2 6.00a + - Microsoft C/C++ (16-bit) for DOS 8.00c + - Microsoft Quick C (16-bit) for DOS 2.50 + - Microsoft Visual C/C++ (16-bit) for DOS 1.52 + - Microsoft Visual C/C++ (32-bit) for Windows 95/NT 5.0 and 6.0 + - WATCOM C/C++ (16-bit & 32-bit) for DOS 9.5 + - WATCOM C/C++ (16-bit & 32-bit) for DOS 10.0 + - WATCOM C/C++ (32-bit) for OS/2 10.0 + - WATCOM C/C++ (32-bit) for Windows 95/NT 10.0 + - HI-TECH Pacific C (16-bit) for DOS 7.51 + - Symantec C/C++ (16-bit) for DOS 7.0 + - Zortech C/C++ (16-bit) for DOS 3.0r4 +*/ + #ifndef HB_GTAPI_H_ #define HB_GTAPI_H_ @@ -13,38 +45,6 @@ /* maximum length of color string */ #define CLR_STRLEN 64 -/* - * GTAPI.H; Screen drawing, cursor and keyboard routines for text mode - * 16-bit and 32-bit MS-DOS, 16-bit and 32-bit OS/2, and 32-bit - * Windows 95/NT applications. - * - * This module is based on VIDMGR by Andrew Clarke and modified for - * the Harbour project - * - * GTAPI has been compiled and tested with the following C compilers: - * - * - Turbo C++ (16-bit) for DOS 3.0 - * - Borland C++ (16-bit) for DOS 3.1 - * - Borland C++ (16-bit) for DOS 4.5 - * - Borland C++ (32-bit) for OS/2 1.0 - * - Cygnus GNU C (32-bit) for Windows 95/NT b14.0 - * - DJGPP GNU C (32-bit) for DOS 2.0 - * - EMX GNU C (32-bit) for OS/2 & DOS 0.9b - * - IBM VisualAge C/C++ 3.0 (32-bit) for OS/2 - * - Microsoft C/C++ (16-bit) for OS/2 6.00a - * - Microsoft C/C++ (16-bit) for DOS 8.00c - * - Microsoft Quick C (16-bit) for DOS 2.50 - * - Microsoft Visual C/C++ (16-bit) for DOS 1.52 - * - Microsoft Visual C/C++ (32-bit) for Windows 95/NT 5.0 and 6.0 - * - WATCOM C/C++ (16-bit & 32-bit) for DOS 9.5 - * - WATCOM C/C++ (16-bit & 32-bit) for DOS 10.0 - * - WATCOM C/C++ (32-bit) for OS/2 10.0 - * - WATCOM C/C++ (32-bit) for Windows 95/NT 10.0 - * - HI-TECH Pacific C (16-bit) for DOS 7.51 - * - Symantec C/C++ (16-bit) for DOS 7.0 - * - Zortech C/C++ (16-bit) for DOS 3.0r4 -*/ - /* Public interface. These should never change, only be added to. */ extern void hb_gtInit(void); @@ -80,30 +80,6 @@ extern int hb_gtWrite(char * fpStr, ULONG length); extern int hb_gtWriteAt(USHORT uiRow, USHORT uiCol, char * fpStr, ULONG length); extern int hb_gtWriteCon(char * fpStr, ULONG length); -#ifndef DOS -#if defined(_QC) || defined(__DOS__) || defined(MSDOS) || defined(__MSDOS__) -#define DOS -#endif -#endif - -#ifndef OS2 -#if defined(__OS2__) || defined(OS_2) -#define OS2 -#endif -#endif - -#ifndef EMX -#if defined(__EMX__) -#define EMX -#endif -#endif - -#ifndef WINNT -#if defined(__NT__) -#define WINNT -#endif -#endif - /* private interface listed below. these are common to all platforms */ extern void hb_gt_Init(void); diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index bb4e1369d7..c2102e7cee 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -88,4 +88,3 @@ extern FILENAME *_pFileName; extern DEFINES *topDefine; #endif /* HB_PP_H_ */ - diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index f969155ba1..d3a00ce5bc 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -136,4 +136,32 @@ #define OS_DOS_COMPATIBLE #endif +/* *********************************************************************** + * Platform detection + */ + +#ifndef DOS +#if defined(_QC) || defined(__DOS__) || defined(MSDOS) || defined(__MSDOS__) +#define DOS +#endif +#endif + +#ifndef OS2 +#if defined(__OS2__) || defined(OS_2) +#define OS2 +#endif +#endif + +#ifndef EMX +#if defined(__EMX__) +#define EMX +#endif +#endif + +#ifndef WINNT +#if defined(__NT__) +#define WINNT +#endif +#endif + #endif /* HB_SETUP_H_ */ diff --git a/harbour/include/item.api b/harbour/include/item.api index 69459040f5..4a04f3e70b 100644 --- a/harbour/include/item.api +++ b/harbour/include/item.api @@ -10,10 +10,6 @@ #include "itemapi.h" -#ifndef ITEM -#define ITEM PHB_ITEM -#endif - #define _evalLaunch hb_evalLaunch #define _evalNew hb_evalNew #define _evalPutParam hb_evalPutParam diff --git a/harbour/include/itemapi.h b/harbour/include/itemapi.h index 694a10b809..5673c52953 100644 --- a/harbour/include/itemapi.h +++ b/harbour/include/itemapi.h @@ -29,7 +29,7 @@ #include "extend.h" -#define HB_EVAL_PARAM_MAX_ 10 +#define HB_EVAL_PARAM_MAX_ 9 typedef struct { diff --git a/harbour/include/memoedit.ch b/harbour/include/memoedit.ch index 06ad8e0320..91dd450497 100644 --- a/harbour/include/memoedit.ch +++ b/harbour/include/memoedit.ch @@ -24,4 +24,3 @@ /* edit action corresponding to the key whose value is returned. */ #endif /* _MEMOEDIT_CH */ - diff --git a/harbour/include/rdd.api b/harbour/include/rdd.api index 7d2e64af43..b5751cf60c 100644 --- a/harbour/include/rdd.api +++ b/harbour/include/rdd.api @@ -8,6 +8,8 @@ #ifndef HB_RDD_API_ #define HB_RDD_API_ +#include "clipdefs.h" #include "rddapi.h" +#include "item.api" #endif /* HB_RDD_API_ */ diff --git a/harbour/include/rddapi.h b/harbour/include/rddapi.h index 97b0c4f50b..2437007604 100644 --- a/harbour/include/rddapi.h +++ b/harbour/include/rddapi.h @@ -12,8 +12,8 @@ typedef void * FARP; /* RDD method return codes */ -#define SUCCESS 0 -#define FAILURE 1 +#define SUCCESS 0 +#define FAILURE 1 /* Flags for DBTRANSINFO */ @@ -163,28 +163,28 @@ typedef DBOPENINFO * LPDBOPENINFO; * La estructura de creaci¢n condicional de orden */ -#ifdef COMMENT +#ifdef 0 typedef struct _DBORDERCONDINFO { - BOOL fActive; - BYTEP abFor; - ITEM itmCobFor; - ITEM itmCobWhile; - ITEM itmCobEval; - LONG lStep; - LONG lStartRecno; - LONG lNextCount; - LONG lRecno; - BOOL fRest; - BOOL fDescending; - BOOL fScoped; - BOOL fAll; + BOOL fActive; + BYTEP abFor; + PHB_ITEM itmCobFor; + PHB_ITEM itmCobWhile; + PHB_ITEM itmCobEval; + LONG lStep; + LONG lStartRecno; + LONG lNextCount; + LONG lRecno; + BOOL fRest; + BOOL fDescending; + BOOL fScoped; + BOOL fAll; - BOOL fAdditive; - BOOL fUseCurrent; - BOOL fCustom; - BOOL fNoOptimize; - FARP lpvCargo; + BOOL fAdditive; + BOOL fUseCurrent; + BOOL fCustom; + BOOL fNoOptimize; + FARP lpvCargo; } DBORDERCONDINFO; @@ -199,19 +199,19 @@ typedef DBORDERCONDINFO * LPDBORDERCONDINFO; * La estructura de creaci¢n de orden */ -#ifdef COMMENT +#ifdef 0 typedef struct { LPDBORDERCONDINFO lpdbOrdCondInfo; /* Informaci¢n condicional */ BYTEP abBagName; /* Nombre del contenedor de ¢rdenes */ BYTEP atomBagName; - ITEM itmOrder; + PHB_ITEM itmOrder; BOOL fUnique; /* Indicador que determina si todas */ /* las claves con £nicas */ - ITEM itmCobExpr; /* Bloque de c¢digo conteniendo la */ + PHB_ITEM itmCobExpr; /* Bloque de c¢digo conteniendo la */ /* expresi¢n clave */ - ITEM abExpr; /* Cadena conteniendo la expresi¢n clave */ + PHB_ITEM abExpr; /* Cadena conteniendo la expresi¢n clave */ } DBORDERCREATEINFO; typedef DBORDERCREATEINFO * LPDBORDERCREATEINFO; @@ -225,17 +225,17 @@ typedef DBORDERCREATEINFO * LPDBORDERCREATEINFO; * La estructura de Set Index */ -#ifdef COMMENT +#ifdef 0 typedef struct { - ITEM atomBagName; /* Nombre del contenedor de ¢rdenes */ - ITEM itmOrder; /* Nombre o n£mero de la orden */ + PHB_ITEM atomBagName; /* Nombre del contenedor de ¢rdenes */ + PHB_ITEM itmOrder; /* Nombre o n£mero de la orden */ - ITEM itmCobExpr; /* Bloque de c¢digo conteniendo la expresi¢n clave */ + PHB_ITEM itmCobExpr; /* Bloque de c¢digo conteniendo la expresi¢n clave */ - ITEM itmResult; /* Resultado de la operaci¢n */ + PHB_ITEM itmResult; /* Resultado de la operaci¢n */ - BOOL fAllTags; /* Indicador de todos los tags a abrir */ + BOOL fAllTags; /* Indicador de todos los tags a abrir */ } DBORDERINFO; @@ -250,21 +250,21 @@ typedef DBORDERINFO * LPDBORDERINFO; * La estructura de  mbito */ -#ifdef COMMENT +#ifdef 0 typedef struct { - ITEM itmCobFor; /* Bloque de c¢digo representaci¢n de una cl usula FOR */ - ITEM lpstrFor; /* Cadena representaci¢n de una cl usula FOR */ - ITEM itmCobWhile; /* Bloque de c¢digo representaci¢n de una cl usula WHILE */ - ITEM lpstrWhile; /* Cadena representaci¢n de una cl usula WHILE */ - ITEM lNext; - ITEM itmRecID; - ITEM fRest; /* TRUE si se empieza desde el registro actual */ + PHB_ITEM itmCobFor; /* Bloque de c¢digo representaci¢n de una cl usula FOR */ + PHB_ITEM lpstrFor; /* Cadena representaci¢n de una cl usula FOR */ + PHB_ITEM itmCobWhile; /* Bloque de c¢digo representaci¢n de una cl usula WHILE */ + PHB_ITEM lpstrWhile; /* Cadena representaci¢n de una cl usula WHILE */ + PHB_ITEM lNext; + PHB_ITEM itmRecID; + PHB_ITEM fRest; /* TRUE si se empieza desde el registro actual */ - BOOL fIgnoreFilter; - BOOL fIncludeDeleted; - BOOL fLast; - BOOL fIgnoreDuplicates; + BOOL fIgnoreFilter; + BOOL fIncludeDeleted; + BOOL fLast; + BOOL fIgnoreDuplicates; } DBSCOPEINFO; @@ -279,12 +279,12 @@ typedef DBSCOPEINFO * LPDBSCOPEINFO; * La estructura de filtro */ -#ifdef COMMENT +#ifdef 0 typedef struct { - ITEM itmCobExpr; /* Bloque representaci¢n de la expresi¢n FILTER */ - ITEM abFilterText; /* Cadena representaci¢n de la expresi¢n FILTER */ - BOOL fFilter; + PHB_ITEM itmCobExpr; /* Bloque representaci¢n de la expresi¢n FILTER */ + PHB_ITEM abFilterText; /* Cadena representaci¢n de la expresi¢n FILTER */ + BOOL fFilter; } DBFILTERINFO; typedef DBFILTERINFO * LPDBFILTERINFO; @@ -298,11 +298,11 @@ typedef DBFILTERINFO * LPDBFILTERINFO; * La estrurcura de relaciones */ -#ifdef COMMENT +#ifdef 0 typedef struct _DBRELINFO { - ITEM itmCobExpr; /* Bloque representaci¢n de la clave relacional SEEK */ - ITEM abKey; /* Cadena representaci¢n de la clave relacional SEEK */ + PHB_ITEM itmCobExpr; /* Bloque representaci¢n de la clave relacional SEEK */ + PHB_ITEM abKey; /* Cadena representaci¢n de la clave relacional SEEK */ struct _AREA *lpaParent; /* El padre de esta relaci¢n */ struct _AREA *lpaChild; /* Los hijos del padre */ @@ -325,10 +325,10 @@ typedef DBRELINFO * LPDBRELINFO; * en cada registro del  rea de trabajo */ -#ifdef COMMENT +#ifdef 0 typedef struct { - ITEM itmBlock; /* El bloque a evaluar */ + PHB_ITEM itmBlock; /* El bloque a evaluar */ DBSCOPEINFO dbsci; /* Ambito que limita la evaluaci¢n */ } DBEVALINFO; @@ -345,7 +345,7 @@ typedef DBEVALINFO * LPDBEVALINFO; * de una base de datos a otra; utilizada por DBTRANSINFO */ -#ifdef COMMENT +#ifdef 0 typedef struct { USHORT uiSource; /* N£mero de ¡ndice de campo del fuente */ @@ -365,7 +365,7 @@ typedef DBTRANSITEM * LPDBTRANSITEM; *  rea de trabajo a otra */ -#ifdef COMMENT +#ifdef 0 typedef struct { struct _AREA *lpaSource; /* Puntero al  rea de trabajo fuente */ @@ -392,7 +392,7 @@ typedef DBTRANSINFO * LPDBTRANSINFO; * orden de la ordenaci¢n. */ -#ifdef COMMENT +#ifdef 0 typedef struct { USHORT uiField; /* Indice dentro de la estructura */ @@ -421,7 +421,7 @@ typedef DBSORTITEM * LPDBSORTITEM; * Informaci¢n para la ordenaci¢n f¡sica en un  rea de trabajo */ -#ifdef COMMENT +#ifdef 0 typedef struct { DBTRANSINFO dbtri; /* Informaci¢n de transferencia del  rea de */ @@ -444,7 +444,7 @@ typedef DBSORTINFO * LPDBSORTINFO; * Contiene informaci¢n de bloqueos de registro o fichero */ -#ifdef COMMENT +#ifdef 0 typedef struct { ULONG itmRecID; @@ -497,16 +497,16 @@ typedef struct _AREA { struct _RDDFUNCS * lprfsHost; /* Virtual method table for this workarea */ - USHORT uiArea; /* The number assigned to this workarea */ -// FARP atomAlias; /* Pointer to the alias symbol for this workarea */ + USHORT uiArea; /* The number assigned to this workarea */ +// FARP atomAlias; /* Pointer to the alias symbol for this workarea */ -// USHORT uiFieldExtent; /* Total number of fields allocated */ - USHORT uiFieldCount; /* Total number of fields used */ - LPFIELD lpFields; /* Pointer to an array of fields */ +// USHORT uiFieldExtent; /* Total number of fields allocated */ + USHORT uiFieldCount; /* Total number of fields used */ + LPFIELD lpFields; /* Pointer to an array of fields */ -// FARP lpFieldExtents; /* Void ptr for additional field properties */ +// FARP lpFieldExtents; /* Void ptr for additional field properties */ -// ITEM valResult; /* All purpose result holder */ +// PHB_ITEM valResult; /* All purpose result holder */ // BOOL fTop; /* TRUE if "top" */ // BOOL fBottom; /* TRUE if "bottom" */ @@ -547,7 +547,7 @@ typedef USHORT ( * DBENTRYP_SI )( AREAP area, USHORT index, PHB_ITEM param ); typedef USHORT ( * DBENTRYP_VP )( AREAP area, LPDBOPENINFO param ); typedef USHORT ( * DBENTRYP_SP )( AREAP area, USHORT * param ); -#ifdef COMMENT +#ifdef 0 typedef USHORT ( * DBENTRYP_S )( AREAP area, USHORT param); typedef USHORT ( * DBENTRYP_LP )( AREAP area, LONGP param); typedef USHORT ( * DBENTRYP_PP )( AREAP area, FARPP param); @@ -556,8 +556,8 @@ typedef USHORT ( * DBENTRYP_SVPB )( AREAP area, USHORT index, FARP param, USHORT typedef USHORT ( * DBENTRYP_VPL )( AREAP area, FARP p1, LONG p2); typedef USHORT ( * DBENTRYP_VPLP )( AREAP area, FARP p1, LONGP p2); typedef USHORT ( * DBENTRYP_LSP )( AREAP area, LONG p1, USHORTP p2); -typedef USHORT ( * DBENTRYP_SSI )( AREAP area, USHORT p1, USHORT p2, ITEM p3); -typedef USHORT ( * DBENTRYP_ISI )( AREAP area, ITEM p1, USHORT p2, ITEM p3); +typedef USHORT ( * DBENTRYP_SSI )( AREAP area, USHORT p1, USHORT p2, PHB_ITEM p3); +typedef USHORT ( * DBENTRYP_ISI )( AREAP area, PHB_ITEM p1, USHORT p2, PHB_ITEM p3); typedef USHORT ( * DBENTRYP_VSP )( AREAP area, USHORT action, LONG lRecord); #endif @@ -861,7 +861,7 @@ typedef RDDFUNCS * PRDDFUNCS; /*--------------------* M‚todos SUPER *------------------------*/ -#ifdef COMMENT +#ifdef 0 /* M‚todos de movimiento y posicionamiento */ diff --git a/harbour/include/vm.api b/harbour/include/vm.api index dd085f987e..abec727fce 100644 --- a/harbour/include/vm.api +++ b/harbour/include/vm.api @@ -8,6 +8,7 @@ #ifndef HB_VM_API_ #define HB_VM_API_ +#include "clipdefs.h" #include "extend.h" typedef void * HANDLE; @@ -42,4 +43,3 @@ typedef void * HANDLE; #define _xvheapunlock(h, offset) /* dummy */ #endif /* HB_VM_API_ */ - diff --git a/harbour/makefile.b31 b/harbour/makefile.b31 index ef3189bca2..aa643326d4 100644 --- a/harbour/makefile.b31 +++ b/harbour/makefile.b31 @@ -17,7 +17,7 @@ PROJECT: harbour.lib hbtools.lib terminal.lib libs\win16\terminal.lib harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj copyfile.obj \ dates.obj descend.obj devoutp.obj dir.obj dynsym.obj environ.obj \ error.obj errorapi.obj errorsys.obj extend.obj \ - files.obj gtapi.obj hardcr.obj initsymb.obj itemapi.obj \ + filesys.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 symbols.obj \ tclass.obj transfrm.obj @@ -55,7 +55,7 @@ error.obj : error.prg extend.h hbdefs.h init.h pcode.h errorapi.obj : errorapi.c extend.h hbdefs.h ctoharb.h errorsys.obj : errorsys.prg extend.h hbdefs.h init.h pcode.h extend.obj : extend.c extend.h hbdefs.h set.h dates.h -files.obj : extend.c extend.h hbdefs.h +filesys.obj : filesys.c extend.h hbdefs.h fm.obj : fm.c extend.h hbdefs.h gtapi.obj : gtapi.c extend.h hbdefs.h gtapi.h hardcr.obj : hardcr.c extend.h hbdefs.h diff --git a/harbour/makefile.b32 b/harbour/makefile.b32 index 7457b5daf4..31bad9f486 100644 --- a/harbour/makefile.b32 +++ b/harbour/makefile.b32 @@ -42,7 +42,7 @@ error.obj : error.c extend.h hbdefs.h errorapi.obj : errorapi.c extend.h hbdefs.h errorsys.obj : errorsys.c extend.h hbdefs.h extend.obj : extend.c extend.h hbdefs.h -files.obj : files.c extend.h hbdefs.h +filesys.obj : filesys.c extend.h hbdefs.h fm.obj : fm.c extend.h hbdefs.h hardcr.obj : hardcr.c extend.h hbdefs.h hb_f.obj : hb_f.c extend.h hbdefs.h diff --git a/harbour/makefile.b40 b/harbour/makefile.b40 index 6fa2b46b7c..3f51ce617f 100644 --- a/harbour/makefile.b40 +++ b/harbour/makefile.b40 @@ -41,7 +41,7 @@ error.obj : error.c extend.h hbdefs.h errorapi.obj : errorapi.c extend.h hbdefs.h errorsys.obj : errorsys.c extend.h hbdefs.h extend.obj : extend.c extend.h hbdefs.h -files.obj : files.c extend.h hbdefs.h +filesys.obj : filesys.c extend.h hbdefs.h fm.obj : fm.c extend.h hbdefs.h hardcr.obj : hardcr.c extend.h hbdefs.h hb_f.obj : hb_f.c extend.h hbdefs.h diff --git a/harbour/makefile.vc b/harbour/makefile.vc index 7ee4d9c801..a35f6abebd 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -325,7 +325,7 @@ $(OBJ_DIR)\error.obj : $(RTL_DIR)\error.c $(OBJ_DIR)\extend.obj : $(RTL_DIR)\extend.c $(CC) $(CLIBFLAGS) -Fo$@ $** -$(OBJ_DIR)\files.obj : $(RTL_DIR)\files.c +$(OBJ_DIR)\files.obj : $(RTL_DIR)\filesys.c $(CC) $(CLIBFLAGS) -Fo$@ $** $(OBJ_DIR)\fm.obj : $(RTL_DIR)\fm.c diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 8a5d3674a2..3d66caee25 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -17,7 +17,7 @@ C_SOURCES=\ environ.c \ errorapi.c \ extend.c \ - files.c \ + filesys.c \ fm.c \ gtapi.c \ hardcr.c \ diff --git a/harbour/source/rtl/files.c b/harbour/source/rtl/filesys.c similarity index 99% rename from harbour/source/rtl/files.c rename to harbour/source/rtl/filesys.c index 2f41c220a8..f6e16f1809 100644 --- a/harbour/source/rtl/files.c +++ b/harbour/source/rtl/filesys.c @@ -2,10 +2,10 @@ * $Id$ */ +#include #include "extend.h" #include "init.h" #include "filesys.h" -#include #include "errorapi.h" #if defined(__CYGWIN__) @@ -558,7 +558,7 @@ USHORT hb_fsIsDrv ( BYTE nDrive ) /* TODO: Implement hb_fsExtOpen */ FHANDLE hb_fsExtOpen( BYTEP fpFilename, BYTEP fpDefExt, - USHORT uiFlags, BYTEP fpPaths, ERRORP pError ) + USHORT uiFlags, BYTEP fpPaths, PHB_ITEM pError ) { return FS_ERROR; } diff --git a/harbour/source/rtl/gt/gtwin.c b/harbour/source/rtl/gt/gtwin.c index 6eb0f4798f..4986c7bf61 100644 --- a/harbour/source/rtl/gt/gtwin.c +++ b/harbour/source/rtl/gt/gtwin.c @@ -24,7 +24,7 @@ #include "gtapi.h" #if ! defined(__GNUC__) -#ifdef __CYGWIN32__ +#ifdef __CYGWIN__ typedef WORD far *LPWORD; #endif #endif /* __GNUC__ */ @@ -158,21 +158,21 @@ int hb_gt_GetCursorStyle(void) switch(cci.dwSize) { case 12: - rc=SC_NORMAL; - break; + rc=SC_NORMAL; + break; case 99: - rc=SC_INSERT; - break; + rc=SC_INSERT; + break; case 49: - rc=SC_SPECIAL1; - break; + rc=SC_SPECIAL1; + break; - /* TODO: cannot tell if the block is upper or lower for cursor */ + /* TODO: cannot tell if the block is upper or lower for cursor */ /* Answer: Supposed to be upper third, but ms don't support it. */ default: - rc=SC_SPECIAL2; + rc=SC_SPECIAL2; } } @@ -221,10 +221,10 @@ void hb_gt_GetText(char cTop, char cLeft, char cBottom, char cRight, char *dest) ReadConsoleOutputAttribute(HOutput, pwattr, width, coord, &len); for (i = 0; i < width; i++) { - *dest = *(pstr + i); - dest++; - *dest = (char)*(pwattr + i)&0xff; - dest++; + *dest = *(pstr + i); + dest++; + *dest = (char)*(pwattr + i)&0xff; + dest++; } } hb_xfree(pwattr); @@ -255,10 +255,10 @@ void hb_gt_PutText(char cTop, char cLeft, char cBottom, char cRight, char *srce) { for (i = 0; i < width; i++) { - *(pstr + i) = *srce; - srce++; - *(pwattr + i) = (WORD)((unsigned char)*srce)&0xff; - srce++; + *(pstr + i) = *srce; + srce++; + *(pwattr + i) = (WORD)((unsigned char)*srce)&0xff; + srce++; } coord.X = (DWORD) (cLeft); coord.Y = (DWORD) (y); @@ -444,7 +444,7 @@ void hb_gt_DispEnd(void) coBuf, /* col/row size of source buffer */ coDest, /* upper-left cell to write data from in src */ &srWin); /* screen buffer rect to write data to */ - + hb_xfree(pCharInfo); } diff --git a/harbour/source/rtl/memvars.c b/harbour/source/rtl/memvars.c index 3b1539fb94..23c48aa5a4 100644 --- a/harbour/source/rtl/memvars.c +++ b/harbour/source/rtl/memvars.c @@ -35,9 +35,9 @@ #include #include "extend.h" +#include "itemapi.h" #include "errorapi.h" #include "error.ch" -#include "itemapi.h" #define VS_PRIVATE 64 #define VS_PUBLIC 128 diff --git a/harbour/tests/working/rtl_test.prg b/harbour/tests/working/rtl_test.prg index 8bc6f781d0..c8c41e4359 100644 --- a/harbour/tests/working/rtl_test.prg +++ b/harbour/tests/working/rtl_test.prg @@ -110,14 +110,14 @@ FUNCTION Main() TEST_LINE( PadL("abcdef", -5) , "" ) TEST_LINE( PadL("abcdef", 0) , "" ) - TEST_LINE( PadL("abcdef", 5) , "abcde" ) /* QUESTION: CA-Clipper "bug", should return: "bcdef" ? */ + TEST_LINE( PadL("abcdef", 5) , "abcde" ) /* QUESTION: CA-Cl*pper "bug", should return: "bcdef" ? */ TEST_LINE( PadL("abcdef", 10) , " abcdef" ) TEST_LINE( PadL("abcdef", 10, "1") , "1111abcdef" ) TEST_LINE( PadL("abcdef", 10, "12") , "1111abcdef" ) TEST_LINE( PadC("abcdef", -5) , "" ) TEST_LINE( PadC("abcdef", 0) , "" ) - TEST_LINE( PadC("abcdef", 2) , "ab" ) /* QUESTION: CA-Clipper "bug", should return: "cd" ? */ + TEST_LINE( PadC("abcdef", 2) , "ab" ) /* QUESTION: CA-Cl*pper "bug", should return: "cd" ? */ TEST_LINE( PadC("abcdef", 5) , "abcde" ) TEST_LINE( PadC("abcdef", 10) , " abcdef " ) TEST_LINE( PadC("abcdef", 10, "1") , "11abcdef11" )