home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************
- MODULE: rput.c
- PURPOSE: recio output functions
- COPYRIGHT: (C) 1994 William Pierpoint
- COMPILER: Borland C Version 3.1
- OS: MSDOS Version 6.2
- VERSION: 2.00
- RELEASE: April 15, 1994
- *****************************************************************************/
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- #include "recio.h"
-
- extern int _rstatus(REC *rp, int mode);
- extern int _rputc(REC *rp, int ch);
-
- #define rcol(rp) ((rp)->r_colno)
-
- /****************************************************************************/
- int /* return error (0=no error; !0=error) */
- rputrec( /* put end-of-record (newline) to stream */
- REC *rp) /* record pointer */
- /****************************************************************************/
- {
- int err=EOF; /* return error (0=no error; !0=error) */
-
- if (!_rstatus(rp, R_WRITE)) {
- err = _rputc(rp, '\n');
- rcol(rp)=0;
- rfldno(rp)=0;
- rrecno(rp)++;
- }
- return err;
- }
-