2010-01-14 22:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbct/ctnet.c
    * Further cleanups.

  * contrib/hbmemio/memio.c
    ! Fixed to use HB_TRUE/HB_FALSE instead of 1/0.

  * contrib/gtwvg/wvgwing.c
    + TOFIXes added to two suspicious boolean casts.

  * contrib/hbfimage/fi_wrp.c
    + Added proper conversion between Harbour boolean and
      FreeImage boolean value.
    % Optimized out unnecessary HB_ISNUM()/HB_ISLOG() calls.

  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
  * contrib/hbmemio/memio.c
  * src/nortl/nortl.c
  * examples/pp/pp.c
  * examples/pp/hbpragma.c
  * examples/pp/hbppcore.c
  * examples/pp/hbppcomp.c
  * examples/pp/hbppdef.h
  * examples/rddado/adordd.prg
    * BOOL  -> HB_BOOL
    * TRUE  -> HB_TRUE
    * FALSE -> HB_FALSE
This commit is contained in:
Viktor Szakats
2010-01-14 21:07:59 +00:00
parent 3b2807927e
commit 8b8d1e24e5
14 changed files with 430 additions and 413 deletions

View File

@@ -17,6 +17,35 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-14 22:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbct/ctnet.c
* Further cleanups.
* contrib/hbmemio/memio.c
! Fixed to use HB_TRUE/HB_FALSE instead of 1/0.
* contrib/gtwvg/wvgwing.c
+ TOFIXes added to two suspicious boolean casts.
* contrib/hbfimage/fi_wrp.c
+ Added proper conversion between Harbour boolean and
FreeImage boolean value.
% Optimized out unnecessary HB_ISNUM()/HB_ISLOG() calls.
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* contrib/hbmemio/memio.c
* src/nortl/nortl.c
* examples/pp/pp.c
* examples/pp/hbpragma.c
* examples/pp/hbppcore.c
* examples/pp/hbppcomp.c
* examples/pp/hbppdef.h
* examples/rddado/adordd.prg
* BOOL -> HB_BOOL
* TRUE -> HB_TRUE
* FALSE -> HB_FALSE
2010-01-14 20:09 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbct/ctnet.c
* Code cleanup.

View File

@@ -1113,7 +1113,8 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON )
tbb.dwData = 0;
tbb.iString = iNewString;
bSuccess = ( BOOL ) SendMessage( hWndTB, TB_ADDBUTTONS, ( WPARAM ) 1, ( LPARAM ) ( LPTBBUTTON ) &tbb );
/* TOFIX: Convertion of LRESULT to HB_BOOL */
bSuccess = ( HB_BOOL ) SendMessage( hWndTB, TB_ADDBUTTONS, ( WPARAM ) 1, ( LPARAM ) ( LPTBBUTTON ) &tbb );
#if ! defined( HB_OS_WIN_CE )
SendMessage( hWndTB, TB_SETPADDING, ( WPARAM ) 0, ( LPARAM ) MAKELPARAM( 10,10 ) );
#endif
@@ -1133,7 +1134,8 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON )
tbb.dwData = 0;
tbb.iString = 0;
bSuccess = ( BOOL ) SendMessage( hWndTB, TB_ADDBUTTONS, ( WPARAM ) 1, ( LPARAM ) ( LPTBBUTTON ) &tbb );
/* TOFIX: Convertion of LRESULT to HB_BOOL */
bSuccess = ( HB_BOOL ) SendMessage( hWndTB, TB_ADDBUTTONS, ( WPARAM ) 1, ( LPARAM ) ( LPTBBUTTON ) &tbb );
hb_retl( bSuccess );
return;
}

View File

@@ -83,6 +83,8 @@
*
*/
#define HB_OS_WIN_USED
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbset.h"
@@ -90,12 +92,9 @@
#if defined( HB_OS_WIN )
# include <windows.h>
# include <winnetwk.h>
#include <winnetwk.h>
# define HB_OS_WIN_USED
BOOL WINAPI WNetErrorHandler( DWORD dwErrorCode, LPSTR lpszFunction )
static HB_BOOL hb_WNetErrorHandler( DWORD dwErrorCode, const char * pszFunction )
{
PHB_ITEM pError;
@@ -106,7 +105,7 @@ BOOL WINAPI WNetErrorHandler( DWORD dwErrorCode, LPSTR lpszFunction )
9001,
0,
"Windows Network operation failed",
lpszFunction, ( HB_ERRCODE ) dwErrorCode, EF_NONE );
pszFunction, ( HB_ERRCODE ) dwErrorCode, EF_NONE );
hb_errLaunch( pError );
hb_itemRelease( pError );
}
@@ -187,11 +186,11 @@ HB_FUNC( NETPRINTER )
HB_FUNC( NETDISK )
{
char cDrive[3];
char cDrive[ 3 ];
cDrive[0] = hb_parcx( 1 )[0];
cDrive[1] = ':';
cDrive[2] = '\0';
cDrive[ 0 ] = hb_parcx( 1 )[ 0 ];
cDrive[ 1 ] = ':';
cDrive[ 2 ] = '\0';
hb_retl( hb_IsNetShared( cDrive ) );
}
@@ -219,7 +218,7 @@ HB_FUNC( NETREDIR )
char szCommand[ 80 ];
hb_snprintf( szCommand, sizeof( szCommand ), "NETREDIR( \"%s\", \"%s\", \"%s\" )",
hb_parcx( 1 ), hb_parcx( 2 ), hb_parcx( 3 ) );
WNetErrorHandler( dwResult, szCommand );
hb_WNetErrorHandler( dwResult, szCommand );
}
hb_retl( HB_FALSE );
}

View File

@@ -67,6 +67,9 @@
#include "FreeImage.h"
#define hb_fi_retl( x ) hb_retl( x ? HB_TRUE : HB_FALSE )
#define hb_fi_parl( x ) ( hb_parl( x ) ? TRUE : FALSE )
/* ************************* WRAPPED FUNCTIONS ****************************** */
/* static for error handler (see below FI_SETOUTPUTMESSAGE ) */
@@ -79,13 +82,8 @@ static void * s_pErrorHandler = NULL;
/* DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE)); */
HB_FUNC( FI_INITIALISE )
{
BOOL bLoadPluginsOnly;
/* Retrieve parameters */
bLoadPluginsOnly = ( HB_ISLOG( 1 ) ? hb_parl( 1 ) : FALSE );
/* Run function */
FreeImage_Initialise( bLoadPluginsOnly );
FreeImage_Initialise( hb_fi_parl( 1 ) );
}
/* -------------------------------------------------------------------------- */
@@ -205,9 +203,9 @@ HB_FUNC( FI_ALLOCATE )
width = hb_parni( 1 );
height = hb_parni( 2 );
bpp = hb_parni( 3 );
red_mask = ( HB_ISNUM( 4 ) ? hb_parni( 4 ) : 0 );
green_mask = ( HB_ISNUM( 5 ) ? hb_parni( 5 ) : 0 );
blue_mask = ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : 0 );
red_mask = hb_parni( 4 );
green_mask = hb_parni( 5 );
blue_mask = hb_parni( 6 );
/* run function & return value */
hb_retptr( FreeImage_Allocate(width, height, bpp, red_mask, green_mask, blue_mask) );
@@ -240,10 +238,10 @@ HB_FUNC( FI_ALLOCATET )
type = ( FREE_IMAGE_TYPE ) hb_parni( 1 );
width = hb_parni( 2 );
height = hb_parni( 3 );
bpp = ( HB_ISNUM( 3 ) ? hb_parni( 3 ) : 8 );
red_mask = ( HB_ISNUM( 4 ) ? hb_parni( 4 ) : 0 );
green_mask = ( HB_ISNUM( 5 ) ? hb_parni( 5 ) : 0 );
blue_mask = ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : 0 );
bpp = hb_parni( 3 );
red_mask = hb_parni( 4 );
green_mask = hb_parni( 5 );
blue_mask = hb_parni( 6 );
/* run function & return value */
hb_retptr( FreeImage_AllocateT(type, width, height, bpp, red_mask, green_mask, blue_mask) );
@@ -420,7 +418,7 @@ HB_FUNC( FI_SAVE )
flags = hb_parni( 4 );
/* run function & return value */
hb_retl( FreeImage_Save(fif, dib, filename, flags) );
hb_fi_retl( FreeImage_Save(fif, dib, filename, flags) );
}
else
{
@@ -500,10 +498,10 @@ HB_FUNC( FI_OPENMULTIBITMAP )
/* Retrieve parameters */
fif = ( FREE_IMAGE_FORMAT ) hb_parni( 1 );
filename = hb_parcx( 2 );
create_new = hb_parl( 3 );
read_only = hb_parl( 4 );
keep_cache_in_memory = ( HB_ISLOG( 5 ) ? hb_parl( 5 ) : FALSE );
flags = ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : 0 );
create_new = hb_fi_parl( 3 );
read_only = hb_fi_parl( 4 );
keep_cache_in_memory = hb_fi_parl( 5 );
flags = hb_parni( 6 );
/* run function */
dib = FreeImage_OpenMultiBitmap(fif, filename, create_new, read_only, keep_cache_in_memory, flags);
@@ -534,10 +532,10 @@ HB_FUNC( FI_CLOSEMULTIBITMAP )
/* Retrieve parameters */
bitmap = ( FIMULTIBITMAP * ) hb_parptr( 1 );
flags = ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 );
flags = hb_parni( 2 );
/* run function & return value */
hb_retl( FreeImage_CloseMultiBitmap(bitmap, flags) );
hb_fi_retl( FreeImage_CloseMultiBitmap(bitmap, flags) );
}
else
{
@@ -706,7 +704,7 @@ HB_FUNC( FI_UNLOCKPAGE )
/* Retrieve parameters */
bitmap = ( FIMULTIBITMAP * ) hb_parptr( 1 );
page = ( FIBITMAP * ) hb_parptr( 2 );
changed = hb_parl( 3 );
changed = hb_fi_parl( 3 );
/* run function & return value */
FreeImage_UnlockPage(bitmap, page, changed);
@@ -740,8 +738,7 @@ HB_FUNC( FI_MOVEPAGE )
source = hb_parni( 3 );
/* run function & return value */
hb_retl( FreeImage_MovePage(bitmap, target, source) );
hb_fi_retl( FreeImage_MovePage(bitmap, target, source) );
}
else
{
@@ -773,7 +770,7 @@ HB_FUNC( FI_GETFILETYPE )
/* Retrieve parameters */
filename = hb_parcx( 1 );
size = ( HB_ISNUM( 2 ) ? hb_parni( 1 ) : 0 );
size = hb_parclen( 1 );
/* run function & return value */
hb_retni( FreeImage_GetFileType(filename, size) );
@@ -805,7 +802,7 @@ HB_FUNC( FI_GETFILETYPEFROMMEM )
/* Retrieve parameters */
szImage = hb_parcx( 1 );
stream = FreeImage_OpenMemory( ( BYTE * ) szImage, hb_parclen( 1 ) );
size = ( HB_ISNUM( 2 ) ? hb_parni( 1 ) : 0 );
size = hb_parni( 1 );
/* run function & return value */
hb_retni( FreeImage_GetFileTypeFromMemory(stream, size) );
@@ -856,7 +853,7 @@ HB_FUNC( FI_GETIMAGETYPE )
HB_FUNC( FI_ISLITTLEENDIAN )
{
/* run function & return value */
hb_retl( FreeImage_IsLittleEndian() );
hb_fi_retl( FreeImage_IsLittleEndian() );
}
/* -------------------------------------------------------------------------- */
@@ -1477,7 +1474,7 @@ HB_FUNC( FI_SETTRANSPARENT )
/* Retrieve parameters */
dib = ( FIBITMAP * ) hb_parptr( 1 );
enabled = hb_parl( 2 );
enabled = hb_fi_parl( 2 );
/* run function & return value */
FreeImage_SetTransparent(dib, enabled);
@@ -1538,8 +1535,7 @@ HB_FUNC( FI_ISTRANSPARENT )
dib = ( FIBITMAP * ) hb_parptr( 1 );
/* run function & return value */
hb_retl( FreeImage_IsTransparent( dib ) );
hb_fi_retl( FreeImage_IsTransparent( dib ) );
}
else
{
@@ -1564,8 +1560,7 @@ HB_FUNC( FI_HASBACKGROUNDCOLOR )
dib = ( FIBITMAP * ) hb_parptr( 1 );
/* run function & return value */
hb_retl( FreeImage_HasBackgroundColor( dib ) );
hb_fi_retl( FreeImage_HasBackgroundColor( dib ) );
}
else
{
@@ -1593,7 +1588,7 @@ HB_FUNC( FI_GETBACKGROUNDCOLOR )
/*bkcolor = ( RGBQUAD * ) hb_parptr( 2 );*/
/* run function & return value */
/*hb_retl( FreeImage_GetBackgroundColor(dib, bkcolor) );*/
/*hb_fi_retl( FreeImage_GetBackgroundColor(dib, bkcolor) );*/
FreeImage_GetBackgroundColor( dib, bkcolor );
/*hb_storptr( bkcolor, 2 );*/
hb_retptr( bkcolor );
@@ -1626,7 +1621,7 @@ HB_FUNC( FI_SETBACKGROUNDCOLOR )
/*bkcolor = ( RGBQUAD * ) hb_parptr( 2 );*/
/* run function & return value */
hb_retl( FreeImage_SetBackgroundColor(dib, bkcolor) );
hb_fi_retl( FreeImage_SetBackgroundColor(dib, bkcolor) );
/*FreeImage_GetBackgroundColor(dib, bkcolor);*/
/*hb_retptr( bkcolor );*/
}
@@ -2062,7 +2057,7 @@ HB_FUNC( FI_CONVERTTOSTANDARDTYPE )
/* Retrieve parameters */
dib = ( FIBITMAP * ) hb_parptr( 1 );
scale_linear = ( HB_ISLOG( 2 ) ) ? hb_parl( 2 ) : TRUE;
scale_linear = ( HB_ISLOG( 2 ) ) ? hb_fi_parl( 2 ) : TRUE;
/* run function & return value */
hb_retptr( FreeImage_ConvertToStandardType( dib, scale_linear ) );
@@ -2093,7 +2088,7 @@ HB_FUNC( FI_CONVERTTOTYPE )
/* Retrieve parameters */
dib = ( FIBITMAP * ) hb_parptr( 1 );
dst_type = ( FREE_IMAGE_TYPE ) hb_parni( 2 );
scale_linear = ( HB_ISLOG( 3 ) ) ? hb_parl( 3 ) : TRUE;
scale_linear = ( HB_ISLOG( 3 ) ) ? hb_fi_parl( 3 ) : TRUE;
/* run function & return value */
hb_retptr( FreeImage_ConvertToType( dib, dst_type, scale_linear ) );
@@ -2225,7 +2220,7 @@ HB_FUNC( FI_ROTATEEX )
y_shift = hb_parnd( 4 );
x_origin = hb_parnd( 5 );
y_origin = hb_parnd( 6 );
use_mask = hb_parl( 7 );
use_mask = hb_fi_parl( 7 );
/* run function & return value */
hb_retptr( FreeImage_RotateEx( dib, angle, x_shift, y_shift, x_origin, y_origin, use_mask ) );
@@ -2255,8 +2250,7 @@ HB_FUNC( FI_FLIPHORIZONTAL )
dib = ( FIBITMAP * ) hb_parptr( 1 );
/* run function & return value */
hb_retl( FreeImage_FlipHorizontal( dib ) );
hb_fi_retl( FreeImage_FlipHorizontal( dib ) );
}
else
{
@@ -2281,8 +2275,7 @@ HB_FUNC( FI_FLIPVERTICAL )
dib = ( FIBITMAP * ) hb_parptr( 1 );
/* run function & return value */
hb_retl( FreeImage_FlipVertical( dib ) );
hb_fi_retl( FreeImage_FlipVertical( dib ) );
}
else
{
@@ -2360,8 +2353,7 @@ HB_FUNC( FI_ADJUSTGAMMA )
gamma = hb_parnd( 2 );
/* run function & return value */
hb_retl( FreeImage_AdjustGamma( dib, gamma ) );
hb_fi_retl( FreeImage_AdjustGamma( dib, gamma ) );
}
else
{
@@ -2390,8 +2382,7 @@ HB_FUNC( FI_ADJUSTBRIGHTNESS )
percentage = hb_parnd( 2 );
/* run function & return value */
hb_retl( FreeImage_AdjustBrightness( dib, percentage ) );
hb_fi_retl( FreeImage_AdjustBrightness( dib, percentage ) );
}
else
{
@@ -2420,8 +2411,7 @@ HB_FUNC( FI_ADJUSTCONTRAST )
percentage = hb_parnd( 2 );
/* run function & return value */
hb_retl( FreeImage_AdjustContrast( dib, percentage ) );
hb_fi_retl( FreeImage_AdjustContrast( dib, percentage ) );
}
else
{
@@ -2447,8 +2437,7 @@ HB_FUNC( FI_INVERT )
dib = ( FIBITMAP * ) hb_parptr( 1 );
/* run function & return value */
hb_retl( FreeImage_Invert( dib ) );
hb_fi_retl( FreeImage_Invert( dib ) );
}
else
{
@@ -2565,8 +2554,7 @@ HB_FUNC( FI_PASTE )
alpha = hb_parni( 5 );
/* run function & return value */
hb_retl( FreeImage_Paste( dst, src, left, top, alpha ) );
hb_fi_retl( FreeImage_Paste( dst, src, left, top, alpha ) );
}
else
{

View File

@@ -304,9 +304,9 @@ HB_MEMFS_EXPORT USHORT hb_memfsError( void )
}
HB_MEMFS_EXPORT BOOL hb_memfsFileExists( const char * szName )
HB_MEMFS_EXPORT HB_BOOL hb_memfsFileExists( const char * szName )
{
BOOL bRet;
HB_BOOL bRet;
HB_MEMFSMT_LOCK
bRet = memfsInodeFind( szName, NULL ) != 0;
@@ -315,7 +315,7 @@ HB_MEMFS_EXPORT BOOL hb_memfsFileExists( const char * szName )
}
HB_MEMFS_EXPORT BOOL hb_memfsDelete( const char * szName )
HB_MEMFS_EXPORT HB_BOOL hb_memfsDelete( const char * szName )
{
PHB_MEMFS_INODE pInode;
ULONG ulFile;
@@ -324,7 +324,7 @@ HB_MEMFS_EXPORT BOOL hb_memfsDelete( const char * szName )
if( ( ulFile = memfsInodeFind( szName, NULL ) ) == 0 )
{
HB_MEMFSMT_UNLOCK
return 0;
return HB_FALSE;
}
pInode = s_fs.pInodes[ ulFile - 1 ];
@@ -336,11 +336,11 @@ HB_MEMFS_EXPORT BOOL hb_memfsDelete( const char * szName )
if( --pInode->uiCount == 0 )
memfsInodeFree( pInode );
HB_MEMFSMT_UNLOCK
return 1;
return HB_TRUE;
}
HB_MEMFS_EXPORT BOOL hb_memfsRename( const char * szName, const char * szNewName )
HB_MEMFS_EXPORT HB_BOOL hb_memfsRename( const char * szName, const char * szNewName )
{
ULONG ulInode;
@@ -349,18 +349,18 @@ HB_MEMFS_EXPORT BOOL hb_memfsRename( const char * szName, const char * szNewName
{
HB_MEMFSMT_UNLOCK
/* File not found */
return 0;
return HB_FALSE;
}
if( memfsInodeFind( szNewName, NULL ) )
{
HB_MEMFSMT_UNLOCK
/* File already exists */
return 0;
return HB_FALSE;
}
hb_xfree( s_fs.pInodes[ ulInode - 1 ]->szName );
s_fs.pInodes[ ulInode - 1 ]->szName = hb_strdup( szNewName );
HB_MEMFSMT_UNLOCK
return 1;
return HB_TRUE;
}
@@ -572,21 +572,21 @@ HB_MEMFS_EXPORT ULONG hb_memfsWrite( HB_FHANDLE hFile, const void * pBuff, ULONG
#endif
HB_MEMFS_EXPORT BOOL hb_memfsTruncAt( HB_FHANDLE hFile, HB_FOFFSET llOffset )
HB_MEMFS_EXPORT HB_BOOL hb_memfsTruncAt( HB_FHANDLE hFile, HB_FOFFSET llOffset )
{
PHB_MEMFS_FILE pFile;
PHB_MEMFS_INODE pInode;
HB_FOFFSET llNewAlloc;
if( ( pFile = memfsHandleToFile( hFile ) ) == NULL )
return 0; /* invalid handle */
return HB_FALSE; /* invalid handle */
pInode = pFile->pInode;
if( ( pFile->uiFlags & FOX_WRITE ) == 0 )
return 0; /* access denied */
return HB_FALSE; /* access denied */
if( llOffset < 0 )
return 0;
return HB_FALSE;
HB_MEMFSMT_LOCK
@@ -612,7 +612,7 @@ HB_MEMFS_EXPORT BOOL hb_memfsTruncAt( HB_FHANDLE hFile, HB_FOFFSET llOffset )
pInode->llSize = llOffset;
HB_MEMFSMT_UNLOCK
return 1;
return HB_TRUE;
}
@@ -653,13 +653,13 @@ HB_MEMFS_EXPORT void hb_memfsCommit( HB_FHANDLE hFile )
}
HB_MEMFS_EXPORT BOOL hb_memfsLock( HB_FHANDLE hFile, HB_FOFFSET ulStart, HB_FOFFSET ulLength, int iMode )
HB_MEMFS_EXPORT HB_BOOL hb_memfsLock( HB_FHANDLE hFile, HB_FOFFSET ulStart, HB_FOFFSET ulLength, int iMode )
{
HB_SYMBOL_UNUSED( hFile );
HB_SYMBOL_UNUSED( ulStart );
HB_SYMBOL_UNUSED( ulLength );
HB_SYMBOL_UNUSED( iMode );
return 1;
return HB_TRUE;
}
/******************************************************
@@ -682,32 +682,32 @@ HB_FILE;
static PHB_FILE s_fileNew( HB_FHANDLE hFile );
static BOOL s_fileAccept( const char * pFilename )
static HB_BOOL s_fileAccept( const char * pFilename )
{
return hb_strnicmp( pFilename, FILE_PREFIX, FILE_PREFIX_LEN ) == 0;
}
static BOOL s_fileExists( const char * pFilename, char * pRetPath )
static HB_BOOL s_fileExists( const char * pFilename, char * pRetPath )
{
if( hb_memfsFileExists( pFilename + FILE_PREFIX_LEN ) )
{
/* Warning: return buffer could be the same memory place as filename parameter! */
if( pRetPath && pRetPath != pFilename )
hb_strncpy( pRetPath, pFilename, HB_PATH_MAX );
return 1;
return HB_TRUE;
}
return 0;
return HB_FALSE;
}
static BOOL s_fileDelete( const char * pFilename )
static HB_BOOL s_fileDelete( const char * pFilename )
{
return hb_memfsDelete( pFilename + FILE_PREFIX_LEN );
}
static BOOL s_fileRename( const char * szName, const char * szNewName )
static HB_BOOL s_fileRename( const char * szName, const char * szNewName )
{
szName += FILE_PREFIX_LEN;
if( s_fileAccept( szNewName ) )
@@ -715,7 +715,7 @@ static BOOL s_fileRename( const char * szName, const char * szNewName )
szNewName += FILE_PREFIX_LEN;
return hb_memfsRename( szName, szNewName );
}
return 0;
return HB_FALSE;
}
@@ -775,8 +775,8 @@ static void s_fileClose( PHB_FILE pFile )
}
static BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart,
HB_FOFFSET ulLen, int iType )
static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart,
HB_FOFFSET ulLen, int iType )
{
return hb_memfsLock( pFile->hFile, ulStart, ulLen, iType );
}
@@ -796,7 +796,7 @@ static ULONG s_fileWriteAt( PHB_FILE pFile, const void * buffer,
}
static BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset )
static HB_BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset )
{
return hb_memfsTruncAt( pFile->hFile, llOffset );
}

