1: # include   <stdio.h>
   2: # include   <sccs.h>
   3: 
   4: SCCSID(@(#)xputchar.c	8.1	12/31/84)
   5: 
   6: /*
   7: **  PUT CHARACTER
   8: **
   9: **	This routine just calls putchar normally, unless the character
  10: **	to be printed is a control character, in which case the octal
  11: **	equivalent is printed out.  Note that tab, newline, and so
  12: **	forth are considered to be control characters.
  13: **
  14: **	Parameters:
  15: **		c -- the character to print.
  16: **
  17: **	Returns:
  18: **		nothing.
  19: **
  20: **	Side Effects:
  21: **		none
  22: **
  23: **	Trace Flags:
  24: **		none
  25: */
  26: 
  27: 
  28: 
  29: xputchar(c)
  30: register char   c;
  31: {
  32:     if (c < 040 || c >= 0177)
  33:     {
  34:         putc('\\', stdout);
  35:         putc(((c >> 6) & 03) | '0', stdout);
  36:         putc(((c >> 3) & 07) | '0', stdout);
  37:         putc((c & 07) | '0', stdout);
  38:     }
  39:     else
  40:         putc(c, stdout);
  41: }

Defined functions

xputchar defined in line 4; used 1 times
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 789
Valid CSS Valid XHTML 1.0 Strict