1: /* enumerate.c
   2:  *
   3:  * Copyright (c) 1984, 1985 Xerox Corp.
   4:  *
   5:  *  Define the functions used in parse.c.
   6:  *
   7:  *
   8:  *
   9:  */
  10: 
  11: #include <stdio.h>
  12: 
  13: #define octal 0
  14: #define hex 1
  15: #define decimal 2
  16: #define character 3
  17: 
  18: extern long filepos;
  19: extern FILE *fp;
  20: int verbose = 0;
  21: 
  22: header(string, resheader)
  23:   char *string;
  24:   {
  25:   printf("(%u) header: %s\n", filepos, string);
  26:   }
  27: 
  28: op_makevec()
  29:   {
  30:   printf("(%u) makevec\n", filepos);
  31:   }
  32: 
  33: op_do()
  34:   {
  35:   printf("(%u) do\n", filepos);
  36:   }
  37: 
  38: op_pop()
  39:   {
  40:   printf("(%u) pop\n", filepos);
  41:   }
  42: 
  43: op_copy()
  44:   {
  45:   printf("(%u) copy\n", filepos);
  46:   }
  47: 
  48: op_dup()
  49:   {
  50:   printf("(%u) dup\n", filepos);
  51:   }
  52: 
  53: op_roll()
  54:   {
  55:   printf("(%u) roll\n", filepos);
  56:   }
  57: 
  58: op_exch()
  59:   {
  60:   printf("(%u) exch\n", filepos);
  61:   }
  62: 
  63: op_nop()
  64:   {
  65:   printf("(%u) nop\n", filepos);
  66:   }
  67: 
  68: op_translate()
  69:   {
  70:   printf("(%u) translate\n", filepos);
  71:   }
  72: 
  73: op_rotate()
  74:   {
  75:   printf("(%u) rotate\n", filepos);
  76:   }
  77: 
  78: op_scale()
  79:   {
  80:   printf("(%u) scale\n", filepos);
  81:   }
  82: 
  83: op_scale2()
  84:   {
  85:   printf("(%u) scale2\n", filepos);
  86:   }
  87: 
  88: op_concat()
  89:   {
  90:   printf("(%u) concat\n", filepos);
  91:   }
  92: 
  93: op_makepixelarray()
  94:   {
  95:   printf("(%u) makepixelarray\n", filepos);
  96:   }
  97: 
  98: op_extractpixelarray()
  99:   {
 100:   printf("(%u) extractpixelarray\n", filepos);
 101:   }
 102: 
 103: op_finddecompressor()
 104:   {
 105:   printf("(%u) finddecompressor\n", filepos);
 106:   }
 107: 
 108: op_makegray()
 109:   {
 110:   printf("(%u) makegray\n", filepos);
 111:   }
 112: 
 113: op_findcolor()
 114:   {
 115:   printf("(%u) findcolor\n", filepos);
 116:   }
 117: 
 118: op_findcoloroperator()
 119:   {
 120:   printf("(%u) findcoloroperator\n", filepos);
 121:   }
 122: 
 123: op_findcolormodeloperator()
 124:   {
 125:   printf("(%u) findcolormodeloperator\n", filepos);
 126:   }
 127: 
 128: op_beginblock()
 129:   {
 130:   printf("(%u) beginblock\n", filepos);
 131:   }
 132: 
 133: op_endblock()
 134:   {
 135:   printf("(%u) endblock\n", filepos);
 136:   }
 137: 
 138: op_unknown(op)
 139:   int op;
 140:   {
 141:   printf("(%u) unknown operator: %u\n", filepos, op);
 142:   }
 143: 
 144: seq_adaptivepixel(len)
 145:   int len;
 146:   {
 147:   printf("(%u) sequence adaptive pixel vector, %u bytes:\n", filepos, len);
 148:   printbytes(len, decimal, verbose);
 149:   }
 150: 
 151: seq_comment(len)
 152:   int len;
 153:   {
 154:   printf("(%u) sequence comment, %u bytes:\n", filepos, len);
 155:   printbytes(len, character, 1);
 156:   }
 157: 
 158: seq_compressedpixel(len)
 159:   int len;
 160:   {
 161:   printf("(%u) sequence compressed pixel vector, %u bytes:\n", filepos, len);
 162:   printbytes(len, decimal, verbose);
 163:   }
 164: 
 165: seq_continued(len, last)
 166:   int len, last;
 167:   {
 168:   printf("(%u) sequence continued, %u bytes:\n", filepos, len);
 169:   printbytes(len, decimal, verbose);
 170:   }
 171: 
 172: seq_identifier(len)
 173:   int len;
 174:   {
 175:   printf("(%u) sequence identifier, %u bytes:\n", filepos, len);
 176:   printbytes(len, character, 1);
 177:   }
 178: 
 179: seq_insertfile(len)
 180:   int len;
 181:   {
 182:   printf("(%u) sequence insert file, %u bytes:\n", filepos, len);
 183:   printbytes(len, character, 1);
 184:   }
 185: 
 186: seq_integer(len)
 187:   int len;
 188:   {
 189:   printf("(%u) sequence integer, %u bytes:\n", filepos, len);
 190:   printbytes(len, decimal, 1);
 191:   }
 192: 
 193: seq_largevector(len)
 194:   int len;
 195:   {
 196:   printf("(%u) sequence large vector, %u bytes:\n", filepos, len);
 197:   printbytes(len, decimal, verbose);
 198:   }
 199: 
 200: seq_packedpixel(len)
 201:   int len;
 202:   {
 203:   printf("(%u) sequence packed pixel vector, %u bytes:\n", filepos, len);
 204:   printbytes(len, decimal, verbose);
 205:   }
 206: 
 207: seq_rational(len)
 208:   int len;
 209:   {
 210:   printf("(%u) sequence rational, %u bytes:\n", filepos, len);
 211:   printbytes(len, decimal, 1);
 212:   }
 213: 
 214: seq_string(len)
 215:   int len;
 216:   {
 217:   printf("(%u) sequence string, %u bytes:\n", filepos, len);
 218:   printbytes(len, character, 1);
 219:   }
 220: 
 221: seq_unknown(type, len)
 222:   int type, len;
 223:   {
 224:   printf("(%u) unknown sequence, %u bytes:\n", filepos, len);
 225:   printbytes(len, decimal, verbose);
 226:   }
 227: 
 228: shortnum(number)
 229:   int number;
 230:   {
 231:   printf("(%u) %d\n", filepos, number);
 232:   }
 233: 
 234: printbytes(len, format, v)
 235:   int len;
 236:   {
 237:   int n, c;
 238:   if (v == 0) { fseek(fp, len, 1); return; }
 239:   for (n=0; n < len; n++)
 240:     {
 241:     c = getc(fp);
 242:     switch (format)
 243:       {
 244:       case octal:      printf("%o ", c);   break;
 245:       case hex:        printf("%x ", c);   break;
 246:       case decimal:    printf("%u ", c);   break;
 247:       case character:  printf("%c ", c);   break;
 248:       }
 249:     if ((n % 8) == 7) printf("\n");
 250:     }
 251:   printf("\n");
 252:   }
 253: 
 254: /* Change Log
 255:  *
 256:  * K. Knox, 28-Mar-85 15:01:49, Created first version.
 257:  *
 258:  *
 259:  *
 260:  */

