Added an optional 3rd parameter to MEMOWRIT()
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2003-07-17 17:34 UTC-0400 Alejandro de Garate <alex_degarate@hotmail.com>
|
||||
* source/rtl/memofile.c
|
||||
+ Added an optional 3rd parameter to MEMOWRIT(), <lWriteEof>, to decide
|
||||
at run-time if EOF char should be written.
|
||||
|
||||
2003-07-16 13:00 UTC-0300 Antonio Carlos Pantaglione <toninho@fwi.com.br>
|
||||
* contrib/rdd_ads/ads1.c
|
||||
! Changes in adsPutValue for speed(). Tested with
|
||||
|
||||
@@ -110,8 +110,12 @@ HB_FUNC( MEMOREAD )
|
||||
HB_FUNC( MEMOWRIT )
|
||||
{
|
||||
PHB_ITEM pFileName = hb_param( 1, HB_IT_STRING );
|
||||
PHB_ITEM pString = hb_param( 2, HB_IT_STRING );
|
||||
BOOL bRetVal = FALSE;
|
||||
PHB_ITEM pString = hb_param( 2, HB_IT_STRING );
|
||||
BOOL bWriteEof = TRUE; /* write Eof !, by default is .T. */
|
||||
BOOL bRetVal = FALSE;
|
||||
|
||||
if( hb_parinfo(0) == 3 && ISLOG( 3 ) )
|
||||
bWriteEof = hb_parl( 3 );
|
||||
|
||||
if( pFileName && pString )
|
||||
{
|
||||
@@ -127,9 +131,12 @@ HB_FUNC( MEMOWRIT )
|
||||
/* NOTE: CA-Clipper will not return .F. when the EOF could not be written. [vszakats] */
|
||||
#if ! defined(OS_UNIX_COMPATIBLE)
|
||||
{
|
||||
BYTE byEOF = HB_CHAR_EOF;
|
||||
if( bWriteEof ) /* if true, then write EOF */
|
||||
{
|
||||
BYTE byEOF = HB_CHAR_EOF;
|
||||
|
||||
hb_fsWrite( fhnd, &byEOF, sizeof( BYTE ) );
|
||||
hb_fsWrite( fhnd, &byEOF, sizeof( BYTE ) );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user