http://www.ousob.com --- Legacy Redefined #include <fcntl.h> #include <sys\types.h> #include <sys\stat.h> #include <io.h> #include <string.h> #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_writline() { int bytes = 0; int gotAproblem = 0; int bytesWritten = 0; char buffer[1024] ; int fileHandle = _parni(1); char *text = _parc(2) ; if( !ISNUM(1) || !ISCHAR(2) ){ gotAproblem = 1; buffer[0] = NULL; } if( !gotAproblem ){ sprintf(buffer,"%s\n%c",text,NULL); bytes = strlen(text); bytesWritten = write(fileHandle,buffer,bytes+1); } _retni(bytesWritten); }