20000415-20:46 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-04-15 18:46:12 +00:00
parent 28e933ee9c
commit 931663c131
5 changed files with 41 additions and 28 deletions

View File

@@ -1,3 +1,23 @@
20000415-20:46 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/rdd/dbfcdx/dbfcdx1.c
! non-ANSI stricmp() changed to hb_stricmp()
- Removed stdio.h and string.h since they are always included from hbapi.h
! Proprietary function _ltoa() changed to hb_cdxltoa()
* include/hbapigt.h
! Doesn't include color.ch, but defines the same constants with HB_
prefix to avoid collision with OS/2 (so far).
* HB_CLR_LASTCOLOR renamed to HB_CLR_MAX_
* source/rtl/gtapi.c
+ Using HB_CLR_MAX_ instead of duplicated define.
* Prefixed CLR_ with HB_
* include/color.ch
- Removed the note that this file is also included from .C files.
- Removed CLR_LASTCOLOR which was not CA-Cl*pper compatible anyway.
20000415-19:09 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 20000415-19:09 GMT+2 Maurilio Longo <maurilio.longo@libero.it>
* source/rdd/dbfcdx/dbfcdx1.c * source/rdd/dbfcdx/dbfcdx1.c

View File

@@ -33,8 +33,6 @@
* *
*/ */
/* NOTE: This file is also used by C code. */
#ifndef _COLOR_CH #ifndef _COLOR_CH
#define _COLOR_CH #define _COLOR_CH
@@ -44,6 +42,5 @@
#define CLR_BORDER 2 #define CLR_BORDER 2
#define CLR_BACKGROUND 3 #define CLR_BACKGROUND 3
#define CLR_UNSELECTED 4 #define CLR_UNSELECTED 4
#define CLR_LASTCOLOR CLR_UNSELECTED
#endif /* _COLOR_CH */ #endif /* _COLOR_CH */

View File

