2009-07-03 09:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
! hbUChar, hbSChar fixed to not depend on legacy types.
* utils/hbmk2/hbmk2.hu_HU.po
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/Makefile
+ Enabled -mt switch on DOS platform.
+ Enabled MT builds on DOS platform.
(currently its used by -jobs switch, maybe internal
Harbour compiling can use this feature)
* contrib/hbmysql/mysql.c
* contrib/hbct/ctstrfil.c
* contrib/hbct/print.c
* contrib/xhb/hbxml.c
* contrib/xhb/dbf2txt.c
* contrib/xhb/filestat.c
* contrib/hbsqlit3/hbsqlit3.c
* contrib/hbnf/fttext.c
* contrib/hbnf/dispc.c
* contrib/hbcurl/hbcurl.c
* contrib/hbgd/gdwrp.c
* contrib/hbmisc/hb_f.c
* contrib/hbtip/utils.c
* source/vm/memvars.c
* source/vm/set.c
* source/rtl/console.c
* source/rtl/philes.c
* source/rtl/gttrm/gttrm.c
* source/rtl/memofile.c
* source/rdd/dbsql.c
* source/rdd/dbffpt/dbffpt1.c
* examples/pp/pp.c
% FS API call cast cleanups.
(removed explicit casts for the most part, added const in few
places, changed some BYTE types to char.)
* Formatting.
* source/vm/task.c
! Minor text sync in debug calls.
; TOFIX:
../../filesys.c(1698) : error C2065: 'Flags' : undeclared identifier
../../filesys.c(1792) : error C2065: 'Flags' : undeclared identifier
This commit is contained in:
@@ -17,6 +17,52 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-03 09:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbdefs.h
|
||||
! hbUChar, hbSChar fixed to not depend on legacy types.
|
||||
|
||||
* utils/hbmk2/hbmk2.hu_HU.po
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* utils/hbmk2/Makefile
|
||||
+ Enabled -mt switch on DOS platform.
|
||||
+ Enabled MT builds on DOS platform.
|
||||
(currently its used by -jobs switch, maybe internal
|
||||
Harbour compiling can use this feature)
|
||||
|
||||
* contrib/hbmysql/mysql.c
|
||||
* contrib/hbct/ctstrfil.c
|
||||
* contrib/hbct/print.c
|
||||
* contrib/xhb/hbxml.c
|
||||
* contrib/xhb/dbf2txt.c
|
||||
* contrib/xhb/filestat.c
|
||||
* contrib/hbsqlit3/hbsqlit3.c
|
||||
* contrib/hbnf/fttext.c
|
||||
* contrib/hbnf/dispc.c
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
* contrib/hbgd/gdwrp.c
|
||||
* contrib/hbmisc/hb_f.c
|
||||
* contrib/hbtip/utils.c
|
||||
* source/vm/memvars.c
|
||||
* source/vm/set.c
|
||||
* source/rtl/console.c
|
||||
* source/rtl/philes.c
|
||||
* source/rtl/gttrm/gttrm.c
|
||||
* source/rtl/memofile.c
|
||||
* source/rdd/dbsql.c
|
||||
* source/rdd/dbffpt/dbffpt1.c
|
||||
* examples/pp/pp.c
|
||||
% FS API call cast cleanups.
|
||||
(removed explicit casts for the most part, added const in few
|
||||
places, changed some BYTE types to char.)
|
||||
* Formatting.
|
||||
|
||||
* source/vm/task.c
|
||||
! Minor text sync in debug calls.
|
||||
|
||||
; TOFIX:
|
||||
../../filesys.c(1698) : error C2065: 'Flags' : undeclared identifier
|
||||
../../filesys.c(1792) : error C2065: 'Flags' : undeclared identifier
|
||||
|
||||
2009-07-03 08:28 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
+ harbour/include/hbtask.h
|
||||
+ harbour/source/vm/task.c
|
||||
@@ -150,12 +196,12 @@
|
||||
2009-07-02 09:24 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbxbp/tests/demoxbp.prg
|
||||
* contrib/hbxbp/xbpstatic.prg
|
||||
+ Implemented XBPSTATIC_TYPE_BITMAP. It is not Xbase++ compatible
|
||||
+ Implemented XBPSTATIC_TYPE_BITMAP. It is not Xbase++ compatible
|
||||
in the sense it is pulled from a disk file. But by attributes wise
|
||||
it is exactly like Xbase++.
|
||||
|
||||
SUGGESSIONS: Should I implement Harbour extensions to the Xbp* classes?
|
||||
I find a wide scope to add few more instance variables to the
|
||||
I find a wide scope to add few more instance variables to the
|
||||
class.
|
||||
|
||||
2009-07-02 16:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
|
||||
@@ -78,9 +78,7 @@ HB_FUNC( SETFCREATE )
|
||||
hb_retni( ct_getfcreate() );
|
||||
|
||||
if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
ct_setfcreate( hb_parni( 1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
void ct_setsafety( BOOL bSafety )
|
||||
@@ -100,12 +98,10 @@ HB_FUNC( CSETSAFETY )
|
||||
hb_retni( ct_getsafety() );
|
||||
|
||||
if( HB_ISLOG( 1 ) )
|
||||
{
|
||||
ct_setsafety( hb_parnl( 1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
static LONG ct_StrFile( const char * pFileName, const BYTE * pcStr, ULONG ulLen, BOOL bOverwrite, LONG lOffset,
|
||||
static LONG ct_StrFile( const char * pFileName, const char * pcStr, ULONG ulLen, BOOL bOverwrite, LONG lOffset,
|
||||
BOOL bTrunc )
|
||||
{
|
||||
HB_FHANDLE hFile;
|
||||
@@ -119,13 +115,9 @@ static LONG ct_StrFile( const char * pFileName, const BYTE * pcStr, ULONG ulLen,
|
||||
bOpen = TRUE;
|
||||
}
|
||||
else if( !bFile || !ct_getsafety() )
|
||||
{
|
||||
hFile = hb_fsCreate( pFileName, ct_getfcreate() );
|
||||
}
|
||||
else
|
||||
{
|
||||
hFile = FS_ERROR;
|
||||
}
|
||||
|
||||
if( hFile != FS_ERROR )
|
||||
{
|
||||
@@ -147,14 +139,12 @@ HB_FUNC( STRFILE )
|
||||
{
|
||||
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
|
||||
{
|
||||
hb_retnl( ct_StrFile( hb_parc( 2 ), ( const BYTE * ) hb_parc( 1 ),
|
||||
hb_retnl( ct_StrFile( hb_parc( 2 ), hb_parc( 1 ),
|
||||
hb_parclen( 1 ), HB_ISLOG( 3 ) && hb_parl( 3 ),
|
||||
hb_parnl( 4 ), HB_ISLOG( 5 ) && hb_parl( 5 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retni( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( FILESTR )
|
||||
@@ -182,7 +172,7 @@ HB_FUNC( FILESTR )
|
||||
pcResult = ( char * ) hb_xgrab( lLength + 1 );
|
||||
if( lLength > 0 )
|
||||
{
|
||||
lLength = hb_fsReadLarge( hFile, ( BYTE * ) pcResult, ( ULONG ) lLength );
|
||||
lLength = hb_fsReadLarge( hFile, pcResult, ( ULONG ) lLength );
|
||||
}
|
||||
|
||||
if( bCtrlZ )
|
||||
@@ -196,14 +186,10 @@ HB_FUNC( FILESTR )
|
||||
hb_retclen_buffer( pcResult, lLength );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retc( NULL );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retc( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( SCREENFILE )
|
||||
@@ -218,15 +204,13 @@ HB_FUNC( SCREENFILE )
|
||||
|
||||
hb_gtSave( 0, 0, hb_gtMaxRow(), hb_gtMaxCol(), pBuffer );
|
||||
|
||||
hb_retnl( ct_StrFile( hb_parc( 1 ), ( const BYTE * ) pBuffer,
|
||||
hb_retnl( ct_StrFile( hb_parc( 1 ), pBuffer,
|
||||
ulSize, HB_ISLOG( 2 ) && hb_parl( 2 ), hb_parnl( 3 ),
|
||||
HB_ISLOG( 4 ) && hb_parl( 4 ) ) );
|
||||
hb_xfree( pBuffer );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retni( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( FILESCREEN )
|
||||
@@ -237,19 +221,17 @@ HB_FUNC( FILESCREEN )
|
||||
|
||||
if( hFile != FS_ERROR )
|
||||
{
|
||||
char *pBuffer;
|
||||
char * pBuffer;
|
||||
ULONG ulSize;
|
||||
LONG lLength;
|
||||
|
||||
if( HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_fsSeek( hFile, hb_parnl( 2 ), FS_SET );
|
||||
}
|
||||
|
||||
hb_gtRectSize( 0, 0, hb_gtMaxRow(), hb_gtMaxCol(), &ulSize );
|
||||
pBuffer = ( char * ) hb_xgrab( ulSize );
|
||||
|
||||
lLength = hb_fsReadLarge( hFile, ( BYTE * ) pBuffer, ulSize );
|
||||
lLength = hb_fsReadLarge( hFile, pBuffer, ulSize );
|
||||
hb_gtRest( 0, 0, hb_gtMaxRow(), hb_gtMaxCol(), pBuffer );
|
||||
|
||||
hb_xfree( pBuffer );
|
||||
@@ -258,12 +240,8 @@ HB_FUNC( FILESCREEN )
|
||||
hb_retnl( lLength );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retni( 0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retni( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ HB_FUNC( PRINTSEND )
|
||||
HB_FHANDLE hFile = hb_fsOpen( szPort, FO_WRITE );
|
||||
if( hFile != FS_ERROR )
|
||||
{
|
||||
usRet = hb_fsWrite( hFile, ( const BYTE * ) szStr, usLen );
|
||||
usRet = hb_fsWrite( hFile, szStr, usLen );
|
||||
hb_fsClose( hFile );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ size_t hb_curl_read_file_callback( void * buffer, size_t size, size_t nmemb, voi
|
||||
return ( size_t ) -1;
|
||||
}
|
||||
|
||||
ret = ( size_t ) hb_fsReadLarge( hb_curl->ul_handle, ( BYTE * ) buffer, size * nmemb );
|
||||
ret = ( size_t ) hb_fsReadLarge( hb_curl->ul_handle, buffer, size * nmemb );
|
||||
|
||||
return hb_fsError() ? CURL_READFUNC_ABORT : ret;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ size_t hb_curl_write_file_callback( void * buffer, size_t size, size_t nmemb, vo
|
||||
return ( size_t ) -1;
|
||||
}
|
||||
|
||||
return hb_fsWriteLarge( hb_curl->dl_handle, ( const BYTE * ) buffer, size * nmemb );
|
||||
return hb_fsWriteLarge( hb_curl->dl_handle, buffer, size * nmemb );
|
||||
}
|
||||
|
||||
return ( size_t ) -1;
|
||||
|
||||
@@ -250,7 +250,7 @@ static void * LoadImageFromHandle( HB_FHANDLE fhandle, int sz )
|
||||
|
||||
/* Read file */
|
||||
iptr = ( BYTE * ) hb_xgrab( sz );
|
||||
hb_fsReadLarge( fhandle, ( BYTE *) iptr, (ULONG) sz );
|
||||
hb_fsReadLarge( fhandle, iptr, (ULONG) sz );
|
||||
/* TraceLog( NULL, "Error dim %i, read %i", sz, iRead ); */
|
||||
|
||||
return iptr;
|
||||
@@ -273,7 +273,7 @@ static void * LoadImageFromFile( const char *szFile, int *sz )
|
||||
|
||||
/* Read file */
|
||||
iptr = ( BYTE * ) hb_xgrab( *sz );
|
||||
hb_fsReadLarge( fhandle, ( BYTE *) iptr, (ULONG) *sz );
|
||||
hb_fsReadLarge( fhandle, iptr, (ULONG) *sz );
|
||||
/* TraceLog( NULL, "Error dim %i, read %i", sz, iRead ); */
|
||||
|
||||
/* Close file */
|
||||
@@ -292,25 +292,25 @@ static void * LoadImageFromFile( const char *szFile, int *sz )
|
||||
|
||||
/* ---------------------------------------------------------------------------*/
|
||||
|
||||
static void SaveImageToHandle( HB_FHANDLE fhandle, void *iptr, int sz )
|
||||
static void SaveImageToHandle( HB_FHANDLE fhandle, const void * iptr, int sz )
|
||||
{
|
||||
if( ! fhandle )
|
||||
fhandle = 1; /* 1 = std output */
|
||||
|
||||
/* Write Image */
|
||||
hb_fsWriteLarge( fhandle, ( BYTE *) iptr, (ULONG) sz );
|
||||
hb_fsWriteLarge( fhandle, iptr, (ULONG) sz );
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------*/
|
||||
|
||||
static void SaveImageToFile( const char *szFile, void *iptr, int sz )
|
||||
static void SaveImageToFile( const char *szFile, const void * iptr, int sz )
|
||||
{
|
||||
HB_FHANDLE fhandle;
|
||||
|
||||
if( ( fhandle = hb_fsCreate( szFile, FC_NORMAL ) ) != FS_ERROR )
|
||||
{
|
||||
/* Write Image */
|
||||
SaveImageToHandle( fhandle, ( BYTE *) iptr, (ULONG) sz );
|
||||
SaveImageToHandle( fhandle, iptr, (ULONG) sz );
|
||||
|
||||
/* Close file */
|
||||
hb_fsClose( fhandle );
|
||||
@@ -420,7 +420,7 @@ static void GDImageSaveTo( int nType )
|
||||
{
|
||||
gdImagePtr im;
|
||||
int sz = 0;
|
||||
void *iptr = NULL;
|
||||
void * iptr = NULL;
|
||||
HB_FHANDLE fhandle;
|
||||
int level = 0, fg = 0;
|
||||
|
||||
@@ -3938,7 +3938,7 @@ HB_FUNC( GDIMAGEINTERLACE ) /* void gdImageInterlace(gdImagePtr im, int interlac
|
||||
|
||||
#if HB_GD_VERS( 2, 0, 33 )
|
||||
|
||||
static void AddImageToFile( const char *szFile, void *iptr, int sz )
|
||||
static void AddImageToFile( const char *szFile, const void * iptr, int sz )
|
||||
{
|
||||
HB_FHANDLE fhandle;
|
||||
|
||||
@@ -3948,7 +3948,7 @@ static void AddImageToFile( const char *szFile, void *iptr, int sz )
|
||||
hb_fsSeek(fhandle, 0, FS_END);
|
||||
|
||||
/* Write Image */
|
||||
SaveImageToHandle( fhandle, ( BYTE *) iptr, (ULONG) sz );
|
||||
SaveImageToHandle( fhandle, iptr, (ULONG) sz );
|
||||
|
||||
/* Close file */
|
||||
hb_fsClose( fhandle );
|
||||
|
||||
@@ -123,7 +123,7 @@ static long hb_hbfskip( int recs )
|
||||
if ( recs > 0 ) {
|
||||
for (y = 0; y < recs; y++ ) {
|
||||
hb_fsSeek( handles[area], offset[area], FS_SET );
|
||||
read_len = hb_fsRead( handles[area], ( BYTE * ) b, b_size );
|
||||
read_len = hb_fsRead( handles[area], b, b_size );
|
||||
for (x = 0; x < read_len; x++ ) {
|
||||
if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||
|
||||
((*(b + x) == 10) && (*(b + x + 1) == 13)) ) {
|
||||
@@ -157,7 +157,7 @@ static long hb_hbfskip( int recs )
|
||||
}
|
||||
|
||||
hb_fsSeek( handles[area], read_pos, FS_SET );
|
||||
read_len = hb_fsRead( handles[area], ( BYTE * ) b, ( USHORT )read_len );
|
||||
read_len = hb_fsRead( handles[area], b, ( USHORT )read_len );
|
||||
|
||||
for (x = read_len - 4; x >= 0; x-- ) {
|
||||
if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||
|
||||
@@ -190,7 +190,7 @@ HB_FUNC( HB_FREADLN )
|
||||
long read;
|
||||
|
||||
hb_fsSeek( handles[area], offset[area], FS_SET );
|
||||
read = hb_fsRead( handles[area], ( BYTE * ) b, b_size );
|
||||
read = hb_fsRead( handles[area], b, b_size );
|
||||
|
||||
for ( x = 0; x < b_size; x++ ) {
|
||||
if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||
|
||||
@@ -250,7 +250,7 @@ HB_FUNC( HB_FGOBOTTOM )
|
||||
last = offset[area];
|
||||
do {
|
||||
hb_fsSeek( handles[area], offset[area], FS_SET );
|
||||
len = hb_fsRead( handles[area], ( BYTE * ) c, c_size );
|
||||
len = hb_fsRead( handles[area], c, c_size );
|
||||
for ( x = 0; x < len; x++ ) {
|
||||
if ( ((*(c + x) == 13) && (*(c + x + 1) == 10)) ||
|
||||
((*(c + x) == 10) && (*(c + x + 1) == 13)) ||
|
||||
@@ -336,7 +336,7 @@ HB_FUNC( HB_FREADANDSKIP )
|
||||
BOOL bInField = 0, bHasCRLF = FALSE;
|
||||
|
||||
hb_fsSeek( handles[area], offset[area], FS_SET );
|
||||
read = hb_fsRead( handles[area], ( BYTE * ) b, b_size );
|
||||
read = hb_fsRead( handles[area], b, b_size );
|
||||
|
||||
while ( x < read )
|
||||
{
|
||||
|
||||
@@ -327,7 +327,7 @@ static char * filetoBuff( const char * fname, int * size )
|
||||
*size = ( int ) hb_fsSeek( handle, 0, FS_END );
|
||||
hb_fsSeek( handle, 0, FS_SET );
|
||||
buffer = ( char * ) hb_xgrab( *size + 1 );
|
||||
*size = hb_fsReadLarge( handle, ( BYTE * ) buffer, *size );
|
||||
*size = hb_fsReadLarge( handle, buffer, *size );
|
||||
buffer[ *size ] = '\0';
|
||||
hb_fsClose( handle );
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ static long getblock(long offset)
|
||||
/* read in the file and set the buffer bottom variable equal */
|
||||
/* to the number of bytes actually read in. */
|
||||
|
||||
buffbot = hb_fsReadLarge( infile, ( BYTE * ) buffer, buffsize );
|
||||
buffbot = hb_fsReadLarge( infile, buffer, buffsize );
|
||||
|
||||
/* if a full buffer's worth was not read in, make it full. */
|
||||
|
||||
@@ -182,7 +182,7 @@ static long getblock(long offset)
|
||||
else
|
||||
hb_fsSeek( infile, (long) buffsize, FS_SET );
|
||||
|
||||
buffbot = hb_fsReadLarge( infile, ( BYTE * ) buffer, buffsize );
|
||||
buffbot = hb_fsReadLarge( infile, buffer, buffsize );
|
||||
}
|
||||
|
||||
/* return the actual file position */
|
||||
|
||||
@@ -186,12 +186,12 @@
|
||||
#define VALLOC_FLAG 0
|
||||
|
||||
/* routines internal to this module */
|
||||
static int _findeol( BYTE * buf, int buf_len );
|
||||
static int _findbol( BYTE * buf, int buf_len );
|
||||
static int _findeol( char * buf, int buf_len );
|
||||
static int _findbol( char * buf, int buf_len );
|
||||
static int _ins_buff( int bytes );
|
||||
static int _del_buff( int bytes );
|
||||
static long _ft_skip( long recs );
|
||||
static int _writeLine( const BYTE * theData, ULONG iDataLen );
|
||||
static int _writeLine( const char * theData, ULONG iDataLen );
|
||||
static BOOL _writeeol( HB_FHANDLE fhnd );
|
||||
|
||||
/* arrays used by the text workareas */
|
||||
@@ -716,10 +716,10 @@ static long _ft_skip( long iRecs )
|
||||
|
||||
int iByteCount;
|
||||
int iBytesRead, iBytesRemaining;
|
||||
BYTE * cPtr;
|
||||
char * cPtr;
|
||||
long iSkipped = 0;
|
||||
|
||||
BYTE * cBuff = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
char * cBuff = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
long fpOffset = offset[area];
|
||||
|
||||
isBof[area] = FALSE;
|
||||
@@ -956,7 +956,7 @@ HB_FUNC( FT_FREADLN )
|
||||
|
||||
int iByteCount;
|
||||
int iBytesRead;
|
||||
BYTE * cPtr = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
char * cPtr = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
|
||||
hb_fsSeek( handles[area], offset[area], FS_SET );
|
||||
iBytesRead = (int) hb_fsReadLarge( handles[area], cPtr, BUFFSIZE );
|
||||
@@ -1028,7 +1028,7 @@ HB_FUNC( FT_FDELETE )
|
||||
long destPtr ;
|
||||
long cur_rec = recno[area];
|
||||
long cur_off = offset[area];
|
||||
BYTE * Buff = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
char * Buff = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
|
||||
/* save address to current record ( first record to be deleted ) */
|
||||
destPtr = offset[area] ;
|
||||
@@ -1212,7 +1212,7 @@ HB_FUNC( FT_FAPPEND )
|
||||
int iRead;
|
||||
int iByteCount;
|
||||
|
||||
BYTE * buff = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
char * buff = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
|
||||
error[area] = 0;
|
||||
|
||||
@@ -1228,7 +1228,7 @@ HB_FUNC( FT_FAPPEND )
|
||||
/* determine if CRLF pair exists, if not, add one */
|
||||
|
||||
/* get count of chars in this line */
|
||||
iByteCount = _findeol( ( BYTE * ) buff, iRead );
|
||||
iByteCount = _findeol( buff, iRead );
|
||||
if( iByteCount == 0 )
|
||||
hb_fsSeek( handles[area], 0, FS_END );
|
||||
else
|
||||
@@ -1330,14 +1330,14 @@ HB_FUNC( FT_FAPPEND )
|
||||
|
||||
HB_FUNC( FT_FWRITEL )
|
||||
{
|
||||
const BYTE * theData = ( const BYTE * ) hb_parc( 1 );
|
||||
const char * theData = hb_parc( 1 );
|
||||
int iDataLen = hb_parclen( 1 );
|
||||
int lInsert = ( HB_ISLOG( 2 ) ? hb_parl( 2 ) : 0 );
|
||||
int err;
|
||||
int iLineLen = 0;
|
||||
int iRead, iEOL;
|
||||
|
||||
BYTE * buffer;
|
||||
char * buffer;
|
||||
|
||||
|
||||
/* position file pointer to insertion point */
|
||||
@@ -1357,13 +1357,13 @@ HB_FUNC( FT_FWRITEL )
|
||||
else
|
||||
{
|
||||
/* overwrite mode, determine how many bytes over/under */
|
||||
buffer = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
buffer = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
|
||||
/* find length of current line, loop if longer than buffer */
|
||||
do
|
||||
{
|
||||
iRead = hb_fsRead( handles[area], buffer, BUFFSIZE );
|
||||
iEOL = _findeol( ( BYTE * ) buffer, iRead );
|
||||
iEOL = _findeol( buffer, iRead );
|
||||
if( iEOL == 0 )
|
||||
{
|
||||
iLineLen += iRead;
|
||||
@@ -1648,7 +1648,7 @@ HB_FUNC( FT_FGOTO )
|
||||
line is longer than buffer end)
|
||||
|
||||
------------------------------------------------------------------------*/
|
||||
static int _findeol( BYTE * buf, int buf_len )
|
||||
static int _findeol( char * buf, int buf_len )
|
||||
{
|
||||
int tmp;
|
||||
|
||||
@@ -1707,14 +1707,14 @@ _feoldone:
|
||||
the preceding CRLF pair (beginning of line).
|
||||
|
||||
------------------------------------------------------------------------*/
|
||||
static int _findbol( BYTE * buf, int buf_len )
|
||||
static int _findbol( char * buf, int buf_len )
|
||||
{
|
||||
int tmp = buf_len - 1;
|
||||
|
||||
if( tmp != 0 )
|
||||
{
|
||||
BYTE * p = buf - 1;
|
||||
BYTE b = *p;
|
||||
char * p = buf - 1;
|
||||
char b = *p;
|
||||
|
||||
if( b == FT_CHR_EOF )
|
||||
{
|
||||
@@ -1806,9 +1806,9 @@ _fbolerr:
|
||||
static int _ins_buff( int iLen )
|
||||
{
|
||||
|
||||
BYTE * ReadBuff = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
BYTE * WriteBuff = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
BYTE * SaveBuff;
|
||||
char * ReadBuff = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
char * WriteBuff = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
char * SaveBuff;
|
||||
long fpRead, fpWrite;
|
||||
int WriteLen, ReadLen;
|
||||
int SaveLen;
|
||||
@@ -1900,7 +1900,7 @@ static int _ins_buff( int iLen )
|
||||
/* deletes xxx bytes from the current file, beginning at the current record */
|
||||
static int _del_buff( int iLen )
|
||||
{
|
||||
BYTE * WriteBuff = ( BYTE * ) hb_xgrab( BUFFSIZE );
|
||||
char * WriteBuff = ( char * ) hb_xgrab( BUFFSIZE );
|
||||
long fpRead, fpWrite;
|
||||
int WriteLen;
|
||||
int SaveLen;
|
||||
@@ -1956,7 +1956,7 @@ static int _del_buff( int iLen )
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* writes a line of data to the file, including the terminating CRLF */
|
||||
static int _writeLine( const BYTE * theData, ULONG iDataLen )
|
||||
static int _writeLine( const char * theData, ULONG iDataLen )
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
@@ -1979,7 +1979,7 @@ static BOOL _writeeol( HB_FHANDLE fhnd )
|
||||
const char * crlf = hb_conNewLine();
|
||||
ULONG len = strlen( crlf );
|
||||
|
||||
return hb_fsWriteLarge( fhnd, ( BYTE * ) crlf, len ) == ( ULONG ) len;
|
||||
return hb_fsWriteLarge( fhnd, crlf, len ) == ( ULONG ) len;
|
||||
}
|
||||
|
||||
/* fttext.c eof */
|
||||
|
||||
@@ -547,7 +547,7 @@ HB_FUNC( SQLITE3_TEMP_DIRECTORY )
|
||||
#ifdef SQLITE3_LIB
|
||||
{
|
||||
BOOL fFree;
|
||||
BYTE *pszDirName = hb_fsNameConv( hb_parcx(1), &fFree );
|
||||
char *pszDirName = hb_fsNameConv( hb_parcx(1), &fFree );
|
||||
|
||||
if( hb_fsIsDirectory(pszDirName) )
|
||||
{
|
||||
@@ -1797,17 +1797,17 @@ HB_FUNC( SQLITE3_FILE_TO_BUFF )
|
||||
|
||||
if( handle != FS_ERROR )
|
||||
{
|
||||
BYTE *buffer;
|
||||
char *buffer;
|
||||
ULONG iSize;
|
||||
|
||||
iSize = ( int ) hb_fsSeek( handle, 0, FS_END );
|
||||
iSize -= ( int ) hb_fsSeek( handle, 0, FS_SET );
|
||||
buffer = ( BYTE * ) hb_xgrab( iSize + 1 );
|
||||
buffer = ( char * ) hb_xgrab( iSize + 1 );
|
||||
iSize = hb_fsReadLarge( handle, buffer, iSize );
|
||||
buffer[iSize] = '\0';
|
||||
hb_fsClose( handle );
|
||||
|
||||
hb_retclen_buffer( ( char * ) buffer, iSize );
|
||||
hb_retclen_buffer( buffer, iSize );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1822,7 +1822,7 @@ HB_FUNC( SQLITE3_BUFF_TO_FILE )
|
||||
|
||||
if( handle != FS_ERROR && iSize > 0 )
|
||||
{
|
||||
hb_retni( hb_fsWriteLarge(handle, ( BYTE * ) hb_parcx(2), iSize) == iSize ? 0 : -1 );
|
||||
hb_retni( hb_fsWriteLarge(handle, hb_parcx(2), iSize) == iSize ? 0 : -1 );
|
||||
hb_fsClose( handle );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -600,7 +600,7 @@ static const char *s_findFileMimeType( HB_FHANDLE fileIn )
|
||||
|
||||
ulPos = hb_fsSeek( fileIn, 0, SEEK_CUR );
|
||||
hb_fsSeek( fileIn, 0, SEEK_SET );
|
||||
iLen = hb_fsRead( fileIn, ( BYTE * ) buf, 512 );
|
||||
iLen = hb_fsRead( fileIn, buf, sizeof( buf ) );
|
||||
|
||||
if ( iLen > 0 )
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@ static BOOL hb_ExportVar( HB_FHANDLE handle, PHB_ITEM pValue, const char * cDeli
|
||||
szString = hb_xstrcpy( NULL, cDelim, szStrEsc, cDelim, NULL );
|
||||
|
||||
/* FWrite( handle, szString ) */
|
||||
hb_fsWriteLarge( handle, ( BYTE * ) szString, strlen( szString ) );
|
||||
hb_fsWriteLarge( handle, szString, strlen( szString ) );
|
||||
|
||||
/* Orphaned, get rif off it */
|
||||
hb_xfree( szStrEsc );
|
||||
@@ -122,14 +122,14 @@ static BOOL hb_ExportVar( HB_FHANDLE handle, PHB_ITEM pValue, const char * cDeli
|
||||
char * szDate = ( char * ) hb_xgrab( 9 );
|
||||
|
||||
hb_itemGetDS( pValue, szDate );
|
||||
hb_fsWriteLarge( handle, (BYTE*) szDate, strlen( szDate ) );
|
||||
hb_fsWriteLarge( handle, szDate, strlen( szDate ) );
|
||||
hb_xfree( szDate );
|
||||
break;
|
||||
}
|
||||
/* an "L" field */
|
||||
case HB_IT_LOGICAL:
|
||||
{
|
||||
hb_fsWriteLarge( handle, (BYTE*) ( hb_itemGetL( pValue ) ? "T" : "F" ), 1 );
|
||||
hb_fsWriteLarge( handle, ( hb_itemGetL( pValue ) ? "T" : "F" ), 1 );
|
||||
break;
|
||||
}
|
||||
/* an "N" field */
|
||||
@@ -144,7 +144,7 @@ static BOOL hb_ExportVar( HB_FHANDLE handle, PHB_ITEM pValue, const char * cDeli
|
||||
ULONG ulLen = strlen( szResult );
|
||||
const char * szTrimmed = hb_strLTrim( szResult, &ulLen );
|
||||
|
||||
hb_fsWriteLarge( handle, ( const BYTE * ) szTrimmed, strlen( szTrimmed ) );
|
||||
hb_fsWriteLarge( handle, szTrimmed, strlen( szTrimmed ) );
|
||||
hb_xfree( szResult );
|
||||
}
|
||||
break;
|
||||
@@ -236,7 +236,7 @@ HB_FUNC( DBF2TEXT )
|
||||
for( ui = 1; ui <= uiFields; ui ++ )
|
||||
{
|
||||
if( bWriteSep )
|
||||
hb_fsWriteLarge( handle, ( const BYTE * ) cSep, iSepLen );
|
||||
hb_fsWriteLarge( handle, cSep, iSepLen );
|
||||
|
||||
SELF_GETVALUE( pArea, ui, pTmp );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
@@ -263,7 +263,7 @@ HB_FUNC( DBF2TEXT )
|
||||
if( iPos )
|
||||
{
|
||||
if( bWriteSep )
|
||||
hb_fsWriteLarge( handle, ( const BYTE * ) cSep, iSepLen );
|
||||
hb_fsWriteLarge( handle, cSep, iSepLen );
|
||||
|
||||
SELF_GETVALUE( pArea, ( USHORT ) iPos, pTmp );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
@@ -276,7 +276,7 @@ HB_FUNC( DBF2TEXT )
|
||||
}
|
||||
}
|
||||
}
|
||||
hb_fsWriteLarge( handle, (BYTE*) "\r\n", 2 );
|
||||
hb_fsWriteLarge( handle, "\r\n", 2 );
|
||||
bWriteSep = FALSE;
|
||||
}
|
||||
|
||||
@@ -288,6 +288,6 @@ HB_FUNC( DBF2TEXT )
|
||||
}
|
||||
|
||||
/* Writing EOF */
|
||||
hb_fsWriteLarge( handle, ( BYTE * ) "\x1A", 1 );
|
||||
hb_fsWriteLarge( handle, "\x1A", 1 );
|
||||
hb_itemRelease( pTmp );
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ static BOOL hb_fsFileStats(
|
||||
|
||||
/* Generic algorithm based on findfirst */
|
||||
{
|
||||
PHB_FFIND findinfo = hb_fsFindFirst( ( char * ) pszFileName, HB_FA_ALL );
|
||||
PHB_FFIND findinfo = hb_fsFindFirst( pszFileName, HB_FA_ALL );
|
||||
|
||||
if( findinfo )
|
||||
{
|
||||
|
||||
@@ -1967,7 +1967,7 @@ static void mxml_output_func_to_handle( MXML_OUTPUT *out, const char *s, int len
|
||||
HB_FHANDLE fh = out->u.hFile;
|
||||
int olen;
|
||||
|
||||
olen = hb_fsWriteLarge( fh, (BYTE *) s, len );
|
||||
olen = hb_fsWriteLarge( fh, s, len );
|
||||
|
||||
if ( olen < len )
|
||||
{
|
||||
@@ -2122,7 +2122,7 @@ static void mxml_refill_from_handle_func( MXML_REFIL *ref )
|
||||
HB_FHANDLE fh = ( HB_FHANDLE ) ref->u.hFile;
|
||||
int len;
|
||||
|
||||
len = hb_fsReadLarge( fh, (BYTE *) ref->buffer, ref->bufsize );
|
||||
len = hb_fsReadLarge( fh, ref->buffer, ref->bufsize );
|
||||
|
||||
if ( len == -1 )
|
||||
{
|
||||
|
||||
@@ -519,7 +519,7 @@ void hb_xfree( void * pMem ) /* frees fixed memory */
|
||||
hb_compGenError( NULL, hb_pp_szErrors, 'P', HB_PP_ERR_MEMFREE, NULL, NULL );
|
||||
}
|
||||
|
||||
BYTE * hb_fsNameConv( BYTE * szFileName, BOOL * pfFree )
|
||||
char * hb_fsNameConv( char * szFileName, BOOL * pfFree )
|
||||
{
|
||||
if( pfFree )
|
||||
* pfFree = FALSE;
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
# define HB_ARCH_16BIT
|
||||
#endif
|
||||
|
||||
#if USHRT_MAX == 0xffff
|
||||
#if USHRT_MAX == 0xFFFF
|
||||
typedef signed short int hbI16;
|
||||
typedef unsigned short int hbU16;
|
||||
#define hbI16Min SHRT_MIN
|
||||
@@ -691,8 +691,8 @@ typedef unsigned long HB_COUNTER;
|
||||
/* Harbour overloaded types: */
|
||||
typedef int hbBool;
|
||||
typedef char hbChar; /* TOFIX */
|
||||
typedef SCHAR hbSChar;
|
||||
typedef UCHAR hbUChar;
|
||||
typedef signed char hbSChar;
|
||||
typedef unsigned char hbUChar;
|
||||
typedef short hbShort;
|
||||
typedef unsigned short hbUShort;
|
||||
typedef int hbInt;
|
||||
|
||||
@@ -3332,7 +3332,7 @@ static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI
|
||||
#endif
|
||||
if( hFile != FS_ERROR )
|
||||
{
|
||||
if( hb_fsWrite( hFile, ( BYTE * ) pString, uiType ) != uiType )
|
||||
if( hb_fsWrite( hFile, pString, uiType ) != uiType )
|
||||
uiError = EDBF_WRITE;
|
||||
hb_xfree( pString );
|
||||
}
|
||||
@@ -3917,13 +3917,13 @@ static HB_ERRCODE hb_fptCreateMemFile( FPTAREAP pArea, LPDBOPENINFO pCreateInfo
|
||||
if( ! pArea->fTemporary )
|
||||
{
|
||||
/* create file name */
|
||||
pFileName = hb_fsFNameSplit( ( char * ) pCreateInfo->abName );
|
||||
pFileName = hb_fsFNameSplit( pCreateInfo->abName );
|
||||
if( ! pFileName->szExtension )
|
||||
{
|
||||
pItem = hb_itemPutC( pItem, NULL );
|
||||
SELF_INFO( ( AREAP ) pArea, DBI_MEMOEXT, pItem );
|
||||
pFileName->szExtension = hb_itemGetCPtr( pItem );
|
||||
hb_fsFNameMerge( ( char * ) szFileName, pFileName );
|
||||
hb_fsFNameMerge( szFileName, pFileName );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4114,13 +4114,13 @@ static HB_ERRCODE hb_fptOpenMemFile( FPTAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
}
|
||||
|
||||
/* create file name */
|
||||
pFileName = hb_fsFNameSplit( ( char * ) pOpenInfo->abName );
|
||||
pFileName = hb_fsFNameSplit( pOpenInfo->abName );
|
||||
if( ! pFileName->szExtension )
|
||||
{
|
||||
PHB_ITEM pItem = hb_itemPutC( NULL, NULL );
|
||||
SELF_INFO( ( AREAP ) pArea, DBI_MEMOEXT, pItem );
|
||||
pFileName->szExtension = hb_itemGetCPtr( pItem );
|
||||
hb_fsFNameMerge( ( char * ) szFileName, pFileName );
|
||||
hb_fsFNameMerge( szFileName, pFileName );
|
||||
hb_itemRelease( pItem );
|
||||
}
|
||||
else
|
||||
@@ -4701,7 +4701,7 @@ static HB_ERRCODE hb_fptInfo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
PHB_FNAME pFileName;
|
||||
|
||||
pFileName = hb_fsFNameSplit( ( char * ) pArea->szMemoFileName );
|
||||
pFileName = hb_fsFNameSplit( pArea->szMemoFileName );
|
||||
hb_itemPutC( pItem, pFileName->szExtension );
|
||||
hb_xfree( pFileName );
|
||||
}
|
||||
|
||||
@@ -120,10 +120,10 @@ static void hb_destroyFBuffer( PHB_FILEBUF pFileBuf )
|
||||
|
||||
static PHB_FILEBUF hb_createFBuffer( HB_FHANDLE hFile, ULONG ulSize )
|
||||
{
|
||||
PHB_FILEBUF pFileBuf = ( PHB_FILEBUF )hb_xgrab( sizeof( HB_FILEBUF ) );
|
||||
PHB_FILEBUF pFileBuf = ( PHB_FILEBUF ) hb_xgrab( sizeof( HB_FILEBUF ) );
|
||||
|
||||
pFileBuf->hFile = hFile;
|
||||
pFileBuf->pBuf = ( BYTE * )hb_xgrab( ulSize );
|
||||
pFileBuf->pBuf = ( BYTE * ) hb_xgrab( ulSize );
|
||||
pFileBuf->ulSize = ulSize;
|
||||
pFileBuf->ulPos = 0;
|
||||
return pFileBuf;
|
||||
@@ -337,7 +337,7 @@ static ULONG hb_db2Sql( AREAP pArea, PHB_ITEM pFields, HB_LONG llNext,
|
||||
hb_itemRelease( pTmp );
|
||||
|
||||
/* Writing EOF */
|
||||
/* hb_fsWrite( hFile, ( BYTE * ) "\x1A", 1 ); */
|
||||
/* hb_fsWrite( hFile, "\x1A", 1 ); */
|
||||
|
||||
return ulRecords;
|
||||
}
|
||||
|
||||
@@ -236,19 +236,19 @@ void hb_conOutAlt( const char * pStr, ULONG ulLen )
|
||||
if( hb_setGetAlternate() && ( hFile = hb_setGetAltHan() ) != FS_ERROR )
|
||||
{
|
||||
/* Print to alternate file if SET ALTERNATE ON and valid alternate file */
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, pStr, ulLen );
|
||||
}
|
||||
|
||||
if( ( hFile = hb_setGetExtraHan() ) != FS_ERROR )
|
||||
{
|
||||
/* Print to extra file if valid alternate file */
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, pStr, ulLen );
|
||||
}
|
||||
|
||||
if( ( hFile = hb_setGetPrinterHandle( HB_SET_PRN_CON ) ) != FS_ERROR )
|
||||
{
|
||||
/* Print to printer if SET PRINTER ON and valid printer file */
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, pStr, ulLen );
|
||||
hb_prnPos()->col += ( USHORT ) ulLen;
|
||||
}
|
||||
}
|
||||
@@ -263,7 +263,7 @@ static void hb_conOutDev( const char * pStr, ULONG ulLen )
|
||||
if( ( hFile = hb_setGetPrinterHandle( HB_SET_PRN_DEV ) ) != FS_ERROR )
|
||||
{
|
||||
/* Display to printer if SET DEVICE TO PRINTER and valid printer file */
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, pStr, ulLen );
|
||||
hb_prnPos()->col += ( USHORT ) ulLen;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -692,7 +692,7 @@ static void hb_gt_trm_termFlush( PHB_GTTRM pTerm )
|
||||
{
|
||||
if( pTerm->iOutBufIndex > 0 )
|
||||
{
|
||||
hb_fsWriteLarge( pTerm->hFileno, ( const BYTE * ) pTerm->pOutBuf, pTerm->iOutBufIndex );
|
||||
hb_fsWriteLarge( pTerm->hFileno, pTerm->pOutBuf, pTerm->iOutBufIndex );
|
||||
pTerm->iOutBufIndex = 0;
|
||||
}
|
||||
}
|
||||
@@ -2120,7 +2120,7 @@ static void hb_gt_trm_SetPalette( PHB_GTTRM pTerm, int iIndex )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_gt_trm_SetPalette(%p,%d)", pTerm, iIndex));
|
||||
|
||||
if( pTerm->terminal_type == TERM_LINUX ||
|
||||
if( pTerm->terminal_type == TERM_LINUX ||
|
||||
( pTerm->terminal_ext & TERM_PUTTY ) )
|
||||
{
|
||||
hb_gt_trm_LinuxSetPalette( pTerm, iIndex );
|
||||
@@ -2131,7 +2131,7 @@ static void hb_gt_trm_ResetPalette( PHB_GTTRM pTerm )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_gt_trm_ResetPalette(%p)", pTerm));
|
||||
|
||||
if( pTerm->terminal_type == TERM_LINUX ||
|
||||
if( pTerm->terminal_type == TERM_LINUX ||
|
||||
( pTerm->terminal_ext & TERM_PUTTY ) )
|
||||
{
|
||||
hb_gt_trm_LinuxResetPalette( pTerm );
|
||||
@@ -2580,7 +2580,7 @@ static void init_keys( PHB_GTTRM pTerm )
|
||||
|
||||
#if 0
|
||||
/* key added for gnome-terminal and teraterm */
|
||||
{ EXKEY_ENTER |KEY_CTRLMASK, "\033[7;5~" },
|
||||
{ EXKEY_ENTER |KEY_CTRLMASK, "\033[7;5~" },
|
||||
{ EXKEY_TAB |KEY_CTRLMASK, "\033[8;5~" },
|
||||
|
||||
{ EXKEY_UP |KEY_CTRLMASK|KEY_ALTMASK, "\033[6A" },
|
||||
|
||||
@@ -134,7 +134,7 @@ static BOOL hb_memowrit( BOOL bHandleEOF )
|
||||
{
|
||||
ULONG ulSize = hb_itemGetCLen( pString );
|
||||
|
||||
bRetVal = ( hb_fsWriteLarge( fhnd, ( const BYTE * ) hb_itemGetCPtr( pString ), ulSize ) == ulSize );
|
||||
bRetVal = ( hb_fsWriteLarge( fhnd, hb_itemGetCPtr( pString ), ulSize ) == ulSize );
|
||||
|
||||
/* NOTE: CA-Cl*pper will add the EOF even if the write failed. [vszakats] */
|
||||
/* NOTE: CA-Cl*pper will not return .F. when the EOF could not be written. [vszakats] */
|
||||
|
||||
@@ -128,8 +128,7 @@ HB_FUNC( FREAD )
|
||||
if( ulRead <= hb_parcsiz( 2 ) &&
|
||||
hb_itemGetWriteCL( pBuffer, &buffer, &ulSize ) )
|
||||
{
|
||||
ulRead = hb_fsReadLarge( hb_numToHandle( hb_parnint( 1 ) ),
|
||||
( BYTE * ) buffer, ulRead );
|
||||
ulRead = hb_fsReadLarge( hb_numToHandle( hb_parnint( 1 ) ), buffer, ulRead );
|
||||
uiError = hb_fsError();
|
||||
}
|
||||
else
|
||||
@@ -155,8 +154,7 @@ HB_FUNC( FWRITE )
|
||||
nLen = nWrite;
|
||||
}
|
||||
|
||||
hb_retnl( hb_fsWriteLarge( hb_numToHandle( hb_parnint( 1 ) ),
|
||||
( const BYTE * ) hb_parc( 2 ), nLen ) );
|
||||
hb_retnl( hb_fsWriteLarge( hb_numToHandle( hb_parnint( 1 ) ), hb_parc( 2 ), nLen ) );
|
||||
uiError = hb_fsError();
|
||||
}
|
||||
else
|
||||
@@ -245,7 +243,7 @@ HB_FUNC( FREADSTR )
|
||||
char * buffer = ( char * ) hb_xgrab( ulToRead + 1 );
|
||||
ULONG ulRead;
|
||||
|
||||
ulRead = hb_fsReadLarge( fhnd, ( BYTE * ) buffer, ulToRead );
|
||||
ulRead = hb_fsReadLarge( fhnd, buffer, ulToRead );
|
||||
uiError = hb_fsError();
|
||||
buffer[ ulRead ] = '\0';
|
||||
|
||||
|
||||
@@ -1399,9 +1399,9 @@ static HB_DYNS_FUNC( hb_memvarSave )
|
||||
buffer[ 11 ] = 'C' + 128;
|
||||
HB_PUT_LE_UINT16( &buffer[ 16 ], ulLen );
|
||||
hb_fsWrite( fhnd, buffer, HB_MEM_REC_LEN );
|
||||
hb_fsWriteLarge( fhnd, ( BYTE * ) hb_itemGetCPtr( pMemvar ), ulLen - iOverFlow );
|
||||
hb_fsWriteLarge( fhnd, hb_itemGetCPtr( pMemvar ), ulLen - iOverFlow );
|
||||
if( iOverFlow )
|
||||
hb_fsWrite( fhnd, ( const BYTE * ) "\0", 1 );
|
||||
hb_fsWrite( fhnd, "\0", 1 );
|
||||
}
|
||||
else if( HB_IS_NUMERIC( pMemvar ) )
|
||||
{
|
||||
|
||||
@@ -191,7 +191,7 @@ static void close_handle( PHB_SET_STRUCT pSet, HB_set_enum set_specifier )
|
||||
if( *handle_ptr != FS_ERROR )
|
||||
{
|
||||
if( set_specifier != HB_SET_PRINTFILE && pSet->HB_SET_EOF )
|
||||
hb_fsWrite( *handle_ptr, ( BYTE * ) "\x1A", 1 );
|
||||
hb_fsWrite( *handle_ptr, "\x1A", 1 );
|
||||
hb_fsClose( *handle_ptr );
|
||||
*handle_ptr = FS_ERROR;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ static void open_handle( PHB_SET_STRUCT pSet, const char * file_name,
|
||||
now that theres an HB_SET_EOF flag). */
|
||||
char cEOF = '\0';
|
||||
hb_fsSeek( handle, -1, FS_END ); /* Position to last char. */
|
||||
hb_fsRead( handle, ( BYTE * ) &cEOF, 1 ); /* Read the last char. */
|
||||
hb_fsRead( handle, &cEOF, 1 ); /* Read the last char. */
|
||||
if( cEOF == '\x1A' ) /* If it's an EOF, */
|
||||
{
|
||||
hb_fsSeek( handle, -1, FS_END ); /* Then write over it. */
|
||||
|
||||
@@ -438,7 +438,7 @@ static void hb_taskFinalize( PHB_TASKINFO pTask )
|
||||
}
|
||||
#ifdef HB_TASK_DEBUG
|
||||
if( pTask->joiners )
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskDone: dummy joiners", NULL, NULL );
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskFinalize: dummy joiners", NULL, NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ static void hb_taskFinalize( PHB_TASKINFO pTask )
|
||||
}
|
||||
#ifdef HB_TASK_DEBUG
|
||||
if( pTask->locking )
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskDone: dummy lock", NULL, NULL );
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskFinalize: dummy lock", NULL, NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ static void hb_taskFinalize( PHB_TASKINFO pTask )
|
||||
}
|
||||
#ifdef HB_TASK_DEBUG
|
||||
if( pTask->waiting )
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskDone: dummy cond", NULL, NULL );
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskFinalize: dummy cond", NULL, NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ static void hb_taskFinalize( PHB_TASKINFO pTask )
|
||||
|
||||
#ifdef HB_TASK_DEBUG
|
||||
if( pTask->locked )
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskDone: dummy lock", NULL, NULL );
|
||||
hb_errInternal( HB_EI_ERRUNRECOV, "TaskFinalize: dummy lock", NULL, NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -6,13 +6,6 @@ ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
HVMLIB = hbvm
|
||||
ifneq ($(HB_ARCHITECTURE),dos)
|
||||
ifneq ($(HB_MT),no)
|
||||
HVMLIB = hbvmmt
|
||||
endif
|
||||
endif
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
@@ -22,13 +15,13 @@ PRG_MAIN=hbmk2.prg
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
$(HVMLIB) \
|
||||
hbvmmt \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbcpage \
|
||||
hbnulrdd \
|
||||
hbrtl \
|
||||
$(HVMLIB) \
|
||||
hbvmmt \
|
||||
hbmacro \
|
||||
hbcommon \
|
||||
hbpp \
|
||||
|
||||
@@ -339,7 +339,7 @@ msgstr "visszat
|
||||
|
||||
#: hbmk2.prg:5758 hbmk2.prg:6471
|
||||
#, c-format
|
||||
msgid "start n compilation threads (MT platforms/builds only)"
|
||||
msgid "start n compilation threads (multiprocess platforms only)"
|
||||
msgstr "n szálon futtassa a fordítókat (csak támogatott platformokon)"
|
||||
|
||||
#: hbmk2.prg:5758 hbmk2.prg:6471
|
||||
|
||||
@@ -1877,9 +1877,9 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
|
||||
hbmk[ _HBMK_lSHARED ] := .F.
|
||||
ENDIF
|
||||
|
||||
/* Force MT mode off in 1.0.x compatibility and dos mode. */
|
||||
/* Force MT mode off in 1.0.x and xhb/dos compatibility modes. */
|
||||
IF hbmk[ _HBMK_nHBMODE ] == _HBMODE_HB10 .OR. ;
|
||||
hbmk[ _HBMK_cARCH ] == "dos"
|
||||
( hbmk[ _HBMK_nHBMODE ] == _HBMODE_XHB .AND. hbmk[ _HBMK_cARCH ] == "dos" )
|
||||
hbmk[ _HBMK_lMT ] := .F.
|
||||
ENDIF
|
||||
|
||||
@@ -6595,7 +6595,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
|
||||
{ "-aflag=<f>" , I_( "pass flag to linker (static library)" ) },;
|
||||
{ "-dflag=<f>" , I_( "pass flag to linker (dynamic library)" ) },;
|
||||
{ "-runflag=<f>" , I_( "pass flag to output executable when -run option is used" ) },;
|
||||
{ "-jobs=<n>" , I_( "start n compilation threads (MT platforms/builds only)" ) },;
|
||||
{ "-jobs=<n>" , I_( "start n compilation threads (multiprocess platforms only)" ) },;
|
||||
{ "-inc" , I_( "enable incremental build mode" ) },;
|
||||
{ "-[no]head[=<m>]" , I_( "control source header parsing (in incremental build mode)\n<m> can be: full, partial (default), off" ) },;
|
||||
{ "-rebuild" , I_( "rebuild all (in incremental build mode)" ) },;
|
||||
|
||||
Reference in New Issue
Block a user