http://www.ousob.com --- Legacy Redefined #include <extend50.h> #define open _topen #define close _tclose #define lseek _tlseek #define read _tread #define write _twrite #define create _tcreat extern int _topen( char*, int); extern int _tclose( int ); extern long _tlseek( int, long, int); extern int _tread( int, char*, int); extern int _twrite( int, char*, int); extern int _tcreat( char*, int); CLIPPER b_eof() { char buff[1]; int isEof, bytesRead; int fileHandle = _parni(1); if( !ISNUM(1) ){ _retl(1); return; } bytesRead = read(fileHandle,buff,1); if( bytesRead > 0 ){ lseek(fileHandle,-1L,1); isEof = 0; } else{ isEof = 1; } _retl( isEof ); }