2005-10-12 02:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/config/global.cf
    + added HB_DB_DRVEXT envvar support for additional RDDs

  * harbour/config/linux/gcc.cf
  + harbour/config/linux/gpp.cf
    + added GNU C++ support

  * harbour/config/linux/owatcom.cf
  * harbour/contrib/btree/hb_btree.c
  * harbour/contrib/libct/ct.h
  * harbour/contrib/libct/ctc.c
  * harbour/contrib/odbc/odbc.c
  * harbour/contrib/rdd_ads/adsfunc.c
  * harbour/include/hbapi.h
  * harbour/include/hbapierr.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapilng.h
  * harbour/source/compiler/harbour.c
  * harbour/source/rtl/console.c
  * harbour/source/rtl/datec.c
  * harbour/source/rtl/diskspac.c
  * harbour/source/rtl/errorapi.c
  * harbour/source/rtl/errorint.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rtl/fssize.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/isprint.c
  * harbour/source/rtl/natmsg.c
  * harbour/source/rtl/philes.c
  * harbour/source/rtl/setcolor.c
  * harbour/source/rtl/spfiles.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/runner.c
    * fixed for popper compilation with GNU C++ and OpenWatcom on Linux
This commit is contained in:
Przemyslaw Czerpak
2005-10-12 00:30:49 +00:00
parent 252a1e65cb
commit 23172a52ce
35 changed files with 187 additions and 125 deletions

View File

@@ -8,6 +8,47 @@
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2005-10-12 02:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/global.cf
+ added HB_DB_DRVEXT envvar support for additional RDDs
- harbour/source/codepage/cdpruwin.c
* harbour/config/linux/gcc.cf
+ harbour/config/linux/gpp.cf
+ added GNU C++ support
- harbour/source/codepage/cdpslwin.c
* harbour/config/linux/owatcom.cf
* harbour/contrib/btree/hb_btree.c
* harbour/contrib/libct/ct.h
* harbour/contrib/libct/ctc.c
* harbour/contrib/odbc/odbc.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/include/hbapi.h
* harbour/include/hbapierr.h
* harbour/include/hbapigt.h
* harbour/include/hbapilng.h
* harbour/source/compiler/harbour.c
* harbour/source/rtl/console.c
* harbour/source/rtl/datec.c
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/isprint.c
* harbour/source/rtl/natmsg.c
* harbour/source/rtl/philes.c
* harbour/source/rtl/setcolor.c
* harbour/source/rtl/spfiles.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtsln/kbsln.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
* harbour/source/vm/runner.c
* fixed for popper compilation with GNU C++ and OpenWatcom on Linux
2005-10-05 15:05 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* source/common/expropt2.c
* fixed bug in ASC() optimization (when character code > 127)

View File

@@ -13,6 +13,10 @@ HB_DB_DRIVERS=\
hbsix \
hsx \
ifneq ($(HB_DB_DRVEXT),)
HB_DB_DRIVERS += $(HB_DB_DRVEXT)
endif
ifeq ($(HB_BIN_COMPILE),)
HB_BIN_COMPILE := $(TOP)$(ROOT)source/compiler/$(HB_ARCH)
endif

View File

@@ -4,12 +4,18 @@
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
ifeq ($(HB_COMPILER),gpp)
HB_CMP = g++
else
HB_CMP = $(HB_COMPILER)
endif
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
CC = $(HB_CCACHE) gcc
CC = $(HB_CCACHE) $(HB_CMP)
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
@@ -26,7 +32,7 @@ CFLAGS += -DSIMPLEX
endif
LD = $(HB_CCACHE) gcc
LD = $(HB_CCACHE) $(HB_CMP)
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.

View File

@@ -0,0 +1,5 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/gcc.cf

View File

@@ -28,7 +28,7 @@ CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0
CPPFLAGS += -i. -i$(TOP)include -i$(TOP)$(ROOT)include -iinclude
ifneq ($(HB_LIB_COMPILE),)
CPPFLAGS += -i$(HB_INC_COMPILE)
CPPFLAGS += -i$(HB_INC_COMPILE)
endif
ifeq ($(HB_LEX),SIMPLEX)

View File

