1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)putc_.c	5.1	6/7/85
   7:  */
   8: 
   9: /*
  10:  * write a character to the standard output
  11:  *
  12:  * calling sequence:
  13:  *	integer putc
  14:  *	ierror =  putc (char)
  15:  * where:
  16:  *	char will be sent to the standard output, usually the terminal
  17:  *	ierror will be 0 if successful; a system error code otherwise.
  18:  */
  19: 
  20: #include    "../libI77/f_errno.h"
  21: #include    "../libI77/fiodefs.h"
  22: 
  23: extern unit units[];    /* logical units table from iolib */
  24: 
  25: long putc_(c, clen)
  26: char *c; long clen;
  27: {
  28:     int i;
  29:     unit    *lu;
  30: 
  31:     lu = &units[STDOUT];
  32:     if (!lu->ufd)
  33:         return((long)(errno=F_ERNOPEN));
  34:     if (!lu->uwrt && ! nowwriting(lu))
  35:         return((long)errno);
  36:     putc (*c, lu->ufd);
  37:     if (ferror(lu->ufd))
  38:     {
  39:         i = errno;
  40:         clearerr(lu->ufd);
  41:         return((long)i);
  42:     }
  43:     return(0L);
  44: }

Defined functions

putc_ defined in line 25; never used
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 656
Valid CSS Valid XHTML 1.0 Strict