1: /*
   2: char id_putc[] = "@(#)putc_.c	1.3";
   3:  *
   4:  * write a character to the standard output
   5:  *
   6:  * calling sequence:
   7:  *	integer putc
   8:  *	ierror =  putc (char)
   9:  * where:
  10:  *	char will be sent to the standard output, usually the terminal
  11:  *	ierror will be 0 if successful; a system error code otherwise.
  12:  */
  13: 
  14: #include    "../libI77/fiodefs.h"
  15: 
  16: extern unit units[];    /* logical units table from iolib */
  17: 
  18: ftnint putc_(c, clen)
  19: char *c; ftnlen clen;
  20: {
  21:     int i;
  22:     unit    *lu;
  23: 
  24:     lu = &units[STDOUT];
  25:     if (!lu->ufd)
  26:         return((ftnint)(errno=F_ERNOPEN));
  27:     if (!lu->uwrt && ! nowwriting(lu))
  28:         return((ftnint)errno);
  29:     putc (*c, lu->ufd);
  30:     if (ferror(lu->ufd))
  31:     {
  32:         i = errno;
  33:         clearerr(lu->ufd);
  34:         return((ftnint)i);
  35:     }
  36:     return((ftnint) 0);
  37: }

Defined functions

putc_ defined in line 18; never used
Last modified: 1983-07-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 711
Valid CSS Valid XHTML 1.0 Strict