@@ -267,28 +267,28 @@ typedef struct ioBuffer_tag
BYTE Buffer[ 1 ];
} ioBuffer_T;
typedef enum BTreeFlags_enum {
typedef int hb_BTreeFlags_T;
IsNormal = 0,
/* btree file access flags */
IsReadOnly = HB_BTREE_READONLY,
IsExclusive = HB_BTREE_EXCLUSIVE,
IsShared = HB_BTREE_SHARED,
#define IsNormal 0
/* btree control flags */
IsUnique = HB_BTREE_UNIQUE,
IsCaseLess = HB_BTREE_CASELESS,
IsInMemory = HB_BTREE_INMEMORY,
/* btree file access flags */
#define IsReadOnly HB_BTREE_READONLY
#define IsExclusive HB_BTREE_EXCLUSIVE
#define IsShared HB_BTREE_SHARED
/* internal flags */
IsRecordFound = 1 << 16,
IsDuplicateKey = 1 << 17,
IsMultiBuffers = 1 << 18,
IsOptimized = 1 << 19,
} hb_BTreeFlags_T;
/* btree control flags */
#define IsUnique HB_BTREE_UNIQUE
#define IsCaseLess HB_BTREE_CASELESS
#define IsInMemory HB_BTREE_INMEMORY
#define GETFLAG( pBTree, flag ) ( BOOL )( ( ( pBTree )->ulFlags & ( flag ) ) == ( flag ) )
/* internal flags */
#define IsRecordFound ( 1 << 16 )
#define IsDuplicateKey ( 1 << 17 )
#define IsMultiBuffers ( 1 << 18 )
#define IsOptimized ( 1 << 19 )
#define GETFLAG( pBTree, flag ) ( BOOL )( ( ( int ) ( pBTree )->ulFlags & ( flag ) ) == ( flag ) )
#define SETFLAG( pBTree, flag ) ( ( pBTree )->ulFlags |= ( flag ) )
#define RESETFLAG( pBTree, flag ) ( ( pBTree )->ulFlags &= ~( flag ) )
@@ -932,7 +932,7 @@ static void KeySet( struct hb_BTree * pBTree, ULONG ulNode, int iPosition, hb_Ke
static LONG KeyCompare( struct hb_BTree * pBTree, hb_KeyData_T *left, hb_KeyData_T *right )
{
/* LONG lResults = strnicmp( left->szKey, right->szKey, pBTree->usKeySize );*/
LONG lResults = ( pBTree->pStrCompare )( left->szKey, right->szKey, pBTree->usKeySize );
LONG lResults = ( pBTree->pStrCompare )( ( char * ) left->szKey, ( char * ) right->szKey, pBTree->usKeySize );
if ( lResults == 0 && GETFLAG( pBTree, IsUnique ) )
{
@@ -1617,7 +1617,7 @@ struct hb_BTree * hb_BTreeNew( BYTE * FileName, USHORT usPageSize, USHORT usKeyS
}
}
pBTree->szFileName = hb_strdup( ( char * ) FileName );
pBTree->szFileName = ( BYTE * ) hb_strdup( ( char * ) FileName );
}
pBTree->ulFreePage = NULLPAGE;
@@ -1663,7 +1663,7 @@ struct hb_BTree * hb_BTreeNew( BYTE * FileName, USHORT usPageSize, USHORT usKeyS
}
else /* IsInMemory == TRUE */
{
pBTree->ulFlags &= ~HB_BTREE_UNIQUE; /* clear this flag */
RESETFLAG( pBTree, HB_BTREE_UNIQUE ); /* clear this flag */
}
return pBTree;
@@ -1678,7 +1678,7 @@ struct hb_BTree *hb_BTreeOpen( BYTE *FileName, ULONG ulFlags, USHORT usBuffers )
HB_TRACE( HB_TR_DEBUG, ( SRCLINENO ) );
pBTree->szFileName = hb_strdup( ( char * ) FileName );
pBTree->szFileName = ( BYTE * ) hb_strdup( ( char * ) FileName );
pBTree->hFile = hb_fsOpen( pBTree->szFileName, FO_READWRITE );
if ( pBTree->hFile == -1 )
{
@@ -1717,7 +1717,7 @@ struct hb_BTree *hb_BTreeOpen( BYTE *FileName, ULONG ulFlags, USHORT usBuffers )
HB_SYMBOL_UNUSED( ulFlags );
ioBufferAlloc( pBTree, usBuffers );
pBTree->ulFlags &= ~HB_BTREE_INMEMORY; /* clear this flag */
RESETFLAG( pBTree, HB_BTREE_INMEMORY ); /* clear this flag */
pBTree->IsDirtyFlagAssignment = TRUE; /* replaces const value for assignment */
if ( GETFLAG( pBTree, IsCaseLess ) )

View File

@@ -75,12 +75,12 @@
/* CT subsystem error throwing functions */
extern USHORT ct_error (USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
char * szDescription, char * szOperation, USHORT uiOsCode,
USHORT uiFlags, ULONG uiArgCount, ...);
const char * szDescription, const char * szOperation,
USHORT uiOsCode, USHORT uiFlags, ULONG uiArgCount, ...);
extern PHB_ITEM ct_error_subst (USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
char * szDescription, char * szOperation, USHORT uiOsCode,
USHORT uiFlags, ULONG uiArgCount, ...);
const char * szDescription, const char * szOperation,
USHORT uiOsCode, USHORT uiFlags, ULONG uiArgCount, ...);
/* set argument error behaviour */
extern void ct_setargerrormode (int iMode);

View File