View File

@@ -131,7 +131,7 @@ static HB_TSD_NEW( s_conData, sizeof( HB_CONDATA ), NULL, NULL );
static PHB_CONCLI s_connections = NULL;
static BOOL s_defaultInit = TRUE;
static HB_BOOL s_defaultInit = HB_TRUE;
static HB_CONDATA s_defaultConn = {
NETIO_DEFAULT_TIMEOUT,
NETIO_DEFAULT_PORT,
@@ -142,7 +142,7 @@ static HB_CONDATA s_defaultConn = {
""
};
static BOOL s_fInit = TRUE;
static HB_BOOL s_fInit = HB_TRUE;
static const HB_FILE_FUNCS * s_fileMethods( void );
@@ -166,13 +166,13 @@ static long s_fileRecvAll( PHB_CONCLI conn, void * buffer, long len )
return lRead;
}
static BOOL s_fileSendMsg( PHB_CONCLI conn, BYTE * msgbuf,
const void * data, long len, BOOL fWait )
static HB_BOOL s_fileSendMsg( PHB_CONCLI conn, BYTE * msgbuf,
const void * data, long len, HB_BOOL fWait )
{
BYTE buffer[ 2048 ];
BYTE * msg, * ptr = NULL;
LONG lSent = 0, lLast = 1, l;
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
if( len == 0 )
{
@@ -223,13 +223,13 @@ static BOOL s_fileSendMsg( PHB_CONCLI conn, BYTE * msgbuf,
if( iResult == NETIO_ERROR )
hb_fsSetError( ( HB_ERRCODE ) HB_GET_LE_UINT32( &msgbuf[ 4 ] ) );
else if( iResult == iMsg )
fResult = TRUE;
fResult = HB_TRUE;
break;
}
}
}
else
fResult = TRUE;
fResult = HB_TRUE;
}
return fResult;
@@ -333,7 +333,7 @@ static PHB_CONCLI s_fileConFind( const char * pszServer, int iPort )
return conn;
}
static BOOL s_fileUsrDisconnect( const char * pszServer, int iPort )
static HB_BOOL s_fileUsrDisconnect( const char * pszServer, int iPort )
{
PHB_CONCLI conn, connClose = NULL;
@@ -366,7 +366,7 @@ static void s_fileUsrConnect( PHB_CONCLI conn )
hb_atomic_inc( &conn->usrcount );
}
static BOOL s_fileConLock( PHB_CONCLI conn )
static HB_BOOL s_fileConLock( PHB_CONCLI conn )
{
return !conn->mutex || hb_threadMutexLock( conn->mutex );
}
@@ -514,7 +514,7 @@ static PHB_CONCLI s_fileConnect( const char ** pszFilename,
if( hb_socketInetAddr( &pSockAddr, &uiLen, pszIpAddres, iPort ) )
{
hb_socketSetKeepAlive( sd, TRUE );
hb_socketSetKeepAlive( sd, HB_TRUE );
if( hb_socketConnect( sd, pSockAddr, uiLen, iTimeOut ) == 0 )
{
BYTE msgbuf[ NETIO_MSGLEN ];
@@ -524,7 +524,7 @@ static PHB_CONCLI s_fileConnect( const char ** pszFilename,
HB_PUT_LE_UINT16( &msgbuf[ 4 ], len );
memset( msgbuf + 6, '\0', sizeof( msgbuf ) - 6 );
hb_socketSetNoDelay( sd, TRUE );
hb_socketSetNoDelay( sd, HB_TRUE );
conn = s_fileConNew( sd, pszIpAddres, iPort, iTimeOut,
pszPasswd, iPassLen, iLevel, iStrategy );
sd = HB_NO_SOCKET;
@@ -546,7 +546,7 @@ static PHB_CONCLI s_fileConnect( const char ** pszFilename,
if( conn )
{
if( !s_fileSendMsg( conn, msgbuf, NETIO_LOGINSTRID, len, TRUE ) ||
if( !s_fileSendMsg( conn, msgbuf, NETIO_LOGINSTRID, len, HB_TRUE ) ||
HB_GET_LE_UINT32( &msgbuf[ 4 ] ) != NETIO_CONNECTED )
{
s_fileConFree( conn );
@@ -577,7 +577,7 @@ static PHB_CONCLI s_fileConnect( const char ** pszFilename,
s_defaultConn.passlen = iPassLen;
if( iPassLen )
memcpy( s_defaultConn.passwd, pszPasswd, iPassLen );
s_defaultInit = FALSE;
s_defaultInit = HB_FALSE;
}
HB_NETIO_UNLOCK
}
@@ -601,7 +601,7 @@ static void s_netio_exit( void * cargo )
if( !s_fInit )
{
hb_socketCleanup();
s_fInit = TRUE;
s_fInit = HB_TRUE;
}
}
@@ -614,7 +614,7 @@ static void s_netio_init( void * cargo )
hb_socketInit();
hb_fileRegister( s_fileMethods() );
hb_vmAtQuit( s_netio_exit, NULL );
s_fInit = FALSE;
s_fInit = HB_FALSE;
}
}
@@ -665,7 +665,7 @@ HB_FUNC( NETIO_DISCONNECT )
const char * pszServer = hb_parc( 1 );
char * pszIpAddres;
int iPort = hb_parni( 2 );
BOOL fDisconnected = FALSE;
HB_BOOL fDisconnected = HB_FALSE;
s_fileGetConnParam( &pszServer, &iPort, NULL, NULL, NULL );
pszIpAddres = hb_socketResolveAddr( pszServer, HB_SOCKET_AF_INET );
@@ -687,7 +687,7 @@ static const char * s_netio_params( int iMsg, const char * pszName, UINT32 * pSi
for( i = 2; i <= iPCount; ++i )
{
itmData = hb_itemSerialize( hb_param( i, HB_IT_ANY ), TRUE, &itmSize );
itmData = hb_itemSerialize( hb_param( i, HB_IT_ANY ), HB_TRUE, &itmSize );
if( data == NULL )
data = ( char * ) memcpy( hb_xgrab( size + itmSize ), pszName, size );
else
@@ -703,9 +703,9 @@ static const char * s_netio_params( int iMsg, const char * pszName, UINT32 * pSi
return data ? data : pszName;
}
static BOOL s_netio_procexec( const char * pszProcName, int iMsg )
static HB_BOOL s_netio_procexec( const char * pszProcName, int iMsg )
{
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
if( pszProcName )
{
@@ -807,14 +807,14 @@ HB_FUNC( NETIO_FUNCEXEC )
/* Client methods
*/
static BOOL s_fileAccept( const char * pFilename )
static HB_BOOL s_fileAccept( const char * pFilename )
{
return hb_strnicmp( pFilename, NETIO_FILE_PREFIX, NETIO_FILE_PREFIX_LEN ) == 0;
}
static BOOL s_fileExists( const char * pFilename, char * pRetPath )
static HB_BOOL s_fileExists( const char * pFilename, char * pRetPath )
{
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
PHB_CONCLI conn;
if( pRetPath )
@@ -834,7 +834,7 @@ static BOOL s_fileExists( const char * pFilename, char * pRetPath )
HB_PUT_LE_UINT32( &msgbuf[ 0 ], NETIO_EXISTS );
HB_PUT_LE_UINT16( &msgbuf[ 4 ], len );
memset( msgbuf + 6, '\0', sizeof( msgbuf ) - 6 );
fResult = s_fileSendMsg( conn, msgbuf, pFilename, len, TRUE );
fResult = s_fileSendMsg( conn, msgbuf, pFilename, len, HB_TRUE );
s_fileConUnlock( conn );
}
s_fileConClose( conn );
@@ -843,9 +843,9 @@ static BOOL s_fileExists( const char * pFilename, char * pRetPath )
return fResult;
}
static BOOL s_fileDelete( const char * pFilename )
static HB_BOOL s_fileDelete( const char * pFilename )
{
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
PHB_CONCLI conn;
pFilename += NETIO_FILE_PREFIX_LEN;
@@ -862,7 +862,7 @@ static BOOL s_fileDelete( const char * pFilename )
HB_PUT_LE_UINT32( &msgbuf[ 0 ], NETIO_DELETE );
HB_PUT_LE_UINT16( &msgbuf[ 4 ], len );
memset( msgbuf + 6, '\0', sizeof( msgbuf ) - 6 );
fResult = s_fileSendMsg( conn, msgbuf, pFilename, len, TRUE );
fResult = s_fileSendMsg( conn, msgbuf, pFilename, len, HB_TRUE );
s_fileConUnlock( conn );
}
s_fileConClose( conn );
@@ -871,9 +871,9 @@ static BOOL s_fileDelete( const char * pFilename )
return fResult;
}
static BOOL s_fileRename( const char * pszFileName, const char * pszNewName )
static HB_BOOL s_fileRename( const char * pszFileName, const char * pszNewName )
{
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
PHB_CONCLI conn;
pszFileName += NETIO_FILE_PREFIX_LEN;
@@ -897,7 +897,7 @@ static BOOL s_fileRename( const char * pszFileName, const char * pszNewName )
HB_PUT_LE_UINT16( &msgbuf[ 4 ], len1 );
HB_PUT_LE_UINT16( &msgbuf[ 6 ], len2 );
memset( msgbuf + 8, '\0', sizeof( msgbuf ) - 8 );
fResult = s_fileSendMsg( conn, msgbuf, pBuffer, len1 + len2, TRUE );
fResult = s_fileSendMsg( conn, msgbuf, pBuffer, len1 + len2, HB_TRUE );
s_fileConUnlock( conn );
}
s_fileConClose( conn );
@@ -933,7 +933,7 @@ static PHB_FILE s_fileOpen( const char * pFilename, const char * pDefExt,
hb_strncpy( ( char * ) &msgbuf[ 8 ],
( const char * ) pDefExt, sizeof( msgbuf ) - 9 );
if( s_fileSendMsg( conn, msgbuf, pszFile, len, TRUE ) )
if( s_fileSendMsg( conn, msgbuf, pszFile, len, HB_TRUE ) )
{
pFile = ( PHB_FILE ) hb_xgrab( sizeof( HB_FILE ) );
pFile->pFuncs = s_fileMethods();
@@ -969,22 +969,22 @@ static void s_fileClose( PHB_FILE pFile )
HB_PUT_LE_UINT32( &msgbuf[ 0 ], NETIO_CLOSE );
HB_PUT_LE_UINT16( &msgbuf[ 4 ], pFile->fd );
memset( msgbuf + 6, '\0', sizeof( msgbuf ) - 6 );
s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, TRUE );
s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, HB_TRUE );
s_fileConUnlock( pFile->conn );
}
s_fileConClose( pFile->conn );
hb_xfree( pFile );
}
static BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen,
int iType )
static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen,
int iType )
{
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
if( s_fileConLock( pFile->conn ) )
{
BYTE msgbuf[ NETIO_MSGLEN ];
BOOL fUnLock = ( iType & FL_MASK ) == FL_UNLOCK;
HB_BOOL fUnLock = ( iType & FL_MASK ) == FL_UNLOCK;
HB_PUT_LE_UINT32( &msgbuf[ 0 ], fUnLock ? NETIO_UNLOCK : NETIO_LOCK );
HB_PUT_LE_UINT16( &msgbuf[ 4 ], pFile->fd );
@@ -1017,7 +1017,7 @@ static ULONG s_fileReadAt( PHB_FILE pFile, void * data, ULONG ulSize,
HB_PUT_LE_UINT64( &msgbuf[ 10 ], llOffset );
memset( msgbuf + 18, '\0', sizeof( msgbuf ) - 18 );
if( s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, TRUE ) )
if( s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, HB_TRUE ) )
{
ulResult = HB_GET_LE_UINT32( &msgbuf[ 4 ] );
if( ulResult > 0 )
@@ -1049,7 +1049,7 @@ static ULONG s_fileWriteAt( PHB_FILE pFile, const void * data, ULONG ulSize,
HB_PUT_LE_UINT64( &msgbuf[ 10 ], llOffset );
memset( msgbuf + 18, '\0', sizeof( msgbuf ) - 18 );
if( s_fileSendMsg( pFile->conn, msgbuf, data, ulSize, TRUE ) )
if( s_fileSendMsg( pFile->conn, msgbuf, data, ulSize, HB_TRUE ) )
{
ulResult = HB_GET_LE_UINT32( &msgbuf[ 4 ] );
hb_fsSetError( ( HB_ERRCODE ) HB_GET_LE_UINT32( &msgbuf[ 8 ] ) );
@@ -1060,9 +1060,9 @@ static ULONG s_fileWriteAt( PHB_FILE pFile, const void * data, ULONG ulSize,
return ulResult;
}
static BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset )
static HB_BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset )
{
BOOL fResult = FALSE;
HB_BOOL fResult = HB_FALSE;
if( s_fileConLock( pFile->conn ) )
{
@@ -1073,7 +1073,7 @@ static BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET llOffset )
HB_PUT_LE_UINT64( &msgbuf[ 6 ], llOffset );
memset( msgbuf + 14, '\0', sizeof( msgbuf ) - 14 );
fResult = s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, TRUE );
fResult = s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, HB_TRUE );
s_fileConUnlock( pFile->conn );
}
@@ -1092,7 +1092,7 @@ static HB_FOFFSET s_fileSize( PHB_FILE pFile )
HB_PUT_LE_UINT16( &msgbuf[ 4 ], pFile->fd );
memset( msgbuf + 6, '\0', sizeof( msgbuf ) - 6 );
if( s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, TRUE ) )
if( s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, HB_TRUE ) )
{
llOffset = HB_GET_LE_UINT64( &msgbuf[ 4 ] );
hb_fsSetError( ( HB_ERRCODE ) HB_GET_LE_UINT32( &msgbuf[ 12 ] ) );
@@ -1113,7 +1113,7 @@ static void s_fileCommit( PHB_FILE pFile )
HB_PUT_LE_UINT16( &msgbuf[ 4 ], pFile->fd );
memset( msgbuf + 6, '\0', sizeof( msgbuf ) - 6 );
s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, FALSE );
s_fileSendMsg( pFile->conn, msgbuf, NULL, 0, HB_FALSE );
s_fileConUnlock( pFile->conn );
}
}

