home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / compiler / small_c / cb / sources / out.c < prev    next >
Encoding:
Text File  |  1985-07-22  |  512 b   |  22 lines

  1.  
  2. /*
  3. ** out.c -- output to fd checking for errors
  4. */
  5. cout(c, fd) char c; int fd; {
  6.   if(fputc(c, fd)==EOF) xout();
  7.   }
  8.  
  9. sout(string, fd) char *string; int fd; {
  10.   if(fputs(string, fd)==EOF) xout();
  11.   }
  12.  
  13. lout(line, fd) char *line; int fd; {
  14.   sout(line, fd);
  15.   cout('\n', fd);
  16.   }
  17.  
  18. xout() {
  19.   fputs("output error\n", stderr);
  20.   abort(7);
  21.   }
  22.