1: /*	@(#)allprint.c	4.1	12/25/82	*/
   2: 
   3: # include <stdio.h>
   4: allprint(c)
   5:   char c; {
   6:     extern FILE *yyout;
   7:     switch(c){
   8:         case '\n':
   9:             fprintf(yyout,"\\n");
  10:             break;
  11:         case '\t':
  12:             fprintf(yyout,"\\t");
  13:             break;
  14:         case '\b':
  15:             fprintf(yyout,"\\b");
  16:             break;
  17:         case ' ':
  18:             fprintf(yyout,"\\\bb");
  19:             break;
  20:         default:
  21:             if(!printable(c))
  22:                 fprintf(yyout,"\\%-3o",c);
  23:             else
  24:                 putc(c,yyout);
  25:             break;
  26:         }
  27:     return;
  28:     }
  29: sprint(s)
  30:   char *s; {
  31:     while(*s)
  32:         allprint(*s++);
  33:     return;
  34:     }
  35: printable(c)
  36:   int c;
  37:     {
  38:     return(040 < c && c < 0177);
  39:     }

Defined functions

allprint defined in line 4; used 1 times
  • in line 32
printable defined in line 35; used 1 times
  • in line 21
sprint defined in line 29; never used
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1160
Valid CSS Valid XHTML 1.0 Strict