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

Defined functions

allprint defined in line 2; used 1 times
  • in line 30
printable defined in line 33; used 1 times
  • in line 19
sprint defined in line 27; never used
Last modified: 1979-01-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 493
Valid CSS Valid XHTML 1.0 Strict