@@ -60,8 +60,8 @@
/* throwing a CT-subsystem error without value substitution
- function adapted from errorapi.c */
USHORT ct_error (USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
char * szDescription, char * szOperation, USHORT uiOsCode,
USHORT uiFlags, ULONG uiArgCount, ...)
const char * szDescription, const char * szOperation,
USHORT uiOsCode, USHORT uiFlags, ULONG uiArgCount, ...)
{
USHORT uiAction;
PHB_ITEM pError;
@@ -117,8 +117,8 @@ USHORT ct_error (USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
/* throwing a CT-subsystem error with value substitution
- function adapted from errorapi.c */
PHB_ITEM ct_error_subst (USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode,
char * szDescription, char * szOperation, USHORT uiOsCode,
USHORT uiFlags, ULONG uiArgCount, ...)
const char * szDescription, const char * szOperation,
USHORT uiOsCode, USHORT uiFlags, ULONG uiArgCount, ...)
{
PHB_ITEM pRetVal;
PHB_ITEM pError;

View File

@@ -77,9 +77,15 @@
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#if defined(HB_OS_LINUX) && defined(__WATCOMC__)
#include "/usr/include/sql.h"
#include "/usr/include/sqlext.h"
#include "/usr/include/sqltypes.h"
#else
#include <sql.h>
#include <sqlext.h>
#include <sqltypes.h>
#endif
HB_FUNC( SQLALLOCEN ) /* HB_SQLALLOCENV( @hEnv ) --> nRetCode */
{
@@ -111,7 +117,7 @@ HB_FUNC( SQLDRIVERC ) /* HB_SQLDRIVERCONNECT( hDbc, @ cConnectString, lPrompt )
#elif defined(HB_OS_UNIX)
RETCODE ret = SQLDriverConnect( ( HDBC ) hb_parnl( 1 ),
0,
hb_parc( 2 ), strlen(hb_parc(2)),
( SQLCHAR * ) hb_parc( 2 ), strlen(hb_parc(2)),
bBuffer1, 1024, &wLen, SQL_DRIVER_COMPLETE ) ;
#endif

View File

@@ -1569,7 +1569,7 @@ HB_FUNC( ADSREINDEX )
if( pArea )
ulRetVal = AdsReindex( pArea->hTable);
else
ulRetVal = AdsReindex( -1 ); // should return error!
ulRetVal = AdsReindex( ( ADSHANDLE ) -1 ); // should return error!
if( ulRetVal == AE_SUCCESS )
hb_retl( 1 );

View File

@@ -588,10 +588,10 @@ extern HB_ITEM_PTR hb_memvarDetachLocal( HB_ITEM_PTR pLocal ); /* Detach a local
extern void hb_conInit( void ); /* initialize the console API system */
extern void hb_conRelease( void ); /* release the console API system */
extern char * hb_conNewLine( void ); /* retrieve a pointer to a static buffer containing new-line characters */
extern void hb_conOutStd( char * pStr, ULONG ulLen ); /* output an string to STDOUT */
extern void hb_conOutErr( char * pStr, ULONG ulLen ); /* output an string to STDERR */
extern void hb_conOutStd( const char * pStr, ULONG ulLen ); /* output an string to STDOUT */
extern void hb_conOutErr( const char * pStr, ULONG ulLen ); /* output an string to STDERR */
extern USHORT hb_conSetCursor( BOOL bSetCursor, USHORT usNewCursor ); /* retrieve and optionally set cursor shape */
extern char * hb_conSetColor( char * szColor ); /* retrieve and optionally set console color */
extern char * hb_conSetColor( const char * szColor ); /* retrieve and optionally set console color */
extern void hb_conXSaveRestRelease( void ); /* release the save/restore API */
/* compiler and macro compiler */

View File

@@ -108,15 +108,15 @@ extern USHORT hb_errGetTries ( PHB_ITEM pError );
extern USHORT hb_errLaunch ( PHB_ITEM pError );
extern PHB_ITEM hb_errNew ( void );
extern PHB_ITEM hb_errPutArgs ( PHB_ITEM pError, ULONG ulArgCount, ... );
extern PHB_ITEM hb_errPutDescription ( PHB_ITEM pError, char * szDescription );
extern PHB_ITEM hb_errPutFileName ( PHB_ITEM pError, char * szFileName );
extern PHB_ITEM hb_errPutDescription ( PHB_ITEM pError, const char * szDescription );
extern PHB_ITEM hb_errPutFileName ( PHB_ITEM pError, const char * szFileName );
extern PHB_ITEM hb_errPutFlags ( PHB_ITEM pError, USHORT uiFlags );
extern PHB_ITEM hb_errPutGenCode ( PHB_ITEM pError, USHORT uiGenCode );
extern PHB_ITEM hb_errPutOperation ( PHB_ITEM pError, char * szOperation );
extern PHB_ITEM hb_errPutOperation ( PHB_ITEM pError, const char * szOperation );
extern PHB_ITEM hb_errPutOsCode ( PHB_ITEM pError, USHORT uiOsCode );
extern PHB_ITEM hb_errPutSeverity ( PHB_ITEM pError, USHORT uiSeverity );
extern PHB_ITEM hb_errPutSubCode ( PHB_ITEM pError, USHORT uiSubCode );
extern PHB_ITEM hb_errPutSubSystem ( PHB_ITEM pError, char * szSubSystem );
extern PHB_ITEM hb_errPutSubSystem ( PHB_ITEM pError, const char * szSubSystem );
extern PHB_ITEM hb_errPutTries ( PHB_ITEM pError, USHORT uiTries );
extern void hb_errRelease ( PHB_ITEM pError );
@@ -127,34 +127,34 @@ extern void hb_errExit ( void );
extern PHB_ITEM hb_errLaunchSubst ( PHB_ITEM pError );
extern PHB_ITEM hb_errRT_New( USHORT uiSeverity, char * szSubSystem,
extern PHB_ITEM hb_errRT_New( USHORT uiSeverity, const char * szSubSystem,
ULONG ulGenCode,
ULONG ulSubCode,
char * szDescription,
char * szOperation,
const char * szDescription,
const char * szOperation,
USHORT uiOsCode,
USHORT uiFlags );
extern PHB_ITEM hb_errRT_New_Subst( USHORT uiSeverity, char * szSubSystem,
extern PHB_ITEM hb_errRT_New_Subst( USHORT uiSeverity, const char * szSubSystem,
ULONG ulGenCode,
ULONG ulSubCode,
char * szDescription,
char * szOperation,
const char * szDescription,
const char * szOperation,
USHORT uiOsCode,
USHORT uiFlags );
extern PHB_ITEM hb_errRT_SubstParams( char *szSubSystem, ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation );
extern PHB_ITEM hb_errRT_SubstParams( const char *szSubSystem, ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation );
extern USHORT hb_errRT_BASE ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, ULONG ulArgCount, ... );
extern USHORT hb_errRT_BASE_Ext1 ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, USHORT uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... );
extern PHB_ITEM hb_errRT_BASE_Subst ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, ULONG ulArgCount, ... );
extern void hb_errRT_BASE_SubstR ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, ULONG ulArgCount, ... );
extern USHORT hb_errRT_TERM ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, USHORT uiOSCode, USHORT uiFlags );
extern USHORT hb_errRT_DBCMD ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation );
extern USHORT hb_errRT_BASE ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... );
extern USHORT hb_errRT_BASE_Ext1 ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... );
extern PHB_ITEM hb_errRT_BASE_Subst ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... );
extern void hb_errRT_BASE_SubstR ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... );
extern USHORT hb_errRT_TERM ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiOSCode, USHORT uiFlags );
extern USHORT hb_errRT_DBCMD ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation );
extern USHORT hb_errRT_DBCMD_Ext ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiFlags );
extern USHORT hb_errRT_TOOLS ( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation );
extern USHORT hb_errRT_TOOLS ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation );
extern void hb_errInternal ( ULONG ulIntCode, char * szText, char * szPar1, char * szPar2 );
extern void hb_errInternal ( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 );
/* Low-level error handling */
struct HB_ERROR_INFO_; /* forward declaration */

