See ChangeLog entry 2000-06-01 12:15 UTC-0400 David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
2000-06-01 12:15 UTC-0400 David G. Holm <dholm@jsd-llc.com>
|
||||
|
||||
* doc/en/file.txt
|
||||
+ Added documentation for HB_FEOF( nHandle )
|
||||
|
||||
* source/rtl/filesys.c
|
||||
+ Added implementation of hb_fsEof() for defined(__CYGWIN__).
|
||||
|
||||
* source/rtl/philes.c
|
||||
+ Added Harbour wrapper HB_FEOF( nHandle ) for hb_fsEof().
|
||||
|
||||
* source/rtl/gtos2/gtos2.c
|
||||
! Bug fix that should allow video mode changes to work
|
||||
in full screen mode as well as in windowed mode.
|
||||
|
||||
20000531-23:20 GMT -3 Luiz Rafael Culik <culik@sl.conex.net>
|
||||
*bin/bld.bat
|
||||
*changed HB_LIB_INSTALL to HB_INC_INSTALL on harbour /i command line
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
* Documentation for: FOPEN(), FCLOSE(), FWRITE(), FSEEK(), FREAD(), FILE(),
|
||||
* FREADSTR(), FRENAME(), FERROR(), RENAME, ERASE, CURDIR()
|
||||
*
|
||||
* Copyright 2000 David G. Holm <Harbour@SpaceMoose.com>
|
||||
* Documentation for: HB_FEOF()
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
@@ -900,3 +903,43 @@
|
||||
* ERASE,RENAME,FRENAME(),FERASE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_FEOF()
|
||||
* $CATEGORY$
|
||||
* Low level
|
||||
* $ONELINER$
|
||||
* Check for end-of-file.
|
||||
* $SYNTAX$
|
||||
* HB_FEOF( <nHandle> ) --> lIsEof
|
||||
* $ARGUMENTS$
|
||||
* <nHandle> The handle of an open file.
|
||||
* $RETURNS$
|
||||
* <lIsEof> .T. if the file handle is at end-of-file, otherwise .F.
|
||||
* $DESCRIPTION$
|
||||
* This function checks an open file handle to see if it is at E-O-F.
|
||||
|
||||
* If the file handle is missing, not numeric, or not open, then this
|
||||
* function returns .T. and sets the value returned by FERROR() to -1
|
||||
* (FS_ERROR) or a C-compiler dependent errno value (EBADF or EINVAL).
|
||||
* $EXAMPLES$
|
||||
|
||||
* nH:=FOPEN('FILE.TXT')
|
||||
* ? FREADSTR(nH,80)
|
||||
* IF HB_FEOF(nH)
|
||||
* ? 'End-of-file reached.'
|
||||
* ELSE
|
||||
* ? FREADSTR(nH,80)
|
||||
* ENDIF
|
||||
* </fixed>
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
* This function is a Harbour extension
|
||||
* $FILES$
|
||||
* Library is rtl
|
||||
* $SEEALSO$
|
||||
* FERROR()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
* hb_fsIsDevice()
|
||||
*
|
||||
* Copyright 2000 Luiz Rafael Culik <culik@sl.conex.net>
|
||||
* and David G. Holm <dholm@jsd-llc.com>
|
||||
* hb_fsEof()
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
@@ -1461,5 +1462,20 @@ BOOL hb_fsFile( BYTE * pFilename )
|
||||
|
||||
BOOL hb_fsEof( FHANDLE hFileHandle )
|
||||
{
|
||||
#if defined(__CYGWIN__)
|
||||
long curPos = lseek( hFileHandle, 0L, SEEK_CUR );
|
||||
long endPos = lseek( hFileHandle, 0L, SEEK_END );
|
||||
long newPos = lseek( hFileHandle, curPos, SEEK_SET );
|
||||
if( newPos == -1L )
|
||||
{
|
||||
hb_fsSetError( errno );
|
||||
}
|
||||
else if( newPos != curPos )
|
||||
{
|
||||
hb_fsSetError( FS_ERROR );
|
||||
}
|
||||
return curPos >= endPos;
|
||||
#else
|
||||
return eof( hFileHandle ) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -544,7 +544,6 @@ void hb_gt_SetCursorStyle( USHORT style )
|
||||
{
|
||||
/* Chen Kedem <niki@actcom.co.il> */
|
||||
char cellsize;
|
||||
VIOCURSORINFO vi;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_gt_SetCursorStyle(%hu)", style));
|
||||
|
||||
@@ -749,10 +748,11 @@ BOOL hb_gt_SetMode( USHORT uiRows, USHORT uiCols )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_gt_SetMode(%hu, %hu)", uiRows, uiCols));
|
||||
|
||||
vi.cb = sizeof( VIOMODEINFO );
|
||||
VioGetMode( &vi, 0 ); /* fill structure with current settings */
|
||||
vi.row = uiRows;
|
||||
vi.col = uiCols;
|
||||
return ( BOOL ) VioSetMode( &vi, 0 ); /* 0 = Ok, other = Fail */
|
||||
return ! ( BOOL ) VioSetMode( &vi, 0 ); /* 0 = Ok, other = Fail */
|
||||
}
|
||||
|
||||
BOOL hb_gt_GetBlink()
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
* Copyright 2000 David G. Holm <dholm@jsd-llc.com>
|
||||
* HB_FEOF()
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -209,3 +214,15 @@ HB_FUNC( CURDIR )
|
||||
hb_fsSetError( uiErrorOld );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_FEOF )
|
||||
{
|
||||
if( ISNUM( 1 ) )
|
||||
{
|
||||
hb_retl( hb_fsEof( hb_parni( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_fsSetError( FS_ERROR );
|
||||
hb_retl( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user