Defined functions

header defined in line 22; used 1 times
op_concat defined in line 88; used 2 times
op_copy defined in line 43; used 2 times
op_do defined in line 33; used 2 times
op_dup defined in line 48; used 2 times
op_endblock defined in line 133; used 2 times
op_exch defined in line 58; used 2 times
op_makegray defined in line 108; used 2 times
op_makevec defined in line 28; used 2 times
op_nop defined in line 63; used 2 times
op_pop defined in line 38; used 2 times
op_roll defined in line 53; used 2 times
op_rotate defined in line 73; used 2 times
op_scale defined in line 78; used 2 times
op_scale2 defined in line 83; used 2 times
op_translate defined in line 68; used 2 times
op_unknown defined in line 138; used 2 times
printbytes defined in line 234; used 12 times
seq_comment defined in line 151; used 2 times
seq_integer defined in line 186; used 2 times
seq_string defined in line 214; used 2 times
seq_unknown defined in line 221; used 2 times
shortnum defined in line 228; used 1 times

Defined variables

verbose defined in line 20; used 10 times

Defined macros

character defined in line 16; used 4 times
decimal defined in line 15; used 8 times
hex defined in line 14; never used
octal defined in line 13; never used
Last modified: 1986-01-25
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2173
Valid CSS Valid XHTML 1.0 Strict