View File

@@ -149,7 +149,7 @@ typedef enum
extern void hb_gtInit( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr );
extern void hb_gtExit( void );
extern void hb_gtAdjustPos( int iHandle, char * pStr, ULONG ulLen );
extern void hb_gtAdjustPos( int iHandle, const char * pStr, ULONG ulLen );
extern USHORT hb_gtBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom, SHORT uiRight, BYTE * pbyFrame );
extern USHORT hb_gtBoxD( SHORT uiTop, SHORT uiLeft, SHORT uiBottom, SHORT uiRight );
extern USHORT hb_gtBoxS( SHORT uiTop, SHORT uiLeft, SHORT uiBottom, SHORT uiRight );
@@ -179,7 +179,7 @@ extern USHORT hb_gtSave( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT ui
extern USHORT hb_gtScrDim( USHORT * puiHeight, USHORT * puiWidth );
extern USHORT hb_gtScroll( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, SHORT iRows, SHORT iCols );
extern USHORT hb_gtSetBlink( BOOL bBlink );
extern USHORT hb_gtSetColorStr( char * pszColorString );
extern USHORT hb_gtSetColorStr( const char * pszColorString );
extern USHORT hb_gtSetCursor( USHORT uiCursorShape );
extern USHORT hb_gtSetMode( USHORT uiRows, USHORT uiCols );
extern USHORT hb_gtSetPos( SHORT iRow, SHORT iCol );

View File

@@ -74,7 +74,7 @@ HB_EXTERN_BEGIN
typedef struct _HB_LANG
{
void * pItemList[ HB_LANG_ITEM_MAX_ ];
const void * pItemList[ HB_LANG_ITEM_MAX_ ];
} HB_LANG, * PHB_LANG, * HB_LANG_PTR;
/* Supported language list management */

View File

@@ -326,7 +326,7 @@ ULONG hb_xquery( USHORT uiMode )
return 0;
}
void hb_conOutErr( char * pStr, ULONG ulLen )
void hb_conOutErr( const char * pStr, ULONG ulLen )
{
HB_SYMBOL_UNUSED( ulLen );

View File

@@ -201,7 +201,7 @@ HB_FUNC( HB_OSNEWLINE )
hb_retc( s_szCrLf );
}
typedef void hb_out_func_typedef( char *, ULONG );
typedef void hb_out_func_typedef( const char *, ULONG );
/* Format items for output, then call specified output function */
static void hb_conOut( USHORT uiParam, hb_out_func_typedef * pOutFunc )
@@ -222,7 +222,7 @@ static void hb_conOut( USHORT uiParam, hb_out_func_typedef * pOutFunc )
}
/* Output an item to STDOUT */
void hb_conOutStd( char * pStr, ULONG ulLen )
void hb_conOutStd( const char * pStr, ULONG ulLen )
{
USHORT uiErrorOld;
@@ -246,7 +246,7 @@ void hb_conOutStd( char * pStr, ULONG ulLen )
}
/* Output an item to STDERR */
void hb_conOutErr( char * pStr, ULONG ulLen )
void hb_conOutErr( const char * pStr, ULONG ulLen )
{
USHORT uiErrorOld;
@@ -270,7 +270,7 @@ void hb_conOutErr( char * pStr, ULONG ulLen )
}
/* Output an item to the screen and/or printer and/or alternate */
static void hb_conOutAlt( char * pStr, ULONG ulLen )
static void hb_conOutAlt( const char * pStr, ULONG ulLen )
{
HB_TRACE(HB_TR_DEBUG, ("hb_conOutAlt(%s, %lu)", pStr, ulLen));
@@ -304,7 +304,7 @@ static void hb_conOutAlt( char * pStr, ULONG ulLen )
}
/* Output an item to the screen and/or printer */
static void hb_conOutDev( char * pStr, ULONG ulLen )
static void hb_conOutDev( const char * pStr, ULONG ulLen )
{
HB_TRACE(HB_TR_DEBUG, ("hb_conOutDev(%s, %lu)", pStr, ulLen));

View File

@@ -60,14 +60,14 @@ char * hb_dateCMonth( int iMonth )
{
HB_TRACE(HB_TR_DEBUG, ("hb_dateCMonth(%d)", iMonth));
return ( iMonth >= 1 && iMonth <= 12 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 ) : "";
return ( iMonth >= 1 && iMonth <= 12 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 ) : ( char * ) "";
}
char * hb_dateCDOW( int iDay )
{
HB_TRACE(HB_TR_DEBUG, ("hb_dateCDOW(%d)", iDay));
return ( iDay >= 1 && iDay <= 7 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + iDay - 1 ) : "";
return ( iDay >= 1 && iDay <= 7 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + iDay - 1 ) : ( char * ) "";
}
HB_FUNC( CMONTH )

View File

@@ -206,7 +206,7 @@ HB_FUNC( DISKSPACE )
#elif defined(HB_OS_UNIX) && !defined(__WATCOMC__)
{
char *szName = ISCHAR( 1 ) ? hb_parc( 1 ) : "/";
char *szName = ISCHAR( 1 ) ? hb_parc( 1 ) : ( char * ) "/";
#if defined(HB_OS_SUNOS)
struct statvfs st;
if ( statvfs( szName, &st) == 0 )

View File

@@ -384,13 +384,13 @@ char * hb_errGetDescription( PHB_ITEM pError )
return hb_itemGetCPtr( &hb_stack.Return );
}
PHB_ITEM hb_errPutDescription( PHB_ITEM pError, char * szDescription )
PHB_ITEM hb_errPutDescription( PHB_ITEM pError, const char * szDescription )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errPutDescription(%p, %s)", pError, szDescription));
hb_vmPushSymbol( hb_dynsymGet( "_DESCRIPTION" )->pSymbol );
hb_vmPush( pError );
hb_vmPushString( szDescription, strlen( szDescription ) );
hb_vmPushString( ( char * ) szDescription, strlen( szDescription ) );
hb_vmDo( 1 );
return pError;
@@ -407,13 +407,13 @@ char * hb_errGetFileName( PHB_ITEM pError )
return hb_itemGetCPtr( &hb_stack.Return );
}
PHB_ITEM hb_errPutFileName( PHB_ITEM pError, char * szFileName )
PHB_ITEM hb_errPutFileName( PHB_ITEM pError, const char * szFileName )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errPutFileName(%p, %s)", pError, szFileName));
hb_vmPushSymbol( hb_dynsymGet( "_FILENAME" )->pSymbol );
hb_vmPush( pError );
hb_vmPushString( szFileName, strlen( szFileName ) );
hb_vmPushString( ( char * ) szFileName, strlen( szFileName ) );
hb_vmDo( 1 );
return pError;
@@ -453,13 +453,13 @@ char * hb_errGetOperation( PHB_ITEM pError )
return hb_itemGetCPtr( &hb_stack.Return );
}
PHB_ITEM hb_errPutOperation( PHB_ITEM pError, char * szOperation )
PHB_ITEM hb_errPutOperation( PHB_ITEM pError, const char * szOperation )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errPutOperation(%p, %s)", pError, szOperation));
hb_vmPushSymbol( hb_dynsymGet( "_OPERATION" )->pSymbol );
hb_vmPush( pError );
hb_vmPushString( szOperation, strlen( szOperation ) );
hb_vmPushString( ( char * ) szOperation, strlen( szOperation ) );
hb_vmDo( 1 );
return pError;
@@ -545,13 +545,13 @@ char * hb_errGetSubSystem( PHB_ITEM pError )
return hb_itemGetCPtr( &hb_stack.Return );
}
PHB_ITEM hb_errPutSubSystem( PHB_ITEM pError, char * szSubSystem )
PHB_ITEM hb_errPutSubSystem( PHB_ITEM pError, const char * szSubSystem )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errPutSubSytem(%p, %s)", pError, szSubSystem));
hb_vmPushSymbol( hb_dynsymGet( "_SUBSYSTEM" )->pSymbol );
hb_vmPush( pError );
hb_vmPushString( szSubSystem, strlen( szSubSystem ) );
hb_vmPushString( ( char * ) szSubSystem, strlen( szSubSystem ) );
hb_vmDo( 1 );
return pError;
@@ -679,11 +679,11 @@ PHB_ITEM hb_errPutArgs( PHB_ITEM pError, ULONG ulArgCount, ... )
PHB_ITEM hb_errRT_New(
USHORT uiSeverity,
char * szSubSystem,
const char * szSubSystem,
ULONG ulGenCode,
ULONG ulSubCode,
char * szDescription,
char * szOperation,
const char * szDescription,
const char * szOperation,
USHORT uiOsCode,
USHORT uiFlags )
{
@@ -693,7 +693,7 @@ PHB_ITEM hb_errRT_New(
hb_errPutSubSystem( pError, szSubSystem ? szSubSystem : HB_ERR_SS_BASE );
hb_errPutGenCode( pError, ( USHORT ) ulGenCode );
hb_errPutSubCode( pError, ( USHORT ) ulSubCode );
hb_errPutDescription( pError, szDescription ? szDescription : ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
hb_errPutDescription( pError, szDescription ? szDescription : ( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
hb_errPutOperation( pError, szOperation ? szOperation : "" );
hb_errPutOsCode( pError, uiOsCode );
hb_errPutFlags( pError, uiFlags );
@@ -703,11 +703,11 @@ PHB_ITEM hb_errRT_New(
PHB_ITEM hb_errRT_New_Subst(
USHORT uiSeverity,
char * szSubSystem,
const char * szSubSystem,
ULONG ulGenCode,
ULONG ulSubCode,
char * szDescription,
char * szOperation,
const char * szDescription,
const char * szOperation,
USHORT uiOsCode,
USHORT uiFlags )
{
@@ -717,7 +717,7 @@ PHB_ITEM hb_errRT_New_Subst(
hb_errPutSubSystem( pError, szSubSystem ? szSubSystem : HB_ERR_SS_BASE );
hb_errPutGenCode( pError, ( USHORT ) ulGenCode );
hb_errPutSubCode( pError, ( USHORT ) ulSubCode );
hb_errPutDescription( pError, szDescription ? szDescription : ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
hb_errPutDescription( pError, szDescription ? szDescription : ( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
hb_errPutOperation( pError, szOperation ? szOperation : "" );
hb_errPutOsCode( pError, uiOsCode );
hb_errPutFlags( pError, uiFlags | EF_CANSUBSTITUTE );
@@ -725,7 +725,7 @@ PHB_ITEM hb_errRT_New_Subst(
return pError;
}
PHB_ITEM hb_errRT_SubstParams( char *szSubSystem, ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation )
PHB_ITEM hb_errRT_SubstParams( const char *szSubSystem, ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation )
{
PHB_ITEM pRetVal;
PHB_ITEM pError;
@@ -775,7 +775,7 @@ HB_FUNC( __ERRRT_SBASE )
hb_param( 6, HB_IT_ANY ) );
}
USHORT hb_errRT_BASE( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, ULONG ulArgCount, ... )
USHORT hb_errRT_BASE( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... )
{
USHORT uiAction;
PHB_ITEM pError;
@@ -846,7 +846,7 @@ USHORT hb_errRT_BASE( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, ch
return uiAction;
}
USHORT hb_errRT_BASE_Ext1( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, USHORT uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
USHORT hb_errRT_BASE_Ext1( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
{
USHORT uiAction;
PHB_ITEM pError;
@@ -885,7 +885,7 @@ USHORT hb_errRT_BASE_Ext1( ULONG ulGenCode, ULONG ulSubCode, char * szDescriptio
return uiAction;
}
PHB_ITEM hb_errRT_BASE_Subst( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, ULONG ulArgCount, ... )
PHB_ITEM hb_errRT_BASE_Subst( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... )
{
PHB_ITEM pRetVal;
PHB_ITEM pError;
@@ -924,7 +924,7 @@ PHB_ITEM hb_errRT_BASE_Subst( ULONG ulGenCode, ULONG ulSubCode, char * szDescrip
return pRetVal;
}
void hb_errRT_BASE_SubstR( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, ULONG ulArgCount, ... )
void hb_errRT_BASE_SubstR( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, ULONG ulArgCount, ... )
{
PHB_ITEM pError;
@@ -987,7 +987,7 @@ void hb_errRT_BASE_SubstR( ULONG ulGenCode, ULONG ulSubCode, char * szDescriptio
hb_errRelease( pError );
}
USHORT hb_errRT_TERM( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, USHORT uiOSCode, USHORT uiFlags )
USHORT hb_errRT_TERM( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiOSCode, USHORT uiFlags )
{
USHORT uiAction;
PHB_ITEM pError =
@@ -1000,7 +1000,7 @@ USHORT hb_errRT_TERM( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, ch
return uiAction;
}
USHORT hb_errRT_DBCMD( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation )
USHORT hb_errRT_DBCMD( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation )
{
USHORT uiAction;
PHB_ITEM pError =
@@ -1018,7 +1018,7 @@ USHORT hb_errRT_DBCMD_Ext( ULONG ulGenCode, ULONG ulSubCode, const char * szDesc
USHORT uiAction;
PHB_ITEM pError;
pError = hb_errRT_New( ES_ERROR, HB_ERR_SS_DBCMD, ulGenCode, ulSubCode, (char *)szDescription, (char *)szOperation, 0, uiFlags );
pError = hb_errRT_New( ES_ERROR, HB_ERR_SS_DBCMD, ulGenCode, ulSubCode, (const char *)szDescription, (const char *)szOperation, 0, uiFlags );
uiAction = hb_errLaunch( pError );
@@ -1027,7 +1027,7 @@ USHORT hb_errRT_DBCMD_Ext( ULONG ulGenCode, ULONG ulSubCode, const char * szDesc
return uiAction;
}
USHORT hb_errRT_TOOLS( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation )
USHORT hb_errRT_TOOLS( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation )
{
USHORT uiAction;
PHB_ITEM pError =

View File

@@ -58,7 +58,7 @@
/* NOTE: Use as minimal calls from here, as possible.
Don't allocate memory from this function. [vszakats] */
void hb_errInternal( ULONG ulIntCode, char * szText, char * szPar1, char * szPar2 )
void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 )
{
char buffer[ 128 ];

View File

@@ -568,7 +568,7 @@ FHANDLE hb_fsPOpen( BYTE * pFilename, BYTE * pMode )
}
if( pFilename[ ulLen - 1 ] == '|' )
{
pbyTmp = hb_strdup( ( char * ) pFilename );
pbyTmp = ( BYTE * ) hb_strdup( ( char * ) pFilename );
pbyTmp[--ulLen] = 0;
pFilename = pbyTmp;
} else
@@ -936,7 +936,7 @@ BOOL hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode )
HB_SYMBOL_UNUSED( uiDevMode );
bResult = FALSE;
s_uiErrorLast = FS_ERROR;
s_uiErrorLast = ( USHORT ) FS_ERROR;
#endif
@@ -1974,8 +1974,8 @@ USHORT HB_EXPORT hb_fsChDrv( BYTE nDrive )
HB_SYMBOL_UNUSED( nDrive );
uiResult = FS_ERROR;
s_uiErrorLast = FS_ERROR;
uiResult = ( USHORT ) FS_ERROR;
s_uiErrorLast = ( USHORT ) FS_ERROR;
#endif
@@ -2045,8 +2045,8 @@ USHORT HB_EXPORT hb_fsIsDrv( BYTE nDrive )
HB_SYMBOL_UNUSED( nDrive );
uiResult = FS_ERROR;
s_uiErrorLast = FS_ERROR;
uiResult = ( USHORT ) FS_ERROR;
s_uiErrorLast = ( USHORT ) FS_ERROR;
#endif
@@ -2124,7 +2124,7 @@ BYTE HB_EXPORT hb_fsCurDrv( void )
#else
uiResult = 0;
s_uiErrorLast = FS_ERROR;
s_uiErrorLast = ( USHORT ) FS_ERROR;
#endif
@@ -2309,7 +2309,7 @@ BOOL hb_fsEof( FHANDLE hFileHandle )
}
else if( newPos != curPos )
{
hb_fsSetError( FS_ERROR );
hb_fsSetError( ( USHORT ) FS_ERROR );
}
return curPos >= endPos;
#else

View File

@@ -90,7 +90,7 @@ ULONG hb_fsFSize( BYTE * pszFileName, BOOL bUseDirEntry )
}
}
hb_fsSetError( FS_ERROR );
hb_fsSetError( ( USHORT ) FS_ERROR );
return 0;
}

View File

@@ -151,7 +151,7 @@ FHANDLE hb_fsCreateTemp( const BYTE * pszDir, const BYTE * pszPrefix, USHORT uiA
}
#endif
hb_fsSetError( FS_ERROR );
hb_fsSetError( ( USHORT ) FS_ERROR );
return FS_ERROR;
}

View File

@@ -154,7 +154,7 @@ int hb_gtReadKey( HB_inkey_enum eventmask )
return hb_gt_ReadKey( eventmask );
}
void hb_gtAdjustPos( int iHandle, char * pStr, ULONG ulLen )
void hb_gtAdjustPos( int iHandle, const char * pStr, ULONG ulLen )
{
HB_TRACE(HB_TR_DEBUG, ("hb_gtAdjustPos()"));
@@ -488,7 +488,7 @@ USHORT hb_gtColorToN( char * szColorString )
return nColor;
}
USHORT hb_gtSetColorStr( char * szColorString )
USHORT hb_gtSetColorStr( const char * szColorString )
{
char c;
char buff[ 6 ];
@@ -1116,7 +1116,7 @@ USHORT hb_gtSuspend( void )
* to prepare screen for outside output
*/
if( !hb_gt_Suspend() )
return( -1 );
return( ( USHORT ) -1 );
return( 0 );
}
@@ -1132,7 +1132,7 @@ USHORT hb_gtResume( void )
hb_gt_DispBegin();
}
else
return( -1 );
return( ( USHORT ) -1 );
return( 0 );
}

View File

@@ -819,7 +819,7 @@ USHORT hb_gt_BoxD( SHORT Top, SHORT Left, SHORT Bottom, SHORT Right, BYTE * pbyF
if( s_under_xterm )
{
/* Under xterm use hard-coded box drawing characters */
pbyFrame = s_xTermBox;
pbyFrame = ( BYTE * ) s_xTermBox;
}
s_alternate_char_set = A_ALTCHARSET;
@@ -837,7 +837,7 @@ USHORT hb_gt_BoxS( SHORT Top, SHORT Left, SHORT Bottom, SHORT Right, BYTE * pbyF
if( s_under_xterm )
{
/* Under xterm use hard-coded box drawing characters */
pbyFrame = s_xTermBox;
pbyFrame = ( BYTE * ) s_xTermBox;
}
s_alternate_char_set = A_ALTCHARSET;

View File

@@ -262,7 +262,7 @@ void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr )
if( ! gt_Inited )
{
char *errmsg = '\r'+'\n'+"Internal error : screen driver initialization failure"+'\r'+'\n'+( char )0;
const char *errmsg = '\r'+'\n'+"Internal error : screen driver initialization failure"+'\r'+'\n'+( char )0;
/* something went wrong - restore default settings */
SLang_reset_tty();
@@ -1247,7 +1247,7 @@ static void hb_gt_build_conv_tabs()
s_convHighChars[ i ] = ( ( SLsmg_Char_Type ) i ) | 0x8000;
/* init an alternate chars table */
if( ( p = SLtt_Graphics_Char_Pairs ) )
if( ( p = ( unsigned char * ) SLtt_Graphics_Char_Pairs ) )
{
len = strlen( ( char * ) p );
@@ -1365,7 +1365,7 @@ static void hb_gt_build_conv_tabs()
/* init national chars */
env = hb_getenv( hb_NationCharsEnvName );
env = ( unsigned char * ) hb_getenv( hb_NationCharsEnvName );
p = env;
if( p && p[ 0 ] != '\0' )

View File

@@ -235,7 +235,7 @@ int hb_gt_Init_Terminal( int phase )
/* get Dead key definition */
p = hb_getenv( hb_DeadKeyEnvName );
p = ( unsigned char * ) hb_getenv( hb_DeadKeyEnvName );
if( p && p[ 0 ] != '\0' )
{

View File

@@ -159,10 +159,10 @@ HB_FUNC( ISPRINTER )
char DefaultPrinter[ 80 ];
DWORD pdwBufferSize = 80;
DPGetDefaultPrinter( ( LPTSTR ) &DefaultPrinter, &pdwBufferSize);
hb_retl( hb_printerIsReady( ISCHAR( 1 ) ? hb_parc( 1 ) : (char*)DefaultPrinter ) );
hb_retl( hb_printerIsReady( ISCHAR( 1 ) ? hb_parc( 1 ) : ( char * ) DefaultPrinter ) );
}
#else
hb_retl( hb_printerIsReady( ISCHAR( 1 ) ? hb_parc( 1 ) : "LPT1" ) );
hb_retl( hb_printerIsReady( ISCHAR( 1 ) ? hb_parc( 1 ) : ( char * ) "LPT1" ) );
#endif
}

View File

@@ -90,7 +90,7 @@ char * hb_nationGetMsg( USHORT uiMsg )
{
HB_TRACE(HB_TR_DEBUG, ("hb_nationGetMsg(%hu)", uiMsg));
return ( uiMsg >= 1 && uiMsg <= 13 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + uiMsg - 1 ) : "";
return ( uiMsg >= 1 && uiMsg <= 13 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + uiMsg - 1 ) : ( char * ) "";
}
#ifdef HB_C52_UNDOC

View File

@@ -234,7 +234,7 @@ HB_FUNC( HB_F_EOF )
}
else
{
hb_fsSetError( FS_ERROR );
hb_fsSetError( ( USHORT ) FS_ERROR );
hb_retl( TRUE );
}
}

View File

@@ -54,7 +54,7 @@
#include "hbapigt.h"
#include "hbset.h"
char * hb_conSetColor( char * szColor )
char * hb_conSetColor( const char * szColor )
{
HB_TRACE(HB_TR_DEBUG, ("hb_conSetColor(%s)", szColor));

View File

@@ -107,7 +107,7 @@ BOOL hb_spFile( BYTE * pFilename, BYTE * pRetPath )
*/
if( ! bIsFile )
{
pFilepath->szPath = hb_set.HB_SET_DEFAULT ? hb_set.HB_SET_DEFAULT : ".";
pFilepath->szPath = hb_set.HB_SET_DEFAULT ? hb_set.HB_SET_DEFAULT : ( char * ) ".";
hb_fsFNameMerge( (char*) Path, pFilepath );
}
}

View File

@@ -1054,7 +1054,7 @@ char * HB_EXPORT hb_itemTypeStr( PHB_ITEM pItem )
switch( pItem->type & ~HB_IT_BYREF )
{
case HB_IT_ARRAY:
return ( hb_arrayIsObject( pItem ) ? "O" : "A" );
return ( char * ) ( hb_arrayIsObject( pItem ) ? "O" : "A" );
case HB_IT_BLOCK:
return "B";
@@ -1777,7 +1777,7 @@ char * HB_EXPORT hb_itemString( PHB_ITEM pItem, ULONG * ulLen, BOOL * bFreeReq )
break;
case HB_IT_LOGICAL:
buffer = ( hb_itemGetL( pItem ) ? ".T." : ".F." );
buffer = ( char * ) ( hb_itemGetL( pItem ) ? ".T." : ".F." );
* ulLen = 3;
* bFreeReq = FALSE;
break;

View File

@@ -1528,7 +1528,7 @@ HB_FUNC( __MVRESTORE )
if( fhnd != FS_ERROR )
{
char * pszMask = ISCHAR( 3 ) ? hb_parc( 3 ) : "*";
char * pszMask = ISCHAR( 3 ) ? hb_parc( 3 ) : ( char * ) "*";
BOOL bIncludeMask = ISCHAR( 4 ) ? hb_parl( 4 ) : TRUE;
BYTE buffer[ HB_MEM_REC_LEN ];

View File

@@ -660,7 +660,7 @@ static PASM_CALL hb_hrbAsmCreateFun( PHB_SYMB pSymbols, BYTE * pCode )
hb_hrbAsmPatch( asmRet->pAsmData, 1, pSymbols ); /* Insert pointer to testsym */
hb_hrbAsmPatch( asmRet->pAsmData, 6, pCode ); /* Insert pointer to testcode */
hb_hrbAsmPatchRelative( asmRet->pAsmData, 11, hb_vmExecute, 15 );
hb_hrbAsmPatchRelative( asmRet->pAsmData, 11, ( void * ) hb_vmExecute, 15 );
/* Insert pointer to hb_vmExecute() */
/* #elseif INTEL16 */