View File

@@ -93,9 +93,9 @@ typedef struct _HB_CONSRV
PHB_FILE fileTable[ NETIO_FILES_MAX ];
int filesCount;
int firstFree;
BOOL stop;
BOOL rpc;
BOOL login;
HB_BOOL stop;
HB_BOOL rpc;
HB_BOOL login;
PHB_SYMB rpcFunc;
PHB_ITEM rpcFilter;
int rootPathLen;
@@ -106,13 +106,13 @@ HB_CONSRV, * PHB_CONSRV;
typedef struct _HB_LISTENSD
{
HB_SOCKET sd;
BOOL stop;
BOOL rpc;
HB_BOOL stop;
HB_BOOL rpc;
char rootPath[ HB_PATH_MAX ];
}
HB_LISTENSD, * PHB_LISTENSD;
static BOOL s_isDirSep( char c )
static HB_BOOL s_isDirSep( char c )
{
/* intentionally used explicit values instead of harbour macros
* because client can use different OS
@@ -310,7 +310,7 @@ static void s_consrvRet( PHB_CONSRV conn )
hb_ret();
}
static PHB_CONSRV s_consrvNew( HB_SOCKET connsd, const char * szRootPath, BOOL rpc )
static PHB_CONSRV s_consrvNew( HB_SOCKET connsd, const char * szRootPath, HB_BOOL rpc )
{
PHB_CONSRV conn = ( PHB_CONSRV ) memset( hb_xgrab( sizeof( HB_CONSRV ) ),
0, sizeof( HB_CONSRV ) );
@@ -398,7 +398,7 @@ static const HB_GC_FUNCS s_gcListensdFuncs =
hb_gcDummyMark
};
static PHB_LISTENSD s_listenParam( int iParam, BOOL fError )
static PHB_LISTENSD s_listenParam( int iParam, HB_BOOL fError )
{
PHB_LISTENSD * lsd_ptr = ( PHB_LISTENSD * )
hb_parptrGC( &s_gcListensdFuncs, iParam );
@@ -411,7 +411,7 @@ static PHB_LISTENSD s_listenParam( int iParam, BOOL fError )
return NULL;
}
static void s_listenRet( HB_SOCKET sd, const char * szRootPath, BOOL rpc )
static void s_listenRet( HB_SOCKET sd, const char * szRootPath, HB_BOOL rpc )
{
if( sd != HB_NO_SOCKET )
{
@@ -450,8 +450,8 @@ static void s_listenRet( HB_SOCKET sd, const char * szRootPath, BOOL rpc )
*/
HB_FUNC( NETIO_RPC )
{
PHB_LISTENSD lsd = s_listenParam( 1, FALSE );
BOOL fRPC = FALSE;
PHB_LISTENSD lsd = s_listenParam( 1, HB_FALSE );
HB_BOOL fRPC = HB_FALSE;
if( lsd )
{
@@ -502,8 +502,8 @@ HB_FUNC( NETIO_RPCFILTER )
*/
HB_FUNC( NETIO_SERVERSTOP )
{
PHB_LISTENSD lsd = s_listenParam( 1, FALSE );
BOOL fStop = hb_parldef( 2, 1 );
PHB_LISTENSD lsd = s_listenParam( 1, HB_FALSE );
HB_BOOL fStop = hb_parldef( 2, 1 );
if( lsd )
lsd->stop = fStop;
@@ -520,12 +520,12 @@ HB_FUNC( NETIO_SERVERSTOP )
*/
HB_FUNC( NETIO_LISTEN )
{
static BOOL s_fInit = TRUE;
static HB_BOOL s_fInit = HB_TRUE;
int iPort = hb_parnidef( 1, NETIO_DEFAULT_PORT );
const char * szAddress = hb_parc( 2 );
const char * szRootPath = hb_parc( 3 );
BOOL fRPC = hb_parl( 4 );
HB_BOOL fRPC = hb_parl( 4 );
void * pSockAddr;
unsigned uiLen;
HB_SOCKET sd = HB_NO_SOCKET;
@@ -533,7 +533,7 @@ HB_FUNC( NETIO_LISTEN )
if( s_fInit )
{
hb_socketInit();
s_fInit = FALSE;
s_fInit = HB_FALSE;
}
if( hb_socketInetAddr( &pSockAddr, &uiLen, szAddress, iPort ) )
@@ -560,7 +560,7 @@ HB_FUNC( NETIO_LISTEN )
*/
HB_FUNC( NETIO_ACCEPT )
{
PHB_LISTENSD lsd = s_listenParam( 1, TRUE );
PHB_LISTENSD lsd = s_listenParam( 1, HB_TRUE );
PHB_CONSRV conn = NULL;
if( lsd && lsd->sd != HB_NO_SOCKET && !lsd->stop )
@@ -583,7 +583,7 @@ HB_FUNC( NETIO_ACCEPT )
if( connsd != HB_NO_SOCKET )
{
hb_socketSetNoDelay( connsd, TRUE );
hb_socketSetNoDelay( connsd, HB_TRUE );
conn = s_consrvNew( connsd, lsd->rootPath, lsd->rpc );
@@ -679,7 +679,7 @@ HB_FUNC( NETIO_SERVER )
HB_PUT_LE_UINT32( &msgbuf[ 4 ], NETIO_CONNECTED );
memset( msgbuf + 8, '\0', NETIO_MSGLEN - 8 );
if( s_srvSendAll( conn, msgbuf, NETIO_MSGLEN ) == NETIO_MSGLEN )
conn->login = TRUE;
conn->login = HB_TRUE;
}
}
}
@@ -690,7 +690,7 @@ HB_FUNC( NETIO_SERVER )
else for( ;; )
{
BYTE buffer[ 2048 ], * ptr = NULL, * msg;
BOOL fNoAnswer = FALSE;
HB_BOOL fNoAnswer = HB_FALSE;
HB_ERRCODE errCode = 0, errFsCode;
long len = 0, size, size2;
int iFileNo;
@@ -913,7 +913,7 @@ HB_FUNC( NETIO_SERVER )
break;
case NETIO_UNLOCK:
fNoAnswer = TRUE;
fNoAnswer = HB_TRUE;
case NETIO_LOCK:
iFileNo = HB_GET_LE_UINT16( &msgbuf[ 4 ] );
llOffset = HB_GET_LE_INT64( &msgbuf[ 6 ] );
@@ -980,11 +980,11 @@ HB_FUNC( NETIO_SERVER )
pFile = s_srvFileGet( conn, iFileNo );
if( pFile )
hb_fileCommit( pFile );
fNoAnswer = TRUE;
fNoAnswer = HB_TRUE;
break;
case NETIO_PROC:
fNoAnswer = TRUE;
fNoAnswer = HB_TRUE;
case NETIO_PROCIS:
case NETIO_PROCW:
case NETIO_FUNC:
@@ -1032,18 +1032,18 @@ HB_FUNC( NETIO_SERVER )
{
ULONG ulSize = size - size2;
USHORT uiPCount = 0;
BOOL fSend = FALSE;
HB_BOOL fSend = HB_FALSE;
data += size2;
if( pItem )
{
fSend = TRUE;
fSend = HB_TRUE;
hb_vmPushEvalSym();
hb_vmPush( pItem );
}
else if( conn->rpcFunc )
{
fSend = TRUE;
fSend = HB_TRUE;
hb_vmPushSymbol( conn->rpcFunc );
hb_vmPushNil();
hb_vmPushDynSym( pDynSym );
@@ -1083,7 +1083,7 @@ HB_FUNC( NETIO_SERVER )
if( uiMsg == NETIO_FUNC )
{
ULONG itmSize;
char * itmData = hb_itemSerialize( hb_stackReturnItem(), TRUE, &itmSize );
char * itmData = hb_itemSerialize( hb_stackReturnItem(), HB_TRUE, &itmSize );
if( itmSize <= sizeof( buffer ) - NETIO_MSGLEN )
msg = buffer;
else if( !ptr || itmSize > ( ULONG ) size - NETIO_MSGLEN )

View File

@@ -84,7 +84,7 @@ static char *s_TextEndFunc = NULL;
static char *s_TextStartFunc = NULL;
/*
BOOL bDebug = FALSE;
HB_BOOL bDebug = HB_FALSE;
*/
void hb_pp_InternalFree( void )
@@ -136,8 +136,8 @@ int hb_pp_Internal_( FILE * handl_o, char * sOut )
s_szOutLine = (char *) hb_xgrab( HB_PP_STR_SIZE );
#endif
hb_pp_NestedLiteralString = FALSE;
hb_pp_LiteralEscSeq = FALSE;
hb_pp_NestedLiteralString = HB_FALSE;
hb_pp_LiteralEscSeq = HB_FALSE;
for( ;; )
{
pFile = hb_comp_files.pLast;
@@ -180,7 +180,7 @@ int hb_pp_Internal_( FILE * handl_o, char * sOut )
s_szLine[ lens ] = '\0';
lens = hb_snprintf( s_szOutLine, HB_PP_STR_SIZE, s_TextOutFunc, s_szLine );
memcpy( s_szLine, s_szOutLine, lens+1 );
hb_pp_NestedLiteralString = TRUE;
hb_pp_NestedLiteralString = HB_TRUE;
break;
}
else
@@ -216,7 +216,7 @@ int hb_pp_Internal_( FILE * handl_o, char * sOut )
lens -= rdlen;
s_szLine[ lens ] = '\0';
pp_StreamBlockFinish( );
hb_pp_LiteralEscSeq = TRUE;
hb_pp_LiteralEscSeq = HB_TRUE;
break;
}
else
@@ -226,7 +226,7 @@ int hb_pp_Internal_( FILE * handl_o, char * sOut )
}
}
}
if( s_szLine[ lens - 1 ] == ';' )
{
lContinue = pFile->lenBuffer ? 1 : 0;
@@ -329,9 +329,9 @@ int hb_pp_Internal_( FILE * handl_o, char * sOut )
static void pp_ParseBuffer( PFILE pFile, int *plLine )
{
BOOL bCont = TRUE;
HB_BOOL bCont = HB_TRUE;
char * ptr;
while( bCont && *s_szLine != '\0' )
{
ptr = s_szLine;
@@ -339,7 +339,7 @@ static void pp_ParseBuffer( PFILE pFile, int *plLine )
if( *ptr == '#' )
{
BOOL bIgnore = hb_pp_ParseDirective_( ptr );
HB_BOOL bIgnore = hb_pp_ParseDirective_( ptr );
if( pFile != hb_comp_files.pLast )
{
@@ -355,13 +355,13 @@ static void pp_ParseBuffer( PFILE pFile, int *plLine )
hb_snprintf( s_szLine + strlen(s_szLine), HB_PP_STR_SIZE - strlen(s_szLine),
"#line 1 \"%s\"", hb_comp_files.pLast->szFileName );
bCont = FALSE;
bCont = HB_FALSE;
}
else if( bIgnore )
*s_szLine = '\0';
else
{
hb_pp_ParseExpression( ptr, s_szOutLine, TRUE );
hb_pp_ParseExpression( ptr, s_szOutLine, HB_TRUE );
}
}
else
@@ -371,13 +371,13 @@ static void pp_ParseBuffer( PFILE pFile, int *plLine )
if( hb_comp_files.iFiles == 1 )
*s_szLine = '\0';
else
bCont = FALSE;
bCont = HB_FALSE;
}
else
{
if( hb_pp_nCondCompile == 0 || hb_pp_aCondCompile[ hb_pp_nCondCompile - 1 ] )
{
hb_pp_ParseExpression( ptr, s_szOutLine, TRUE );
hb_pp_ParseExpression( ptr, s_szOutLine, HB_TRUE );
HB_SKIPTABSPACES( ptr );
bCont = ( *ptr == '#' );
@@ -393,7 +393,7 @@ static char *pp_TextCommand( char * ptr, int *pLen )
{
int i;
char *cCommand = NULL;
i = 0;
while( ptr[i] && ptr[i] != '|' )
{
@@ -423,7 +423,7 @@ static char *pp_TextCommand( char * ptr, int *pLen )
else
*ptr ='\0';
}
return cCommand;
}
@@ -450,14 +450,14 @@ static void pp_TextBlockFinish( void )
hb_xfree( (void *)s_TextStartFunc );
s_TextStartFunc = NULL;
}
hb_pp_NestedLiteralString = FALSE;
hb_pp_NestedLiteralString = HB_FALSE;
}
BOOL hb_pp_StreamBlockBegin( char * ptr, int iStreamType )
HB_BOOL hb_pp_StreamBlockBegin( char * ptr, int iStreamType )
{
BOOL bIgnore = TRUE;
HB_BOOL bIgnore = HB_TRUE;
int len;
switch( iStreamType )
{
case HB_PP_STREAM_CLIPPER:
@@ -473,7 +473,7 @@ BOOL hb_pp_StreamBlockBegin( char * ptr, int iStreamType )
if( s_TextStartFunc )
{
memcpy( ptr, s_TextStartFunc, strlen(s_TextStartFunc)+1 );
bIgnore = FALSE;
bIgnore = HB_FALSE;
}
hb_pp_StreamBlock = iStreamType;
break;
@@ -494,7 +494,7 @@ BOOL hb_pp_StreamBlockBegin( char * ptr, int iStreamType )
hb_pp_StreamBlock = iStreamType;
break;
}
case HB_PP_STREAM_C:
{
/* internal handling of TEXT/ENDTEXT command
@@ -510,10 +510,10 @@ BOOL hb_pp_StreamBlockBegin( char * ptr, int iStreamType )
hb_pp_StreamBlock = iStreamType;
break;
}
default:
break;
}
}
return bIgnore;
}
@@ -542,7 +542,7 @@ static void pp_StreamBlockFinish( void )
hb_xfree( (void *)s_TextOutFunc );
s_TextOutFunc = NULL;
}
hb_pp_NestedLiteralString = TRUE;
hb_pp_NestedLiteralString = HB_TRUE;
}
void hb_pp_BlockEnd( )

View File

@@ -89,31 +89,31 @@ int hb_pp_ParseDefine_( char * ); /* Process #define directive */
static COMMANDS *AddCommand( char * ); /* Add new #command to an array */
static COMMANDS *AddTranslate( char * ); /* Add new #translate to an array */
static DEFINES *DefSearch( char *, int, BOOL * );
static DEFINES *DefSearch( char *, int, HB_BOOL * );
static COMMANDS *ComSearch( char *, COMMANDS * );
static COMMANDS *TraSearch( char *, COMMANDS * );
static int ParseUndef( char * ); /* Process #undef directive */
static int ParseIfdef( char *, int ); /* Process #ifdef directive */
static void ParseCommand( char *, BOOL, BOOL ); /* Process #command or #translate directive */
static void ParseCommand( char *, HB_BOOL, HB_BOOL ); /* Process #command or #translate directive */
static void ConvertPatterns( char *, int, char *, int ); /* Converting result pattern in #command and #translate */
static int WorkDefine( char **, char *, DEFINES * ); /* Replace fragment of code with a #defined result text */
static int WorkPseudoF( char **, char *, DEFINES * ); /* Replace pseudofunction with a #defined result text */
static int WorkCommand( char *, char *, COMMANDS * );
static int WorkTranslate( char *, char *, COMMANDS *, int * );
static int CommandStuff( char *, char *, char *, int *, BOOL, BOOL );
static int CommandStuff( char *, char *, char *, int *, HB_BOOL, HB_BOOL );
static int RemoveSlash( char * );
static int WorkMarkers( char **, char **, char *, int *, BOOL, BOOL );
static int getExpReal( char *, char **, BOOL, int, BOOL, BOOL );
static BOOL isExpres( char *, BOOL );
static BOOL TestOptional( char *, char * );
static BOOL CheckOptional( char *, char *, char *, int *, BOOL, BOOL );
static int WorkMarkers( char **, char **, char *, int *, HB_BOOL, HB_BOOL );
static int getExpReal( char *, char **, HB_BOOL, int, HB_BOOL, HB_BOOL );
static HB_BOOL isExpres( char *, HB_BOOL );
static HB_BOOL TestOptional( char *, char * );
static HB_BOOL CheckOptional( char *, char *, char *, int *, HB_BOOL, HB_BOOL );
static void SkipOptional( char ** );
static void SearnRep( char *, char *, int, char *, int * );
static int ReplacePattern( char, char *, int, char *, int );
static void pp_rQuotes( char *, char * );
static int md_strAt( char *, int, char *, BOOL, BOOL, BOOL, int );
static int md_strAt( char *, int, char *, HB_BOOL, HB_BOOL, HB_BOOL, int );
#define MD_STR_AT_IGNORECASE 0 /* search ignoring case */
#define MD_STR_AT_USESUBCASE 1 /* use case specified in search string (old) */
@@ -121,17 +121,17 @@ static char *PrevSquare( char *, char *, int * );
static int IsInStr( char, char * );
static int stroncpy( char *, char *, int );
static int strincpy( char *, char * );
static BOOL truncmp( char **, char **, BOOL );
static BOOL strincmp( char *, char **, BOOL );
static int strotrim( char *, BOOL ); /* Ron Pinkas 2001-02-14 added 2nd parameter */
static int NextWord( char **, char *, BOOL );
static HB_BOOL truncmp( char **, char **, HB_BOOL );
static HB_BOOL strincmp( char *, char **, HB_BOOL );
static int strotrim( char *, HB_BOOL ); /* Ron Pinkas 2001-02-14 added 2nd parameter */
static int NextWord( char **, char *, HB_BOOL );
static int NextName( char **, char * );
static int NextParm( char **, char * );
static BOOL OpenInclude( char *, HB_PATHNAMES *, PHB_FNAME, BOOL bStandardOnly, char * );
static BOOL IsIdentifier( char *szProspect );
static int IsMacroVar( char *szText, BOOL isCommand );
static HB_BOOL OpenInclude( char *, HB_PATHNAMES *, PHB_FNAME, HB_BOOL bStandardOnly, char * );
static HB_BOOL IsIdentifier( char *szProspect );
static int IsMacroVar( char *szText, HB_BOOL isCommand );
static void RemoveOptional( char *cpatt );
static int ConvertOptional( char *cpatt, int len, BOOL bLeft );
static int ConvertOptional( char *cpatt, int len, HB_BOOL bLeft );
#define ISNAME( c ) ( isalnum( c ) || ( c ) == '_' || ( c ) > 0x7E )
#define MAX_NAME 255
@@ -185,7 +185,7 @@ static int s_ParseState;
static int s_maxCondCompile;
static int s_aIsRepeate[5];
static int s_Repeate;
static BOOL s_bReplacePat = TRUE;
static HB_BOOL s_bReplacePat = HB_TRUE;
static int s_numBrackets;
static char s_groupchar;
static char s_prevchar;
@@ -196,14 +196,14 @@ static char *s_expcopy = NULL; /* allocation inside SearnExp */
/* global variables */
int *hb_pp_aCondCompile = NULL;
int hb_pp_nCondCompile = 0;
BOOL hb_pp_NestedLiteralString = FALSE;
BOOL hb_pp_LiteralEscSeq = FALSE;
HB_BOOL hb_pp_NestedLiteralString = HB_FALSE;
HB_BOOL hb_pp_LiteralEscSeq = HB_FALSE;
unsigned int hb_pp_MaxTranslateCycles = 1024;
int hb_pp_StreamBlock = 0;
char *hb_pp_STD_CH = NULL;
/* Ron Pinkas added 2000-11-21 */
static BOOL s_bArray = FALSE;
static HB_BOOL s_bArray = HB_FALSE;
/* Table with parse errors */
const char *hb_pp_szErrors[] = {
@@ -236,7 +236,7 @@ const char *hb_pp_szWarnings[] = {
"1No directives in command definitions file"
};
void hb_pp_SetRules_( HB_INCLUDE_FUNC_PTR pIncludeFunc, BOOL bQuiet )
void hb_pp_SetRules_( HB_INCLUDE_FUNC_PTR pIncludeFunc, HB_BOOL bQuiet )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_pp_SetRules_()" ) );
@@ -378,7 +378,7 @@ void hb_pp_Init( void )
s_ParseState = 0;
s_maxCondCompile = 5;
s_bReplacePat = TRUE;
s_bReplacePat = HB_TRUE;
s_prevchar = 'A';
if( !hb_pp_aCondCompile )
@@ -502,7 +502,7 @@ int hb_pp_ParseDirective_( char *sLine )
HB_TRACE( HB_TR_DEBUG, ( "hb_pp_ParseDirective_(%s)", sLine ) );
strotrim( sLine, TRUE );
strotrim( sLine, HB_TRUE );
hb_pp_strocpy( sLine, sLine + 1 );
sParse = sLine;
@@ -528,10 +528,10 @@ int hb_pp_ParseDirective_( char *sLine )
}
else if( i >= 4 && i <= 5 && memcmp( sDirective, "IFDEF", i ) == 0 )
ParseIfdef( sLine, TRUE ); /* --- #ifdef --- */
ParseIfdef( sLine, HB_TRUE ); /* --- #ifdef --- */
else if( i >= 4 && i <= 6 && memcmp( sDirective, "IFNDEF", i ) == 0 )
ParseIfdef( sLine, FALSE ); /* --- #ifndef --- */
ParseIfdef( sLine, HB_FALSE ); /* --- #ifndef --- */
else if( hb_pp_nCondCompile == 0 || hb_pp_aCondCompile[hb_pp_nCondCompile - 1] )
{
@@ -579,13 +579,13 @@ int hb_pp_ParseDirective_( char *sLine )
else if( ( i >= 4 && i <= 7 && memcmp( sDirective, "COMMAND", i ) == 0 ) || ( i >= 4 && i <= 8 && memcmp( sDirective, "XCOMMAND", i ) == 0 ) )
/* --- #command --- */
ParseCommand( sLine, ( i == 7 ) ? FALSE : TRUE, TRUE );
ParseCommand( sLine, ( i == 7 ) ? HB_FALSE : HB_TRUE, HB_TRUE );
else
if( ( i >= 4 && i <= 9 && memcmp( sDirective, "TRANSLATE", i ) == 0 )
|| ( i >= 4 && i <= 10 && memcmp( sDirective, "XTRANSLATE", i ) == 0 ) )
/* --- #translate --- */
ParseCommand( sLine, ( i == 9 ) ? FALSE : TRUE, FALSE );
ParseCommand( sLine, ( i == 9 ) ? HB_FALSE : HB_TRUE, HB_FALSE );
else if( i >= 4 && i <= 6 && memcmp( sDirective, "STDOUT", i ) == 0 )
printf( "%s\n", sLine ); /* --- #stdout --- */
@@ -702,7 +702,7 @@ int hb_pp_ParseDefine_( char *sLine )
memcpy( pars, tmp, iPar );
pars[iPar] = '\0';
iOldPos = 0;
while( ( iPos = md_strAt( pars + 1, iPar - 1, sLine + iOldPos, TRUE, FALSE, FALSE, MD_STR_AT_IGNORECASE ) ) != 0 )
while( ( iPos = md_strAt( pars + 1, iPar - 1, sLine + iOldPos, HB_TRUE, HB_FALSE, HB_FALSE, MD_STR_AT_IGNORECASE ) ) != 0 )
{
if( sLine[iOldPos + iPos] != '\001' )
{
@@ -733,7 +733,7 @@ int hb_pp_ParseDefine_( char *sLine )
DEFINES *hb_pp_AddDefine_( char *defname, char *value )
{
BOOL isNew;
HB_BOOL isNew;
DEFINES *stdef;
int len = strlen( defname );
@@ -777,12 +777,12 @@ static int ParseUndef( char *sLine )
{
char defname[MAX_NAME];
DEFINES *stdef;
BOOL isNew;
HB_BOOL isNew;
int len;
HB_TRACE( HB_TR_DEBUG, ( "ParseUndef(%s)", sLine ) );
NextWord( &sLine, defname, FALSE );
NextWord( &sLine, defname, HB_FALSE );
len = strlen( defname );
if( ( stdef = DefSearch( defname, len, &isNew ) ) != NULL )
@@ -814,7 +814,7 @@ static int ParseIfdef( char *sLine, int usl )
if( hb_pp_nCondCompile == 0 || hb_pp_aCondCompile[hb_pp_nCondCompile - 1] )
{
len = NextWord( &sLine, defname, FALSE );
len = NextWord( &sLine, defname, HB_FALSE );
if( *defname == '\0' )
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_DEFINE_ABSENT, NULL, NULL );
}
@@ -838,7 +838,7 @@ static int ParseIfdef( char *sLine, int usl )
return 0;
}
static DEFINES *DefSearch( char *defname, int len, BOOL * isNew )
static DEFINES *DefSearch( char *defname, int len, HB_BOOL * isNew )
{
int kol = 0, j;
DEFINES *stdef = hb_pp_topDefine;
@@ -904,7 +904,7 @@ static COMMANDS *TraSearch( char *cmdname, COMMANDS * sttraStart )
return sttra;
}
static void ParseCommand( char *sLine, BOOL com_or_xcom, BOOL com_or_tra )
static void ParseCommand( char *sLine, HB_BOOL com_or_xcom, HB_BOOL com_or_tra )
{
#if !defined(HB_PP_DEBUG_MEMORY)
static char mpatt[PATTERN_SIZE];
@@ -919,7 +919,7 @@ static void ParseCommand( char *sLine, BOOL com_or_xcom, BOOL com_or_tra )
int ipos;
/* Ron Pinkas added 2000-12-03 */
BOOL bOk = FALSE;
HB_BOOL bOk = HB_FALSE;
HB_TRACE( HB_TR_DEBUG, ( "ParseCommand(%s, %d, %d)", sLine, com_or_xcom, com_or_tra ) );
@@ -999,7 +999,7 @@ static void ParseCommand( char *sLine, BOOL com_or_xcom, BOOL com_or_tra )
mpatt[ipos + 1] = '\0';
sLine++;
bOk = TRUE;
bOk = HB_TRUE;
break;
}
@@ -1017,7 +1017,7 @@ static void ParseCommand( char *sLine, BOOL com_or_xcom, BOOL com_or_tra )
/* Ron Pinkas removed 2000-12-03
stroncpy( mpatt, sLine, ipos-1 ); */
mlen = strotrim( mpatt, TRUE );
mlen = strotrim( mpatt, HB_TRUE );
/* Ron Pinkas removed 2000-12-03
sLine += ipos + 1; */
@@ -1025,7 +1025,7 @@ static void ParseCommand( char *sLine, BOOL com_or_xcom, BOOL com_or_tra )
HB_SKIPTABSPACES( sLine );
/* hb_pp_strocpy( rpatt, sLine ); */
rpatt = sLine;
rlen = strotrim( rpatt, TRUE );
rlen = strotrim( rpatt, HB_TRUE );
ConvertPatterns( mpatt, mlen, rpatt, rlen );
RemoveSlash( mpatt );
@@ -1052,7 +1052,7 @@ static void ParseCommand( char *sLine, BOOL com_or_xcom, BOOL com_or_tra )
/* Remove escape characters and check '[' optional markers
*/
static int ConvertOptional( char *cpatt, int len, BOOL bLeft )
static int ConvertOptional( char *cpatt, int len, HB_BOOL bLeft )
{
int i = 0;
@@ -1083,7 +1083,7 @@ static int ConvertOptional( char *cpatt, int len, BOOL bLeft )
{
int j = i + 1;
int iOpenBrackets = 1;
BOOL bOption = FALSE;
HB_BOOL bOption = HB_FALSE;
while( cpatt[j] && iOpenBrackets )
{
@@ -1104,7 +1104,7 @@ static int ConvertOptional( char *cpatt, int len, BOOL bLeft )
j++;
if( strchr( "*(!-{.\"", cpatt[j] ) || ISNAME( ( BYTE ) cpatt[j] ) )
{
bOption = TRUE;
bOption = HB_TRUE;
continue;
}
}
@@ -1203,8 +1203,8 @@ static void ConvertPatterns( char *mpatt, int mlen, char *rpatt, int rlen )
HB_TRACE( HB_TR_DEBUG, ( "ConvertPatterns(%s, %d, %s, %d)", mpatt, mlen, rpatt, rlen ) );
expreal[0] = HB_PP_MATCH_MARK;
mlen = ConvertOptional( mpatt, mlen, TRUE ); /* left pattern */
rlen = ConvertOptional( rpatt, rlen, FALSE ); /* right pattern */
mlen = ConvertOptional( mpatt, mlen, HB_TRUE ); /* left pattern */
rlen = ConvertOptional( rpatt, rlen, HB_FALSE ); /* right pattern */
while( *( mpatt + i ) != '\0' )
{
@@ -1415,7 +1415,7 @@ static COMMANDS *AddTranslate( char *traname )
return sttra;
}
int hb_pp_ParseExpression( char *sLine, char *sOutLine, BOOL bSplitLines )
int hb_pp_ParseExpression( char *sLine, char *sOutLine, HB_BOOL bSplitLines )
{
#if !defined(HB_PP_DEBUG_MEMORY)
static char rpatt[PATTERN_SIZE];
@@ -1435,7 +1435,7 @@ int hb_pp_ParseExpression( char *sLine, char *sOutLine, BOOL bSplitLines )
do
{
strotrim( sLine, FALSE );
strotrim( sLine, HB_FALSE );
rezDef = 0;
rezTra = 0;
@@ -1447,7 +1447,7 @@ int hb_pp_ParseExpression( char *sLine, char *sOutLine, BOOL bSplitLines )
ptro = sOutLine;
ptri = sLine + isdvig;
if( bSplitLines )
ipos = md_strAt( ";", 1, ptri, TRUE, FALSE, FALSE, MD_STR_AT_IGNORECASE );
ipos = md_strAt( ";", 1, ptri, HB_TRUE, HB_FALSE, HB_FALSE, MD_STR_AT_IGNORECASE );
else
ipos = 0;
@@ -1526,7 +1526,7 @@ int hb_pp_ParseExpression( char *sLine, char *sOutLine, BOOL bSplitLines )
ptri = sLine + isdvig;
lenToken = stcmd->namelen;
while( ( ifou = md_strAt( stcmd->name, lenToken, ptri, TRUE, FALSE, FALSE, MD_STR_AT_USESUBCASE ) ) > 0 )
while( ( ifou = md_strAt( stcmd->name, lenToken, ptri, HB_TRUE, HB_FALSE, HB_FALSE, MD_STR_AT_USESUBCASE ) ) > 0 )
{
ptri += ifou - 1;
@@ -1720,7 +1720,7 @@ static int WorkDefine( char **ptri, char *ptro, DEFINES * stdef )
}
if( *pTmp == '[' )
{
s_bArray = TRUE;
s_bArray = HB_TRUE;
}
/* END - Ron Pinkas added 2000-11-21 */
@@ -1830,7 +1830,7 @@ static int WorkCommand( char *ptri, char *ptro, COMMANDS * stcmd )
ptrmp = stcmd->mpatt; /* Pointer to a match pattern */
s_Repeate = 0;
s_groupchar = '@';
rez = CommandStuff( ptrmp, ptri, ptro, &lenres, TRUE, stcmd->com_or_xcom );
rez = CommandStuff( ptrmp, ptri, ptro, &lenres, HB_TRUE, stcmd->com_or_xcom );
stcmd = stcmd->last;
if( rez < 0 && stcmd != NULL )
@@ -1861,7 +1861,7 @@ static int WorkTranslate( char *ptri, char *ptro, COMMANDS * sttra, int *lens )
ptrmp = sttra->mpatt;
s_Repeate = 0;
s_groupchar = '@';
rez = CommandStuff( ptrmp, ptri, ptro, &lenres, FALSE, sttra->com_or_xcom );
rez = CommandStuff( ptrmp, ptri, ptro, &lenres, HB_FALSE, sttra->com_or_xcom );
sttra = sttra->last;
@@ -1885,9 +1885,9 @@ static int WorkTranslate( char *ptri, char *ptro, COMMANDS * sttra, int *lens )
#define MAX_OPTIONALS 64
static int CommandStuff( char *ptrmp, char *inputLine, char *ptro, int *lenres, BOOL com_or_tra, BOOL com_or_xcom )
static int CommandStuff( char *ptrmp, char *inputLine, char *ptro, int *lenres, HB_BOOL com_or_tra, HB_BOOL com_or_xcom )
{
BOOL endTranslation = FALSE;
HB_BOOL endTranslation = HB_FALSE;
int ipos;
char *lastopti[MAX_OPTIONALS], *strtopti = NULL, *strtptri = NULL;
char *ptri = inputLine, *ptr, tmpname[MAX_NAME];
@@ -1929,7 +1929,7 @@ static int CommandStuff( char *ptrmp, char *inputLine, char *ptro, int *lenres,
ptrmp = strtopti;
ptr = ptri;
ipos = NextName( &ptr, tmpname ); /* get starting keyword */
ipos = md_strAt( tmpname, ipos, strtopti, TRUE, TRUE, TRUE, MD_STR_AT_USESUBCASE );
ipos = md_strAt( tmpname, ipos, strtopti, HB_TRUE, HB_TRUE, HB_TRUE, MD_STR_AT_USESUBCASE );
if( ipos && TestOptional( strtopti, strtopti + ipos - 2 ) )
{
/* the keyword from input is found in the pattern */
@@ -1968,7 +1968,7 @@ static int CommandStuff( char *ptrmp, char *inputLine, char *ptro, int *lenres,
{
ptr = ptri;
ipos = NextName( &ptr, tmpname );
ipos = md_strAt( tmpname, ipos, ptrmp, TRUE, TRUE, TRUE, MD_STR_AT_USESUBCASE );
ipos = md_strAt( tmpname, ipos, ptrmp, HB_TRUE, HB_TRUE, HB_TRUE, MD_STR_AT_USESUBCASE );
if( ipos && TestOptional( ptrmp + 1, ptrmp + ipos - 2 ) )
{
ptr = PrevSquare( ptrmp + ipos - 2, ptrmp + 1, NULL );
@@ -2058,7 +2058,7 @@ static int CommandStuff( char *ptrmp, char *inputLine, char *ptro, int *lenres,
if( com_or_tra )
return -1;
else
endTranslation = TRUE;
endTranslation = HB_TRUE;
break;
default: /* Key word */
@@ -2164,7 +2164,7 @@ static int RemoveSlash( char *cpatt )
return lenres;
}
static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL com_or_tra, BOOL com_or_xcom )
static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_BOOL com_or_tra, HB_BOOL com_or_xcom )
{
#if ! defined(HB_PP_DEBUG_MEMORY)
char exppatt[MAX_NAME];
@@ -2233,7 +2233,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL
{
lenreal = strincpy( s_expreal, ptrtemp );
if( ( ipos = md_strAt( s_expreal, lenreal, *ptri, TRUE, TRUE, FALSE, MD_STR_AT_USESUBCASE ) ) > 0 )
if( ( ipos = md_strAt( s_expreal, lenreal, *ptri, HB_TRUE, HB_TRUE, HB_FALSE, MD_STR_AT_USESUBCASE ) ) > 0 )
{
if( ptrtemp > *ptrmp )
{
@@ -2310,7 +2310,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL
if( *( exppatt + 2 ) == '4' ) /* ---- extended match marker */
{
if( !lenreal )
lenreal = getExpReal( s_expreal, ptri, FALSE, maxlenreal, FALSE, FALSE );
lenreal = getExpReal( s_expreal, ptri, HB_FALSE, maxlenreal, HB_FALSE, HB_FALSE );
{
SearnRep( exppatt, s_expreal, lenreal, ptro, lenres );
}
@@ -2360,7 +2360,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL
HB_SKIPTABSPACES( *ptri );
if( **ptri == '(' ) /* macro expression &( expr ) */
{
lenreal = getExpReal( s_expreal + 2, ptri, TRUE, maxlenreal, FALSE, TRUE );
lenreal = getExpReal( s_expreal + 2, ptri, HB_TRUE, maxlenreal, HB_FALSE, HB_TRUE );
if( !( **ptri == '\0' || **ptri == ' ' ) && com_or_tra )
break;
s_expreal[0] = '&';
@@ -2481,7 +2481,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL
{
if( !lenreal )
{
lenreal = getExpReal( s_expreal, ptri, TRUE, maxlenreal, FALSE, FALSE );
lenreal = getExpReal( s_expreal, ptri, HB_TRUE, maxlenreal, HB_FALSE, HB_FALSE );
}
if( lenreal )
@@ -2501,7 +2501,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL
/* Copying a real expression to 's_expreal' */
if( !lenreal )
{
lenreal = getExpReal( s_expreal, ptri, FALSE, maxlenreal, FALSE, FALSE );
lenreal = getExpReal( s_expreal, ptri, HB_FALSE, maxlenreal, HB_FALSE, HB_FALSE );
}
/*
@@ -2527,15 +2527,15 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, BOOL
return 1;
}
static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL bStrict, BOOL bInBrackets )
static int getExpReal( char *expreal, char **ptri, HB_BOOL prlist, int maxrez, HB_BOOL bStrict, HB_BOOL bInBrackets )
{
int lens = 0;
char *sZnaki = "+-=><*/$.:#%!^";
int State;
int StBr1 = 0, StBr2 = 0, StBr3 = 0;
BOOL rez = FALSE;
BOOL bMacro = FALSE;
BOOL bBrackets = FALSE;
HB_BOOL rez = HB_FALSE;
HB_BOOL bMacro = HB_FALSE;
HB_BOOL bBrackets = HB_FALSE;
char *cStart = expreal;
char cLastSep = '\0';
char cLastChar = '\0';
@@ -2547,9 +2547,9 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
if( **ptri == '(' && bInBrackets )
{
/* scan expression including start and end brackets */
bBrackets = TRUE;
bBrackets = HB_TRUE;
( * ptri )++;
prlist = TRUE;
prlist = HB_TRUE;
}
State = ( **ptri == '\'' || **ptri == '\"' || **ptri == '[' ) ? STATE_EXPRES : STATE_ID;
@@ -2776,7 +2776,7 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
{
if( !prlist )
{
rez = TRUE;
rez = HB_TRUE;
}
else
{
@@ -2786,7 +2786,7 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
}
else
{
rez = TRUE;
rez = HB_TRUE;
}
}
else if( ( **ptri == '+' && *( *ptri + 1 ) == '+' ) || ( **ptri == '-' && *( *ptri + 1 ) == '-' ) )
@@ -2841,7 +2841,7 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
State = STATE_ID_END;
}
bMacro = FALSE;
bMacro = HB_FALSE;
/* Ron Pinkas added 2000-05-03 */
/* Macro terminator is NOT a coninutation char unlike '.' of logical operators, so we don't want it recorded as cLastChar! */
@@ -2892,24 +2892,24 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
{
( *ptri )++;
}
rez = TRUE;
rez = HB_TRUE;
}
else if( **ptri == ']' && StBr2 == 0 )
{
rez = TRUE;
rez = HB_TRUE;
}
else if( **ptri == '}' && StBr3 == 0 )
{
rez = TRUE;
rez = HB_TRUE;
}
else if( **ptri == '&' )
{
bMacro = TRUE;
bMacro = HB_TRUE;
}
else if( **ptri == ' ' )
{
State = STATE_ID_END;
bMacro = FALSE;
bMacro = HB_FALSE;
}
break;
@@ -2928,7 +2928,7 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
if( prlist && cLastSep == ' ' )
{
State = STATE_ID_END;
rez = TRUE;
rez = HB_TRUE;
}
else
State = STATE_EXPRES_ID;
@@ -2953,7 +2953,7 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
/* Ron Pinkas added 2000-06-14 */
else if( **ptri == ')' && StBr1 == 0 )
{
rez = TRUE;
rez = HB_TRUE;
}
/* Ron Pinkas end 2000-06-14 */
else if( **ptri == '(' )
@@ -2968,13 +2968,13 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
}
else if( **ptri == '}' && StBr3 == 0 )
{
rez = TRUE;
rez = HB_TRUE;
}
else if( **ptri == ',' )
{
if( !prlist )
{
rez = TRUE;
rez = HB_TRUE;
State = STATE_EXPRES;
}
cLastSep = ',';
@@ -3047,7 +3047,7 @@ static int getExpReal( char *expreal, char **ptri, BOOL prlist, int maxrez, BOOL
return lens;
}
static BOOL isExpres( char *stroka, BOOL prlist )
static HB_BOOL isExpres( char *stroka, HB_BOOL prlist )
{
int l1, l2;
@@ -3058,7 +3058,7 @@ static BOOL isExpres( char *stroka, BOOL prlist )
#endif
l1 = strlen( stroka );
l2 = getExpReal( NULL, &stroka, prlist, HB_PP_STR_SIZE, TRUE, FALSE );
l2 = getExpReal( NULL, &stroka, prlist, HB_PP_STR_SIZE, HB_TRUE, HB_FALSE );
#if 0
printf( "Len1: %i Len2: %i RealExp: >%s< Last: %c\n", l1, l2, stroka - l2, ( stroka - l2 )[l1 - 1] );
@@ -3071,10 +3071,10 @@ static BOOL isExpres( char *stroka, BOOL prlist )
return ( l1 <= l2 /*&& ! IsInStr( ( stroka - l2 )[l1-1], ":/+*-%^=(<>[{" ) */ );
}
static BOOL TestOptional( char *ptr1, char *ptr2 )
static HB_BOOL TestOptional( char *ptr1, char *ptr2 )
{
int nbr = 0;
BOOL flagname = FALSE;
HB_BOOL flagname = HB_FALSE;
int statevar = 0;
HB_TRACE( HB_TR_DEBUG, ( "TestOptional(%s, %s)", ptr1, ptr2 ) );
@@ -3090,7 +3090,7 @@ static BOOL TestOptional( char *ptr1, char *ptr2 )
if( nbr )
{
nbr--;
flagname = FALSE;
flagname = HB_FALSE;
}
else
return 0;
@@ -3102,7 +3102,7 @@ static BOOL TestOptional( char *ptr1, char *ptr2 )
else if( *ptr1 != ' ' && *ptr1 != '\t' && !statevar )
{
if( nbr )
flagname = TRUE;
flagname = HB_TRUE;
else
return 0;
}
@@ -3117,11 +3117,11 @@ static BOOL TestOptional( char *ptr1, char *ptr2 )
return !flagname;
}
static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOOL com_or_tra, BOOL com_or_xcom )
static HB_BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, HB_BOOL com_or_tra, HB_BOOL com_or_xcom )
{
int save_numBr = s_numBrackets, save_Repeate = s_Repeate;
BOOL endTranslation = FALSE;
BOOL bResult = TRUE;
HB_BOOL endTranslation = HB_FALSE;
HB_BOOL bResult = HB_TRUE;
char *lastInputptr[5];
char *lastopti[3], *ptr;
@@ -3129,7 +3129,7 @@ static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOO
HB_TRACE( HB_TR_DEBUG, ( "CheckOptional(%s, %s, %s, %p, %d, %d)", ptrmp, ptri, ptro, lenres, com_or_tra, com_or_xcom ) );
s_bReplacePat = FALSE;
s_bReplacePat = HB_FALSE;
lastInputptr[s_Repeate] = ptri;
while( *ptri != '\0' && !endTranslation && bResult )
{
@@ -3146,7 +3146,7 @@ static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOO
case HB_PP_OPT_END:
if( s_numBrackets == save_numBr )
endTranslation = TRUE;
endTranslation = HB_TRUE;
else
{
if( s_Repeate )
@@ -3174,7 +3174,7 @@ static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOO
ptri = lastInputptr[s_Repeate];
}
else
bResult = FALSE;
bResult = HB_FALSE;
}
break;
@@ -3187,12 +3187,12 @@ static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOO
ptri = lastInputptr[s_Repeate];
}
else
bResult = FALSE;
bResult = HB_FALSE;
}
break;
case '\0':
bResult = FALSE;
bResult = HB_FALSE;
default: /* Key word */
ptr = ptri;
@@ -3205,7 +3205,7 @@ static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOO
ptri = lastInputptr[s_Repeate];
}
else
bResult = FALSE;
bResult = HB_FALSE;
}
}
HB_SKIPTABSPACES( ptri );
@@ -3232,7 +3232,7 @@ static BOOL CheckOptional( char *ptrmp, char *ptri, char *ptro, int *lenres, BOO
}
s_Repeate = save_Repeate;
s_numBrackets = save_numBr;
s_bReplacePat = TRUE;
s_bReplacePat = HB_TRUE;
return bResult;
}
@@ -3273,7 +3273,7 @@ static void SkipOptional( char **ptri )
static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int *lenres )
{
int ifou, isdvig = 0;
BOOL rezs, bFound = FALSE;
HB_BOOL rezs, bFound = HB_FALSE;
int kolmarkers;
int lennew, i;
char lastchar = '0';
@@ -3287,10 +3287,10 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
if( *( exppatt + 1 ) == '\0' )
*( ptro + *lenres ) = '\0';
while( ( ifou = md_strAt( exppatt, ( *( exppatt + 1 ) ) ? 2 : 1, ptrOut, FALSE, FALSE, TRUE, MD_STR_AT_USESUBCASE ) ) > 0 )
while( ( ifou = md_strAt( exppatt, ( *( exppatt + 1 ) ) ? 2 : 1, ptrOut, HB_FALSE, HB_FALSE, HB_TRUE, MD_STR_AT_USESUBCASE ) ) > 0 )
{
bFound = TRUE;
rezs = FALSE;
bFound = HB_TRUE;
rezs = HB_FALSE;
ptr = ptrOut + ifou - 1;
kolmarkers = 0;
ptr = PrevSquare( ptr, ptro, &kolmarkers );
@@ -3312,7 +3312,7 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
if( s_Repeate && lenreal && kolmarkers && lastchar != '0' && *( ptrOut + ifou + 2 ) == '0' )
{
isdvig += ifou;
rezs = TRUE;
rezs = HB_TRUE;
}
else if( s_Repeate )
{
@@ -3328,7 +3328,7 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
hb_pp_Stuff( "", ptr, 0, ptr2 - ptr + 1, *lenres - ( ptr - ptro ) );
*lenres -= ptr2 - ptr + 1;
isdvig = ptr - ptro;
rezs = TRUE;
rezs = HB_TRUE;
}
}
else
@@ -3361,7 +3361,7 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
hb_pp_Stuff( s_expcopy, ptr, lennew, 0, *lenres - ( ptr - ptro ) );
*lenres += lennew;
isdvig = ptr - ptro + ( ptr2 - ptr - 1 ) + lennew;
rezs = TRUE;
rezs = HB_TRUE;
}
}
else if( exppatt[0] == '\001' && exppatt[1] == '\000' )
@@ -3370,7 +3370,7 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
hb_pp_Stuff( "", ptr, 0, ptr2 - ptr + 1, *lenres - ( ptr - ptro ) );
*lenres -= ptr2 - ptr + 1;
isdvig = ptr - ptro;
rezs = TRUE;
rezs = HB_TRUE;
}
}
@@ -3393,7 +3393,7 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
*lenres += ReplacePattern( exppatt[2], expreal, lenreal, ptrOut + ifou - 1, *lenres - ifou + 1 );
ptrOut = ptrOut + ifou;
}
while( ( ifou = md_strAt( exppatt, ( *( exppatt + 1 ) ) ? 2 : 1, ptrOut, FALSE, FALSE, TRUE, MD_STR_AT_USESUBCASE ) ) > 0 );
while( ( ifou = md_strAt( exppatt, ( *( exppatt + 1 ) ) ? 2 : 1, ptrOut, HB_FALSE, HB_FALSE, HB_TRUE, MD_STR_AT_USESUBCASE ) ) > 0 );
if( ! s_Repeate )
{
lastchar++;
@@ -3422,7 +3422,7 @@ static void SearnRep( char *exppatt, char *expreal, int lenreal, char *ptro, int
s_aIsRepeate[s_Repeate - 1]++;
}
static BOOL ScanMacro( char *expreal, int lenitem, int *pNewLen )
static HB_BOOL ScanMacro( char *expreal, int lenitem, int *pNewLen )
{
int i;
@@ -3438,7 +3438,7 @@ static BOOL ScanMacro( char *expreal, int lenitem, int *pNewLen )
if( expreal[i] == '(' )
{
*pNewLen = lenitem - 1;
return TRUE;
return HB_TRUE;
}
else if( HB_ISALPHA( ( BYTE ) expreal[i] ) || expreal[i] == '_' )
{
@@ -3458,20 +3458,20 @@ static BOOL ScanMacro( char *expreal, int lenitem, int *pNewLen )
}
if( expreal[i] == '\0' || expreal[i] == ',' || expreal[i] == ')' ) /* || expreal[i] == ' ' )*/
{
return TRUE;
return HB_TRUE;
}
}
*pNewLen = lenitem;
return FALSE;
return HB_FALSE;
}
static int pp_Stringify( BOOL bSmart, char **ptro, int *lenres, char *expr, int lenitem )
static int pp_Stringify( HB_BOOL bSmart, char **ptro, int *lenres, char *expr, int lenitem )
{
int rmlen = 0;
int lenTrim = lenitem;
int iAdd = 0;
char sQuotes[3] = "\"\"";
BOOL bComma = expr[lenitem] == ',';
HB_BOOL bComma = expr[lenitem] == ',';
while( *expr == ' ' && lenTrim )
{
@@ -3490,7 +3490,7 @@ static int pp_Stringify( BOOL bSmart, char **ptro, int *lenres, char *expr, int
else if( *expr == '&' )
{
/* macro operator */
BOOL bSmartMacro;
HB_BOOL bSmartMacro;
int lennew;
lennew = lenTrim;
@@ -3560,7 +3560,7 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
hb_pp_Stuff( expreal, ptro + 1, lenreal, 0, lenres );
rmlen = lenreal + 2;
if( *sQuotes == '[' )
hb_pp_NestedLiteralString = TRUE;
hb_pp_NestedLiteralString = HB_TRUE;
break;
case '2': /* Normal stringify result marker */
@@ -3571,10 +3571,10 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
rmlen = 0;
do
{
ifou = md_strAt( ",", 1, expreal, FALSE, TRUE, FALSE, MD_STR_AT_IGNORECASE );
ifou = md_strAt( ",", 1, expreal, HB_FALSE, HB_TRUE, HB_FALSE, MD_STR_AT_IGNORECASE );
if( *expreal != '\0' )
{
rmlen += pp_Stringify( FALSE, &ptro, &lenres, expreal, ( ( ifou ) ? ifou - 1 : lenreal ) );
rmlen += pp_Stringify( HB_FALSE, &ptro, &lenres, expreal, ( ( ifou ) ? ifou - 1 : lenreal ) );
}
expreal += ifou;
lenreal -= ifou;
@@ -3583,7 +3583,7 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
}
else
{
rmlen = pp_Stringify( FALSE, &ptro, &lenres, expreal, lenreal );
rmlen = pp_Stringify( HB_FALSE, &ptro, &lenres, expreal, lenreal );
}
break;
@@ -3595,10 +3595,10 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
rmlen = 0;
do
{
ifou = md_strAt( ",", 1, expreal, FALSE, TRUE, FALSE, MD_STR_AT_IGNORECASE );
ifou = md_strAt( ",", 1, expreal, HB_FALSE, HB_TRUE, HB_FALSE, MD_STR_AT_IGNORECASE );
if( *expreal != '\0' )
{
rmlen += pp_Stringify( TRUE, &ptro, &lenres, expreal, ( ( ifou ) ? ifou - 1 : lenreal ) );
rmlen += pp_Stringify( HB_TRUE, &ptro, &lenres, expreal, ( ( ifou ) ? ifou - 1 : lenreal ) );
}
expreal += ifou;
lenreal -= ifou;
@@ -3607,7 +3607,7 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
}
else
{
rmlen = pp_Stringify( TRUE, &ptro, &lenres, expreal, lenreal );
rmlen = pp_Stringify( HB_TRUE, &ptro, &lenres, expreal, lenreal );
}
break;
@@ -3621,7 +3621,7 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
rmlen = 0;
do
{
ifou = md_strAt( ",", 1, expreal, FALSE, TRUE, FALSE, MD_STR_AT_IGNORECASE );
ifou = md_strAt( ",", 1, expreal, HB_FALSE, HB_TRUE, HB_FALSE, MD_STR_AT_IGNORECASE );
lenitem = ( ifou ) ? ifou - 1 : lenreal;
if( *expreal != '\0' )
{
@@ -3670,8 +3670,8 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro
static void pp_rQuotes( char *expreal, char *sQuotes )
{
BOOL lQuote1 = FALSE;
BOOL lQuote2 = FALSE;
HB_BOOL lQuote1 = HB_FALSE;
HB_BOOL lQuote2 = HB_FALSE;
HB_TRACE( HB_TR_DEBUG, ( "pp_rQuotes(%s, %s)", expreal, sQuotes ) );
@@ -3682,9 +3682,9 @@ static void pp_rQuotes( char *expreal, char *sQuotes )
while( *expreal != '\0' )
{
if( *expreal == '\"' )
lQuote2 = TRUE;
lQuote2 = HB_TRUE;
else if( *expreal == '\'' )
lQuote1 = TRUE;
lQuote1 = HB_TRUE;
expreal++;
}
if( lQuote2 )
@@ -3707,12 +3707,12 @@ static void pp_rQuotes( char *expreal, char *sQuotes )
}
}
int hb_pp_RdStr( FILE * handl_i, char *buffer, int maxlen, BOOL lContinue, char *sBuffer, int *lenBuffer, int *iBuffer )
int hb_pp_RdStr( FILE * handl_i, char *buffer, int maxlen, HB_BOOL lContinue, char *sBuffer, int *lenBuffer, int *iBuffer )
{
int readed = 0;
int State = 0;
char cha, cLast = '\0', symbLast = '\0';
BOOL lDropSpaces = lContinue;
HB_BOOL lDropSpaces = lContinue;
HB_TRACE( HB_TR_DEBUG, ( "hb_pp_RdStr(%p, %s, %d, %d, %s, %p, %p)", handl_i, buffer, maxlen, lDropSpaces, sBuffer, lenBuffer, iBuffer ) );
@@ -3928,7 +3928,7 @@ int hb_pp_WrStr( FILE * handl_o, char *buffer )
return 0;
}
static int md_strAt( char *szSub, int lSubLen, char *szText, BOOL checkword, BOOL checkPrth, BOOL bRule, int iCaseOption )
static int md_strAt( char *szSub, int lSubLen, char *szText, HB_BOOL checkword, HB_BOOL checkPrth, HB_BOOL bRule, int iCaseOption )
{
int State = STATE_NORMAL;
long lPos = 0, lSubPos = 0;
@@ -4021,7 +4021,7 @@ static int md_strAt( char *szSub, int lSubLen, char *szText, BOOL checkword, BOO
lPos++;
continue;
}
else if( bRule == FALSE && *( szText + lPos ) == '[' && strchr( ")]}.", cLastChar ) == NULL && !ISNAME( ( BYTE ) cLastChar ) )
else if( bRule == HB_FALSE && *( szText + lPos ) == '[' && strchr( ")]}.", cLastChar ) == NULL && !ISNAME( ( BYTE ) cLastChar ) )
{
State = STATE_QUOTE3;
iNestedQuote3++;
@@ -4242,7 +4242,7 @@ static int stroncpy( char *ptro, char *ptri, int lens )
return i;
}
static BOOL truncmp( char **ptro, char **ptri, BOOL lTrunc )
static HB_BOOL truncmp( char **ptro, char **ptri, HB_BOOL lTrunc )
{
char *ptrb = *ptro, co, ci;
@@ -4260,17 +4260,17 @@ static BOOL truncmp( char **ptro, char **ptri, BOOL lTrunc )
ci == HB_PP_OPT_END || ci == HB_PP_MATCH_MARK || ci == '\0' ) &&
( ( !ISNAME( ( BYTE ) ** ptro ) && ISNAME( ( BYTE ) co ) ) ||
( !ISNAME( ( BYTE ) co ) ) ) ) )
return FALSE;
return HB_FALSE;
else if( lTrunc && *ptro - ptrb >= 4 && ISNAME( ( BYTE ) ci ) && !ISNAME( ( BYTE ) ** ptro ) && ISNAME( ( BYTE ) co ) )
{
while( ISNAME( ( BYTE ) ** ptri ) )
( *ptri )++;
return FALSE;
return HB_FALSE;
}
return TRUE;
return HB_TRUE;
}
static BOOL strincmp( char *ptro, char **ptri, BOOL lTrunc )
static HB_BOOL strincmp( char *ptro, char **ptri, HB_BOOL lTrunc )
{
char *ptrb = ptro, co, ci;
@@ -4284,13 +4284,13 @@ static BOOL strincmp( char *ptro, char **ptri, BOOL lTrunc )
if( ( ( ci == ' ' || ci == ',' || ci == HB_PP_OPT_START ||
ci == HB_PP_OPT_END || ci == HB_PP_MATCH_MARK || ci == '\0' ) &&
( ( !ISNAME( ( BYTE ) * ptro ) && ISNAME( ( BYTE ) co ) ) || ( !ISNAME( ( BYTE ) co ) ) ) ) )
return FALSE;
return HB_FALSE;
else if( lTrunc && ptro - ptrb >= 4 && ISNAME( ( BYTE ) ci ) && !ISNAME( ( BYTE ) * ptro ) && ISNAME( ( BYTE ) co ) )
{
/* while( ISNAME(( BYTE ) **ptri) ) (*ptri)++; */
return FALSE;
return HB_FALSE;
}
return TRUE;
return HB_TRUE;
}
static int strincpy( char *ptro, char *ptri )
@@ -4306,7 +4306,7 @@ static int strincpy( char *ptro, char *ptri )
return lens;
}
static int strotrim( char *stroka, BOOL bRule )
static int strotrim( char *stroka, HB_BOOL bRule )
{
char *ptr = stroka, lastc = '0', curc;
int lens = 0, State = STATE_NORMAL;
@@ -4348,7 +4348,7 @@ static int strotrim( char *stroka, BOOL bRule )
}
/* Ron Pinkas added 2000-11-05 */
/* Ron Pinkas 2001-02-14 added bRule logic (removed array logic). */
else if( curc == '[' && bRule == FALSE ) /* && ( strchr( ")]}.", cLastChar ) == NULL && ! ISNAME( ( BYTE ) cLastChar ) ) ) */
else if( curc == '[' && bRule == HB_FALSE ) /* && ( strchr( ")]}.", cLastChar ) == NULL && ! ISNAME( ( BYTE ) cLastChar ) ) ) */
{
State = STATE_QUOTE3;
}
@@ -4376,7 +4376,7 @@ static int strotrim( char *stroka, BOOL bRule )
return lens;
}
static int NextWord( char **sSource, char *sDest, BOOL lLower )
static int NextWord( char **sSource, char *sDest, HB_BOOL lLower )
{
int i = 0;
@@ -4516,7 +4516,7 @@ static int NextName( char **sSource, char *sDest )
State = STATE_QUOTE2;
}
/* Ron Pinkas added 2000-11-08 */
else if( **sSource == '[' && s_bArray == FALSE && strchr( ")]}.\"\'", cLastChar ) == NULL && !ISNAME( ( BYTE ) cLastChar ) )
else if( **sSource == '[' && s_bArray == HB_FALSE && strchr( ")]}.\"\'", cLastChar ) == NULL && !ISNAME( ( BYTE ) cLastChar ) )
{
/* Ron Pinkas added 2000-11-08 */
pString = *sSource;
@@ -4668,7 +4668,7 @@ static int NextParm( char **sSource, char *sDest )
return lenName;
}
static BOOL IsIdentifier( char *szProspect )
static HB_BOOL IsIdentifier( char *szProspect )
{
if( HB_ISALPHA( ( BYTE ) szProspect[0] ) || szProspect[0] == '_' )
{
@@ -4686,11 +4686,11 @@ static BOOL IsIdentifier( char *szProspect )
return ( szProspect[i] == '\0' );
}
return FALSE;
return HB_FALSE;
}
static int IsMacroVar( char *szText, BOOL isCommand )
static int IsMacroVar( char *szText, HB_BOOL isCommand )
{
int len = 0;
@@ -4726,7 +4726,7 @@ static int IsMacroVar( char *szText, BOOL isCommand )
}
static BOOL OpenInclude( char *szFileName, HB_PATHNAMES * pSearch, PHB_FNAME pMainFileName, BOOL bStandardOnly, char *szInclude )
static HB_BOOL OpenInclude( char *szFileName, HB_PATHNAMES * pSearch, PHB_FNAME pMainFileName, HB_BOOL bStandardOnly, char *szInclude )
{
FILE *fptr;
PHB_FNAME pFileName;
@@ -4787,10 +4787,10 @@ static BOOL OpenInclude( char *szFileName, HB_PATHNAMES * pSearch, PHB_FNAME pMa
pFile->pPrev = hb_comp_files.pLast;
hb_comp_files.pLast = pFile;
hb_comp_files.iFiles++;
return TRUE;
return HB_TRUE;
}
return FALSE;
return HB_FALSE;
}

View File

@@ -113,50 +113,50 @@ typedef struct
/* ppcore.c exported functions and variables */
#define HB_INCLUDE_FUNC_( hbFunc ) BOOL hbFunc( char *, HB_PATHNAMES * )
#define HB_INCLUDE_FUNC_( hbFunc ) HB_BOOL hbFunc( char *, HB_PATHNAMES * )
typedef HB_INCLUDE_FUNC_( HB_INCLUDE_FUNC );
typedef HB_INCLUDE_FUNC * HB_INCLUDE_FUNC_PTR;
extern void hb_pp_SetRules_( HB_INCLUDE_FUNC_PTR hb_compInclude, BOOL hb_comp_bQuiet );
extern void hb_pp_SetRules_( HB_INCLUDE_FUNC_PTR hb_compInclude, HB_BOOL hb_comp_bQuiet );
extern int hb_pp_ReadRules( void );
extern void hb_pp_Init( void );
extern void hb_pp_Free( void );
extern void hb_pp_CloseInclude( void );
extern int hb_pp_ParseDirective_( char * ); /* Parsing preprocessor directives ( #... ) */
extern int hb_pp_ParseExpression( char *, char *, BOOL ); /* Parsing a line ( without preprocessor directive ) */
extern int hb_pp_ParseExpression( char *, char *, HB_BOOL ); /* Parsing a line ( without preprocessor directive ) */
extern int hb_pp_WrStr( FILE *, char * );
extern int hb_pp_RdStr( FILE *, char *, int, BOOL, char *, int *, int * );
extern int hb_pp_RdStr( FILE *, char *, int, HB_BOOL, char *, int *, int * );
extern void hb_pp_Stuff( char *, char *, int, int, int );
extern int hb_pp_strocpy( char *, char * );
extern DEFINES * hb_pp_AddDefine_( char *, char * ); /* Add new #define to a linked list */
extern PHB_FNAME hb_comp_pFileName;
extern BOOL hb_comp_bQuiet;
extern BOOL hb_comp_bStartProc;
extern BOOL hb_comp_bAutoMemvarAssume;
extern BOOL hb_comp_bForceMemvars;
extern BOOL hb_comp_bShortCuts;
extern BOOL hb_comp_bDebugInfo;
extern BOOL hb_comp_bLineNumbers;
extern int hb_comp_iExitLevel;
extern int hb_comp_iWarnings;
extern int hb_comp_iLine;
extern int hb_comp_iLineINLINE;
extern int hb_comp_iLinePRG;
extern int hb_pp_lInclude;
extern int * hb_pp_aCondCompile;
extern int hb_pp_nCondCompile;
extern HB_BOOL hb_comp_bQuiet;
extern HB_BOOL hb_comp_bStartProc;
extern HB_BOOL hb_comp_bAutoMemvarAssume;
extern HB_BOOL hb_comp_bForceMemvars;
extern HB_BOOL hb_comp_bShortCuts;
extern HB_BOOL hb_comp_bDebugInfo;
extern HB_BOOL hb_comp_bLineNumbers;
extern int hb_comp_iExitLevel;
extern int hb_comp_iWarnings;
extern int hb_comp_iLine;
extern int hb_comp_iLineINLINE;
extern int hb_comp_iLinePRG;
extern int hb_pp_lInclude;
extern int * hb_pp_aCondCompile;
extern int hb_pp_nCondCompile;
extern const char * hb_pp_szErrors[];
extern const char * hb_pp_szWarnings[];
extern int hb_pp_nEmptyStrings;
extern int hb_pp_LastOutLine;
extern int hb_pp_StreamBlock;
extern BOOL hb_pp_NestedLiteralString;
extern BOOL hb_pp_LiteralEscSeq;
extern int hb_pp_nEmptyStrings;
extern int hb_pp_LastOutLine;
extern int hb_pp_StreamBlock;
extern HB_BOOL hb_pp_NestedLiteralString;
extern HB_BOOL hb_pp_LiteralEscSeq;
extern unsigned int hb_pp_MaxTranslateCycles;
extern HB_PATHNAMES * hb_comp_pIncludePath;
extern FILES hb_comp_files;
extern BOOL hb_comp_bPPO;
extern HB_BOOL hb_comp_bPPO;
extern FILE * hb_comp_yyppo;
/* ppcomp.c exported functions */
@@ -168,8 +168,8 @@ extern void hb_pp_InternalFree( void );
#define HB_PP_STREAM_PRG 4 /* TEXT/ENDTEXT lines joined with LF */
#define HB_PP_STREAM_C 8 /* TEXT/ENDTEXT lines joined and ESC seq processed */
extern BOOL hb_pp_StreamBlockBegin( char *, int );
extern void hb_pp_BlockEnd( void );
extern HB_BOOL hb_pp_StreamBlockBegin( char *, int );
extern void hb_pp_BlockEnd( void );
/* pptable.c exported functions and variables */
@@ -181,7 +181,7 @@ extern COMMANDS * hb_pp_topTranslate;
/* pragma.c exported functions */
extern BOOL hb_pp_ParsePragma( char * szline );
extern HB_BOOL hb_pp_ParsePragma( char * szline );
/*
* Errors generated by Harbour preprocessor
@@ -214,4 +214,3 @@ extern BOOL hb_pp_ParsePragma( char * szline );
HB_EXTERN_END
#endif /* HB_PP_H_ */

View File

@@ -57,12 +57,12 @@
#include "hbppdef.h"
#include "hbcomp.h"
static BOOL StringToBool( char *, BOOL );
static HB_BOOL StringToBool( char *, HB_BOOL );
static int StringToInt( char *, int );
static BOOL IsOnOffSwitch( char *, BOOL );
static void DebugPragma( char *, int, BOOL );
static HB_BOOL IsOnOffSwitch( char *, HB_BOOL );
static void DebugPragma( char *, int, HB_BOOL );
static BOOL s_bTracePragma = FALSE;
static HB_BOOL s_bTracePragma = HB_FALSE;
/* Size of abreviated pragma commands */
#define PRAGMAS_LEN 8
@@ -77,10 +77,10 @@ static PINLINE hb_compInlineAdd_( char * szFunName )
return NULL;
}
BOOL hb_pp_ParsePragma( char * szLine )
HB_BOOL hb_pp_ParsePragma( char * szLine )
{
BOOL bIgnore = TRUE;
HB_BOOL bIgnore = HB_TRUE;
HB_TRACE(HB_TR_DEBUG, ("hb_pp_ParsePragma(%s)", szLine));
HB_SKIPTABSPACES( szLine );
@@ -126,7 +126,7 @@ BOOL hb_pp_ParsePragma( char * szLine )
default:
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
}
DebugPragma( szLine, hb_comp_iExitLevel, FALSE );
DebugPragma( szLine, hb_comp_iExitLevel, HB_FALSE );
}
break;
@@ -269,7 +269,7 @@ BOOL hb_pp_ParsePragma( char * szLine )
else if( hb_strnicmp( szLine, "ENABLEWARNINGS", PRAGMAS_LEN ) == 0 )
{
hb_comp_iWarnings = StringToBool( szLine, hb_comp_iWarnings != 0 ) ? 1 : 0;
DebugPragma( szLine, hb_comp_iWarnings, FALSE );
DebugPragma( szLine, hb_comp_iWarnings, HB_FALSE );
}
else if( hb_strnicmp( szLine, "EXITSEVERITY", PRAGMAS_LEN ) == 0 )
{
@@ -278,7 +278,7 @@ BOOL hb_pp_ParsePragma( char * szLine )
hb_comp_iExitLevel != HB_EXITLEVEL_SETEXIT &&
hb_comp_iExitLevel != HB_EXITLEVEL_DELTARGET )
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
DebugPragma( szLine, hb_comp_iExitLevel, FALSE );
DebugPragma( szLine, hb_comp_iExitLevel, HB_FALSE );
}
else if( hb_strnicmp( szLine, "DYNAMICMEMVAR", PRAGMAS_LEN ) == 0 )
{
@@ -310,7 +310,7 @@ BOOL hb_pp_ParsePragma( char * szLine )
hb_comp_iWarnings = StringToInt( szLine, hb_comp_iWarnings );
if( hb_comp_iWarnings < 0 || hb_comp_iWarnings > 3 )
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
DebugPragma( szLine, hb_comp_iWarnings, FALSE );
DebugPragma( szLine, hb_comp_iWarnings, HB_FALSE );
}
else if( hb_strnicmp( szLine, "TRACEPRAGMAS", PRAGMAS_LEN ) == 0 )
{
@@ -341,34 +341,34 @@ BOOL hb_pp_ParsePragma( char * szLine )
{
int iOverflow;
int iMax;
iMax = ( int ) hb_strValInt( szLine, &iOverflow );
if( iOverflow || iMax < 1 )
hb_pp_MaxTranslateCycles = 1024;
else
hb_pp_MaxTranslateCycles = ( unsigned int ) iMax;
DebugPragma( szLine, hb_pp_MaxTranslateCycles, FALSE );
DebugPragma( szLine, hb_pp_MaxTranslateCycles, HB_FALSE );
}
}
return bIgnore;
}
/* Checks for +/- within the string, sets bDefault if not found */
static BOOL IsOnOffSwitch( char * pszStr, BOOL bValue )
static HB_BOOL IsOnOffSwitch( char * pszStr, HB_BOOL bValue )
{
int iPos = strlen( pszStr ) - 1;
if( pszStr[ iPos ] == '+' )
bValue = TRUE;
bValue = HB_TRUE;
else if( pszStr[ iPos ] == '-' )
bValue = FALSE;
bValue = HB_FALSE;
return bValue;
}
/* Checks for ON/OFF within the string, sets bDefault if not found */
static BOOL StringToBool( char * pszStr, BOOL bValue )
static HB_BOOL StringToBool( char * pszStr, HB_BOOL bValue )
{
char * pos = strchr( pszStr, '=' );
@@ -382,9 +382,9 @@ static BOOL StringToBool( char * pszStr, BOOL bValue )
HB_SKIPTABSPACES( pos );
if( hb_strnicmp( pos, "ON", 2 ) == 0 )
bValue = TRUE;
bValue = HB_TRUE;
else if( hb_strnicmp( pos, "OFF", 3 ) == 0 )
bValue = FALSE;
bValue = HB_FALSE;
}
return bValue;
@@ -412,7 +412,7 @@ static int StringToInt( char * pszStr, int iValue )
}
/* This is only to debug pragmas now */
static void DebugPragma( char * pszStr, int iValue, BOOL bValue )
static void DebugPragma( char * pszStr, int iValue, HB_BOOL bValue )
{
if( s_bTracePragma )
{

View File

@@ -74,7 +74,7 @@ extern int hb_pp_ParseDefine_( char * );
static void AddSearchPath( char * szPath, HB_PATHNAMES * * pSearchList );
static void OutTable( DEFINES * endDefine, COMMANDS * endCommand );
static BOOL hb_pp_fopen( char * szFileName );
static HB_BOOL hb_pp_fopen( char * szFileName );
static char s_szLine[ HB_PP_STR_SIZE ];
static int s_iWarnings = 0;
@@ -86,16 +86,16 @@ FILES hb_comp_files;
int hb_comp_iLine = 1; /* currently parsed file line number */
/* These are need for the PP #pragma support */
BOOL hb_comp_bPPO = FALSE; /* flag indicating, is ppo output needed */
BOOL hb_comp_bStartProc = TRUE; /* holds if we need to create the starting procedure */
BOOL hb_comp_bLineNumbers = TRUE; /* holds if we need pcodes with line numbers */
BOOL hb_comp_bShortCuts = TRUE; /* .and. & .or. expressions shortcuts */
int hb_comp_iWarnings = 0; /* enable parse warnings */
BOOL hb_comp_bAutoMemvarAssume = FALSE; /* holds if undeclared variables are automatically assumed MEMVAR (-a)*/
BOOL hb_comp_bForceMemvars = FALSE; /* holds if memvars are assumed when accesing undeclared variable (-v)*/
BOOL hb_comp_bDebugInfo = FALSE; /* holds if generate debugger required info */
int hb_comp_iExitLevel = HB_EXITLEVEL_DEFAULT; /* holds if there was any warning during the compilation process */
FILE *hb_comp_yyppo = NULL;
HB_BOOL hb_comp_bPPO = HB_FALSE; /* flag indicating, is ppo output needed */
HB_BOOL hb_comp_bStartProc = HB_TRUE; /* holds if we need to create the starting procedure */
HB_BOOL hb_comp_bLineNumbers = HB_TRUE; /* holds if we need pcodes with line numbers */
HB_BOOL hb_comp_bShortCuts = HB_TRUE; /* .and. & .or. expressions shortcuts */
int hb_comp_iWarnings = 0; /* enable parse warnings */
HB_BOOL hb_comp_bAutoMemvarAssume = HB_FALSE; /* holds if undeclared variables are automatically assumed MEMVAR (-a)*/
HB_BOOL hb_comp_bForceMemvars = HB_FALSE; /* holds if memvars are assumed when accesing undeclared variable (-v)*/
HB_BOOL hb_comp_bDebugInfo = HB_FALSE; /* holds if generate debugger required info */
int hb_comp_iExitLevel = HB_EXITLEVEL_DEFAULT; /* holds if there was any warning during the compilation process */
FILE * hb_comp_yyppo = NULL;
int hb_comp_iLinePRG;
int hb_comp_iLineINLINE = 0;
@@ -106,8 +106,8 @@ int main( int argc, char * argv[] )
char szFileName[ HB_PATH_MAX ];
char szPpoName[ HB_PATH_MAX ];
int iArg = 1;
BOOL bOutTable = FALSE;
BOOL bOutNew = FALSE;
HB_BOOL bOutTable = HB_FALSE;
HB_BOOL bOutNew = HB_FALSE;
DEFINES * stdef;
COMMANDS * stcmd;
@@ -164,11 +164,11 @@ int main( int argc, char * argv[] )
break;
case 'o':
case 'O':
bOutTable = TRUE;
bOutTable = HB_TRUE;
break;
case 'n':
case 'N':
bOutNew = TRUE;
bOutNew = HB_TRUE;
break;
case 'w':
case 'W':
@@ -490,13 +490,13 @@ int hb_verSvnID( void )
return 0;
}
static BOOL hb_pp_fopen( char * szFileName )
static HB_BOOL hb_pp_fopen( char * szFileName )
{
PFILE pFile;
FILE * handl_i = fopen( szFileName, "r" );
if( !handl_i )
return FALSE;
return HB_FALSE;
pFile = ( PFILE ) hb_xgrab( sizeof( _FILE ) );
pFile->handle = handl_i;
@@ -508,7 +508,7 @@ static BOOL hb_pp_fopen( char * szFileName )
hb_comp_files.pLast = pFile;
hb_comp_files.iFiles = 1;
return TRUE;
return HB_TRUE;
}
#if defined( HB_OS_WIN_CE ) && !defined( __CEGCC__ )

View File

@@ -1279,15 +1279,15 @@ STATIC FUNCTION ADO_SEEK( nWA, lSoftSeek, cKey, lFindLast )
//oRecordSet:Find( aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ], iif( lContinue, 1, 0 ) )
LPCDXKEY pKey;
HB_ERRCODE retval = HB_SUCCESS;
BOOL fEOF = FALSE, fLast;
HB_BOOL fEOF = HB_FALSE, fLast;
ULONG ulRec;
IF ! Empty( aWAData[ WA_PENDINGREL ] )
ADO_FORCEREL( nWA )
ENDIF
pArea->fTop = pArea->fBottom = FALSE;
pArea->fEof = FALSE;
pArea->fTop = pArea->fBottom = HB_FALSE;
pArea->fEof = HB_FALSE;
if ( pTag->UsrUnique )
fLast = !pTag->UsrAscend;
@@ -1295,22 +1295,22 @@ STATIC FUNCTION ADO_SEEK( nWA, lSoftSeek, cKey, lFindLast )
fLast = pTag->UsrAscend ? fFindLast : !fFindLast;
// TODO: runtime error if valtype(pKeyItm) != pTag->Type
pKey = hb_cdxKeyPutItem( NULL, pKeyItm, fLast ? CDX_MAX_REC_NUM : CDX_IGNORE_REC_NUM, pTag, TRUE, FALSE );
pKey = hb_cdxKeyPutItem( NULL, pKeyItm, fLast ? CDX_MAX_REC_NUM : CDX_IGNORE_REC_NUM, pTag, HB_TRUE, HB_FALSE );
hb_cdxIndexLockRead( pTag->pIndex );
hb_cdxTagRefreshScope( pTag );
ulRec = hb_cdxTagKeyFind( pTag, pKey );
if ( ( ulRec == 0 && ! fSoftSeek ) || pTag->TagEOF )
fEOF = TRUE;
fEOF = HB_TRUE;
else // if ( fSoftSeek )
{
if ( ! hb_cdxBottomScope( pTag ) )
fEOF = TRUE;
fEOF = HB_TRUE;
else if ( ! hb_cdxTopScope( pTag ) )
{
hb_cdxTagGoTop( pTag );
if ( pTag->CurKey->rec == 0 )
fEOF = TRUE;
fEOF = HB_TRUE;
}
}
hb_cdxIndexUnLockRead( pTag->pIndex );
@@ -1326,7 +1326,7 @@ STATIC FUNCTION ADO_SEEK( nWA, lSoftSeek, cKey, lFindLast )
hb_cdxValCompare( pTag, pKey->val, pKey->len,
pTag->CurKey->val, pTag->CurKey->len, FALSE ) == 0 );
if ( ! pArea->fFound && ! fSoftSeek )
fEOF = TRUE;
fEOF = HB_TRUE;
}
}
}
@@ -1336,7 +1336,7 @@ STATIC FUNCTION ADO_SEEK( nWA, lSoftSeek, cKey, lFindLast )
{
retval = SELF_GOTO( ( AREAP ) pArea, 0 );
}
pArea->fBof = FALSE;
pArea->fBof = HB_FALSE;
hb_cdxKeyFree( pKey );
RETURN retval;
*/

View File

@@ -4,7 +4,7 @@
/*
* Harbour Project source code:
*
*
*
* Copyright 2009 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
@@ -391,7 +391,7 @@ void hb_vmLock( void ) {}
void hb_vmUnlock( void ) {}
void hb_fsSetIOError( BOOL fResult, USHORT uiOperation )
void hb_fsSetIOError( HB_BOOL fResult, USHORT uiOperation )
{
HB_SYMBOL_UNUSED( fResult );
HB_SYMBOL_UNUSED( uiOperation );
@@ -399,10 +399,10 @@ void hb_fsSetIOError( BOOL fResult, USHORT uiOperation )
/* file name conversion */
static int s_iFileCase = HB_SET_CASE_MIXED;
static int s_iDirCase = HB_SET_CASE_MIXED;
static BOOL s_fFnTrim = FALSE;
static char s_cDirSep = HB_OS_PATH_DELIM_CHR;
static int s_iFileCase = HB_SET_CASE_MIXED;
static int s_iDirCase = HB_SET_CASE_MIXED;
static HB_BOOL s_fFnTrim = HB_FALSE;
static char s_cDirSep = HB_OS_PATH_DELIM_CHR;
const char * hb_fsNameConv( const char * szFileName, char ** pszFree )
{
@@ -583,12 +583,12 @@ void hb_compChkFileSwitches( int argc, char * argv[] )
case 's':
if( !argv[i][3] )
{
s_fFnTrim = TRUE;
s_fFnTrim = HB_TRUE;
n = 3;
}
else if( argv[i][3] == '-' )
{
s_fFnTrim = FALSE;
s_fFnTrim = HB_FALSE;
n = 4;
}
break;