1: int chtab[]{
   2: 00000, /*   */
   3: 03004, /* ! */
   4: 02404, /* " */
   5: 02040, /* sharp */
   6: 02042, /* $ */
   7: 02104, /* % */
   8: 00001, /* & */
   9: 03002, /* ' */
  10: 02201, /* ( */
  11: 02202, /* ) */
  12: 02102, /* * */
  13: 00005, /* + */
  14: 02044, /* , */
  15: 00002, /* - */
  16: 02041, /* . */
  17: 00014, /* / */
  18: 00004, /* 0 */
  19: 00010, /* 1 */
  20: 00020, /* 2 */
  21: 00040, /* 3 */
  22: 00100, /* 4 */
  23: 00200, /* 5 */
  24: 00400, /* 6 */
  25: 01000, /* 7 */
  26: 02000, /* 8 */
  27: 04000, /* 9 */
  28: 02200, /* : */
  29: 02402, /* ; */
  30: 02401, /* < */
  31: 02204, /* = */
  32: 02400, /* > */
  33: 03000, /* ? */
  34: 02100, /* at */
  35:  011,
  36:  021,
  37:  041,
  38: 0101,
  39: 0201,
  40: 0401,
  41: 01001,
  42: 02001,
  43: 04001,
  44: 012,
  45: 022,
  46: 042,
  47: 0102,
  48: 0202,
  49: 0402,
  50: 01002,
  51: 02002,
  52: 02002,
  53: 024,
  54: 044,
  55: 0104,
  56: 0204,
  57: 0404,
  58: 01004,
  59: 02004,
  60: 04004,
  61: 02020, /* [ */
  62: 03001, /* \ */
  63: 02101, /* ] */
  64: 00006, /* ^ */
  65: 02024 /* _ */
  66: };
  67:     char s[128];
  68:     char *sp {&s[0]};
  69: main(argc, argv)
  70: char *argv[];
  71: {
  72:     char *spp;
  73:     int i;
  74:     int j;
  75:     int c;
  76:     int l;
  77: 
  78:     if (argc<2) {
  79:         puts("% ");
  80:         while ((c=getchar())!='\0'&c!='\n')
  81:             *sp++ = c;
  82:         *sp = 0;
  83:         sp = &s[0];
  84:     } else
  85:         sp = *++argv;
  86:     puts("\n\n\n\n");
  87:     puts(" ________________________________");
  88:     puts("________________\n");
  89:     spp = sp;
  90:     while(*spp++);
  91:     spp--;
  92:     l = spp - sp;
  93:     putchar('/');
  94:     puts(sp);
  95:     i = 49 - l;
  96:     while(--i>0) putchar(' ');
  97:     puts("|\n");
  98:     j = 0;
  99:     spp = sp;
 100:     while (j++<12) {
 101:         putchar('|');
 102:         i = 0;
 103:         spp = sp;
 104:         while (i<48) {
 105:             c = *spp++ - 040;
 106:             i++;
 107:             if (c>='a'-040) c = c - 040;
 108:             if (i>l) c = 0;
 109:             if (c<0 | c>137) c = 0;
 110:             if ((chtab[c]>>(j-1))&1)
 111:                 puts("[]");
 112:             else
 113:                 putchar(j>3?'0'+j-3:' ');
 114:         }
 115:         puts("|\n");
 116:     }
 117:     putchar('|');
 118:     puts("____________");
 119:     puts("____________________________________");
 120:     puts("|\n");
 121:     puts("\n\n\n\n");
 122: }
 123: 
 124: puts(ss) char *ss; {
 125:     int i;
 126:     char t;
 127:     i = 0;
 128:     while(t = *ss++) {
 129:         if(t >= 'a' && t <= 'z')
 130:             t =+ 'A'-'a';
 131:         putchar(t);
 132:     }
 133: }

Defined functions

main defined in line 69; never used
puts defined in line 124; used 12 times

Defined variables

chtab defined in line 1; used 1 times
s defined in line 67; used 2 times
sp defined in line 68; used 9 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 759
Valid CSS Valid XHTML 1.0 Strict