*** empty log message ***

This commit is contained in:
Paul Tucker
1999-09-02 01:42:47 +00:00
parent 86a68c0511
commit 1077f690ee
4 changed files with 27 additions and 20 deletions

View File

@@ -1,4 +1,9 @@
19990902--01:44 GMT+1 Victor Szel <info@szelvesz.hu>
19990901-21:24 EDT Paul Tucker <ptucker@sympatico.ca>
* source/rtl/filesys.c
hb_fsReadLarge() -> drop out on eof
hb_fsWriteLarge() -> drop out on disk full
19990902-01:44 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/filesys.c
include/filesys.h
- For speed reasons the hb_fsRead/Write() functions were set back to use

View File

@@ -293,7 +293,7 @@ static void hb_outerr( char * pStr, ULONG len )
/* Output an item to the screen and/or printer and/or alternate */
static void hb_altout( char * pStr, ULONG len )
{
char * pPtr = pStr;
char *pPtr = pStr;
if( hb_set.HB_SET_CONSOLE )
{
@@ -327,7 +327,7 @@ static void hb_altout( char * pStr, ULONG len )
write_len = count;
count = 0;
}
hb_fsWrite( hb_set_althan, pPtr, write_len );
hb_fsWrite( hb_set_althan, (BYTE *)pPtr, write_len );
pPtr += write_len;
}
}
@@ -349,7 +349,7 @@ static void hb_altout( char * pStr, ULONG len )
write_len = count;
count = 0;
}
hb_fsWrite( hb_set_extrahan, pPtr, write_len );
hb_fsWrite( hb_set_extrahan, (BYTE *)pPtr, write_len );
pPtr += write_len;
}
}
@@ -371,7 +371,7 @@ static void hb_altout( char * pStr, ULONG len )
write_len = count;
count = 0;
}
hb_fsWrite( hb_set_printhan, pPtr, write_len );
hb_fsWrite( hb_set_printhan, (BYTE *)pPtr, write_len );
pPtr += write_len;
}
if( len + s_uiPCol > USHRT_MAX ) s_uiPCol = USHRT_MAX;
@@ -400,7 +400,7 @@ static void hb_devout( char * pStr, ULONG len )
write_len = count;
count = 0;
}
hb_fsWrite( hb_set_printhan, pPtr, write_len );
hb_fsWrite( hb_set_printhan, (BYTE *)pPtr, write_len );
pPtr += write_len;
}
if( len + s_uiPCol > USHRT_MAX ) s_uiPCol = USHRT_MAX;
@@ -473,18 +473,18 @@ void hb_devpos( WORD row, WORD col )
{
if( row < s_uiPRow )
{
hb_fsWrite( hb_set_printhan, "\x0C", 1 );
hb_fsWrite( hb_set_printhan, (BYTE *)"\x0C", 1 );
s_uiPRow = s_uiPCol = 0;
}
for( count = s_uiPRow; count < row; count++ )
hb_fsWrite( hb_set_printhan, s_szCrLf, CRLF_BUFFER_LEN-1 );
hb_fsWrite( hb_set_printhan, (BYTE *)s_szCrLf, CRLF_BUFFER_LEN-1 );
if( row > s_uiPRow ) s_uiPCol = 0;
col += hb_set.HB_SET_MARGIN;
for( count = s_uiPCol; count < col; count++ )
hb_fsWrite( hb_set_printhan, " ", 1 );
hb_fsWrite( hb_set_printhan, (BYTE *)" ", 1 );
s_uiPRow = row;
s_uiPCol = col;
@@ -540,7 +540,7 @@ HARBOUR HB_QOUT( void )
s_uiPCol = hb_set.HB_SET_MARGIN;
count = s_uiPCol;
while( count-- > 0 )
hb_fsWrite( hb_set_printhan, " ", 1 );
hb_fsWrite( hb_set_printhan, (BYTE *)" ", 1 );
}
HB_QQOUT();
@@ -654,7 +654,7 @@ HARBOUR HB___EJECT( void ) /* Ejects the current page from the printer */
{
if( hb_stricmp( hb_set.HB_SET_DEVICE, "PRINTER" ) == 0 && hb_set_printhan >= 0 )
{
hb_fsWrite( hb_set_printhan, "\x0C\x0D", 2 );
hb_fsWrite( hb_set_printhan, (BYTE *)"\x0C\x0D", 2 );
s_uiPRow = s_uiPCol = 0;
}
}

View File

@@ -444,13 +444,14 @@ ULONG hb_fsReadLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
{
USHORT uiRead = read( hFileHandle, pBuff, ( USHORT ) ( ulCount - ulReadTotal ) );
if( uiRead == ( USHORT )-1 )
/* -1 for bad hFileHandle or file is WriteOnly
0 for EOF
*/
if( uiRead == ( USHORT )-1 || uiRead == 0 )
break;
ulReadTotal += ( ULONG ) uiRead;
if( uiRead < ( USHORT ) ( ulCount - ulReadTotal ) )
break;
}
s_uiErrorLast = errno;
@@ -474,13 +475,14 @@ ULONG hb_fsWriteLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
{
USHORT uiWritten = write( hFileHandle, pBuff, ( USHORT ) ( ulCount - ulWrittenTotal ) );
if( uiWritten == ( USHORT )-1 )
/* -1 on bad hFileHandle
0 on disk full
*/
if( uiWritten == ( USHORT )-1 || uiWritten == 0 )
break;
ulWrittenTotal += ( ULONG ) uiWritten;
if( uiWritten < ( USHORT ) ( ulCount - ulWrittenTotal ) )
break;
}
s_uiErrorLast = errno;

View File

@@ -234,7 +234,7 @@ static void close_text( FHANDLE handle )
if( handle != FS_ERROR )
{
#if ! defined(OS_UNIX_COMPATIBLE)
hb_fsWrite( handle, "\x1A", 1 );
hb_fsWrite( handle, (BYTE *)"\x1A", 1 );
#endif
hb_fsClose( handle );
}
@@ -263,8 +263,8 @@ static FHANDLE open_handle( char * file_name, BOOL bMode, char * def_ext, HB_set
/* QUESTION: What sharing mode does Clipper use ? [vszel] */
while( ( handle = ( bMode ? hb_fsOpen( path, FO_WRITE | FO_DENYWRITE ) :
hb_fsCreate( path, FC_NORMAL ) ) ) == FS_ERROR )
while( ( handle = ( bMode ? hb_fsOpen( (BYTE *)path, FO_WRITE | FO_DENYWRITE ) :
hb_fsCreate( (BYTE *)path, FC_NORMAL ) ) ) == FS_ERROR )
{
WORD wResult;