@@ -53,15 +53,6 @@
#include "hbapi.h" #include "hbapi.h"
/* 15/04/2000 - maurilio.longo@libero.it
CLR_BACKGROUND from os2.h (os2emx.h) conflicts with color.ch definition,
but we can undef it while we stay a VIO only program */
#if defined(HB_OS_OS2) && !defined(INCL_GPI)
#undef CLR_BACKGROUND
#endif
#include "color.ch"
#if defined(HB_EXTERN_C) #if defined(HB_EXTERN_C)
extern "C" { extern "C" {
#endif #endif
@@ -71,7 +62,16 @@ extern "C" {
original CA-Cl*pper versions. [vszakats] */ original CA-Cl*pper versions. [vszakats] */
/* maximum length of color string */ /* maximum length of color string */
#define CLR_STRLEN 64 #define CLR_STRLEN 64
/* attributes for color strings, these are the same as the ones in color.ch
but prefixed with HB_ to avoid collision. */
#define HB_CLR_STANDARD 0
#define HB_CLR_ENHANCED 1
#define HB_CLR_BORDER 2
#define HB_CLR_BACKGROUND 3
#define HB_CLR_UNSELECTED 4
#define HB_CLR_MAX_ HB_CLR_UNSELECTED
/* strings for borders (same as box.ch, but defined for use by C) */ /* strings for borders (same as box.ch, but defined for use by C) */
/*01234567*/ /*01234567*/

View File

@@ -37,8 +37,6 @@
#include <time.h> #include <time.h>
#include <ctype.h> #include <ctype.h>
#include <string.h>
#include <stdio.h>
#include "hbapi.h" #include "hbapi.h"
#include "hbapiitm.h" #include "hbapiitm.h"
@@ -252,12 +250,12 @@ typedef struct
typedef SORTINFO * LPSORTINFO; typedef SORTINFO * LPSORTINFO;
HB_FUNC(_DBFCDX); extern HB_FUNC( _DBFCDX );
HB_FUNC(DBFCDX_GETFUNCTABLE); extern HB_FUNC( DBFCDX_GETFUNCTABLE );
HB_INIT_SYMBOLS_BEGIN( dbfcdx1__InitSymbols ) HB_INIT_SYMBOLS_BEGIN( dbfcdx1__InitSymbols )
{ "_DBFCDX", HB_FS_PUBLIC, HB_FUNCNAME(_DBFCDX), NULL }, { "_DBFCDX", HB_FS_PUBLIC, HB_FUNCNAME( _DBFCDX ), NULL },
{ "DBFCDX_GETFUNCTABLE", HB_FS_PUBLIC, HB_FUNCNAME(DBFCDX_GETFUNCTABLE), NULL } { "DBFCDX_GETFUNCTABLE", HB_FS_PUBLIC, HB_FUNCNAME( DBFCDX_GETFUNCTABLE ), NULL }
HB_INIT_SYMBOLS_END( dbfcdx1__InitSymbols ) HB_INIT_SYMBOLS_END( dbfcdx1__InitSymbols )
#if ! defined(__GNUC__) && ! defined(_MSC_VER) #if ! defined(__GNUC__) && ! defined(_MSC_VER)
#pragma startup dbfcdx1__InitSymbols #pragma startup dbfcdx1__InitSymbols
@@ -1928,7 +1926,7 @@ static void hb_cdxIndexAddTag( LPINDEXINFO pIndex, char * szTagName, char * szKe
pLastTag = NULL; pLastTag = NULL;
while( pTag != NULL ) while( pTag != NULL )
{ {
if( stricmp( pTag->TagName, szTagName ) == 0 ) if( hb_stricmp( pTag->TagName, szTagName ) == 0 )
{ {
pKey->Tag = pTag->TagBlock; pKey->Tag = pTag->TagBlock;
if( hb_cdxTagKeyFind( pIndex->CompoundTag, pKey ) > 0 ) if( hb_cdxTagKeyFind( pIndex->CompoundTag, pKey ) > 0 )
@@ -2078,7 +2076,7 @@ static void hb_cdxSortInsertWord( LPSORTINFO pSort, LONG Tag, char * Value )
SHORT v; SHORT v;
LPSORTDATA wx; LPSORTDATA wx;
_ltoa( Tag, s + 1, 10 ); hb_cdxltoa( Tag, s + 1, 10 );
w = strlen( Value ); w = strlen( Value );
if( pSort->NodeLimit - pSort->NodeCur < w + strlen( s + 1 ) + 1 ) if( pSort->NodeLimit - pSort->NodeCur < w + strlen( s + 1 ) + 1 )
{ {
@@ -3284,11 +3282,11 @@ static RDDFUNCS cdxTable = { cdxBof,
cdxWhoCares cdxWhoCares
}; };
HB_FUNC(_DBFCDX) HB_FUNC( _DBFCDX )
{ {
} }
HB_FUNC(DBFCDX_GETFUNCTABLE) HB_FUNC( DBFCDX_GETFUNCTABLE )
{ {
RDDFUNCS * pTable; RDDFUNCS * pTable;
USHORT * uiCount; USHORT * uiCount;

View File

@@ -91,14 +91,12 @@ static int * s_pColor;
/* gt API functions */ /* gt API functions */
#define COLOR_COUNT_DEF 5
void hb_gtInit( int s_iFilenoStdin, int s_iFilenoStdout, int s_iFilenoStderr ) void hb_gtInit( int s_iFilenoStdin, int s_iFilenoStdout, int s_iFilenoStderr )
{ {
HB_TRACE(HB_TR_DEBUG, ("hb_gtInit()")); HB_TRACE(HB_TR_DEBUG, ("hb_gtInit()"));
s_pColor = ( int * ) hb_xgrab( COLOR_COUNT_DEF * sizeof( int ) ); s_pColor = ( int * ) hb_xgrab( ( HB_CLR_MAX_ + 1 ) * sizeof( int ) );
s_uiColorCount = COLOR_COUNT_DEF; s_uiColorCount = HB_CLR_MAX_ + 1;
hb_gt_Init( s_iFilenoStdin, s_iFilenoStdout, s_iFilenoStderr ); hb_gt_Init( s_iFilenoStdin, s_iFilenoStdout, s_iFilenoStderr );
@@ -611,7 +609,7 @@ USHORT hb_gtSetColorStr( char * szColorString )
if( nPos > 0 && nPos < 4 ) if( nPos > 0 && nPos < 4 )
s_pColor[ 4 ] = s_pColor[ 1 ]; s_pColor[ 4 ] = s_pColor[ 1 ];
s_uiColorIndex = CLR_STANDARD; /* hb_gtColorSelect( CLR_STANDARD ); */ s_uiColorIndex = HB_CLR_STANDARD; /* hb_gtColorSelect( HB_CLR_STANDARD ); */
return 0; return 0;
} }