home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource3 / 126_01 / a_open.c < prev    next >
Encoding:
C/C++ Source or Header  |  1985-03-11  |  512 b   |  18 lines

  1. /* This is a function to open for appending. It is identical to r_open (BDSC
  2. fopen) except for the mode in the call to "open". E. Martz */
  3.  
  4. #include "bdscio.h"
  5.  
  6. int a_open(filename,iobuf)
  7. struct _buf *iobuf;
  8. char *filename;
  9. {
  10.     if ((iobuf -> _fd = open(filename,2))<0) return ERROR;
  11.     iobuf -> _nleft = 0;
  12.  
  13.     /* added for bdsc 1.5 to force write when fflush() is called */
  14.     iobuf -> _flags = _WRITE + _READ;
  15.  
  16.     return iobuf -> _fd;
  17. }
  18.                 return w;è    return ERROR;è}èèèint fflush(iobuf)èstruct _buf *