Patch level : 2.0 464
Files correlati : cb6.dll Ricompilazione Demo : [ ] Commento : Modifiche per la compilazione Linux git-svn-id: svn://10.65.10.50/trunk@11080 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0688668ef5
commit
3d6c8b3e2d
@ -13,24 +13,24 @@ S4EXPORT long S4FUNCTION a4indexVersion(DATA4 * data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
S4EXPORT int S4FUNCTION a4tagKeyLen(DATA4 * data)
|
S4EXPORT int S4FUNCTION a4tagKeyLen(DATA4 * data)
|
||||||
{
|
{
|
||||||
const TAG4 * t4 = d4tagDefault(data);
|
const TAG4 * t4 = d4tagDefault(data);
|
||||||
|
|
||||||
return t4->tagFile->expr->len;
|
return t4->tagFile->expr->len;
|
||||||
}
|
}
|
||||||
|
|
||||||
S4EXPORT const char * S4FUNCTION a4tagKey(DATA4 * data)
|
S4EXPORT const char * S4FUNCTION a4tagKey(DATA4 * data)
|
||||||
{
|
{
|
||||||
const TAG4 * t4 = d4tagDefault(data);
|
const TAG4 * t4 = d4tagDefault(data);
|
||||||
|
|
||||||
return tfile4key(t4->tagFile);
|
return tfile4key(t4->tagFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
S4EXPORT int S4FUNCTION a4lockTest(DATA4 * data)
|
S4EXPORT int S4FUNCTION a4lockTest(DATA4 * data)
|
||||||
{
|
{
|
||||||
return d4lockTestFile(data);
|
return d4lockTestFile(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
S4EXPORT void S4FUNCTION error4hook( CODE4 S4PTR * codebase, int errCode1, long errCode2, const char S4PTR * desc1, const char S4PTR * desc2, const char S4PTR * desc3)
|
S4EXPORT void S4FUNCTION error4hook( CODE4 S4PTR * codebase, int errCode1, long errCode2, const char S4PTR * desc1, const char S4PTR * desc2, const char S4PTR * desc3)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ void S4FUNCTION c4upper( char *str )
|
|||||||
if ( *ptr >= 'a' && *ptr <= 'z' )
|
if ( *ptr >= 'a' && *ptr <= 'z' )
|
||||||
*ptr &= 0xDF ;
|
*ptr &= 0xDF ;
|
||||||
|
|
||||||
/* Les accents sont laiss‚ afin d'ˆtre compatible avec toute p‚riph‚rie */
|
/* Les accents sont laiss afin d'tre compatible avec toute priphrie */
|
||||||
if ( *ptr >= E4C_CED )
|
if ( *ptr >= E4C_CED )
|
||||||
{
|
{
|
||||||
switch( *ptr )
|
switch( *ptr )
|
||||||
@ -712,7 +712,7 @@ void S4FUNCTION c4upper( char *str )
|
|||||||
if ( *ptr >= 'A' && *ptr <= 'Z' )
|
if ( *ptr >= 'A' && *ptr <= 'Z' )
|
||||||
*ptr |= 0x20 ;
|
*ptr |= 0x20 ;
|
||||||
|
|
||||||
/* Les accents sont laiss‚ afin d'ˆtre compatible avec toute p‚riph‚rie */
|
/* Les accents sont laiss afin d'tre compatible avec toute priphrie */
|
||||||
if ( *ptr >= E4C_CED )
|
if ( *ptr >= E4C_CED )
|
||||||
{
|
{
|
||||||
switch( *ptr )
|
switch( *ptr )
|
||||||
@ -1009,6 +1009,7 @@ void S4FUNCTION c4upper( char *str )
|
|||||||
void *c4memmove(void *dest, const void *src, size_t count )
|
void *c4memmove(void *dest, const void *src, size_t count )
|
||||||
{
|
{
|
||||||
if ( dest < src )
|
if ( dest < src )
|
||||||
|
{
|
||||||
if ( (char *)dest + count <= (char *) src )
|
if ( (char *)dest + count <= (char *) src )
|
||||||
{
|
{
|
||||||
memcpy( dest, src, count ) ;
|
memcpy( dest, src, count ) ;
|
||||||
@ -1022,8 +1023,10 @@ void *c4memmove(void *dest, const void *src, size_t count )
|
|||||||
((char *) dest)[i] = ((char *)src)[i] ;
|
((char *) dest)[i] = ((char *)src)[i] ;
|
||||||
return( dest ) ;
|
return( dest ) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( src < dest )
|
if ( src < dest )
|
||||||
|
{
|
||||||
if ( (char *) src + count <= (char *) dest )
|
if ( (char *) src + count <= (char *) dest )
|
||||||
{
|
{
|
||||||
memcpy( dest, src, count ) ;
|
memcpy( dest, src, count ) ;
|
||||||
@ -1039,6 +1042,7 @@ void *c4memmove(void *dest, const void *src, size_t count )
|
|||||||
}
|
}
|
||||||
return( dest ) ;
|
return( dest ) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return( dest ) ;
|
return( dest ) ;
|
||||||
}
|
}
|
||||||
#endif /* S4NO_MEMMOVE */
|
#endif /* S4NO_MEMMOVE */
|
||||||
|
@ -407,7 +407,7 @@ int S4FUNCTION code4passwordSet( CODE4 *c4, const char *userId, const char *oldP
|
|||||||
int S4FUNCTION code4initLow( CODE4 *c4, const char *defaultProtocol, long versionId )
|
int S4FUNCTION code4initLow( CODE4 *c4, const char *defaultProtocol, long versionId )
|
||||||
{
|
{
|
||||||
char v1[10], v2[10] ;
|
char v1[10], v2[10] ;
|
||||||
int n;
|
|
||||||
#ifdef S4TESTING
|
#ifdef S4TESTING
|
||||||
int exclusiveFlag ;
|
int exclusiveFlag ;
|
||||||
int openFlag ;
|
int openFlag ;
|
||||||
@ -454,7 +454,7 @@ int S4FUNCTION code4initLow( CODE4 *c4, const char *defaultProtocol, long versio
|
|||||||
no file open/create incorrectly auto-starts the optimization process
|
no file open/create incorrectly auto-starts the optimization process
|
||||||
|
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifdef S4WINDOWS
|
#ifdef S4WINDOWS
|
||||||
n = SetHandleCount(40);
|
n = SetHandleCount(40);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,6 +3,13 @@
|
|||||||
#ifndef D4ALL_INC
|
#ifndef D4ALL_INC
|
||||||
#define D4ALL_INC
|
#define D4ALL_INC
|
||||||
|
|
||||||
|
#ifdef LINUX
|
||||||
|
#define S4UNIX
|
||||||
|
#endif
|
||||||
|
#ifdef WIN32
|
||||||
|
#define S4DLL
|
||||||
|
#define S4WIN32
|
||||||
|
#endif
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/********** USER SWITCH SETTINGS AREA ***********/
|
/********** USER SWITCH SETTINGS AREA ***********/
|
||||||
|
|
||||||
@ -62,7 +69,7 @@
|
|||||||
/* Error Configuration Options */
|
/* Error Configuration Options */
|
||||||
/* #define E4ANALYZE */
|
/* #define E4ANALYZE */
|
||||||
/* #define E4DEBUG */
|
/* #define E4DEBUG */
|
||||||
#define E4HOOK
|
#define E4HOOK
|
||||||
/* #define E4LINK */
|
/* #define E4LINK */
|
||||||
/* #define E4MISC */
|
/* #define E4MISC */
|
||||||
/* #define E4OFF */
|
/* #define E4OFF */
|
||||||
@ -78,14 +85,14 @@
|
|||||||
/* #define S4OFF_MEMO */
|
/* #define S4OFF_MEMO */
|
||||||
/* #define S4OFF_MULTI */
|
/* #define S4OFF_MULTI */
|
||||||
/* #define S4OFF_OPTIMIZE */
|
/* #define S4OFF_OPTIMIZE */
|
||||||
#define S4OFF_REPORT
|
#define S4OFF_REPORT
|
||||||
/* #define S4OFF_TRAN */
|
/* #define S4OFF_TRAN */
|
||||||
/* #define S4OFF_WRITE */
|
/* #define S4OFF_WRITE */
|
||||||
/* #define S4OFF_THREAD */
|
/* #define S4OFF_THREAD */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Spoken Language Switches */
|
/* Spoken Language Switches */
|
||||||
#define S4ANSI
|
#define S4ANSI
|
||||||
/* #define S4DICTIONARY */
|
/* #define S4DICTIONARY */
|
||||||
/* #define S4FINNISH */
|
/* #define S4FINNISH */
|
||||||
/* #define S4FRENCH */
|
/* #define S4FRENCH */
|
||||||
@ -100,6 +107,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef S4UNIX
|
#ifdef S4UNIX
|
||||||
#include "p4port.h"
|
#include "p4port.h"
|
||||||
#else
|
#else
|
||||||
|
@ -305,6 +305,7 @@ int S4FUNCTION d4log( DATA4 *data, const int logging )
|
|||||||
oldVal = ( data->logVal == 0 ) ? 0 : 1 ;
|
oldVal = ( data->logVal == 0 ) ? 0 : 1 ;
|
||||||
|
|
||||||
if ( logging != -1 )
|
if ( logging != -1 )
|
||||||
|
{
|
||||||
if ( logging )
|
if ( logging )
|
||||||
{
|
{
|
||||||
if ( data->logVal == LOG4TRANS )
|
if ( data->logVal == LOG4TRANS )
|
||||||
@ -313,6 +314,7 @@ int S4FUNCTION d4log( DATA4 *data, const int logging )
|
|||||||
else
|
else
|
||||||
if ( data->logVal == LOG4ON )
|
if ( data->logVal == LOG4ON )
|
||||||
data->logVal = LOG4TRANS ;
|
data->logVal = LOG4TRANS ;
|
||||||
|
}
|
||||||
|
|
||||||
return oldVal ;
|
return oldVal ;
|
||||||
}
|
}
|
||||||
|
@ -849,7 +849,7 @@ int l4lockCheck( void ) ;
|
|||||||
void l4lockRemove( int, long, long ) ;
|
void l4lockRemove( int, long, long ) ;
|
||||||
void l4lockSave( int, long, long ) ;
|
void l4lockSave( int, long, long ) ;
|
||||||
|
|
||||||
static Y4CHUNK *mem4allocChunkDefault( MEM4 * ) ; /* 0 Parm causes 0 return */
|
Y4CHUNK *mem4allocChunkDefault( MEM4 * ) ; /* 0 Parm causes 0 return */ // verificare
|
||||||
void mem4init( void ) ;
|
void mem4init( void ) ;
|
||||||
int mem4reset( void ) ;
|
int mem4reset( void ) ;
|
||||||
#ifdef S4MEM_DBF
|
#ifdef S4MEM_DBF
|
||||||
@ -1138,5 +1138,6 @@ S4LONG x4reverseLong( const void S4PTR * ) ;
|
|||||||
void t4noChangeStr( char *, const char *, const int ) ;
|
void t4noChangeStr( char *, const char *, const int ) ;
|
||||||
void t4noChangeDouble( char *, const double ) ;
|
void t4noChangeDouble( char *, const double ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "a4declar.h"
|
#include "a4declar.h"
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ INDEX4 *S4FUNCTION d4index( DATA4 *data, const char *indexName )
|
|||||||
char indexLookup2[258] ;
|
char indexLookup2[258] ;
|
||||||
#endif
|
#endif
|
||||||
INDEX4 *indexOn ;
|
INDEX4 *indexOn ;
|
||||||
unsigned int i, extIndex ;
|
unsigned int i, extIndex = 0;
|
||||||
int doAlias, hasExt, hasPath ;
|
int doAlias, hasExt, hasPath ;
|
||||||
|
|
||||||
#ifdef S4VBASIC
|
#ifdef S4VBASIC
|
||||||
|
@ -101,7 +101,7 @@ void t4intToFox( char *result, const long *val )
|
|||||||
|
|
||||||
void t4curToFox( char *result, const CURRENCY4 *source )
|
void t4curToFox( char *result, const CURRENCY4 *source )
|
||||||
{
|
{
|
||||||
char i ;
|
int i ;
|
||||||
int isPositive ;
|
int isPositive ;
|
||||||
|
|
||||||
isPositive = ( (short int)(source->lo[3]) >= 0 ) ;
|
isPositive = ( (short int)(source->lo[3]) >= 0 ) ;
|
||||||
@ -142,7 +142,7 @@ void t4dblToCurFox( char *result, const double doub )
|
|||||||
|
|
||||||
void t4dblToFox( char *result, const double doub )
|
void t4dblToFox( char *result, const double doub )
|
||||||
{
|
{
|
||||||
char i ;
|
int i ;
|
||||||
int isPositive ;
|
int isPositive ;
|
||||||
|
|
||||||
isPositive = ( doub >= 0 ) ;
|
isPositive = ( doub >= 0 ) ;
|
||||||
|
@ -1246,7 +1246,7 @@ void e4ascend()
|
|||||||
void e4descend()
|
void e4descend()
|
||||||
{
|
{
|
||||||
#ifdef S4FOX
|
#ifdef S4FOX
|
||||||
char loop ;
|
int loop ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
e4ascend() ;
|
e4ascend() ;
|
||||||
|
@ -469,7 +469,7 @@ static int e4massage( E4PARSE *p4 )
|
|||||||
case r4date:
|
case r4date:
|
||||||
{
|
{
|
||||||
int rem ;
|
int rem ;
|
||||||
if (rem=position[numParms]%sizeof(double))
|
if ((rem=position[numParms]%sizeof(double)))
|
||||||
delta=sizeof(double)-rem;
|
delta=sizeof(double)-rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1025,7 +1025,7 @@ int expr4parseFunction( E4PARSE *p4, const char *startPtr, const int fLen )
|
|||||||
e4functionPop( &p4->expr ) ;
|
e4functionPop( &p4->expr ) ;
|
||||||
numParms-- ;
|
numParms-- ;
|
||||||
}
|
}
|
||||||
if ( numParms == 3 && fNum == E4SUBSTR || numParms == 2 && fNum == E4LEFT )
|
if ((numParms == 3 && fNum == E4SUBSTR) || (numParms == 2 && fNum == E4LEFT))
|
||||||
{
|
{
|
||||||
info = (E4INFO *)p4->codeBase->exprWorkBuf + p4->expr.infoN -1 ;
|
info = (E4INFO *)p4->codeBase->exprWorkBuf + p4->expr.infoN -1 ;
|
||||||
if ( info->functionI != E4DOUBLE )
|
if ( info->functionI != E4DOUBLE )
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
#ifdef S4UNIX
|
#ifdef S4UNIX
|
||||||
static int file4createLow( FILE4 *file, CODE4 *c4, const char *name )
|
static int file4createLow( FILE4 *file, CODE4 *c4, const char *name )
|
||||||
{
|
{
|
||||||
int extraFlag, oflag, pmode ;
|
int oflag, pmode ;
|
||||||
int rc = 0 ;
|
int rc = 0 ;
|
||||||
#ifdef S4NO_FLOCK
|
#ifdef S4NO_FLOCK
|
||||||
struct flock lck;
|
struct flock lck;
|
||||||
|
@ -338,7 +338,7 @@ static int i4addOneTag( INDEX4 *i4, const TAG4INFO *tagData )
|
|||||||
{
|
{
|
||||||
int rc ;
|
int rc ;
|
||||||
TAG4 *tagPtr ;
|
TAG4 *tagPtr ;
|
||||||
TAG4FILE *tagFile ;
|
TAG4FILE *tagFile = NULL ;
|
||||||
R4REINDEX reindex ;
|
R4REINDEX reindex ;
|
||||||
DATA4 *d4 ;
|
DATA4 *d4 ;
|
||||||
CODE4 *c4 ;
|
CODE4 *c4 ;
|
||||||
|
@ -1535,8 +1535,8 @@ S4EXPORT long S4FUNCTION tfile4skip( TAG4FILE *t4, long numSkip )
|
|||||||
|
|
||||||
if ( goTo == -1 )
|
if ( goTo == -1 )
|
||||||
{
|
{
|
||||||
if ( numSkip > 0 && t4->header.descending == 0 ||
|
if ((numSkip > 0 && t4->header.descending == 0) ||
|
||||||
numSkip <= 0 && t4->header.descending == 1 )
|
(numSkip <= 0 && t4->header.descending == 1))
|
||||||
{
|
{
|
||||||
saveDups = tfile4block( t4 )->curDupCnt ;
|
saveDups = tfile4block( t4 )->curDupCnt ;
|
||||||
rc = tfile4bottom( t4 ) ;
|
rc = tfile4bottom( t4 ) ;
|
||||||
|
@ -384,7 +384,7 @@ void *S4FUNCTION mem4allocDefault( MEM4 *memoryType )
|
|||||||
return mem4alloc2Default( memoryType, 0 ) ;
|
return mem4alloc2Default( memoryType, 0 ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Y4CHUNK *mem4allocChunkDefault( MEM4 *typePtr )
|
Y4CHUNK *mem4allocChunkDefault( MEM4 *typePtr )
|
||||||
{
|
{
|
||||||
Y4CHUNK *chunkPtr ;
|
Y4CHUNK *chunkPtr ;
|
||||||
int nAllocate, i ;
|
int nAllocate, i ;
|
||||||
|
@ -337,7 +337,7 @@ int opt4flushAll( OPT4 *opt, char doFree )
|
|||||||
OPT4BLOCK *blockOn ;
|
OPT4BLOCK *blockOn ;
|
||||||
LINK4 *linkOn, *nextLink ;
|
LINK4 *linkOn, *nextLink ;
|
||||||
LIST4 *flushList ;
|
LIST4 *flushList ;
|
||||||
char i ;
|
int i ;
|
||||||
int rc, saveRc ;
|
int rc, saveRc ;
|
||||||
|
|
||||||
#ifdef E4PARM_LOW
|
#ifdef E4PARM_LOW
|
||||||
@ -842,7 +842,7 @@ int opt4fileWrite( FILE4 *file, long pos, unsigned len, const void *data, char c
|
|||||||
unsigned readLen, lenRead, extraRead ;
|
unsigned readLen, lenRead, extraRead ;
|
||||||
OPT4BLOCK *blockOn ;
|
OPT4BLOCK *blockOn ;
|
||||||
OPT4 *opt ;
|
OPT4 *opt ;
|
||||||
int doUpgradeCheck ;
|
int doUpgradeCheck = 0;
|
||||||
|
|
||||||
#ifdef E4PARM_LOW
|
#ifdef E4PARM_LOW
|
||||||
if ( file == 0 || pos < 0 || data == 0 )
|
if ( file == 0 || pos < 0 || data == 0 )
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#define S4DATA_ALIGN /* Use if data needs to be on byte boundaries */
|
#define S4DATA_ALIGN /* Use if data needs to be on byte boundaries */
|
||||||
/* #define S4MEMCMP */ /* use if memcmp() uses signed byte comparison */
|
/* #define S4MEMCMP */ /* use if memcmp() uses signed byte comparison */
|
||||||
|
|
||||||
|
#define S4LOCKF
|
||||||
/* #define S4NO_ATOF */ /* use if atof() not found */
|
/* #define S4NO_ATOF */ /* use if atof() not found */
|
||||||
#define S4NO_CHSIZE /* use if chsize() not found */
|
#define S4NO_CHSIZE /* use if chsize() not found */
|
||||||
/* #define S4NO_ECVT */ /* use if ecvt() not found */
|
/* #define S4NO_ECVT */ /* use if ecvt() not found */
|
||||||
|
@ -80,7 +80,7 @@ static int u4nameFix( char *buf )
|
|||||||
len = strlen( buf ) ;
|
len = strlen( buf ) ;
|
||||||
|
|
||||||
for( i = 0 ; i < len - 2 ; i++ )
|
for( i = 0 ; i < len - 2 ; i++ )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
#ifdef S4UNIX
|
#ifdef S4UNIX
|
||||||
if ( c4memcmp(buf+i, "../", 3 ) == 0 )
|
if ( c4memcmp(buf+i, "../", 3 ) == 0 )
|
||||||
@ -113,8 +113,8 @@ static int u4nameFix( char *buf )
|
|||||||
}
|
}
|
||||||
|
|
||||||
for( i = 0 ; i < len - 1 ; i++ )
|
for( i = 0 ; i < len - 1 ; i++ )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
#ifdef S4UNIX
|
#ifdef S4UNIX
|
||||||
if ( c4memcmp( buf + i, "./", 2 ) == 0 )
|
if ( c4memcmp( buf + i, "./", 2 ) == 0 )
|
||||||
#else
|
#else
|
||||||
@ -466,7 +466,7 @@ int S4FUNCTION u4nameChar( unsigned char ch)
|
|||||||
#ifdef S4MDX
|
#ifdef S4MDX
|
||||||
((ch>='0') && (ch<='9')) || ch=='&' || ch=='@' ||
|
((ch>='0') && (ch<='9')) || ch=='&' || ch=='@' ||
|
||||||
#else
|
#else
|
||||||
ch>='0' && ch<='9' ||
|
(ch>='0' && ch<='9') ||
|
||||||
#endif
|
#endif
|
||||||
ch=='_'
|
ch=='_'
|
||||||
/* ch=='\\' || ch=='.' || ch=='_' || ch==':' */
|
/* ch=='\\' || ch=='.' || ch=='_' || ch==':' */
|
||||||
@ -542,8 +542,8 @@ int u4namePath( char *result, const unsigned int lenResult, const char *from )
|
|||||||
/* returns the length of the extension in 'from', and copies the extension in 'from' to 'result' */
|
/* returns the length of the extension in 'from', and copies the extension in 'from' to 'result' */
|
||||||
int u4nameRetExt( char *result, const int lenIn, const char *from )
|
int u4nameRetExt( char *result, const int lenIn, const char *from )
|
||||||
{
|
{
|
||||||
char len, name[LEN4PATH+1] ;
|
char name[LEN4PATH+1] ;
|
||||||
int lenResult, onPos ;
|
int lenResult, onPos, len ;
|
||||||
|
|
||||||
lenResult = lenIn ;
|
lenResult = lenIn ;
|
||||||
memset( result, 0, lenIn ) ;
|
memset( result, 0, lenIn ) ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user