2004-02-20 8:55 UTC-0800 Luis Krause Mantilla
This commit is contained in:
@@ -8,6 +8,15 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-02-20 8:55 UTC-0800 Luis Krause Mantilla <lkrausem /*at*/ shaw /*dot*/ ca>
|
||||
* contrib/mysql/mysql.c
|
||||
! Fixed declaration for filelength() from int to long to match io.h
|
||||
* source/rtl/memofile.c
|
||||
! Changed return values for empty or failed calles to MemoRead() to return an
|
||||
empty string instead of a NULL
|
||||
! Close file when MemoRead() was successful, but file was empty (was being left open)
|
||||
Above solutions reported and provided by David Arturo Macías Corona. Thanks!
|
||||
|
||||
2004-02-19 12:48 UTC-0800 Luis Krause Mantilla <lkrausem /*at*/ shaw /*dot*/ ca>
|
||||
* contrib/rdd_ads/adsfunc.c
|
||||
! fixed casting in adsShowError()
|
||||
|
||||
@@ -344,13 +344,13 @@ HB_FUNC(SQLSRVINFO)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
int filelength( int handle )
|
||||
long filelength( int handle )
|
||||
{
|
||||
int nEnd = hb_fsSeek( handle, 0 , 2 );
|
||||
int nStart = hb_fsSeek( handle , 0 , 0 );
|
||||
return nEnd - nStart;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char *filetoBuff(char *f,char *s)
|
||||
{
|
||||
@@ -369,11 +369,11 @@ HB_FUNC(DATATOSQL)
|
||||
int iSize;
|
||||
char *buffer;
|
||||
from=hb_parc(1);
|
||||
iSize= hb_parclen(1) ;
|
||||
iSize= hb_parclen(1) ;
|
||||
|
||||
buffer=(char*)hb_xgrab((iSize*2)+1);
|
||||
iSize = mysql_escape_string(buffer,from,iSize);
|
||||
hb_retclen((char*)buffer,iSize) ;
|
||||
iSize = mysql_escape_string(buffer,from,iSize);
|
||||
hb_retclen((char*)buffer,iSize) ;
|
||||
hb_xfree(buffer);
|
||||
}
|
||||
|
||||
@@ -393,8 +393,8 @@ HB_FUNC(FILETOSQLBINARY)
|
||||
hb_fsClose(fh);
|
||||
from=(char*)filetoBuff(FromBuffer,szFile);
|
||||
buffer=(char*)hb_xgrab(iLen+1);
|
||||
iSize = mysql_escape_string(buffer,from,iSize);
|
||||
hb_retclen((char*)buffer, iSize);
|
||||
iSize = mysql_escape_string(buffer,from,iSize);
|
||||
hb_retclen((char*)buffer, iSize);
|
||||
hb_xfree(buffer);
|
||||
hb_xfree(FromBuffer);
|
||||
}
|
||||
|
||||
@@ -98,13 +98,16 @@ HB_FUNC( MEMOREAD )
|
||||
hb_retclen_buffer( ( char * ) pbyBuffer, ulSize );
|
||||
}
|
||||
else
|
||||
hb_retc( NULL );
|
||||
{
|
||||
hb_fsClose( fhnd );
|
||||
hb_retc( "" );
|
||||
}
|
||||
}
|
||||
else
|
||||
hb_retc( NULL );
|
||||
hb_retc( "" );
|
||||
}
|
||||
else
|
||||
hb_retc( NULL );
|
||||
hb_retc( "" );
|
||||
}
|
||||
|
||||
HB_FUNC( MEMOWRIT )
|
||||
|
||||
Reference in New Issue
Block a user