|
|
1.1 root 1: struct defs {
2: int cbits; /* No. of bits per char */
3: int ibits; /* int */
4: int sbits; /* short */
5: int lbits; /* long */
6: int ubits; /* unsigned */
7: int fbits; /* float */
8: int dbits; /* double */
9: float fprec; /* Smallest number that can be */
10: float dprec; /* significantly added to 1. */
11: int flgs; /* Print return codes, by section */
12: int flgm; /* Announce machine dependencies */
13: int flgd; /* give explicit diagnostics */
14: int flgl; /* Report local return codes. */
15: int rrc; /* recent return code */
16: int crc; /* Cumulative return code */
17: char rfs[8]; /* Return from section */
18: };
19: main(n,args) /* C REFERENCE MANUAL */
20: int n;
21: char **args;
22: {
23:
24: /* This program performs a series of tests on a C compiler,
25: based on information in the
26:
27: C REFERENCE MANUAL
28:
29: which appears as Appendix A to the book "The C Programming
30: Language" by Brian W. Kernighan and Dennis M. Ritchie
31: (Prentice-Hall, 1978, $10.95). This Appendix is hereafter
32: referred to as "the Manual".
33:
34: The rules followed in writing this program are:
35:
36: 1. The entire program is written in legal C, according
37: to the Manual. It should compile with no error messages,
38: although some warning messages may be produced by some
39: compilers. Failure to compile should be interpreted as
40: a compiler error.
41:
42: 2. The program is clean, in that it does not make use
43: of any features of the operating system on which it runs,
44: with the sole exceptions of the printf() function, and an
45: internal "options" routine, which is easily excised.
46:
47: 3. No global variables are used, except for the spec-
48: ific purpose of testing the global variable facility.
49:
50: The program is divided into modules having names of the
51: form snnn... These modules correspond to those sections of the
52: Manual, as identified by boldface type headings, in which
53: there is something to test. For example, s241() corresponds
54: to section 2.4.1 of the Manual (Integer constants) and tests
55: the facilities described therein. The module numbering
56: scheme is ambiguous, especially when it names modules
57: referring to more than one section; module s7813, for ex-
58: ample, deals with sections 7.8 through 7.13. Nonetheless,
59: it is surprisingly easy to find a section in the Manual
60: corresponding to a section of code, and vice versa.
61:
62: Note also that there seem to be "holes" in the program,
63: at least from the point of view that there exist sections in the
64: Manual for which there is no corresponding code. Such holes
65: arise from three causes: (a) there is nothing in that partic-
66: ular section to test, (b) everything in that section is tested
67: elsewhere, and (c) it was deemed advisable not to check cer-
68: tain features like preprocessor or listing control features.
69:
70: Modules are called by a main program main(). The mod-
71: ules that are called, and the sequence in which they are
72: called, are determined by two lists in main(), in which the
73: module names appear. The first list (an extern statement)
74: declares the module names to be external. The second (a stat-
75: ic int statement) names the modules and defines the sequence
76: in which they are called. There is no need for these lists
77: to be in the same order, but it is probably a good idea to keep
78: them that way in the interest of clarity. Since there are no
79: cross-linkages between modules, new modules may be added,
80: or old ones deleted, simply by editing the lists, with one
81: exception: section s26, which pokes around at the hardware
82: trying to figure out the characteristics of the machine that
83: it is running on, saves information that is subsequently
84: used by sections s626, s72, and s757. If this program is
85: to be broken up into smallish pieces, say for running on
86: a microcomputer, take care to see that s26 is called before
87: calling any of the latter three sections. The size
88: of the lists, i.e., the number of modules to be called, is
89: not explicitly specified as a program parameter, but is
90: determined dynamically using the sizeof operator.
91:
92: Communication between the main program and the modules
93: takes place in two ways. In all cases, a pointer to a structure
94: is passed to the called module. The structure contains flags
95: that will determine the type of information to be published
96: by the module, and fields that may be written in by the
97: module. The former include "flgm" and "flgd", which, if set
98: to a nonzero value, specify that machine dependencies are to
99: be announced or that error messages are to be printed, re-
100: spectively. The called module's name, and the hardware char-
101: acteristics probed in s26() comprise the latter.
102:
103:
104: Also, in all cases, a return code is returned by the called
105: module. A return code of zero indicates that all has gone well;
106: nonzero indicates otherwise. Since more than one type of error
107: may be detected by a module, the return code is a composite
108: of error indicators, which, individually, are given as numbers
109: that are powers of two. Thus, a return code of 10 indicates
110: that two specific errors, 8 and 2, were detected. Whether or
111: not the codes returned by the modules are printed by the main
112: program is determined by setting "flgs" to 1 (resp. 0).
113:
114: The entire logic of the main program is contained in the
115: half-dozen or so lines at the end. The somewhat cryptic
116: statement:
117:
118: d0.rrc = (*sec[j])(pd0);
119:
120: in the for loop calls the modules. The rest of the code is
121: reasonably straightforward.
122:
123: Finally, in each of the modules, there is the following
124: prologue:
125:
126: snnn(pd0)
127: struct defs *pd0;
128: {
129: static char snnner[] = "snnn,er%d\n";
130: static char qsnnn[8] = "snnn ";
131: char *ps, *pt;
132: int rc;
133:
134: rc = 0;
135: ps = qsnnn;
136: pt = pd0->rfs;
137: while(*pt++ = *ps++);
138:
139: used for housekeeping, handshaking and module initialization.
140:
141: */
142: extern
143: s22(),
144: s241(),
145: s243(),
146: s244(),
147: s25(),
148: s26(),
149: s4(),
150: s61(),
151: s626(),
152: s71(),
153: s72(),
154: s757(),
155: s7813(),
156: s714(),
157: s715(),
158: s81(),
159: s84(),
160: s85(),
161: s86(),
162: s88(),
163: s9()
164: ;
165:
166: int j;
167: static int (*sec[])() = {
168: s22,
169: s241,
170: s243,
171: s244,
172: s25,
173: s26,
174: s4,
175: s61,
176: s626,
177: s71,
178: s72,
179: s757,
180: s7813,
181: s714,
182: s715,
183: s81,
184: s84,
185: s85,
186: s86,
187: s88,
188: s9
189: };
190:
191: static struct defs d0, *pd0;
192:
193: d0.flgs = 1; /* These flags dictate */
194: d0.flgm = 1; /* the verbosity of */
195: d0.flgd = 1; /* the program. */
196: d0.flgl = 1;
197:
198: pd0 = &d0;
199:
200: for (j=0; j<sizeof(sec) / sizeof(sec[0]); j++) {
201: d0.rrc = (*sec[j])(pd0);
202: d0.crc = d0.crc+d0.rrc;
203: if(d0.flgs != 0) printf("Section %s returned %d.\n",d0.rfs,d0.rrc);
204: }
205:
206: if(d0.crc == 0) printf("\nNo errors detected.\n");
207: else printf("\nFailed.\n");
208: return 0;
209: }
210: s22(pd0) /* 2.2 Identifiers (Names) */
211: struct defs *pd0;
212: {
213: int a234, a;
214: int _, _234, A, rc;
215:
216: static char s22er[] = "s22,er%d\n";
217: static char qs22[8] = "s22 ";
218:
219: char *ps, *pt;
220: /* Initialize */
221:
222: rc = 0;
223: ps = qs22;
224: pt = pd0 -> rfs;
225: while (*pt++ = *ps++);
226:
227: /* An identifier is a sequence of letters and digits;
228: the first character must be a letter. The under-
229: score _ counts as a letter. */
230:
231: a=1;
232: _=2;
233: _234=3;
234: a234=4;
235: if(a+_+_234+a234 != 10) {
236: rc = rc+1;
237: if(pd0->flgd != 0) printf(s22er,1);
238: }
239:
240: /* Upper and lower case letters are different. */
241:
242: A = 2;
243: if (A == a) {
244: rc = rc+4;
245: if (pd0->flgd != 0) printf(s22er,4);
246: }
247:
248: return(rc);
249: }
250: s241(pd0) /* 2.4.1 Integer constants
251: 2.4.2 Explicit long constants */
252: struct defs *pd0;
253: {
254: long pow2();
255: static char s241er[] = "s241,er%d\n";
256: static char qs241[8] = "s241 ";
257: char *ps, *pt;
258: int rc, j, lrc;
259: static long g[39] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
260: 0,6,0,8,0,12,0,16,0,18,0,20,0,24,
261: 0,28,0,30,0,32,0,36};
262: long d[39], o[39], x[39];
263:
264: rc = 0;
265: lrc = 0;
266: ps = qs241;
267: pt = pd0 -> rfs;
268: while (*pt++ = *ps++);
269:
270: /* An integer constant consisting of a sequence of digits is
271: taken to be octal if it begins with 0 (digit zero), decimal
272: otherwise. */
273:
274: if ( 8 != 010
275: || 16 != 020
276: || 24 != 030
277: || 32 != 040
278: || 40 != 050
279: || 48 != 060
280: || 56 != 070
281: || 64 != 0100
282: || 72 != 0110
283: || 80 != 0120
284: || 9 != 0011
285: || 17 != 0021
286: || 25 != 0031
287: || 33 != 0041
288: || 41 != 0051
289: || 49 != 0061
290: || 57 != 0071
291: || 65 != 0101
292: || 73 != 0111
293: || 81 != 0121 ){
294:
295: rc = rc+1;
296: if( pd0->flgd != 0 ) printf(s241er,1);
297: }
298:
299: /* A sequence of digits preceded by 0x or 0X (digit zero)
300: is taken to be a hexadecimal integer. The hexadecimal
301: digits include a or A through f or F with values 10
302: through 15. */
303:
304: if ( 0x00abcdef != 0xabcdef
305: || 0xabcdef != 0Xabcdef || 0Xabcdef != 0XAbcdef
306: || 0XAbcdef != 0XABcdef || 0XABcdef != 0XABCdef
307: || 0XABCdef != 0XABCDef || 0XABCDef != 0XABCDEf
308: || 0XABCDEf != 0XABCDEF || 0xABCDEF != 11259375 ){
309:
310: rc = rc+2;
311: if( pd0->flgd != 0 ) printf(s241er,2);
312: }
313:
314: /* A decimal constant whose value exceeds the largest signed
315: machine integer is taken to be long; an octal or hex con-
316: stant which exceeds the largest unsigned machine integer
317: is likewise taken to be long. */
318:
319: if ( sizeof 010000000000 != sizeof(long) /* 2**30 */
320: || sizeof 1073741824 != sizeof(long) /* ditto */
321: || sizeof 0x40000000 != sizeof(long) ){ /* " */
322:
323: rc = rc+4;
324: if( pd0->flgd != 0 ) printf(s241er,4);
325: }
326:
327: /* A decimal, octal, or hexadecimal constant immediately followed
328: by l (letter ell) or L is a long constant. */
329:
330: if ( sizeof 67l != sizeof(long)
331: || sizeof 67L != sizeof(long)
332: || sizeof 067l != sizeof(long)
333: || sizeof 067L != sizeof(long)
334: || sizeof 0X67l != sizeof(long)
335: || sizeof 0x67L != sizeof(long) ){
336:
337: rc = rc+8;
338: if( pd0 -> flgd != 0 ) printf(s241er,8);
339: }
340:
341: /* Finally, we test to see that decimal (d), octal (o),
342: and hexadecimal (x) constants representing the same values
343: agree among themselves, and with computed values, at spec-
344: ified points over an appropriate range. The points select-
345: ed here are those with the greatest potential for caus-
346: ing trouble, i.e., zero, 1-16, and values of 2**n and
347: 2**n - 1 where n is some multiple of 4 or 6. Unfortunately,
348: just what happens when a value is too big to fit in a
349: long is undefined; however, it would be nice if what
350: happened were at least consistent... */
351:
352: for ( j=0; j<17; j++ ) g[j] = j;
353: for ( j=18; j<39; ) {
354: g[j] = pow2(g[j]);
355: g[j-1] = g[j] - 1;
356: j = j+2;
357: }
358:
359: d[0] = 0; o[0] = 00; x[0] = 0x0;
360: d[1] = 1; o[1] = 01; x[1] = 0x1;
361: d[2] = 2; o[2] = 02; x[2] = 0x2;
362: d[3] = 3; o[3] = 03; x[3] = 0x3;
363: d[4] = 4; o[4] = 04; x[4] = 0x4;
364: d[5] = 5; o[5] = 05; x[5] = 0x5;
365: d[6] = 6; o[6] = 06; x[6] = 0x6;
366: d[7] = 7; o[7] = 07; x[7] = 0x7;
367: d[8] = 8; o[8] = 010; x[8] = 0x8;
368: d[9] = 9; o[9] = 011; x[9] = 0x9;
369: d[10] = 10; o[10] = 012; x[10] = 0xa;
370: d[11] = 11; o[11] = 013; x[11] = 0xb;
371: d[12] = 12; o[12] = 014; x[12] = 0xc;
372: d[13] = 13; o[13] = 015; x[13] = 0xd;
373: d[14] = 14; o[14] = 016; x[14] = 0xe;
374: d[15] = 15; o[15] = 017; x[15] = 0xf;
375: d[16] = 16; o[16] = 020; x[16] = 0x10;
376: d[17] = 63; o[17] = 077; x[17] = 0x3f;
377: d[18] = 64; o[18] = 0100; x[18] = 0x40;
378: d[19] = 255; o[19] = 0377; x[19] = 0xff;
379: d[20] = 256; o[20] = 0400; x[20] = 0x100;
380: d[21] = 4095; o[21] = 07777; x[21] = 0xfff;
381: d[22] = 4096; o[22] = 010000; x[22] = 0x1000;
382: d[23] = 65535; o[23] = 0177777; x[23] = 0xffff;
383: d[24] = 65536; o[24] = 0200000; x[24] = 0x10000;
384: d[25] = 262143; o[25] = 0777777; x[25] = 0x3ffff;
385: d[26] = 262144; o[26] = 01000000; x[26] = 0x40000;
386: d[27] = 1048575; o[27] = 03777777; x[27] = 0xfffff;
387: d[28] = 1048576; o[28] = 04000000; x[28] = 0x100000;
388: d[29] = 16777215; o[29] = 077777777; x[29] = 0xffffff;
389: d[30] = 16777216; o[30] = 0100000000; x[30] = 0x1000000;
390: d[31] = 268435455; o[31] = 01777777777; x[31] = 0xfffffff;
391: d[32] = 268435456; o[32] = 02000000000; x[32] = 0x10000000;
392: d[33] = 1073741823; o[33] = 07777777777; x[33] = 0x3fffffff;
393: d[34] = 1073741824; o[34] = 010000000000; x[34] = 0x40000000;
394: d[35] = 4294967295; o[35] = 037777777777; x[35] = 0xffffffff;
395: d[36] = 4294967296; o[36] = 040000000000; x[36] = 0x100000000;
396: d[37] = 68719476735; o[37] = 0777777777777; x[37] = 0xfffffffff;
397: d[38] = 68719476736; o[38] = 01000000000000; x[38] = 0x1000000000;
398:
399: /* WHEW! */
400:
401: for (j=0; j<39; j++){
402: if ( g[j] != d[j]
403: || d[j] != o[j]
404: || o[j] != x[j]) {
405:
406: if( pd0 -> flgm != 0 ) {
407: /* printf(s241er,16); save in case opinions change... */
408: printf("Decimal and octal/hex constants sometimes give\n");
409: printf(" different results when assigned to longs.\n");
410: }
411: /* lrc = 1; save... */
412: }
413: }
414:
415: if (lrc != 0) rc =16;
416:
417: return rc;
418: }
419:
420: long pow2(n) /* Calculate 2**n by multiplying, not shifting */
421: long n;
422: {
423: long s;
424: s = 1;
425: while(n--) s = s*2;
426: return s;
427: }
428: s243(pd0) /* 2.4.3 Character constants */
429: struct defs *pd0;
430: {
431: static char s243er[] = "s243,er%d\n";
432: static char qs243[8] = "s243 ";
433: char *ps, *pt;
434: int rc;
435: char chars[256];
436:
437: rc = 0;
438: ps = qs243;
439: pt = pd0->rfs;
440: while(*pt++ = *ps++);
441:
442: /* One of the problems that arises when testing character constants
443: is that of definition: What, exactly, is the character set?
444: In order to guarantee a certain amount of machine independence,
445: the character set we will use here is the set of characters writ-
446: able as escape sequences in C, plus those characters used in writ-
447: ing C programs, i.e.,
448:
449: letters:
450: ABCDEFGHIJKLMNOPQRSTUVWXYZ 26
451: abcdefghijklmnopqrstuvwxyz 26
452: numbers:
453: 0123456789 10
454: special characters:
455: ~!"#%&()_=-^|{}[]+;*:<>,.?/ 27
456: extra special characters:
457: newline \n
458: horizontal tab \t
459: backspace \b
460: carriage return \r
461: form feed \f
462: backslash \\
463: single quote \' 7
464: blank & NUL 2
465: ---
466: 98
467:
468: Any specific implementation of C may of course support additional
469: characters. */
470:
471: /* Since the value of a character constant is the numerical value
472: of the character in the machine's character set, there should
473: be a one-to-one correspondence between characters and values. */
474:
475: zerofill(chars);
476:
477: chars['a'] = 1; chars['A'] = 1; chars['~'] = 1; chars['0'] = 1;
478: chars['b'] = 1; chars['B'] = 1; chars['!'] = 1; chars['1'] = 1;
479: chars['c'] = 1; chars['C'] = 1; chars['"'] = 1; chars['2'] = 1;
480: chars['d'] = 1; chars['D'] = 1; chars['#'] = 1; chars['3'] = 1;
481: chars['e'] = 1; chars['E'] = 1; chars['%'] = 1; chars['4'] = 1;
482: chars['f'] = 1; chars['F'] = 1; chars['&'] = 1; chars['5'] = 1;
483: chars['g'] = 1; chars['G'] = 1; chars['('] = 1; chars['6'] = 1;
484: chars['h'] = 1; chars['H'] = 1; chars[')'] = 1; chars['7'] = 1;
485: chars['i'] = 1; chars['I'] = 1; chars['_'] = 1; chars['8'] = 1;
486: chars['j'] = 1; chars['J'] = 1; chars['='] = 1; chars['9'] = 1;
487: chars['k'] = 1; chars['K'] = 1; chars['-'] = 1;
488: chars['l'] = 1; chars['L'] = 1; chars['^'] = 1;
489: chars['m'] = 1; chars['M'] = 1; chars['|'] = 1; chars['\n'] = 1;
490: chars['n'] = 1; chars['N'] = 1; chars['\t'] = 1;
491: chars['o'] = 1; chars['O'] = 1; chars['{'] = 1; chars['\b'] = 1;
492: chars['p'] = 1; chars['P'] = 1; chars['}'] = 1; chars['\r'] = 1;
493: chars['q'] = 1; chars['Q'] = 1; chars['['] = 1; chars['\f'] = 1;
494: chars['r'] = 1; chars['R'] = 1; chars[']'] = 1;
495: chars['s'] = 1; chars['S'] = 1; chars['+'] = 1; chars['\\'] = 1;
496: chars['t'] = 1; chars['T'] = 1; chars[';'] = 1; chars['\''] = 1;
497: chars['u'] = 1; chars['U'] = 1; chars['*'] = 1;
498: chars['v'] = 1; chars['V'] = 1; chars[':'] = 1; chars['\0'] = 1;
499: chars['w'] = 1; chars['W'] = 1; chars['<'] = 1; chars[' '] = 1;
500: chars['x'] = 1; chars['X'] = 1; chars['>'] = 1;
501: chars['y'] = 1; chars['Y'] = 1; chars[','] = 1;
502: chars['z'] = 1; chars['Z'] = 1; chars['.'] = 1;
503: chars['?'] = 1;
504: chars['/'] = 1;
505:
506: if(sumof(chars) != 98){
507: rc = rc+1;
508: if(pd0->flgd != 0) printf(s243er,1);
509: }
510:
511: /* Finally, the escape \ddd consists of the backslash followed
512: by 1, 2, or 3 octal digits which are taken to specify the
513: desired character. */
514:
515: if( '\0' != 0 || '\01' != 1 || '\02' != 2
516: || '\03' != 3 || '\04' != 4 || '\05' != 5
517: || '\06' != 6 || '\07' != 7 || '\10' != 8
518: || '\17' != 15 || '\20' != 16 || '\77' != 63
519: || '\100' != 64 || '\177' != 127 ){
520:
521: rc = rc+8;
522: if(pd0->flgd != 0) printf(s243er,8);
523: }
524:
525: return rc;
526: }
527: zerofill(x)
528: char *x;
529: {
530: int j;
531:
532: for (j=0; j<256; j++) *x++ = 0;
533: }
534: sumof(x)
535: char *x;
536: {
537: char *p;
538: int total, j;
539:
540: p = x;
541: total = 0;
542:
543: for(j=0; j<256; j++) total = total+ *p++;
544: return total;
545: }
546: s244(pd0)
547: struct defs *pd0;
548: {
549: double a[8];
550: int rc, lrc, j;
551: static char s244er[] = "s244,er%d\n";
552: static char qs244[8] = "s244 ";
553: char *ps, *pt;
554:
555: ps = qs244;
556: pt = pd0->rfs;
557: while(*pt++ = *ps++);
558: rc = 0;
559: lrc = 0;
560:
561: /* Unfortunately, there's not a lot we can do with floating constants.
562: We can check to see that the various representations can be com-
563: piled, that the conversion is such that they yield the same hard-
564: ware representations in all cases, and that all representations
565: thus checked are double precision. */
566:
567: a[0] = .1250E+04;
568: a[1] = 1.250E3;
569: a[2] = 12.50E02;
570: a[3] = 125.0e+1;
571: a[4] = 1250e00;
572: a[5] = 12500.e-01;
573: a[6] = 125000e-2;
574: a[7] = 1250.;
575:
576: lrc = 0;
577: for (j=0; j<7; j++) if(a[j] != a[j+1]) lrc = 1;
578:
579: if(lrc != 0) {
580: if(pd0->flgd != 0) printf(s244er,1);
581: rc = rc+1;
582: }
583:
584: if ( (sizeof .1250E+04 ) != sizeof(double)
585: || (sizeof 1.250E3 ) != sizeof(double)
586: || (sizeof 12.50E02 ) != sizeof(double)
587: || (sizeof 1.250e+1 ) != sizeof(double)
588: || (sizeof 1250e00 ) != sizeof(double)
589: || (sizeof 12500.e-01) != sizeof(double)
590: || (sizeof 125000e-2 ) != sizeof(double)
591: || (sizeof 1250. ) != sizeof(double)){
592:
593: if(pd0->flgd != 0) printf(s244er,2);
594: rc = rc+2;
595: }
596:
597: return rc;
598: }
599: s25(pd0)
600: struct defs *pd0;
601: {
602: char *s, *s2;
603: int rc, lrc, j;
604: static char s25er[] = "s25,er%d\n";
605: static char qs25[8] = "s25 ";
606: char *ps, *pt;
607:
608: ps = qs25;
609: pt = pd0->rfs;
610: while(*pt++ = *ps++);
611: rc = 0;
612:
613: /* A string is a sequence of characters surrounded by double
614: quotes, as in "...". */
615:
616: s = "...";
617:
618: /* A string has type "array of characters" and storage class
619: static and is initialized with the given characters. */
620:
621: if ( s[0] != s[1] || s[1] != s[2]
622: || s[2] != '.' ) {
623:
624: rc = rc+1;
625: if(pd0->flgd != 0) printf(s25er,1);
626: }
627:
628: /* The compiler places a null byte \0 at the end of each string
629: so the program which scans the string can find its end. */
630:
631: if( s[3] != '\0' ){
632: rc = rc+4;
633: if(pd0->flgd != 0) printf(s25er,4);
634: }
635:
636: /* In a string, the double quote character " must be preceded
637: by a \. */
638:
639: if( ".\"."[1] != '"' ){
640: rc = rc+8;
641: if(pd0->flgd != 0) printf(s25er,8);
642: }
643:
644: /* In addition, the same escapes described for character constants
645: may be used. */
646:
647: s = "\n\t\b\r\f\\\'";
648:
649: if( s[0] != '\n'
650: || s[1] != '\t'
651: || s[2] != '\b'
652: || s[3] != '\r'
653: || s[4] != '\f'
654: || s[5] != '\\'
655: || s[6] != '\'' ){
656:
657: rc = rc+16;
658: if( pd0->flgd != 0) printf(s25er,16);
659: }
660:
661: /* Finally, a \ and an immediately following newline are ignored */
662:
663: s2 = "queep!";
664: s = "queep!";
665:
666: lrc = 0;
667: for (j=0; j<sizeof "queep!"; j++) if(s[j] != s2[j]) lrc = 1;
668: if (lrc != 0){
669: rc = rc+32;
670: if(pd0->flgd != 0) printf(s25er,32);
671: }
672: return rc;
673: }
674: s26(pd0) /* 2.6 Hardware Characteristics */
675: struct defs *pd0;
676: {
677: static char qs26[8] = "s26 ";
678: char *ps, *pt;
679: char c0, c1;
680: float temp, one, delta;
681: double tempd, oned;
682: static char s[] = "%3d bits in %ss.\n";
683: static char s2[] = "%e is the least number that can be added to 1. (%s).\n";
684:
685: ps = qs26;
686: pt = pd0->rfs;
687:
688: while(*pt++ = *ps++);
689:
690: /* Here, we shake the machinery a little to see what falls
691: out. First, we find out how many bits are in a char. */
692:
693: pd0->cbits = 0;
694: c0 = 0;
695: c1 = 1;
696:
697: while(c0 != c1) {
698: c1 = c1<<1;
699: pd0->cbits = pd0->cbits+1;
700: }
701: /* That information lets us determine the size of everything else. */
702:
703: pd0->ibits = pd0->cbits * sizeof(int);
704: pd0->sbits = pd0->cbits * sizeof(short);
705: pd0->lbits = pd0->cbits * sizeof(long);
706: pd0->ubits = pd0->cbits * sizeof(unsigned);
707: pd0->fbits = pd0->cbits * sizeof(float);
708: pd0->dbits = pd0->cbits * sizeof(double);
709:
710: /* We have now almost reconstructed the table in section 2.6, the
711: exception being the range of the floating point hardware.
712: Now there are just so many ways to conjure up a floating point
713: representation system that it's damned near impossible to guess
714: what's going on by writing a program to interpret bit patterns.
715: Further, the information isn't all that useful, if we consider
716: the fact that machines that won't handle numbers between 10**30
717: and 10**-30 are very hard to find, and that people playing with
718: numbers outside that range have a lot more to worry about than
719: just the capacity of the characteristic.
720:
721: A much more useful measure is the precision, which can be ex-
722: pressed in terms of the smallest number that can be added to
723: 1. without loss of significance. We calculate that here, for
724: float and double. */
725:
726: one = 1.;
727: delta = 1.;
728: temp = 0.;
729: while(temp != one) {
730: temp = one+delta;
731: delta = delta/2.;
732: }
733: pd0->fprec = delta * 4.;
734: oned = 1.;
735: delta = 1.;
736: tempd = 0.;
737: while(tempd != oned) {
738: tempd = oned+delta;
739: delta = delta/2.;
740: }
741: pd0->dprec = delta * 4.;
742:
743: /* Now, if anyone's interested, we publish the results. */
744:
745: if(pd0->flgm != 0) {
746: printf(s,pd0->cbits,"char");
747: printf(s,pd0->ibits,"int");
748: printf(s,pd0->sbits,"short");
749: printf(s,pd0->lbits,"long");
750: printf(s,pd0->ubits,"unsigned");
751: printf(s,pd0->fbits,"float");
752: printf(s,pd0->dbits,"double");
753: printf(s2,pd0->fprec,"float");
754: printf(s2,pd0->dprec,"double");
755: }
756: /* Since we are only exploring and perhaps reporting, but not
757: testing any features, we cannot return an error code. */
758:
759: return 0;
760: }
761: int extvar;
762: s4(pd0) /* 4. What's in a name? */
763: struct defs *pd0;
764: {
765: static char s4er[] = "s4,er%d\n";
766: static char qs4[8] = "s4 ";
767: char *ps, *pt;
768: int j, rc;
769:
770: short sint; /* short integer, for size test */
771: int pint; /* plain */
772: long lint; /* long */
773: unsigned target;
774: unsigned int mask;
775:
776: rc = 0;
777: ps = qs4;
778: pt = pd0->rfs;
779:
780: while(*pt++ = *ps++);
781:
782: /* There are four declarable storage classes: automatic,
783: static, external, and register. Automatic variables have
784: been dealt with extensively thus far, and will not be specif-
785: ically treated in this section. Register variables are treated
786: in section s81.
787:
788: Static variables are local to a block, but retain their
789: values upon reentry to a block, even after control has left
790: the block. */
791:
792: for (j=0; j<3; j++)
793: if(svtest(j) != zero()){
794: rc = 1;
795: if(pd0->flgd != 0) printf(s4er,1);
796: }
797: ;
798:
799: /* External variables exist and retain their values throughout
800: the execution of the entire program, and may be used for comm-
801: unication between functions, even separately compiled functions.
802: */
803:
804: setev();
805: if(testev() != 0){
806: rc=rc+2;
807: if(pd0->flgd != 0) printf(s4er,2);
808: }
809: /*
810: Characters have been tested elsewhere (in s243).
811:
812: Up to three sizes of integer, declared short int, int, and
813: long int, are available. Longer integers provide no less storage
814: than shorter ones, but implementation may make either short
815: integers, or long integers, or both, equivalent to plain
816: integers.
817: */
818:
819: if(sizeof lint < sizeof pint || sizeof pint < sizeof sint){
820:
821: rc = rc+4;
822: if(pd0->flgd != 0) printf(s4er,4);
823: }
824:
825: /* Unsigned integers, declared unsigned, obey the laws of
826: arithmetic modulo 2**n, where n is the number of bits in the
827: implementation */
828:
829: target = 0;
830: target = target-1;
831: mask = 1;
832:
833: for(j=0; j<(sizeof target)*pd0->cbits; j++){
834:
835: mask = mask⌖
836: target = target>>1;
837: }
838:
839: if(mask != 1 || target != 0){
840:
841: rc = rc+8;
842: if(pd0->flgd != 0) printf(s4er,8);
843: }
844:
845: return rc;
846: }
847: svtest(n)
848: int n;
849: {
850: static k;
851: int rc;
852: switch (n) {
853:
854: case 0: k = 1978;
855: rc = 0;
856: break;
857:
858: case 1: if(k != 1978) rc = 1;
859: else{
860: k = 1929;
861: rc = 0;
862: }
863: break;
864:
865: case 2: if(k != 1929) rc = 1;
866: else rc = 0;
867: break;
868: }
869: return rc;
870: }
871: zero(){ /* Returns a value of zero, possibly */
872: static k; /* with side effects, as it's called */
873: int rc; /* alternately with svtest, above, */
874: k = 2; /* and has the same internal storage */
875: rc = 0; /* requirements. */
876: return rc;
877: }
878: testev(){
879: if(extvar != 1066) return 1;
880: else return 0;
881: }
882: s61(pd0) /* Characters and integers */
883: struct defs *pd0;
884: {
885: static char s61er[] = "s61,er%d\n";
886: static char qs61[8] = "s61 ";
887: short from, shortint;
888: long int to, longint;
889: int rc, lrc;
890: int j;
891: char fromc, charint;
892: char *wd, *pc[6];
893:
894: static char upper_alpha[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
895: static char lower_alpha[] = "abcdefghijklmnopqrstuvwxyz";
896: static char numbers[] = "0123456789";
897: static char special_characters[] = "~!\"#%&()_=-^|{}[]+;*:<>,.?/";
898: static char extra_special_characters[] = "\n\t\b\r\f\\\'";
899: static char blank_and_NUL[] = " \0";
900:
901: char *ps, *pt;
902: ps = qs61;
903: pt = pd0->rfs;
904: rc = 0;
905: while (*pt++ = *ps++);
906:
907: /* A character or a short integer may be used wherever
908: an integer may be used. In all cases, the value is converted
909: to integer. This principle is extensively used throughout this
910: program, and will not be explicitly tested here. */
911:
912: /* Conversion of a shorter integer to a longer always
913: involves sign extension. */
914:
915: from = -19;
916: to = from;
917:
918: if(to != -19){
919: rc = rc+1;
920: if(pd0->flgd != 0) printf(s61er,1);
921: }
922:
923: /* It is guaranteed that a member of the standard char-
924: acter set is nonnegative. */
925:
926: pc[0] = upper_alpha;
927: pc[1] = lower_alpha;
928: pc[2] = numbers;
929: pc[3] = special_characters;
930: pc[4] = extra_special_characters;
931: pc[5] = blank_and_NUL;
932:
933: lrc = 0;
934: for (j=0; j<6; j++)
935: while(*pc[j]) if(*pc[j]++ < 0) lrc =1;
936:
937: if(lrc != 0){
938: rc=rc+2;
939: if(pd0->flgd != 0) printf(s61er,2);
940: }
941:
942: /* When a longer integer is converted to a shorter or
943: to a char, it is truncated on the left; excess bits are
944: simply discarded. */
945:
946: longint = 1048579; /* =2**20+3 */
947: shortint = longint;
948: charint = longint;
949:
950: if((shortint != longint && shortint != 3) ||
951: (charint != longint && charint != 3)) {
952: rc = rc+8;
953: if(pd0->flgd != 0) printf(s61er,8);
954: }
955:
956: return rc;
957: }
958: s626(pd0) /* 6.2 Float and double */
959: /* 6.3 Floating and integral */
960: /* 6.4 Pointers and integers */
961: /* 6.5 Unsigned */
962: /* 6.6 Arithmetic conversions */
963: struct defs *pd0;
964: {
965: static char s626er[] = "s626,er%d\n";
966: static char qs626[8] = "s626 ";
967: int rc;
968: char *ps, *pt;
969: float eps, f1, f2, f3, f4, f;
970: long lint1, lint2, l, ls;
971: char c, t[28], t0;
972: short s;
973: int is, i, j;
974: unsigned u, us;
975: double d, ds;
976: ps = qs626;
977: pt = pd0->rfs;
978: rc = 0;
979: while (*pt++ = *ps++);
980:
981: /* Conversions of integral values to floating type are
982: well-behaved. */
983:
984: f1 = 1.;
985: lint1 = 1.;
986: lint2 = 1.;
987:
988: for(j=0;j<pd0->lbits-2;j++){
989: f1 = f1*2;
990: lint2 = (lint2<<1)|lint1;
991: }
992: f2 = lint2;
993: f1 = (f1-f2)/f1;
994: if(f1>2.*pd0->fprec){
995:
996: rc = rc+2;
997: if(pd0->flgd != 0) printf(s626er,2);
998: }
999:
1000: /* Pointer-integer combinations are discussed in s74,
1001: "Additive operators". The unsigned-int combination
1002: appears below. */
1003:
1004: c = 125;
1005: s = 125;
1006: i = 125; is = 15625;
1007: u = 125; us = 15625;
1008: l = 125; ls = 15625;
1009: f = 125.;
1010: d = 125.; ds = 15625.;
1011:
1012: for(j=0;j<28;j++) t[j] = 0;
1013:
1014: if(c*c != is) t[ 0] = 1;
1015: if(s*c != is) t[ 1] = 1;
1016: if(s*s != is) t[ 2] = 1;
1017: if(i*c != is) t[ 3] = 1;
1018: if(i*s != is) t[ 4] = 1;
1019: if(i*i != is) t[ 5] = 1;
1020: if(u*c != us) t[ 6] = 1;
1021: if(u*s != us) t[ 7] = 1;
1022: if(u*i != us) t[ 8] = 1;
1023: if(u*u != us) t[ 9] = 1;
1024: if(l*c != ls) t[10] = 1;
1025: if(l*s != ls) t[11] = 1;
1026: if(l*i != ls) t[12] = 1;
1027: if(l*u != us) t[13] = 1;
1028: if(l*l != ls) t[14] = 1;
1029: if(f*c != ds) t[15] = 1;
1030: if(f*s != ds) t[16] = 1;
1031: if(f*i != ds) t[17] = 1;
1032: if(f*u != ds) t[18] = 1;
1033: if(f*l != ds) t[19] = 1;
1034: if(f*f != ds) t[20] = 1;
1035: if(d*c != ds) t[21] = 1;
1036: if(d*s != ds) t[22] = 1;
1037: if(d*i != ds) t[23] = 1;
1038: if(d*u != ds) t[24] = 1;
1039: if(d*l != ds) t[25] = 1;
1040: if(d*f != ds) t[26] = 1;
1041: if(d*d != ds) t[27] = 1;
1042:
1043: t0 = 0;
1044: for(j=0; j<28; j++) t0 = t0+t[j];
1045:
1046: if(t0 != 0){
1047:
1048: rc = rc+4;
1049: if(pd0->flgd != 0){
1050:
1051: printf(s626er,4);
1052: printf(" key=");
1053: for(j=0;j<28;j++) printf("%d",t[j]);
1054: printf("\n");
1055: }
1056: }
1057:
1058: /* When an unsigned integer is converted to long,
1059: the value of the result is the same numerically
1060: as that of the unsigned integer. */
1061:
1062: l = (unsigned)0100000;
1063: if((long)l > (unsigned)0100000){
1064:
1065: rc = rc+8;
1066: if(pd0->flgd != 0) printf(s626er,8);
1067: }
1068:
1069: return rc;
1070: }
1071: s71(pd0) /* 7.1 Primary expressions */
1072: struct defs *pd0;
1073: {
1074: static char s71er[] = "s71,er%d\n";
1075: static char qs71[8] = "s71 ";
1076: int rc;
1077: char *ps, *pt;
1078: static char q = 'q';
1079: int x[10], McCarthy(), clobber(), a, b, *p;
1080: ps = qs71;
1081: pt = pd0->rfs;
1082: rc = 0;
1083: while (*pt++ = *ps++);
1084:
1085: /* Testing of expressions and operators is quite complicated,
1086: because (a) problems are apt to surface in queer combinations
1087: of operators and operands, rather than in isolation,
1088: and (b) the number of expressions needed to provoke a case
1089: of improper behaviour may be quite large. Hence, we take the
1090: following approach: for this section, and for subsequent
1091: sections through 7.15, we will check the primitive operations
1092: in isolation, thus verifying that the primitives work,
1093: after a fashion. The job of testing combinations, we will
1094: leave to a separate, machine-generated program, to be included
1095: in the C test package at some later date.
1096: */
1097:
1098: /* A string is a primary expression. The identifier points to
1099: the first character of a string.
1100: */
1101:
1102: if(*"queep" != q){
1103: rc = rc+1;
1104: if(pd0->flgd != 0) printf(s71er,1);
1105: }
1106: /* A parenthesized expression is a primary expression whose
1107: type and value are the same as those of the unadorned
1108: expression.
1109: */
1110: if((2+3) != 2+3) {
1111: rc = rc+2;
1112: if(pd0->flgd != 0) printf(s71er,2);
1113: }
1114:
1115: /* A primary expression followed by an expression in square
1116: brackets is a primary expression. The intuitive meaning is
1117: that of a subscript. The expression E1[E2] is identical
1118: (by definition) to *((E1)+(E2)).
1119: */
1120:
1121: x[5] = 1942;
1122: if(x[5] != 1942 || x[5] != *((x)+(5))){
1123: rc = rc+4;
1124: if(pd0->flgd != 0) printf(s71er,4);
1125: }
1126:
1127: /* If the various flavors of function calls didn't work, we
1128: would never have gotten this far; however, we do need to
1129: show that functions can be recursive...
1130: */
1131:
1132: if ( McCarthy(-5) != 91){
1133: rc = rc+8;
1134: if(pd0->flgd != 0) printf(s71er,8);
1135: }
1136:
1137: /* and that argument passing is strictly by value. */
1138:
1139: a = 2;
1140: b = 3;
1141: p = &b;
1142:
1143: clobber(a,p);
1144:
1145: if(a != 2 || b != 2){
1146: rc = rc+16;
1147: if(pd0->flgd != 0) printf(s71er,16);
1148: }
1149:
1150: /* Finally, structures and unions are addressed thusly: */
1151:
1152: if(pd0->dprec != (*pd0).dprec){
1153: rc = rc+32;
1154: if(pd0->flgd != 0) printf(s71er,32);
1155: }
1156:
1157: return rc;
1158: }
1159: McCarthy(x)
1160: int x;
1161: {
1162: if(x>100) return x-10;
1163: else return McCarthy( McCarthy(x+11));
1164: }
1165: clobber(x,y)
1166: int x, *y;
1167: {
1168: x = 3;
1169: *y = 2;
1170: }
1171: s714(pd0) /* 7.14 Assignment operators */
1172: struct defs *pd0;
1173: {
1174: static char f[] = "Local error %d.\n";
1175: static char s714er[] = "s714,er%d\n";
1176: static char qs714[8] = "s714 ";
1177: register int prlc, lrc;
1178: int rc;
1179: char cl, cr;
1180: short sl, sr;
1181: int il, ir;
1182: long ll, lr;
1183: unsigned ul, ur;
1184: float fl, fr;
1185: double dl, dr;
1186: char *ps, *pt;
1187: ps = qs714;
1188: pt = pd0->rfs;
1189: rc = 0;
1190: lrc = 0;
1191: prlc = pd0->flgl;
1192: while (*pt++ = *ps++);
1193:
1194: /* This section tests the assignment operators.
1195:
1196: It is an exhaustive test of all assignment statements
1197: of the form:
1198:
1199: vl op vr
1200:
1201: where vl and vr are variables from the set
1202: {char,short,int,long,unsigned,float,double} and op is
1203: one of the assignment operators. There are 395 such
1204: statements.
1205:
1206: The initial values for the variables have been chosen
1207: so that both the initial values and the results will
1208: "fit" in just about any implementation, and that the re-
1209: sults will be such that they test for the proper form-
1210: ation of composite operators, rather than checking for
1211: the valid operation of those operators' components.
1212: For example, in checking >>=, we want to verify that
1213: a right shift and a move take place, rather than
1214: whether or not there may be some peculiarities about
1215: the right shift. Such tests have been made previously,
1216: and to repeat them here would be to throw out a red
1217: herring.
1218:
1219: The table below lists the operators, assignment targets,
1220: initial values for left and right operands, and the
1221: expected values of the results.
1222:
1223:
1224: = += -= *= /= %= >>= <<= &= ^= |=
1225: char 2 7 3 10 2 1 1 20 8 6 14
1226: short 2 7 3 10 2 1 1 20 8 6 14
1227: int 2 7 3 10 2 1 1 20 8 6 14
1228: long 2 7 3 10 2 1 1 20 8 6 14
1229: unsigned 2 7 3 10 2 1 1 20 8 6 14
1230: float 2 7 3 10 2.5 | |
1231: double 2 7 3 10 2.5 | |
1232: | |
1233: initial (5,2) | (5,2) | (12,10)
1234:
1235: The following machine-generated program reflects the
1236: tests described in the table.
1237: */
1238:
1239: cl = 5; cr = 2;
1240: cl = cr;
1241: if(cl != 2){
1242: lrc = 1;
1243: if(prlc) printf(f,lrc);
1244: }
1245: cl = 5; sr = 2;
1246: cl = sr;
1247: if(cl != 2){
1248: lrc = 2;
1249: if(prlc) printf(f,lrc);
1250: }
1251: cl = 5; ir = 2;
1252: cl = ir;
1253: if(cl != 2){
1254: lrc = 3;
1255: if(prlc) printf(f,lrc);
1256: }
1257: cl = 5; lr = 2;
1258: cl = lr;
1259: if(cl != 2){
1260: lrc = 4;
1261: if(prlc) printf(f,lrc);
1262: }
1263: cl = 5; ur = 2;
1264: cl = ur;
1265: if(cl != 2){
1266: lrc = 5;
1267: if(prlc) printf(f,lrc);
1268: }
1269: cl = 5; fr = 2;
1270: cl = fr;
1271: if(cl != 2){
1272: lrc = 6;
1273: if(prlc) printf(f,lrc);
1274: }
1275: cl = 5; dr = 2;
1276: cl = dr;
1277: if(cl != 2){
1278: lrc = 7;
1279: if(prlc) printf(f,lrc);
1280: }
1281: sl = 5; cr = 2;
1282: sl = cr;
1283: if(sl != 2){
1284: lrc = 8;
1285: if(prlc) printf(f,lrc);
1286: }
1287: sl = 5; sr = 2;
1288: sl = sr;
1289: if(sl != 2){
1290: lrc = 9;
1291: if(prlc) printf(f,lrc);
1292: }
1293: sl = 5; ir = 2;
1294: sl = ir;
1295: if(sl != 2){
1296: lrc = 10;
1297: if(prlc) printf(f,lrc);
1298: }
1299: sl = 5; lr = 2;
1300: sl = lr;
1301: if(sl != 2){
1302: lrc = 11;
1303: if(prlc) printf(f,lrc);
1304: }
1305: sl = 5; ur = 2;
1306: sl = ur;
1307: if(sl != 2){
1308: lrc = 12;
1309: if(prlc) printf(f,lrc);
1310: }
1311: sl = 5; fr = 2;
1312: sl = fr;
1313: if(sl != 2){
1314: lrc = 13;
1315: if(prlc) printf(f,lrc);
1316: }
1317: sl = 5; dr = 2;
1318: sl = dr;
1319: if(sl != 2){
1320: lrc = 14;
1321: if(prlc) printf(f,lrc);
1322: }
1323: il = 5; cr = 2;
1324: il = cr;
1325: if(il != 2){
1326: lrc = 15;
1327: if(prlc) printf(f,lrc);
1328: }
1329: il = 5; sr = 2;
1330: il = sr;
1331: if(il != 2){
1332: lrc = 16;
1333: if(prlc) printf(f,lrc);
1334: }
1335: il = 5; ir = 2;
1336: il = ir;
1337: if(il != 2){
1338: lrc = 17;
1339: if(prlc) printf(f,lrc);
1340: }
1341: il = 5; lr = 2;
1342: il = lr;
1343: if(il != 2){
1344: lrc = 18;
1345: if(prlc) printf(f,lrc);
1346: }
1347: il = 5; ur = 2;
1348: il = ur;
1349: if(il != 2){
1350: lrc = 19;
1351: if(prlc) printf(f,lrc);
1352: }
1353: il = 5; fr = 2;
1354: il = fr;
1355: if(il != 2){
1356: lrc = 20;
1357: if(prlc) printf(f,lrc);
1358: }
1359: il = 5; dr = 2;
1360: il = dr;
1361: if(il != 2){
1362: lrc = 21;
1363: if(prlc) printf(f,lrc);
1364: }
1365: ll = 5; cr = 2;
1366: ll = cr;
1367: if(ll != 2){
1368: lrc = 22;
1369: if(prlc) printf(f,lrc);
1370: }
1371: ll = 5; sr = 2;
1372: ll = sr;
1373: if(ll != 2){
1374: lrc = 23;
1375: if(prlc) printf(f,lrc);
1376: }
1377: ll = 5; ir = 2;
1378: ll = ir;
1379: if(ll != 2){
1380: lrc = 24;
1381: if(prlc) printf(f,lrc);
1382: }
1383: ll = 5; lr = 2;
1384: ll = lr;
1385: if(ll != 2){
1386: lrc = 25;
1387: if(prlc) printf(f,lrc);
1388: }
1389: ll = 5; ur = 2;
1390: ll = ur;
1391: if(ll != 2){
1392: lrc = 26;
1393: if(prlc) printf(f,lrc);
1394: }
1395: ll = 5; fr = 2;
1396: ll = fr;
1397: if(ll != 2){
1398: lrc = 27;
1399: if(prlc) printf(f,lrc);
1400: }
1401: ll = 5; dr = 2;
1402: ll = dr;
1403: if(ll != 2){
1404: lrc = 28;
1405: if(prlc) printf(f,lrc);
1406: }
1407: ul = 5; cr = 2;
1408: ul = cr;
1409: if(ul != 2){
1410: lrc = 29;
1411: if(prlc) printf(f,lrc);
1412: }
1413: ul = 5; sr = 2;
1414: ul = sr;
1415: if(ul != 2){
1416: lrc = 30;
1417: if(prlc) printf(f,lrc);
1418: }
1419: ul = 5; ir = 2;
1420: ul = ir;
1421: if(ul != 2){
1422: lrc = 31;
1423: if(prlc) printf(f,lrc);
1424: }
1425: ul = 5; lr = 2;
1426: ul = lr;
1427: if(ul != 2){
1428: lrc = 32;
1429: if(prlc) printf(f,lrc);
1430: }
1431: ul = 5; ur = 2;
1432: ul = ur;
1433: if(ul != 2){
1434: lrc = 33;
1435: if(prlc) printf(f,lrc);
1436: }
1437: ul = 5; fr = 2;
1438: ul = fr;
1439: if(ul != 2){
1440: lrc = 34;
1441: if(prlc) printf(f,lrc);
1442: }
1443: ul = 5; dr = 2;
1444: ul = dr;
1445: if(ul != 2){
1446: lrc = 35;
1447: if(prlc) printf(f,lrc);
1448: }
1449: fl = 5; cr = 2;
1450: fl = cr;
1451: if(fl != 2){
1452: lrc = 36;
1453: if(prlc) printf(f,lrc);
1454: }
1455: fl = 5; sr = 2;
1456: fl = sr;
1457: if(fl != 2){
1458: lrc = 37;
1459: if(prlc) printf(f,lrc);
1460: }
1461: fl = 5; ir = 2;
1462: fl = ir;
1463: if(fl != 2){
1464: lrc = 38;
1465: if(prlc) printf(f,lrc);
1466: }
1467: fl = 5; lr = 2;
1468: fl = lr;
1469: if(fl != 2){
1470: lrc = 39;
1471: if(prlc) printf(f,lrc);
1472: }
1473: fl = 5; ur = 2;
1474: fl = ur;
1475: if(fl != 2){
1476: lrc = 40;
1477: if(prlc) printf(f,lrc);
1478: }
1479: fl = 5; fr = 2;
1480: fl = fr;
1481: if(fl != 2){
1482: lrc = 41;
1483: if(prlc) printf(f,lrc);
1484: }
1485: fl = 5; dr = 2;
1486: fl = dr;
1487: if(fl != 2){
1488: lrc = 42;
1489: if(prlc) printf(f,lrc);
1490: }
1491: dl = 5; cr = 2;
1492: dl = cr;
1493: if(dl != 2){
1494: lrc = 43;
1495: if(prlc) printf(f,lrc);
1496: }
1497: dl = 5; sr = 2;
1498: dl = sr;
1499: if(dl != 2){
1500: lrc = 44;
1501: if(prlc) printf(f,lrc);
1502: }
1503: dl = 5; ir = 2;
1504: dl = ir;
1505: if(dl != 2){
1506: lrc = 45;
1507: if(prlc) printf(f,lrc);
1508: }
1509: dl = 5; lr = 2;
1510: dl = lr;
1511: if(dl != 2){
1512: lrc = 46;
1513: if(prlc) printf(f,lrc);
1514: }
1515: dl = 5; ur = 2;
1516: dl = ur;
1517: if(dl != 2){
1518: lrc = 47;
1519: if(prlc) printf(f,lrc);
1520: }
1521: dl = 5; fr = 2;
1522: dl = fr;
1523: if(dl != 2){
1524: lrc = 48;
1525: if(prlc) printf(f,lrc);
1526: }
1527: dl = 5; dr = 2;
1528: dl = dr;
1529: if(dl != 2){
1530: lrc = 49;
1531: if(prlc) printf(f,lrc);
1532: }
1533: cl = 5; cr = 2;
1534: cl += cr;
1535: if(cl != 7){
1536: lrc = 50;
1537: if(prlc) printf(f,lrc);
1538: }
1539: cl = 5; sr = 2;
1540: cl += sr;
1541: if(cl != 7){
1542: lrc = 51;
1543: if(prlc) printf(f,lrc);
1544: }
1545: cl = 5; ir = 2;
1546: cl += ir;
1547: if(cl != 7){
1548: lrc = 52;
1549: if(prlc) printf(f,lrc);
1550: }
1551: cl = 5; lr = 2;
1552: cl += lr;
1553: if(cl != 7){
1554: lrc = 53;
1555: if(prlc) printf(f,lrc);
1556: }
1557: cl = 5; ur = 2;
1558: cl += ur;
1559: if(cl != 7){
1560: lrc = 54;
1561: if(prlc) printf(f,lrc);
1562: }
1563: cl = 5; fr = 2;
1564: cl += fr;
1565: if(cl != 7){
1566: lrc = 55;
1567: if(prlc) printf(f,lrc);
1568: }
1569: cl = 5; dr = 2;
1570: cl += dr;
1571: if(cl != 7){
1572: lrc = 56;
1573: if(prlc) printf(f,lrc);
1574: }
1575: sl = 5; cr = 2;
1576: sl += cr;
1577: if(sl != 7){
1578: lrc = 57;
1579: if(prlc) printf(f,lrc);
1580: }
1581: sl = 5; sr = 2;
1582: sl += sr;
1583: if(sl != 7){
1584: lrc = 58;
1585: if(prlc) printf(f,lrc);
1586: }
1587: sl = 5; ir = 2;
1588: sl += ir;
1589: if(sl != 7){
1590: lrc = 59;
1591: if(prlc) printf(f,lrc);
1592: }
1593: sl = 5; lr = 2;
1594: sl += lr;
1595: if(sl != 7){
1596: lrc = 60;
1597: if(prlc) printf(f,lrc);
1598: }
1599: sl = 5; ur = 2;
1600: sl += ur;
1601: if(sl != 7){
1602: lrc = 61;
1603: if(prlc) printf(f,lrc);
1604: }
1605: sl = 5; fr = 2;
1606: sl += fr;
1607: if(sl != 7){
1608: lrc = 62;
1609: if(prlc) printf(f,lrc);
1610: }
1611: sl = 5; dr = 2;
1612: sl += dr;
1613: if(sl != 7){
1614: lrc = 63;
1615: if(prlc) printf(f,lrc);
1616: }
1617: il = 5; cr = 2;
1618: il += cr;
1619: if(il != 7){
1620: lrc = 64;
1621: if(prlc) printf(f,lrc);
1622: }
1623: il = 5; sr = 2;
1624: il += sr;
1625: if(il != 7){
1626: lrc = 65;
1627: if(prlc) printf(f,lrc);
1628: }
1629: il = 5; ir = 2;
1630: il += ir;
1631: if(il != 7){
1632: lrc = 66;
1633: if(prlc) printf(f,lrc);
1634: }
1635: il = 5; lr = 2;
1636: il += lr;
1637: if(il != 7){
1638: lrc = 67;
1639: if(prlc) printf(f,lrc);
1640: }
1641: il = 5; ur = 2;
1642: il += ur;
1643: if(il != 7){
1644: lrc = 68;
1645: if(prlc) printf(f,lrc);
1646: }
1647: il = 5; fr = 2;
1648: il += fr;
1649: if(il != 7){
1650: lrc = 69;
1651: if(prlc) printf(f,lrc);
1652: }
1653: il = 5; dr = 2;
1654: il += dr;
1655: if(il != 7){
1656: lrc = 70;
1657: if(prlc) printf(f,lrc);
1658: }
1659: ll = 5; cr = 2;
1660: ll += cr;
1661: if(ll != 7){
1662: lrc = 71;
1663: if(prlc) printf(f,lrc);
1664: }
1665: ll = 5; sr = 2;
1666: ll += sr;
1667: if(ll != 7){
1668: lrc = 72;
1669: if(prlc) printf(f,lrc);
1670: }
1671: ll = 5; ir = 2;
1672: ll += ir;
1673: if(ll != 7){
1674: lrc = 73;
1675: if(prlc) printf(f,lrc);
1676: }
1677: ll = 5; lr = 2;
1678: ll += lr;
1679: if(ll != 7){
1680: lrc = 74;
1681: if(prlc) printf(f,lrc);
1682: }
1683: ll = 5; ur = 2;
1684: ll += ur;
1685: if(ll != 7){
1686: lrc = 75;
1687: if(prlc) printf(f,lrc);
1688: }
1689: ll = 5; fr = 2;
1690: ll += fr;
1691: if(ll != 7){
1692: lrc = 76;
1693: if(prlc) printf(f,lrc);
1694: }
1695: ll = 5; dr = 2;
1696: ll += dr;
1697: if(ll != 7){
1698: lrc = 77;
1699: if(prlc) printf(f,lrc);
1700: }
1701: ul = 5; cr = 2;
1702: ul += cr;
1703: if(ul != 7){
1704: lrc = 78;
1705: if(prlc) printf(f,lrc);
1706: }
1707: ul = 5; sr = 2;
1708: ul += sr;
1709: if(ul != 7){
1710: lrc = 79;
1711: if(prlc) printf(f,lrc);
1712: }
1713: ul = 5; ir = 2;
1714: ul += ir;
1715: if(ul != 7){
1716: lrc = 80;
1717: if(prlc) printf(f,lrc);
1718: }
1719: ul = 5; lr = 2;
1720: ul += lr;
1721: if(ul != 7){
1722: lrc = 81;
1723: if(prlc) printf(f,lrc);
1724: }
1725: ul = 5; ur = 2;
1726: ul += ur;
1727: if(ul != 7){
1728: lrc = 82;
1729: if(prlc) printf(f,lrc);
1730: }
1731: ul = 5; fr = 2;
1732: ul += fr;
1733: if(ul != 7){
1734: lrc = 83;
1735: if(prlc) printf(f,lrc);
1736: }
1737: ul = 5; dr = 2;
1738: ul += dr;
1739: if(ul != 7){
1740: lrc = 84;
1741: if(prlc) printf(f,lrc);
1742: }
1743: fl = 5; cr = 2;
1744: fl += cr;
1745: if(fl != 7){
1746: lrc = 85;
1747: if(prlc) printf(f,lrc);
1748: }
1749: fl = 5; sr = 2;
1750: fl += sr;
1751: if(fl != 7){
1752: lrc = 86;
1753: if(prlc) printf(f,lrc);
1754: }
1755: fl = 5; ir = 2;
1756: fl += ir;
1757: if(fl != 7){
1758: lrc = 87;
1759: if(prlc) printf(f,lrc);
1760: }
1761: fl = 5; lr = 2;
1762: fl += lr;
1763: if(fl != 7){
1764: lrc = 88;
1765: if(prlc) printf(f,lrc);
1766: }
1767: fl = 5; ur = 2;
1768: fl += ur;
1769: if(fl != 7){
1770: lrc = 89;
1771: if(prlc) printf(f,lrc);
1772: }
1773: fl = 5; fr = 2;
1774: fl += fr;
1775: if(fl != 7){
1776: lrc = 90;
1777: if(prlc) printf(f,lrc);
1778: }
1779: fl = 5; dr = 2;
1780: fl += dr;
1781: if(fl != 7){
1782: lrc = 91;
1783: if(prlc) printf(f,lrc);
1784: }
1785: dl = 5; cr = 2;
1786: dl += cr;
1787: if(dl != 7){
1788: lrc = 92;
1789: if(prlc) printf(f,lrc);
1790: }
1791: dl = 5; sr = 2;
1792: dl += sr;
1793: if(dl != 7){
1794: lrc = 93;
1795: if(prlc) printf(f,lrc);
1796: }
1797: dl = 5; ir = 2;
1798: dl += ir;
1799: if(dl != 7){
1800: lrc = 94;
1801: if(prlc) printf(f,lrc);
1802: }
1803: dl = 5; lr = 2;
1804: dl += lr;
1805: if(dl != 7){
1806: lrc = 95;
1807: if(prlc) printf(f,lrc);
1808: }
1809: dl = 5; ur = 2;
1810: dl += ur;
1811: if(dl != 7){
1812: lrc = 96;
1813: if(prlc) printf(f,lrc);
1814: }
1815: dl = 5; fr = 2;
1816: dl += fr;
1817: if(dl != 7){
1818: lrc = 97;
1819: if(prlc) printf(f,lrc);
1820: }
1821: dl = 5; dr = 2;
1822: dl += dr;
1823: if(dl != 7){
1824: lrc = 98;
1825: if(prlc) printf(f,lrc);
1826: }
1827: cl = 5; cr = 2;
1828: cl -= cr;
1829: if(cl != 3){
1830: lrc = 99;
1831: if(prlc) printf(f,lrc);
1832: }
1833: cl = 5; sr = 2;
1834: cl -= sr;
1835: if(cl != 3){
1836: lrc = 100;
1837: if(prlc) printf(f,lrc);
1838: }
1839: cl = 5; ir = 2;
1840: cl -= ir;
1841: if(cl != 3){
1842: lrc = 101;
1843: if(prlc) printf(f,lrc);
1844: }
1845: cl = 5; lr = 2;
1846: cl -= lr;
1847: if(cl != 3){
1848: lrc = 102;
1849: if(prlc) printf(f,lrc);
1850: }
1851: cl = 5; ur = 2;
1852: cl -= ur;
1853: if(cl != 3){
1854: lrc = 103;
1855: if(prlc) printf(f,lrc);
1856: }
1857: cl = 5; fr = 2;
1858: cl -= fr;
1859: if(cl != 3){
1860: lrc = 104;
1861: if(prlc) printf(f,lrc);
1862: }
1863: cl = 5; dr = 2;
1864: cl -= dr;
1865: if(cl != 3){
1866: lrc = 105;
1867: if(prlc) printf(f,lrc);
1868: }
1869: sl = 5; cr = 2;
1870: sl -= cr;
1871: if(sl != 3){
1872: lrc = 106;
1873: if(prlc) printf(f,lrc);
1874: }
1875: sl = 5; sr = 2;
1876: sl -= sr;
1877: if(sl != 3){
1878: lrc = 107;
1879: if(prlc) printf(f,lrc);
1880: }
1881: sl = 5; ir = 2;
1882: sl -= ir;
1883: if(sl != 3){
1884: lrc = 108;
1885: if(prlc) printf(f,lrc);
1886: }
1887: sl = 5; lr = 2;
1888: sl -= lr;
1889: if(sl != 3){
1890: lrc = 109;
1891: if(prlc) printf(f,lrc);
1892: }
1893: sl = 5; ur = 2;
1894: sl -= ur;
1895: if(sl != 3){
1896: lrc = 110;
1897: if(prlc) printf(f,lrc);
1898: }
1899: sl = 5; fr = 2;
1900: sl -= fr;
1901: if(sl != 3){
1902: lrc = 111;
1903: if(prlc) printf(f,lrc);
1904: }
1905: sl = 5; dr = 2;
1906: sl -= dr;
1907: if(sl != 3){
1908: lrc = 112;
1909: if(prlc) printf(f,lrc);
1910: }
1911: il = 5; cr = 2;
1912: il -= cr;
1913: if(il != 3){
1914: lrc = 113;
1915: if(prlc) printf(f,lrc);
1916: }
1917: il = 5; sr = 2;
1918: il -= sr;
1919: if(il != 3){
1920: lrc = 114;
1921: if(prlc) printf(f,lrc);
1922: }
1923: il = 5; ir = 2;
1924: il -= ir;
1925: if(il != 3){
1926: lrc = 115;
1927: if(prlc) printf(f,lrc);
1928: }
1929: il = 5; lr = 2;
1930: il -= lr;
1931: if(il != 3){
1932: lrc = 116;
1933: if(prlc) printf(f,lrc);
1934: }
1935: il = 5; ur = 2;
1936: il -= ur;
1937: if(il != 3){
1938: lrc = 117;
1939: if(prlc) printf(f,lrc);
1940: }
1941: il = 5; fr = 2;
1942: il -= fr;
1943: if(il != 3){
1944: lrc = 118;
1945: if(prlc) printf(f,lrc);
1946: }
1947: il = 5; dr = 2;
1948: il -= dr;
1949: if(il != 3){
1950: lrc = 119;
1951: if(prlc) printf(f,lrc);
1952: }
1953: ll = 5; cr = 2;
1954: ll -= cr;
1955: if(ll != 3){
1956: lrc = 120;
1957: if(prlc) printf(f,lrc);
1958: }
1959: ll = 5; sr = 2;
1960: ll -= sr;
1961: if(ll != 3){
1962: lrc = 121;
1963: if(prlc) printf(f,lrc);
1964: }
1965: ll = 5; ir = 2;
1966: ll -= ir;
1967: if(ll != 3){
1968: lrc = 122;
1969: if(prlc) printf(f,lrc);
1970: }
1971: ll = 5; lr = 2;
1972: ll -= lr;
1973: if(ll != 3){
1974: lrc = 123;
1975: if(prlc) printf(f,lrc);
1976: }
1977: ll = 5; ur = 2;
1978: ll -= ur;
1979: if(ll != 3){
1980: lrc = 124;
1981: if(prlc) printf(f,lrc);
1982: }
1983: ll = 5; fr = 2;
1984: ll -= fr;
1985: if(ll != 3){
1986: lrc = 125;
1987: if(prlc) printf(f,lrc);
1988: }
1989: ll = 5; dr = 2;
1990: ll -= dr;
1991: if(ll != 3){
1992: lrc = 126;
1993: if(prlc) printf(f,lrc);
1994: }
1995: ul = 5; cr = 2;
1996: ul -= cr;
1997: if(ul != 3){
1998: lrc = 127;
1999: if(prlc) printf(f,lrc);
2000: }
2001: ul = 5; sr = 2;
2002: ul -= sr;
2003: if(ul != 3){
2004: lrc = 128;
2005: if(prlc) printf(f,lrc);
2006: }
2007: ul = 5; ir = 2;
2008: ul -= ir;
2009: if(ul != 3){
2010: lrc = 129;
2011: if(prlc) printf(f,lrc);
2012: }
2013: ul = 5; lr = 2;
2014: ul -= lr;
2015: if(ul != 3){
2016: lrc = 130;
2017: if(prlc) printf(f,lrc);
2018: }
2019: ul = 5; ur = 2;
2020: ul -= ur;
2021: if(ul != 3){
2022: lrc = 131;
2023: if(prlc) printf(f,lrc);
2024: }
2025: ul = 5; fr = 2;
2026: ul -= fr;
2027: if(ul != 3){
2028: lrc = 132;
2029: if(prlc) printf(f,lrc);
2030: }
2031: ul = 5; dr = 2;
2032: ul -= dr;
2033: if(ul != 3){
2034: lrc = 133;
2035: if(prlc) printf(f,lrc);
2036: }
2037: fl = 5; cr = 2;
2038: fl -= cr;
2039: if(fl != 3){
2040: lrc = 134;
2041: if(prlc) printf(f,lrc);
2042: }
2043: fl = 5; sr = 2;
2044: fl -= sr;
2045: if(fl != 3){
2046: lrc = 135;
2047: if(prlc) printf(f,lrc);
2048: }
2049: fl = 5; ir = 2;
2050: fl -= ir;
2051: if(fl != 3){
2052: lrc = 136;
2053: if(prlc) printf(f,lrc);
2054: }
2055: fl = 5; lr = 2;
2056: fl -= lr;
2057: if(fl != 3){
2058: lrc = 137;
2059: if(prlc) printf(f,lrc);
2060: }
2061: fl = 5; ur = 2;
2062: fl -= ur;
2063: if(fl != 3){
2064: lrc = 138;
2065: if(prlc) printf(f,lrc);
2066: }
2067: fl = 5; fr = 2;
2068: fl -= fr;
2069: if(fl != 3){
2070: lrc = 139;
2071: if(prlc) printf(f,lrc);
2072: }
2073: fl = 5; dr = 2;
2074: fl -= dr;
2075: if(fl != 3){
2076: lrc = 140;
2077: if(prlc) printf(f,lrc);
2078: }
2079: dl = 5; cr = 2;
2080: dl -= cr;
2081: if(dl != 3){
2082: lrc = 141;
2083: if(prlc) printf(f,lrc);
2084: }
2085: dl = 5; sr = 2;
2086: dl -= sr;
2087: if(dl != 3){
2088: lrc = 142;
2089: if(prlc) printf(f,lrc);
2090: }
2091: dl = 5; ir = 2;
2092: dl -= ir;
2093: if(dl != 3){
2094: lrc = 143;
2095: if(prlc) printf(f,lrc);
2096: }
2097: dl = 5; lr = 2;
2098: dl -= lr;
2099: if(dl != 3){
2100: lrc = 144;
2101: if(prlc) printf(f,lrc);
2102: }
2103: dl = 5; ur = 2;
2104: dl -= ur;
2105: if(dl != 3){
2106: lrc = 145;
2107: if(prlc) printf(f,lrc);
2108: }
2109: dl = 5; fr = 2;
2110: dl -= fr;
2111: if(dl != 3){
2112: lrc = 146;
2113: if(prlc) printf(f,lrc);
2114: }
2115: dl = 5; dr = 2;
2116: dl -= dr;
2117: if(dl != 3){
2118: lrc = 147;
2119: if(prlc) printf(f,lrc);
2120: }
2121: cl = 5; cr = 2;
2122: cl *= cr;
2123: if(cl != 10){
2124: lrc = 148;
2125: if(prlc) printf(f,lrc);
2126: }
2127: cl = 5; sr = 2;
2128: cl *= sr;
2129: if(cl != 10){
2130: lrc = 149;
2131: if(prlc) printf(f,lrc);
2132: }
2133: cl = 5; ir = 2;
2134: cl *= ir;
2135: if(cl != 10){
2136: lrc = 150;
2137: if(prlc) printf(f,lrc);
2138: }
2139: cl = 5; lr = 2;
2140: cl *= lr;
2141: if(cl != 10){
2142: lrc = 151;
2143: if(prlc) printf(f,lrc);
2144: }
2145: cl = 5; ur = 2;
2146: cl *= ur;
2147: if(cl != 10){
2148: lrc = 152;
2149: if(prlc) printf(f,lrc);
2150: }
2151: cl = 5; fr = 2;
2152: cl *= fr;
2153: if(cl != 10){
2154: lrc = 153;
2155: if(prlc) printf(f,lrc);
2156: }
2157: cl = 5; dr = 2;
2158: cl *= dr;
2159: if(cl != 10){
2160: lrc = 154;
2161: if(prlc) printf(f,lrc);
2162: }
2163: sl = 5; cr = 2;
2164: sl *= cr;
2165: if(sl != 10){
2166: lrc = 155;
2167: if(prlc) printf(f,lrc);
2168: }
2169: sl = 5; sr = 2;
2170: sl *= sr;
2171: if(sl != 10){
2172: lrc = 156;
2173: if(prlc) printf(f,lrc);
2174: }
2175: sl = 5; ir = 2;
2176: sl *= ir;
2177: if(sl != 10){
2178: lrc = 157;
2179: if(prlc) printf(f,lrc);
2180: }
2181: sl = 5; lr = 2;
2182: sl *= lr;
2183: if(sl != 10){
2184: lrc = 158;
2185: if(prlc) printf(f,lrc);
2186: }
2187: sl = 5; ur = 2;
2188: sl *= ur;
2189: if(sl != 10){
2190: lrc = 159;
2191: if(prlc) printf(f,lrc);
2192: }
2193: sl = 5; fr = 2;
2194: sl *= fr;
2195: if(sl != 10){
2196: lrc = 160;
2197: if(prlc) printf(f,lrc);
2198: }
2199: sl = 5; dr = 2;
2200: sl *= dr;
2201: if(sl != 10){
2202: lrc = 161;
2203: if(prlc) printf(f,lrc);
2204: }
2205: il = 5; cr = 2;
2206: il *= cr;
2207: if(il != 10){
2208: lrc = 162;
2209: if(prlc) printf(f,lrc);
2210: }
2211: il = 5; sr = 2;
2212: il *= sr;
2213: if(il != 10){
2214: lrc = 163;
2215: if(prlc) printf(f,lrc);
2216: }
2217: il = 5; ir = 2;
2218: il *= ir;
2219: if(il != 10){
2220: lrc = 164;
2221: if(prlc) printf(f,lrc);
2222: }
2223: il = 5; lr = 2;
2224: il *= lr;
2225: if(il != 10){
2226: lrc = 165;
2227: if(prlc) printf(f,lrc);
2228: }
2229: il = 5; ur = 2;
2230: il *= ur;
2231: if(il != 10){
2232: lrc = 166;
2233: if(prlc) printf(f,lrc);
2234: }
2235: il = 5; fr = 2;
2236: il *= fr;
2237: if(il != 10){
2238: lrc = 167;
2239: if(prlc) printf(f,lrc);
2240: }
2241: il = 5; dr = 2;
2242: il *= dr;
2243: if(il != 10){
2244: lrc = 168;
2245: if(prlc) printf(f,lrc);
2246: }
2247: ll = 5; cr = 2;
2248: ll *= cr;
2249: if(ll != 10){
2250: lrc = 169;
2251: if(prlc) printf(f,lrc);
2252: }
2253: ll = 5; sr = 2;
2254: ll *= sr;
2255: if(ll != 10){
2256: lrc = 170;
2257: if(prlc) printf(f,lrc);
2258: }
2259: ll = 5; ir = 2;
2260: ll *= ir;
2261: if(ll != 10){
2262: lrc = 171;
2263: if(prlc) printf(f,lrc);
2264: }
2265: ll = 5; lr = 2;
2266: ll *= lr;
2267: if(ll != 10){
2268: lrc = 172;
2269: if(prlc) printf(f,lrc);
2270: }
2271: ll = 5; ur = 2;
2272: ll *= ur;
2273: if(ll != 10){
2274: lrc = 173;
2275: if(prlc) printf(f,lrc);
2276: }
2277: ll = 5; fr = 2;
2278: ll *= fr;
2279: if(ll != 10){
2280: lrc = 174;
2281: if(prlc) printf(f,lrc);
2282: }
2283: ll = 5; dr = 2;
2284: ll *= dr;
2285: if(ll != 10){
2286: lrc = 175;
2287: if(prlc) printf(f,lrc);
2288: }
2289: ul = 5; cr = 2;
2290: ul *= cr;
2291: if(ul != 10){
2292: lrc = 176;
2293: if(prlc) printf(f,lrc);
2294: }
2295: ul = 5; sr = 2;
2296: ul *= sr;
2297: if(ul != 10){
2298: lrc = 177;
2299: if(prlc) printf(f,lrc);
2300: }
2301: ul = 5; ir = 2;
2302: ul *= ir;
2303: if(ul != 10){
2304: lrc = 178;
2305: if(prlc) printf(f,lrc);
2306: }
2307: ul = 5; lr = 2;
2308: ul *= lr;
2309: if(ul != 10){
2310: lrc = 179;
2311: if(prlc) printf(f,lrc);
2312: }
2313: ul = 5; ur = 2;
2314: ul *= ur;
2315: if(ul != 10){
2316: lrc = 180;
2317: if(prlc) printf(f,lrc);
2318: }
2319: ul = 5; fr = 2;
2320: ul *= fr;
2321: if(ul != 10){
2322: lrc = 181;
2323: if(prlc) printf(f,lrc);
2324: }
2325: ul = 5; dr = 2;
2326: ul *= dr;
2327: if(ul != 10){
2328: lrc = 182;
2329: if(prlc) printf(f,lrc);
2330: }
2331: fl = 5; cr = 2;
2332: fl *= cr;
2333: if(fl != 10){
2334: lrc = 183;
2335: if(prlc) printf(f,lrc);
2336: }
2337: fl = 5; sr = 2;
2338: fl *= sr;
2339: if(fl != 10){
2340: lrc = 184;
2341: if(prlc) printf(f,lrc);
2342: }
2343: fl = 5; ir = 2;
2344: fl *= ir;
2345: if(fl != 10){
2346: lrc = 185;
2347: if(prlc) printf(f,lrc);
2348: }
2349: fl = 5; lr = 2;
2350: fl *= lr;
2351: if(fl != 10){
2352: lrc = 186;
2353: if(prlc) printf(f,lrc);
2354: }
2355: fl = 5; ur = 2;
2356: fl *= ur;
2357: if(fl != 10){
2358: lrc = 187;
2359: if(prlc) printf(f,lrc);
2360: }
2361: fl = 5; fr = 2;
2362: fl *= fr;
2363: if(fl != 10){
2364: lrc = 188;
2365: if(prlc) printf(f,lrc);
2366: }
2367: fl = 5; dr = 2;
2368: fl *= dr;
2369: if(fl != 10){
2370: lrc = 189;
2371: if(prlc) printf(f,lrc);
2372: }
2373: dl = 5; cr = 2;
2374: dl *= cr;
2375: if(dl != 10){
2376: lrc = 190;
2377: if(prlc) printf(f,lrc);
2378: }
2379: dl = 5; sr = 2;
2380: dl *= sr;
2381: if(dl != 10){
2382: lrc = 191;
2383: if(prlc) printf(f,lrc);
2384: }
2385: dl = 5; ir = 2;
2386: dl *= ir;
2387: if(dl != 10){
2388: lrc = 192;
2389: if(prlc) printf(f,lrc);
2390: }
2391: dl = 5; lr = 2;
2392: dl *= lr;
2393: if(dl != 10){
2394: lrc = 193;
2395: if(prlc) printf(f,lrc);
2396: }
2397: dl = 5; ur = 2;
2398: dl *= ur;
2399: if(dl != 10){
2400: lrc = 194;
2401: if(prlc) printf(f,lrc);
2402: }
2403: dl = 5; fr = 2;
2404: dl *= fr;
2405: if(dl != 10){
2406: lrc = 195;
2407: if(prlc) printf(f,lrc);
2408: }
2409: dl = 5; dr = 2;
2410: dl *= dr;
2411: if(dl != 10){
2412: lrc = 196;
2413: if(prlc) printf(f,lrc);
2414: }
2415: cl = 5; cr = 2;
2416: cl /= cr;
2417: if(cl != 2){
2418: lrc = 197;
2419: if(prlc) printf(f,lrc);
2420: }
2421: cl = 5; sr = 2;
2422: cl /= sr;
2423: if(cl != 2){
2424: lrc = 198;
2425: if(prlc) printf(f,lrc);
2426: }
2427: cl = 5; ir = 2;
2428: cl /= ir;
2429: if(cl != 2){
2430: lrc = 199;
2431: if(prlc) printf(f,lrc);
2432: }
2433: cl = 5; lr = 2;
2434: cl /= lr;
2435: if(cl != 2){
2436: lrc = 200;
2437: if(prlc) printf(f,lrc);
2438: }
2439: cl = 5; ur = 2;
2440: cl /= ur;
2441: if(cl != 2){
2442: lrc = 201;
2443: if(prlc) printf(f,lrc);
2444: }
2445: cl = 5; fr = 2;
2446: cl /= fr;
2447: if(cl != 2){
2448: lrc = 202;
2449: if(prlc) printf(f,lrc);
2450: }
2451: cl = 5; dr = 2;
2452: cl /= dr;
2453: if(cl != 2){
2454: lrc = 203;
2455: if(prlc) printf(f,lrc);
2456: }
2457: sl = 5; cr = 2;
2458: sl /= cr;
2459: if(sl != 2){
2460: lrc = 204;
2461: if(prlc) printf(f,lrc);
2462: }
2463: sl = 5; sr = 2;
2464: sl /= sr;
2465: if(sl != 2){
2466: lrc = 205;
2467: if(prlc) printf(f,lrc);
2468: }
2469: sl = 5; ir = 2;
2470: sl /= ir;
2471: if(sl != 2){
2472: lrc = 206;
2473: if(prlc) printf(f,lrc);
2474: }
2475: sl = 5; lr = 2;
2476: sl /= lr;
2477: if(sl != 2){
2478: lrc = 207;
2479: if(prlc) printf(f,lrc);
2480: }
2481: sl = 5; ur = 2;
2482: sl /= ur;
2483: if(sl != 2){
2484: lrc = 208;
2485: if(prlc) printf(f,lrc);
2486: }
2487: sl = 5; fr = 2;
2488: sl /= fr;
2489: if(sl != 2){
2490: lrc = 209;
2491: if(prlc) printf(f,lrc);
2492: }
2493: sl = 5; dr = 2;
2494: sl /= dr;
2495: if(sl != 2){
2496: lrc = 210;
2497: if(prlc) printf(f,lrc);
2498: }
2499: il = 5; cr = 2;
2500: il /= cr;
2501: if(il != 2){
2502: lrc = 211;
2503: if(prlc) printf(f,lrc);
2504: }
2505: il = 5; sr = 2;
2506: il /= sr;
2507: if(il != 2){
2508: lrc = 212;
2509: if(prlc) printf(f,lrc);
2510: }
2511: il = 5; ir = 2;
2512: il /= ir;
2513: if(il != 2){
2514: lrc = 213;
2515: if(prlc) printf(f,lrc);
2516: }
2517: il = 5; lr = 2;
2518: il /= lr;
2519: if(il != 2){
2520: lrc = 214;
2521: if(prlc) printf(f,lrc);
2522: }
2523: il = 5; ur = 2;
2524: il /= ur;
2525: if(il != 2){
2526: lrc = 215;
2527: if(prlc) printf(f,lrc);
2528: }
2529: il = 5; fr = 2;
2530: il /= fr;
2531: if(il != 2){
2532: lrc = 216;
2533: if(prlc) printf(f,lrc);
2534: }
2535: il = 5; dr = 2;
2536: il /= dr;
2537: if(il != 2){
2538: lrc = 217;
2539: if(prlc) printf(f,lrc);
2540: }
2541: ll = 5; cr = 2;
2542: ll /= cr;
2543: if(ll != 2){
2544: lrc = 218;
2545: if(prlc) printf(f,lrc);
2546: }
2547: ll = 5; sr = 2;
2548: ll /= sr;
2549: if(ll != 2){
2550: lrc = 219;
2551: if(prlc) printf(f,lrc);
2552: }
2553: ll = 5; ir = 2;
2554: ll /= ir;
2555: if(ll != 2){
2556: lrc = 220;
2557: if(prlc) printf(f,lrc);
2558: }
2559: ll = 5; lr = 2;
2560: ll /= lr;
2561: if(ll != 2){
2562: lrc = 221;
2563: if(prlc) printf(f,lrc);
2564: }
2565: ll = 5; ur = 2;
2566: ll /= ur;
2567: if(ll != 2){
2568: lrc = 222;
2569: if(prlc) printf(f,lrc);
2570: }
2571: ll = 5; fr = 2;
2572: ll /= fr;
2573: if(ll != 2){
2574: lrc = 223;
2575: if(prlc) printf(f,lrc);
2576: }
2577: ll = 5; dr = 2;
2578: ll /= dr;
2579: if(ll != 2){
2580: lrc = 224;
2581: if(prlc) printf(f,lrc);
2582: }
2583: ul = 5; cr = 2;
2584: ul /= cr;
2585: if(ul != 2){
2586: lrc = 225;
2587: if(prlc) printf(f,lrc);
2588: }
2589: ul = 5; sr = 2;
2590: ul /= sr;
2591: if(ul != 2){
2592: lrc = 226;
2593: if(prlc) printf(f,lrc);
2594: }
2595: ul = 5; ir = 2;
2596: ul /= ir;
2597: if(ul != 2){
2598: lrc = 227;
2599: if(prlc) printf(f,lrc);
2600: }
2601: ul = 5; lr = 2;
2602: ul /= lr;
2603: if(ul != 2){
2604: lrc = 228;
2605: if(prlc) printf(f,lrc);
2606: }
2607: ul = 5; ur = 2;
2608: ul /= ur;
2609: if(ul != 2){
2610: lrc = 229;
2611: if(prlc) printf(f,lrc);
2612: }
2613: ul = 5; fr = 2;
2614: ul /= fr;
2615: if(ul != 2){
2616: lrc = 230;
2617: if(prlc) printf(f,lrc);
2618: }
2619: ul = 5; dr = 2;
2620: ul /= dr;
2621: if(ul != 2){
2622: lrc = 231;
2623: if(prlc) printf(f,lrc);
2624: }
2625: fl = 5; cr = 2;
2626: fl /= cr;
2627: if(fl != 2.5){
2628: lrc = 232;
2629: if(prlc) printf(f,lrc);
2630: }
2631: fl = 5; sr = 2;
2632: fl /= sr;
2633: if(fl != 2.5){
2634: lrc = 233;
2635: if(prlc) printf(f,lrc);
2636: }
2637: fl = 5; ir = 2;
2638: fl /= ir;
2639: if(fl != 2.5){
2640: lrc = 234;
2641: if(prlc) printf(f,lrc);
2642: }
2643: fl = 5; lr = 2;
2644: fl /= lr;
2645: if(fl != 2.5){
2646: lrc = 235;
2647: if(prlc) printf(f,lrc);
2648: }
2649: fl = 5; ur = 2;
2650: fl /= ur;
2651: if(fl != 2.5){
2652: lrc = 236;
2653: if(prlc) printf(f,lrc);
2654: }
2655: fl = 5; fr = 2;
2656: fl /= fr;
2657: if(fl != 2.5){
2658: lrc = 237;
2659: if(prlc) printf(f,lrc);
2660: }
2661: fl = 5; dr = 2;
2662: fl /= dr;
2663: if(fl != 2.5){
2664: lrc = 238;
2665: if(prlc) printf(f,lrc);
2666: }
2667: dl = 5; cr = 2;
2668: dl /= cr;
2669: if(dl != 2.5){
2670: lrc = 239;
2671: if(prlc) printf(f,lrc);
2672: }
2673: dl = 5; sr = 2;
2674: dl /= sr;
2675: if(dl != 2.5){
2676: lrc = 240;
2677: if(prlc) printf(f,lrc);
2678: }
2679: dl = 5; ir = 2;
2680: dl /= ir;
2681: if(dl != 2.5){
2682: lrc = 241;
2683: if(prlc) printf(f,lrc);
2684: }
2685: dl = 5; lr = 2;
2686: dl /= lr;
2687: if(dl != 2.5){
2688: lrc = 242;
2689: if(prlc) printf(f,lrc);
2690: }
2691: dl = 5; ur = 2;
2692: dl /= ur;
2693: if(dl != 2.5){
2694: lrc = 243;
2695: if(prlc) printf(f,lrc);
2696: }
2697: dl = 5; fr = 2;
2698: dl /= fr;
2699: if(dl != 2.5){
2700: lrc = 244;
2701: if(prlc) printf(f,lrc);
2702: }
2703: dl = 5; dr = 2;
2704: dl /= dr;
2705: if(dl != 2.5){
2706: lrc = 245;
2707: if(prlc) printf(f,lrc);
2708: }
2709: cl = 5; cr = 2;
2710: cl %= cr;
2711: if(cl != 1){
2712: lrc = 246;
2713: if(prlc) printf(f,lrc);
2714: }
2715: cl = 5; sr = 2;
2716: cl %= sr;
2717: if(cl != 1){
2718: lrc = 247;
2719: if(prlc) printf(f,lrc);
2720: }
2721: cl = 5; ir = 2;
2722: cl %= ir;
2723: if(cl != 1){
2724: lrc = 248;
2725: if(prlc) printf(f,lrc);
2726: }
2727: cl = 5; lr = 2;
2728: cl %= lr;
2729: if(cl != 1){
2730: lrc = 249;
2731: if(prlc) printf(f,lrc);
2732: }
2733: cl = 5; ur = 2;
2734: cl %= ur;
2735: if(cl != 1){
2736: lrc = 250;
2737: if(prlc) printf(f,lrc);
2738: }
2739: sl = 5; cr = 2;
2740: sl %= cr;
2741: if(sl != 1){
2742: lrc = 251;
2743: if(prlc) printf(f,lrc);
2744: }
2745: sl = 5; sr = 2;
2746: sl %= sr;
2747: if(sl != 1){
2748: lrc = 252;
2749: if(prlc) printf(f,lrc);
2750: }
2751: sl = 5; ir = 2;
2752: sl %= ir;
2753: if(sl != 1){
2754: lrc = 253;
2755: if(prlc) printf(f,lrc);
2756: }
2757: sl = 5; lr = 2;
2758: sl %= lr;
2759: if(sl != 1){
2760: lrc = 254;
2761: if(prlc) printf(f,lrc);
2762: }
2763: sl = 5; ur = 2;
2764: sl %= ur;
2765: if(sl != 1){
2766: lrc = 255;
2767: if(prlc) printf(f,lrc);
2768: }
2769: il = 5; cr = 2;
2770: il %= cr;
2771: if(il != 1){
2772: lrc = 256;
2773: if(prlc) printf(f,lrc);
2774: }
2775: il = 5; sr = 2;
2776: il %= sr;
2777: if(il != 1){
2778: lrc = 257;
2779: if(prlc) printf(f,lrc);
2780: }
2781: il = 5; ir = 2;
2782: il %= ir;
2783: if(il != 1){
2784: lrc = 258;
2785: if(prlc) printf(f,lrc);
2786: }
2787: il = 5; lr = 2;
2788: il %= lr;
2789: if(il != 1){
2790: lrc = 259;
2791: if(prlc) printf(f,lrc);
2792: }
2793: il = 5; ur = 2;
2794: il %= ur;
2795: if(il != 1){
2796: lrc = 260;
2797: if(prlc) printf(f,lrc);
2798: }
2799: ll = 5; cr = 2;
2800: ll %= cr;
2801: if(ll != 1){
2802: lrc = 261;
2803: if(prlc) printf(f,lrc);
2804: }
2805: ll = 5; sr = 2;
2806: ll %= sr;
2807: if(ll != 1){
2808: lrc = 262;
2809: if(prlc) printf(f,lrc);
2810: }
2811: ll = 5; ir = 2;
2812: ll %= ir;
2813: if(ll != 1){
2814: lrc = 263;
2815: if(prlc) printf(f,lrc);
2816: }
2817: ll = 5; lr = 2;
2818: ll %= lr;
2819: if(ll != 1){
2820: lrc = 264;
2821: if(prlc) printf(f,lrc);
2822: }
2823: ll = 5; ur = 2;
2824: ll %= ur;
2825: if(ll != 1){
2826: lrc = 265;
2827: if(prlc) printf(f,lrc);
2828: }
2829: ul = 5; cr = 2;
2830: ul %= cr;
2831: if(ul != 1){
2832: lrc = 266;
2833: if(prlc) printf(f,lrc);
2834: }
2835: ul = 5; sr = 2;
2836: ul %= sr;
2837: if(ul != 1){
2838: lrc = 267;
2839: if(prlc) printf(f,lrc);
2840: }
2841: ul = 5; ir = 2;
2842: ul %= ir;
2843: if(ul != 1){
2844: lrc = 268;
2845: if(prlc) printf(f,lrc);
2846: }
2847: ul = 5; lr = 2;
2848: ul %= lr;
2849: if(ul != 1){
2850: lrc = 269;
2851: if(prlc) printf(f,lrc);
2852: }
2853: ul = 5; ur = 2;
2854: ul %= ur;
2855: if(ul != 1){
2856: lrc = 270;
2857: if(prlc) printf(f,lrc);
2858: }
2859: cl = 5; cr = 2;
2860: cl >>= cr;
2861: if(cl != 1){
2862: lrc = 271;
2863: if(prlc) printf(f,lrc);
2864: }
2865: cl = 5; sr = 2;
2866: cl >>= sr;
2867: if(cl != 1){
2868: lrc = 272;
2869: if(prlc) printf(f,lrc);
2870: }
2871: cl = 5; ir = 2;
2872: cl >>= ir;
2873: if(cl != 1){
2874: lrc = 273;
2875: if(prlc) printf(f,lrc);
2876: }
2877: cl = 5; lr = 2;
2878: cl >>= lr;
2879: if(cl != 1){
2880: lrc = 274;
2881: if(prlc) printf(f,lrc);
2882: }
2883: cl = 5; ur = 2;
2884: cl >>= ur;
2885: if(cl != 1){
2886: lrc = 275;
2887: if(prlc) printf(f,lrc);
2888: }
2889: sl = 5; cr = 2;
2890: sl >>= cr;
2891: if(sl != 1){
2892: lrc = 276;
2893: if(prlc) printf(f,lrc);
2894: }
2895: sl = 5; sr = 2;
2896: sl >>= sr;
2897: if(sl != 1){
2898: lrc = 277;
2899: if(prlc) printf(f,lrc);
2900: }
2901: sl = 5; ir = 2;
2902: sl >>= ir;
2903: if(sl != 1){
2904: lrc = 278;
2905: if(prlc) printf(f,lrc);
2906: }
2907: sl = 5; lr = 2;
2908: sl >>= lr;
2909: if(sl != 1){
2910: lrc = 279;
2911: if(prlc) printf(f,lrc);
2912: }
2913: sl = 5; ur = 2;
2914: sl >>= ur;
2915: if(sl != 1){
2916: lrc = 280;
2917: if(prlc) printf(f,lrc);
2918: }
2919: il = 5; cr = 2;
2920: il >>= cr;
2921: if(il != 1){
2922: lrc = 281;
2923: if(prlc) printf(f,lrc);
2924: }
2925: il = 5; sr = 2;
2926: il >>= sr;
2927: if(il != 1){
2928: lrc = 282;
2929: if(prlc) printf(f,lrc);
2930: }
2931: il = 5; ir = 2;
2932: il >>= ir;
2933: if(il != 1){
2934: lrc = 283;
2935: if(prlc) printf(f,lrc);
2936: }
2937: il = 5; lr = 2;
2938: il >>= lr;
2939: if(il != 1){
2940: lrc = 284;
2941: if(prlc) printf(f,lrc);
2942: }
2943: il = 5; ur = 2;
2944: il >>= ur;
2945: if(il != 1){
2946: lrc = 285;
2947: if(prlc) printf(f,lrc);
2948: }
2949: ll = 5; cr = 2;
2950: ll >>= cr;
2951: if(ll != 1){
2952: lrc = 286;
2953: if(prlc) printf(f,lrc);
2954: }
2955: ll = 5; sr = 2;
2956: ll >>= sr;
2957: if(ll != 1){
2958: lrc = 287;
2959: if(prlc) printf(f,lrc);
2960: }
2961: ll = 5; ir = 2;
2962: ll >>= ir;
2963: if(ll != 1){
2964: lrc = 288;
2965: if(prlc) printf(f,lrc);
2966: }
2967: ll = 5; lr = 2;
2968: ll >>= lr;
2969: if(ll != 1){
2970: lrc = 289;
2971: if(prlc) printf(f,lrc);
2972: }
2973: ll = 5; ur = 2;
2974: ll >>= ur;
2975: if(ll != 1){
2976: lrc = 290;
2977: if(prlc) printf(f,lrc);
2978: }
2979: ul = 5; cr = 2;
2980: ul >>= cr;
2981: if(ul != 1){
2982: lrc = 291;
2983: if(prlc) printf(f,lrc);
2984: }
2985: ul = 5; sr = 2;
2986: ul >>= sr;
2987: if(ul != 1){
2988: lrc = 292;
2989: if(prlc) printf(f,lrc);
2990: }
2991: ul = 5; ir = 2;
2992: ul >>= ir;
2993: if(ul != 1){
2994: lrc = 293;
2995: if(prlc) printf(f,lrc);
2996: }
2997: ul = 5; lr = 2;
2998: ul >>= lr;
2999: if(ul != 1){
3000: lrc = 294;
3001: if(prlc) printf(f,lrc);
3002: }
3003: ul = 5; ur = 2;
3004: ul >>= ur;
3005: if(ul != 1){
3006: lrc = 295;
3007: if(prlc) printf(f,lrc);
3008: }
3009: cl = 5; cr = 2;
3010: cl <<= cr;
3011: if(cl != 20){
3012: lrc = 296;
3013: if(prlc) printf(f,lrc);
3014: }
3015: cl = 5; sr = 2;
3016: cl <<= sr;
3017: if(cl != 20){
3018: lrc = 297;
3019: if(prlc) printf(f,lrc);
3020: }
3021: cl = 5; ir = 2;
3022: cl <<= ir;
3023: if(cl != 20){
3024: lrc = 298;
3025: if(prlc) printf(f,lrc);
3026: }
3027: cl = 5; lr = 2;
3028: cl <<= lr;
3029: if(cl != 20){
3030: lrc = 299;
3031: if(prlc) printf(f,lrc);
3032: }
3033: cl = 5; ur = 2;
3034: cl <<= ur;
3035: if(cl != 20){
3036: lrc = 300;
3037: if(prlc) printf(f,lrc);
3038: }
3039: sl = 5; cr = 2;
3040: sl <<= cr;
3041: if(sl != 20){
3042: lrc = 301;
3043: if(prlc) printf(f,lrc);
3044: }
3045: sl = 5; sr = 2;
3046: sl <<= sr;
3047: if(sl != 20){
3048: lrc = 302;
3049: if(prlc) printf(f,lrc);
3050: }
3051: sl = 5; ir = 2;
3052: sl <<= ir;
3053: if(sl != 20){
3054: lrc = 303;
3055: if(prlc) printf(f,lrc);
3056: }
3057: sl = 5; lr = 2;
3058: sl <<= lr;
3059: if(sl != 20){
3060: lrc = 304;
3061: if(prlc) printf(f,lrc);
3062: }
3063: sl = 5; ur = 2;
3064: sl <<= ur;
3065: if(sl != 20){
3066: lrc = 305;
3067: if(prlc) printf(f,lrc);
3068: }
3069: il = 5; cr = 2;
3070: il <<= cr;
3071: if(il != 20){
3072: lrc = 306;
3073: if(prlc) printf(f,lrc);
3074: }
3075: il = 5; sr = 2;
3076: il <<= sr;
3077: if(il != 20){
3078: lrc = 307;
3079: if(prlc) printf(f,lrc);
3080: }
3081: il = 5; ir = 2;
3082: il <<= ir;
3083: if(il != 20){
3084: lrc = 308;
3085: if(prlc) printf(f,lrc);
3086: }
3087: il = 5; lr = 2;
3088: il <<= lr;
3089: if(il != 20){
3090: lrc = 309;
3091: if(prlc) printf(f,lrc);
3092: }
3093: il = 5; ur = 2;
3094: il <<= ur;
3095: if(il != 20){
3096: lrc = 310;
3097: if(prlc) printf(f,lrc);
3098: }
3099: ll = 5; cr = 2;
3100: ll <<= cr;
3101: if(ll != 20){
3102: lrc = 311;
3103: if(prlc) printf(f,lrc);
3104: }
3105: ll = 5; sr = 2;
3106: ll <<= sr;
3107: if(ll != 20){
3108: lrc = 312;
3109: if(prlc) printf(f,lrc);
3110: }
3111: ll = 5; ir = 2;
3112: ll <<= ir;
3113: if(ll != 20){
3114: lrc = 313;
3115: if(prlc) printf(f,lrc);
3116: }
3117: ll = 5; lr = 2;
3118: ll <<= lr;
3119: if(ll != 20){
3120: lrc = 314;
3121: if(prlc) printf(f,lrc);
3122: }
3123: ll = 5; ur = 2;
3124: ll <<= ur;
3125: if(ll != 20){
3126: lrc = 315;
3127: if(prlc) printf(f,lrc);
3128: }
3129: ul = 5; cr = 2;
3130: ul <<= cr;
3131: if(ul != 20){
3132: lrc = 316;
3133: if(prlc) printf(f,lrc);
3134: }
3135: ul = 5; sr = 2;
3136: ul <<= sr;
3137: if(ul != 20){
3138: lrc = 317;
3139: if(prlc) printf(f,lrc);
3140: }
3141: ul = 5; ir = 2;
3142: ul <<= ir;
3143: if(ul != 20){
3144: lrc = 318;
3145: if(prlc) printf(f,lrc);
3146: }
3147: ul = 5; lr = 2;
3148: ul <<= lr;
3149: if(ul != 20){
3150: lrc = 319;
3151: if(prlc) printf(f,lrc);
3152: }
3153: ul = 5; ur = 2;
3154: ul <<= ur;
3155: if(ul != 20){
3156: lrc = 320;
3157: if(prlc) printf(f,lrc);
3158: }
3159: cl = 12; cr = 10;
3160: cl &= cr;
3161: if(cl != 8){
3162: lrc = 321;
3163: if(prlc) printf(f,lrc);
3164: }
3165: cl = 12; sr = 10;
3166: cl &= sr;
3167: if(cl != 8){
3168: lrc = 322;
3169: if(prlc) printf(f,lrc);
3170: }
3171: cl = 12; ir = 10;
3172: cl &= ir;
3173: if(cl != 8){
3174: lrc = 323;
3175: if(prlc) printf(f,lrc);
3176: }
3177: cl = 12; lr = 10;
3178: cl &= lr;
3179: if(cl != 8){
3180: lrc = 324;
3181: if(prlc) printf(f,lrc);
3182: }
3183: cl = 12; ur = 10;
3184: cl &= ur;
3185: if(cl != 8){
3186: lrc = 325;
3187: if(prlc) printf(f,lrc);
3188: }
3189: sl = 12; cr = 10;
3190: sl &= cr;
3191: if(sl != 8){
3192: lrc = 326;
3193: if(prlc) printf(f,lrc);
3194: }
3195: sl = 12; sr = 10;
3196: sl &= sr;
3197: if(sl != 8){
3198: lrc = 327;
3199: if(prlc) printf(f,lrc);
3200: }
3201: sl = 12; ir = 10;
3202: sl &= ir;
3203: if(sl != 8){
3204: lrc = 328;
3205: if(prlc) printf(f,lrc);
3206: }
3207: sl = 12; lr = 10;
3208: sl &= lr;
3209: if(sl != 8){
3210: lrc = 329;
3211: if(prlc) printf(f,lrc);
3212: }
3213: sl = 12; ur = 10;
3214: sl &= ur;
3215: if(sl != 8){
3216: lrc = 330;
3217: if(prlc) printf(f,lrc);
3218: }
3219: il = 12; cr = 10;
3220: il &= cr;
3221: if(il != 8){
3222: lrc = 331;
3223: if(prlc) printf(f,lrc);
3224: }
3225: il = 12; sr = 10;
3226: il &= sr;
3227: if(il != 8){
3228: lrc = 332;
3229: if(prlc) printf(f,lrc);
3230: }
3231: il = 12; ir = 10;
3232: il &= ir;
3233: if(il != 8){
3234: lrc = 333;
3235: if(prlc) printf(f,lrc);
3236: }
3237: il = 12; lr = 10;
3238: il &= lr;
3239: if(il != 8){
3240: lrc = 334;
3241: if(prlc) printf(f,lrc);
3242: }
3243: il = 12; ur = 10;
3244: il &= ur;
3245: if(il != 8){
3246: lrc = 335;
3247: if(prlc) printf(f,lrc);
3248: }
3249: ll = 12; cr = 10;
3250: ll &= cr;
3251: if(ll != 8){
3252: lrc = 336;
3253: if(prlc) printf(f,lrc);
3254: }
3255: ll = 12; sr = 10;
3256: ll &= sr;
3257: if(ll != 8){
3258: lrc = 337;
3259: if(prlc) printf(f,lrc);
3260: }
3261: ll = 12; ir = 10;
3262: ll &= ir;
3263: if(ll != 8){
3264: lrc = 338;
3265: if(prlc) printf(f,lrc);
3266: }
3267: ll = 12; lr = 10;
3268: ll &= lr;
3269: if(ll != 8){
3270: lrc = 339;
3271: if(prlc) printf(f,lrc);
3272: }
3273: ll = 12; ur = 10;
3274: ll &= ur;
3275: if(ll != 8){
3276: lrc = 340;
3277: if(prlc) printf(f,lrc);
3278: }
3279: ul = 12; cr = 10;
3280: ul &= cr;
3281: if(ul != 8){
3282: lrc = 341;
3283: if(prlc) printf(f,lrc);
3284: }
3285: ul = 12; sr = 10;
3286: ul &= sr;
3287: if(ul != 8){
3288: lrc = 342;
3289: if(prlc) printf(f,lrc);
3290: }
3291: ul = 12; ir = 10;
3292: ul &= ir;
3293: if(ul != 8){
3294: lrc = 343;
3295: if(prlc) printf(f,lrc);
3296: }
3297: ul = 12; lr = 10;
3298: ul &= lr;
3299: if(ul != 8){
3300: lrc = 344;
3301: if(prlc) printf(f,lrc);
3302: }
3303: ul = 12; ur = 10;
3304: ul &= ur;
3305: if(ul != 8){
3306: lrc = 345;
3307: if(prlc) printf(f,lrc);
3308: }
3309: cl = 12; cr = 10;
3310: cl ^= cr;
3311: if(cl != 6){
3312: lrc = 346;
3313: if(prlc) printf(f,lrc);
3314: }
3315: cl = 12; sr = 10;
3316: cl ^= sr;
3317: if(cl != 6){
3318: lrc = 347;
3319: if(prlc) printf(f,lrc);
3320: }
3321: cl = 12; ir = 10;
3322: cl ^= ir;
3323: if(cl != 6){
3324: lrc = 348;
3325: if(prlc) printf(f,lrc);
3326: }
3327: cl = 12; lr = 10;
3328: cl ^= lr;
3329: if(cl != 6){
3330: lrc = 349;
3331: if(prlc) printf(f,lrc);
3332: }
3333: cl = 12; ur = 10;
3334: cl ^= ur;
3335: if(cl != 6){
3336: lrc = 350;
3337: if(prlc) printf(f,lrc);
3338: }
3339: sl = 12; cr = 10;
3340: sl ^= cr;
3341: if(sl != 6){
3342: lrc = 351;
3343: if(prlc) printf(f,lrc);
3344: }
3345: sl = 12; sr = 10;
3346: sl ^= sr;
3347: if(sl != 6){
3348: lrc = 352;
3349: if(prlc) printf(f,lrc);
3350: }
3351: sl = 12; ir = 10;
3352: sl ^= ir;
3353: if(sl != 6){
3354: lrc = 353;
3355: if(prlc) printf(f,lrc);
3356: }
3357: sl = 12; lr = 10;
3358: sl ^= lr;
3359: if(sl != 6){
3360: lrc = 354;
3361: if(prlc) printf(f,lrc);
3362: }
3363: sl = 12; ur = 10;
3364: sl ^= ur;
3365: if(sl != 6){
3366: lrc = 355;
3367: if(prlc) printf(f,lrc);
3368: }
3369: il = 12; cr = 10;
3370: il ^= cr;
3371: if(il != 6){
3372: lrc = 356;
3373: if(prlc) printf(f,lrc);
3374: }
3375: il = 12; sr = 10;
3376: il ^= sr;
3377: if(il != 6){
3378: lrc = 357;
3379: if(prlc) printf(f,lrc);
3380: }
3381: il = 12; ir = 10;
3382: il ^= ir;
3383: if(il != 6){
3384: lrc = 358;
3385: if(prlc) printf(f,lrc);
3386: }
3387: il = 12; lr = 10;
3388: il ^= lr;
3389: if(il != 6){
3390: lrc = 359;
3391: if(prlc) printf(f,lrc);
3392: }
3393: il = 12; ur = 10;
3394: il ^= ur;
3395: if(il != 6){
3396: lrc = 360;
3397: if(prlc) printf(f,lrc);
3398: }
3399: ll = 12; cr = 10;
3400: ll ^= cr;
3401: if(ll != 6){
3402: lrc = 361;
3403: if(prlc) printf(f,lrc);
3404: }
3405: ll = 12; sr = 10;
3406: ll ^= sr;
3407: if(ll != 6){
3408: lrc = 362;
3409: if(prlc) printf(f,lrc);
3410: }
3411: ll = 12; ir = 10;
3412: ll ^= ir;
3413: if(ll != 6){
3414: lrc = 363;
3415: if(prlc) printf(f,lrc);
3416: }
3417: ll = 12; lr = 10;
3418: ll ^= lr;
3419: if(ll != 6){
3420: lrc = 364;
3421: if(prlc) printf(f,lrc);
3422: }
3423: ll = 12; ur = 10;
3424: ll ^= ur;
3425: if(ll != 6){
3426: lrc = 365;
3427: if(prlc) printf(f,lrc);
3428: }
3429: ul = 12; cr = 10;
3430: ul ^= cr;
3431: if(ul != 6){
3432: lrc = 366;
3433: if(prlc) printf(f,lrc);
3434: }
3435: ul = 12; sr = 10;
3436: ul ^= sr;
3437: if(ul != 6){
3438: lrc = 367;
3439: if(prlc) printf(f,lrc);
3440: }
3441: ul = 12; ir = 10;
3442: ul ^= ir;
3443: if(ul != 6){
3444: lrc = 368;
3445: if(prlc) printf(f,lrc);
3446: }
3447: ul = 12; lr = 10;
3448: ul ^= lr;
3449: if(ul != 6){
3450: lrc = 369;
3451: if(prlc) printf(f,lrc);
3452: }
3453: ul = 12; ur = 10;
3454: ul ^= ur;
3455: if(ul != 6){
3456: lrc = 370;
3457: if(prlc) printf(f,lrc);
3458: }
3459: cl = 12; cr = 10;
3460: cl |= cr;
3461: if(cl != 14){
3462: lrc = 371;
3463: if(prlc) printf(f,lrc);
3464: }
3465: cl = 12; sr = 10;
3466: cl |= sr;
3467: if(cl != 14){
3468: lrc = 372;
3469: if(prlc) printf(f,lrc);
3470: }
3471: cl = 12; ir = 10;
3472: cl |= ir;
3473: if(cl != 14){
3474: lrc = 373;
3475: if(prlc) printf(f,lrc);
3476: }
3477: cl = 12; lr = 10;
3478: cl |= lr;
3479: if(cl != 14){
3480: lrc = 374;
3481: if(prlc) printf(f,lrc);
3482: }
3483: cl = 12; ur = 10;
3484: cl |= ur;
3485: if(cl != 14){
3486: lrc = 375;
3487: if(prlc) printf(f,lrc);
3488: }
3489: sl = 12; cr = 10;
3490: sl |= cr;
3491: if(sl != 14){
3492: lrc = 376;
3493: if(prlc) printf(f,lrc);
3494: }
3495: sl = 12; sr = 10;
3496: sl |= sr;
3497: if(sl != 14){
3498: lrc = 377;
3499: if(prlc) printf(f,lrc);
3500: }
3501: sl = 12; ir = 10;
3502: sl |= ir;
3503: if(sl != 14){
3504: lrc = 378;
3505: if(prlc) printf(f,lrc);
3506: }
3507: sl = 12; lr = 10;
3508: sl |= lr;
3509: if(sl != 14){
3510: lrc = 379;
3511: if(prlc) printf(f,lrc);
3512: }
3513: sl = 12; ur = 10;
3514: sl |= ur;
3515: if(sl != 14){
3516: lrc = 380;
3517: if(prlc) printf(f,lrc);
3518: }
3519: il = 12; cr = 10;
3520: il |= cr;
3521: if(il != 14){
3522: lrc = 381;
3523: if(prlc) printf(f,lrc);
3524: }
3525: il = 12; sr = 10;
3526: il |= sr;
3527: if(il != 14){
3528: lrc = 382;
3529: if(prlc) printf(f,lrc);
3530: }
3531: il = 12; ir = 10;
3532: il |= ir;
3533: if(il != 14){
3534: lrc = 383;
3535: if(prlc) printf(f,lrc);
3536: }
3537: il = 12; lr = 10;
3538: il |= lr;
3539: if(il != 14){
3540: lrc = 384;
3541: if(prlc) printf(f,lrc);
3542: }
3543: il = 12; ur = 10;
3544: il |= ur;
3545: if(il != 14){
3546: lrc = 385;
3547: if(prlc) printf(f,lrc);
3548: }
3549: ll = 12; cr = 10;
3550: ll |= cr;
3551: if(ll != 14){
3552: lrc = 386;
3553: if(prlc) printf(f,lrc);
3554: }
3555: ll = 12; sr = 10;
3556: ll |= sr;
3557: if(ll != 14){
3558: lrc = 387;
3559: if(prlc) printf(f,lrc);
3560: }
3561: ll = 12; ir = 10;
3562: ll |= ir;
3563: if(ll != 14){
3564: lrc = 388;
3565: if(prlc) printf(f,lrc);
3566: }
3567: ll = 12; lr = 10;
3568: ll |= lr;
3569: if(ll != 14){
3570: lrc = 389;
3571: if(prlc) printf(f,lrc);
3572: }
3573: ll = 12; ur = 10;
3574: ll |= ur;
3575: if(ll != 14){
3576: lrc = 390;
3577: if(prlc) printf(f,lrc);
3578: }
3579: ul = 12; cr = 10;
3580: ul |= cr;
3581: if(ul != 14){
3582: lrc = 391;
3583: if(prlc) printf(f,lrc);
3584: }
3585: ul = 12; sr = 10;
3586: ul |= sr;
3587: if(ul != 14){
3588: lrc = 392;
3589: if(prlc) printf(f,lrc);
3590: }
3591: ul = 12; ir = 10;
3592: ul |= ir;
3593: if(ul != 14){
3594: lrc = 393;
3595: if(prlc) printf(f,lrc);
3596: }
3597: ul = 12; lr = 10;
3598: ul |= lr;
3599: if(ul != 14){
3600: lrc = 394;
3601: if(prlc) printf(f,lrc);
3602: }
3603: ul = 12; ur = 10;
3604: ul |= ur;
3605: if(ul != 14){
3606: lrc = 395;
3607: if(prlc) printf(f,lrc);
3608: }
3609: if(lrc != 0) {
3610: rc = 1;
3611: if(pd0->flgd != 0) printf(s714er,1);
3612: }
3613: return rc;
3614: }
3615: s715(pd0) /* 7.15 Comma operator */
3616: struct defs *pd0;
3617: {
3618: static char s715er[] = "s715,er%d\n";
3619: static char qs715[8] = "s715 ";
3620: int rc;
3621: char *ps, *pt;
3622: int a, t, c, i;
3623: a = c = 0;
3624: ps = qs715;
3625: pt = pd0->rfs;
3626: rc = 0;
3627: while (*pt++ = *ps++);
3628:
3629: /* A pair of expressions separated by a comma is
3630: evaluated left to right and the value of the left
3631: expression is discarded.
3632: */
3633: i = 1;
3634: if( i++,i++,i++,i++,++i != 6 ){
3635: if(pd0->flgd != 0) printf(s715er,1);
3636: rc = rc+1;
3637: }
3638:
3639: /* In contexts where the comma is given a special mean-
3640: ing, for example in a list of actual arguments to
3641: functions (sic) and lists of initializers, the comma
3642: operator as described in this section can only appear
3643: in parentheses; for example
3644:
3645: f( a, (t=3, t+2), c)
3646:
3647: has three arguments, the second of which has the
3648: value 5.
3649: */
3650:
3651: if(s715f(a, (t=3, t+2), c) != 5){
3652: if(pd0->flgd != 0) printf(s715er,2);
3653: rc = rc+2;
3654: }
3655: return rc;
3656: }
3657: s715f(x,y,z)
3658: int x, y, z;
3659: {
3660: return y;
3661: }
3662: s72(pd0) /* 7.2 Unary operators */
3663: struct defs *pd0;
3664: {
3665: static char s72er[] = "s72,er%d\n";
3666: static char qs72[8] = "s72 ";
3667: int rc;
3668: char *ps, *pt;
3669: int k, j, i, lrc;
3670: char c;
3671: short s;
3672: long l;
3673: unsigned u;
3674: double d;
3675: float f;
3676: ps = qs72;
3677: pt = pd0->rfs;
3678: rc = 0;
3679: while (*pt++ = *ps++);
3680:
3681: /* The *, denoting indirection, and the &, denoting a
3682: pointer, are duals of each other, and ought to behave as
3683: such... */
3684:
3685: k = 2;
3686: if(*&*&k != 2){
3687: rc = rc+1;
3688: printf(s72er,1);
3689: }
3690:
3691: /* The unary minus has the conventional meaning. */
3692:
3693: if(k+(-k) != 0){
3694: rc = rc+2;
3695: printf(s72er,2);
3696: }
3697:
3698: /* The negation operator (!) has been thoroughly checked out,
3699: perhaps more thoroughly than any of the others. The ~ oper-
3700: ator gets us a ones complement. */
3701:
3702: k = 0;
3703: for(j=0;j<pd0->ibits;j++) k = (k<<1)|1;
3704: if(~k != 0){
3705: rc = rc+4;
3706: printf(s72er,4);
3707: }
3708:
3709: /* Now we look at the ++ and -- operators, which can be
3710: used in either prefix or suffix form. With side
3711: effects they're loaded. */
3712:
3713: k = 5;
3714:
3715: if( ++k != 6 || --k != 5
3716: || k++ != 5 || k-- != 6
3717: || k != 5 ){
3718: rc = rc+8;
3719: printf(s72er,8);
3720: }
3721:
3722: /* An expression preceded by the parenthesised name of a
3723: data type causes conversion of the value of the expression
3724: to the named type. This construction is called a cast.
3725: Here, we check to see that all of the possible casts and
3726: their simple combinations are accepted by the compiler,
3727: and that they all produce a correct result for this sample
3728: of size one. */
3729:
3730: c = 26; l = 26; d = 26.;
3731: s = 26; u = 26;
3732: i = 26; f = 26.;
3733:
3734: lrc = 0;
3735:
3736: if( (char)s != 26 || (char)i != 26
3737: || (char)l != 26 || (char)u != 26
3738: || (char)f != 26 || (char)d != 26 ) lrc = lrc+1;
3739:
3740: if( (short)c != 26 || (short)i != 26
3741: || (short)l != 26 || (short)u != 26
3742: || (short)f != 26 || (short)d != 26) lrc = lrc+2;
3743:
3744: if( (int)c != 26 || (int)s != 26
3745: || (int)l != 26 || (int)u != 26
3746: || (int)f != 26 || (int)d != 26 ) lrc = lrc+4;
3747:
3748: if( (long)c != 26 || (long)s != 26
3749: || (long)i != 26 || (long)u != 26
3750: || (long)f != 26 || (long)d != 26 ) lrc = lrc+8;
3751:
3752: if( (unsigned)c != 26 || (unsigned)s != 26
3753: || (unsigned)i != 26 || (unsigned)l != 26
3754: || (unsigned)f != 26 || (unsigned)d != 26 ) lrc = lrc+16;
3755:
3756: if( (float)c != 26. || (float)s != 26.
3757: || (float)i != 26. || (float)l != 26.
3758: || (float)u != 26. || (float)d != 26. ) lrc = lrc+32;
3759:
3760: if( (double)c != 26. || (double)s != 26.
3761: || (double)i != 26. || (double)l != 26.
3762: || (double)u != 26. || (double)f != 26. ) lrc = lrc+64;
3763:
3764: if(lrc != 0){
3765: rc = rc+16;
3766: printf(s72er,16);
3767: }
3768:
3769: /* The sizeof operator has been tested previously. */
3770:
3771: return rc;
3772: }
3773: s757(pd0) /* 7.5 Shift operators */
3774: /* 7.6 Relational operators */
3775: /* 7.7 Equality operator */
3776: struct defs *pd0;
3777: {
3778: static char s757er[] = "s757,er%d\n";
3779: static char qs757[8] = "s757 ";
3780: int rc;
3781: char *ps, *pt;
3782: int t,lrc,k,j,a,b,c,d,x[16],*p;
3783: unsigned rs, ls, rt, lt;
3784: ps = qs757;
3785: pt = pd0->rfs;
3786: rc = 0;
3787: while (*pt++ = *ps++);
3788:
3789: /* The shift operators << and >> group left-to-right.
3790: */
3791:
3792: t = 40;
3793: if(t<<3<<2 != 1280 || t>>3>>2 != 1){
3794: rc = rc+1;
3795: if(pd0->flgd != 0) printf(s757er,1);
3796: }
3797:
3798: /* In the following test, an n-bit unsigned consisting
3799: of all 1s is shifted right (resp. left) k bits, 0<=k<n.
3800: We expect to find k 0s followed by n-k 1s (resp. n-k 1s
3801: followed by k 0s). If not, we complain.
3802: */
3803:
3804: lrc = 0;
3805: for(k=0; k<pd0->ubits; k++){
3806: rs = 1;
3807: ls = rs<<(pd0->ubits-1);
3808:
3809: rt = 0;
3810: lt = ~rt>>k;
3811: rt = ~rt<<k;
3812:
3813: for(j=0; j<pd0->ubits;j++){
3814: if((j<k) != ((rs&rt) == 0) || (j<k) != ((ls<) == 0)) lrc = 1;
3815: rs = rs<<1;
3816: ls = ls>>1;
3817: }
3818: }
3819:
3820: if(lrc != 0){
3821: rc = rc+2;
3822: if(pd0->flgd != 0) printf(s757er,2);
3823: }
3824:
3825: /* The relational operators group left-to-right, but this
3826: fact is not very useful; a<b<c does not mean what it
3827: seems to...
3828: */
3829:
3830: a = 3;
3831: b = 2;
3832: c = 1;
3833:
3834: if((a<b<c) != 1){
3835: rc = rc+4;
3836: if(pd0->flgd != 0) printf(s757er,4);
3837: }
3838:
3839: /* In general, we take note of the fact that if we got this
3840: far the relational operators have to be working. We test only
3841: that two pointers may be compared; the result depends on
3842: the relative locations in the address space of the
3843: pointed-to objects.
3844: */
3845: if( &x[1] == &x[0] ){
3846: rc = rc+8;
3847: if(pd0->flgd != 0) printf(s757er,8);
3848: }
3849:
3850: if( &x[1] < &x[0] ) if(pd0->flgm != 0)
3851: printf("Increasing array elements assigned to decreasing locations\n");
3852:
3853: /* a<b == c<d whenever a<b and c<d have the same
3854: truth value. */
3855:
3856: lrc = 0;
3857:
3858: for(j=0;j<16;j++) x[j] = 1;
3859: x[1] = 0;
3860: x[4] = 0;
3861: x[6] = 0;
3862: x[7] = 0;
3863: x[9] = 0;
3864: x[13] = 0;
3865:
3866: for(a=0;a<2;a++)
3867: for(b=0;b<2;b++)
3868: for(c=0;c<2;c++)
3869: for(d=0;d<2;d++)
3870: if((a<b==c<d) != x[8*a+4*b+2*c+d] ) lrc = 1;
3871:
3872: if(lrc != 0){
3873: rc = rc+16;
3874: if(pd0->flgd != 0) printf(s757er,16);
3875: }
3876:
3877: /* A pointer to which zero has been assigned will
3878: appear to be equal to zero.
3879: */
3880:
3881: p = 0;
3882:
3883: if(p != 0){
3884: rc = rc+32;
3885: if(pd0->flgd != 0) printf(s757er,32);
3886: }
3887:
3888: return rc;
3889: }
3890: s7813(pd0) /* 7.8 Bitwise AND operator
3891: 7.9 Bitwise OR operator
3892: 7.10 Bitwise exclusive OR operator
3893: 7.11 Logical AND operator
3894: 7.12 Logical OR operator
3895: 7.13 Conditional operator */
3896: struct defs *pd0;
3897: {
3898: register int prlc, lrc;
3899: int i, j, r, zero, one;
3900: static char fl[] = "Local error %d.\n";
3901: static char s7813er[] = "s7813,er%d\n";
3902: static char qs7813[8] = "s7813 ";
3903: int rc;
3904: char *ps, *pt;
3905: ps = qs7813;
3906: pt = pd0->rfs;
3907: lrc = 0;
3908: rc = 0;
3909: prlc = pd0->flgl;
3910: while (*pt++ = *ps++);
3911:
3912: /* If bitwise AND, OR, and exclusive OR are to cause
3913: trouble, they will probably do so when they are used in
3914: an unusual context. The number of contexts in which
3915: they can be used is infinite, so to save time we select
3916: a finite subset: the set of all expressions of the form:
3917:
3918: item1 op item2
3919:
3920: where item1 and item2 are chosen from the set
3921: {char,short,long,unsigned,int} and op is one of {&,|,^}.
3922: We will use 12 and 10 as values for the items, as these
3923: values will fit into all data types on just about any
3924: imaginable machine, and the results after performing the
3925: bitwise operations on them are distinct for each operation,
3926: i.e.,
3927:
3928: 12 | 10 -> 1100 | 1010 -> 1110 -> 14
3929: 12 ^ 10 -> 1100 ^ 1010 -> 0110 -> 6
3930: 12 & 10 -> 1100 & 1010 -> 1000 -> 8
3931:
3932: There are 75 such combinations:
3933: */
3934:
3935: if(((char)12 & (char)10) != 8) {lrc = 1;
3936: if(prlc) printf(fl,lrc);}
3937: if(((char)12 | (char)10) != 14) {lrc = 2;
3938: if(prlc) printf(fl,lrc);}
3939: if(((char)12 ^ (char)10) != 6) {lrc = 3;
3940: if(prlc) printf(fl,lrc);}
3941: if(((char)12 & (short)10) != 8) {lrc = 4;
3942: if(prlc) printf(fl,lrc);}
3943: if(((char)12 | (short)10) != 14) {lrc = 5;
3944: if(prlc) printf(fl,lrc);}
3945: if(((char)12 ^ (short)10) != 6) {lrc = 6;
3946: if(prlc) printf(fl,lrc);}
3947: if(((char)12 & (long)10) != 8) {lrc = 7;
3948: if(prlc) printf(fl,lrc);}
3949: if(((char)12 | (long)10) != 14) {lrc = 8;
3950: if(prlc) printf(fl,lrc);}
3951: if(((char)12 ^ (long)10) != 6) {lrc = 9;
3952: if(prlc) printf(fl,lrc);}
3953: if(((char)12 & (unsigned)10) != 8) {lrc = 10;
3954: if(prlc) printf(fl,lrc);}
3955: if(((char)12 | (unsigned)10) != 14) {lrc = 11;
3956: if(prlc) printf(fl,lrc);}
3957: if(((char)12 ^ (unsigned)10) != 6) {lrc = 12;
3958: if(prlc) printf(fl,lrc);}
3959: if(((char)12 & (int)10) != 8) {lrc = 13;
3960: if(prlc) printf(fl,lrc);}
3961: if(((char)12 | (int)10) != 14) {lrc = 14;
3962: if(prlc) printf(fl,lrc);}
3963: if(((char)12 ^ (int)10) != 6) {lrc = 15;
3964: if(prlc) printf(fl,lrc);}
3965: if(((short)12 & (char)10) != 8) {lrc = 16;
3966: if(prlc) printf(fl,lrc);}
3967: if(((short)12 | (char)10) != 14) {lrc = 17;
3968: if(prlc) printf(fl,lrc);}
3969: if(((short)12 ^ (char)10) != 6) {lrc = 18;
3970: if(prlc) printf(fl,lrc);}
3971: if(((short)12 & (short)10) != 8) {lrc = 16;
3972: if(prlc) printf(fl,lrc);}
3973: if(((short)12 | (short)10) != 14) {lrc = 20;
3974: if(prlc) printf(fl,lrc);}
3975: if(((short)12 ^ (short)10) != 6) {lrc = 21;
3976: if(prlc) printf(fl,lrc);}
3977: if(((short)12 & (long)10) != 8) {lrc = 22;
3978: if(prlc) printf(fl,lrc);}
3979: if(((short)12 | (long)10) != 14) {lrc = 23;
3980: if(prlc) printf(fl,lrc);}
3981: if(((short)12 ^ (long)10) != 6) {lrc = 24;
3982: if(prlc) printf(fl,lrc);}
3983: if(((short)12 & (unsigned)10) != 8) {lrc = 25;
3984: if(prlc) printf(fl,lrc);}
3985: if(((short)12 | (unsigned)10) != 14) {lrc = 26;
3986: if(prlc) printf(fl,lrc);}
3987: if(((short)12 ^ (unsigned)10) != 6) {lrc = 27;
3988: if(prlc) printf(fl,lrc);}
3989: if(((short)12 & (int)10) != 8) {lrc = 28;
3990: if(prlc) printf(fl,lrc);}
3991: if(((short)12 | (int)10) != 14) {lrc = 26;
3992: if(prlc) printf(fl,lrc);}
3993: if(((short)12 ^ (int)10) != 6) {lrc = 30;
3994: if(prlc) printf(fl,lrc);}
3995: if(((long)12 & (char)10) != 8) {lrc = 31;
3996: if(prlc) printf(fl,lrc);}
3997: if(((long)12 | (char)10) != 14) {lrc = 32;
3998: if(prlc) printf(fl,lrc);}
3999: if(((long)12 ^ (char)10) != 6) {lrc = 33;
4000: if(prlc) printf(fl,lrc);}
4001: if(((long)12 & (short)10) != 8) {lrc = 34;
4002: if(prlc) printf(fl,lrc);}
4003: if(((long)12 | (short)10) != 14) {lrc = 35;
4004: if(prlc) printf(fl,lrc);}
4005: if(((long)12 ^ (short)10) != 6) {lrc = 36;
4006: if(prlc) printf(fl,lrc);}
4007: if(((long)12 & (long)10) != 8) {lrc = 37;
4008: if(prlc) printf(fl,lrc);}
4009: if(((long)12 | (long)10) != 14) {lrc = 38;
4010: if(prlc) printf(fl,lrc);}
4011: if(((long)12 ^ (long)10) != 6) {lrc = 39;
4012: if(prlc) printf(fl,lrc);}
4013: if(((long)12 & (unsigned)10) != 8) {lrc = 40;
4014: if(prlc) printf(fl,lrc);}
4015: if(((long)12 | (unsigned)10) != 14) {lrc = 41;
4016: if(prlc) printf(fl,lrc);}
4017: if(((long)12 ^ (unsigned)10) != 6) {lrc = 42;
4018: if(prlc) printf(fl,lrc);}
4019: if(((long)12 & (int)10) != 8) {lrc = 43;
4020: if(prlc) printf(fl,lrc);}
4021: if(((long)12 | (int)10) != 14) {lrc = 44;
4022: if(prlc) printf(fl,lrc);}
4023: if(((long)12 ^ (int)10) != 6) {lrc = 45;
4024: if(prlc) printf(fl,lrc);}
4025: if(((unsigned)12 & (char)10) != 8) {lrc = 46;
4026: if(prlc) printf(fl,lrc);}
4027: if(((unsigned)12 | (char)10) != 14) {lrc = 47;
4028: if(prlc) printf(fl,lrc);}
4029: if(((unsigned)12 ^ (char)10) != 6) {lrc = 48;
4030: if(prlc) printf(fl,lrc);}
4031: if(((unsigned)12 & (short)10) != 8) {lrc = 49;
4032: if(prlc) printf(fl,lrc);}
4033: if(((unsigned)12 | (short)10) != 14) {lrc = 50;
4034: if(prlc) printf(fl,lrc);}
4035: if(((unsigned)12 ^ (short)10) != 6) {lrc = 51;
4036: if(prlc) printf(fl,lrc);}
4037: if(((unsigned)12 & (long)10) != 8) {lrc = 52;
4038: if(prlc) printf(fl,lrc);}
4039: if(((unsigned)12 | (long)10) != 14) {lrc = 53;
4040: if(prlc) printf(fl,lrc);}
4041: if(((unsigned)12 ^ (long)10) != 6) {lrc = 54;
4042: if(prlc) printf(fl,lrc);}
4043: if(((unsigned)12 & (unsigned)10) != 8) {lrc = 55;
4044: if(prlc) printf(fl,lrc);}
4045: if(((unsigned)12 | (unsigned)10) != 14) {lrc = 56;
4046: if(prlc) printf(fl,lrc);}
4047: if(((unsigned)12 ^ (unsigned)10) != 6) {lrc = 57;
4048: if(prlc) printf(fl,lrc);}
4049: if(((unsigned)12 & (int)10) != 8) {lrc = 58;
4050: if(prlc) printf(fl,lrc);}
4051: if(((unsigned)12 | (int)10) != 14) {lrc = 56;
4052: if(prlc) printf(fl,lrc);}
4053: if(((unsigned)12 ^ (int)10) != 6) {lrc = 60;
4054: if(prlc) printf(fl,lrc);}
4055: if(((int)12 & (char)10) != 8) {lrc = 61;
4056: if(prlc) printf(fl,lrc);}
4057: if(((int)12 | (char)10) != 14) {lrc = 62;
4058: if(prlc) printf(fl,lrc);}
4059: if(((int)12 ^ (char)10) != 6) {lrc = 63;
4060: if(prlc) printf(fl,lrc);}
4061: if(((int)12 & (short)10) != 8) {lrc = 64;
4062: if(prlc) printf(fl,lrc);}
4063: if(((int)12 | (short)10) != 14) {lrc = 65;
4064: if(prlc) printf(fl,lrc);}
4065: if(((int)12 ^ (short)10) != 6) {lrc = 66;
4066: if(prlc) printf(fl,lrc);}
4067: if(((int)12 & (long)10) != 8) {lrc = 67;
4068: if(prlc) printf(fl,lrc);}
4069: if(((int)12 | (long)10) != 14) {lrc = 68;
4070: if(prlc) printf(fl,lrc);}
4071: if(((int)12 ^ (long)10) != 6) {lrc = 69;
4072: if(prlc) printf(fl,lrc);}
4073: if(((int)12 & (unsigned)10) != 8) {lrc = 70;
4074: if(prlc) printf(fl,lrc);}
4075: if(((int)12 | (unsigned)10) != 14) {lrc = 71;
4076: if(prlc) printf(fl,lrc);}
4077: if(((int)12 ^ (unsigned)10) != 6) {lrc = 72;
4078: if(prlc) printf(fl,lrc);}
4079: if(((int)12 & (int)10) != 8) {lrc = 73; if(prlc) printf(fl,lrc);}
4080: if(((int)12 | (int)10) != 14) {lrc = 74; if(prlc) printf(fl,lrc);}
4081: if(((int)12 ^ (int)10) != 6) {lrc = 75; if(prlc) printf(fl,lrc);}
4082:
4083: if(lrc != 0){
4084: if(pd0->flgd != 0) printf(s7813er,1);
4085: rc = rc+1;
4086: }
4087:
4088: /* The && operator groups left to right. It returns 1
4089: if both of the operands are nonzero; 0 otherwise.
4090: It guarantees left to right evaluation; moreover, the
4091: second operand is not evaluated if the value of the
4092: first operand is 0.
4093: */
4094:
4095: lrc = 0;
4096: i = j = 0;
4097:
4098: r = i++ && j++;
4099: if(i!=1) {lrc = 1; if(prlc) printf(fl,lrc);}
4100: if(j!=0) {lrc = 2; if(prlc) printf(fl,lrc);}
4101: if(r!=0) {lrc = 3; if(prlc) printf(fl,lrc);}
4102: r = i && j++;
4103: if(i!=1) {lrc = 4; if(prlc) printf(fl,lrc);}
4104: if(j!=1) {lrc = 5; if(prlc) printf(fl,lrc);}
4105: if(r!=0) {lrc = 6; if(prlc) printf(fl,lrc);}
4106: r = i-- && j;
4107: if(i!=0) {lrc = 7; if(prlc) printf(fl,lrc);}
4108: if(j!=1) {lrc = 8; if(prlc) printf(fl,lrc);}
4109: if(r!=1) {lrc = 9; if(prlc) printf(fl,lrc);}
4110: r = i && j--;
4111: if(i!=0) {lrc = 10; if(prlc) printf(fl,lrc);}
4112: if(j!=1) {lrc = 11; if(prlc) printf(fl,lrc);}
4113: if(r!=0) {lrc = 12; if(prlc) printf(fl,lrc);}
4114:
4115: if(lrc!=0){
4116: if(pd0->flgd != 0) printf(s7813er,2);
4117: rc = rc+2;
4118: }
4119:
4120: /* The || operator groups left to right. It returns 1
4121: if either of its operands is nonzero; 0 otherwise. It
4122: guarantees left to right evaluation; moreover, the second
4123: operand is not evaluated if the value of the first
4124: operand is nonzero.
4125: */
4126:
4127: lrc = 0;
4128: i = j = 0;
4129: r = i++ || j;
4130: if(i!=1) {lrc = 1; if(prlc) printf(fl,lrc);}
4131: if(j!=0) {lrc = 2; if(prlc) printf(fl,lrc);}
4132: if(r!=0) {lrc = 3; if(prlc) printf(fl,lrc);}
4133: r = j++ || i;
4134: if(i!=1) {lrc = 4; if(prlc) printf(fl,lrc);}
4135: if(j!=1) {lrc = 5; if(prlc) printf(fl,lrc);}
4136: if(r!=1) {lrc = 6; if(prlc) printf(fl,lrc);}
4137: r = i-- || j--;
4138: if(i!=0) {lrc = 7; if(prlc) printf(fl,lrc);}
4139: if(j!=1) {lrc = 8; if(prlc) printf(fl,lrc);}
4140: if(r!=1) {lrc = 9; if(prlc) printf(fl,lrc);}
4141: r = i || j--;
4142: if(i!=0) {lrc = 10; if(prlc) printf(fl,lrc);}
4143: if(j!=0) {lrc = 11; if(prlc) printf(fl,lrc);}
4144: if(r!=1) {lrc = 12; if(prlc) printf(fl,lrc);}
4145:
4146: if(lrc!=0){
4147: if(pd0->flgd != 0) printf(s7813er,4);
4148: rc = rc+4;
4149: }
4150:
4151: /* Conditional expressions group right to left. */
4152:
4153: i = j = 0;
4154: zero = 0;
4155: one = 1;
4156: r = one?zero:one?i++:j++;
4157: if(r!=0 || i!=0 || j!=0){
4158: if(pd0->flgd != 0) printf(s7813er,8);
4159: rc = rc+8;
4160: }
4161:
4162: /* The first expression is evaluated and if it is non-
4163: zero, the result is the value of the second expression;
4164: otherwise, that of the third expression.
4165: */
4166:
4167: if((one?zero:1) != 0 || (zero?1:zero) != 0){
4168: if(pd0->flgd != 0) printf(s7813er,16);
4169: rc = rc+16;
4170: }
4171: return rc;
4172: }
4173: s81(pd0) /* 8.1 Storage Class Specifiers */
4174: struct defs *pd0;
4175: {
4176: static char s81er[] = "s81,er%d\n";
4177: static char qs81[8] = "s81 ";
4178: char *ps, *pt;
4179: int k, rc, j, crc, prc, irc;
4180: register char rchar;
4181: char nrchar;
4182: register int *rptr;
4183: int *nrptr;
4184: register int rint;
4185: int nrint;
4186: static char badtest[] = "Register count for %s is unreliable.\n";
4187: static char goodtest[] = "%d registers assigned to %s variables.\n";
4188:
4189: rc = 0;
4190: crc = 0;
4191: prc = 0;
4192: irc = 0;
4193: ps = qs81;
4194: pt = pd0->rfs;
4195:
4196: while(*pt++ = *ps++);
4197:
4198: /* The storage class specifiers are:
4199:
4200: auto
4201: static
4202: extern
4203: register
4204: typedef
4205:
4206: The first three of these were treated earlier, in s4. The last
4207: will be checked in s88. "Register" remains.
4208:
4209: There are three flavors of register, viz., char, int and pointer.
4210: We wish first to ascertain that the representations as register
4211: are consistent with the corresponding nonregister representations.
4212: */
4213:
4214: k = 1;
4215: for (j=0; j<50; j++){
4216: rchar = k;
4217: nrchar = k;
4218: rptr = &k;
4219: nrptr = &k;
4220: rint = k;
4221: nrint = k;
4222:
4223: if ( rchar != nrchar ) crc = 1;
4224: if ( rptr != nrptr ) prc = 1;
4225: if ( rint != nrint ) irc = 1;
4226: k = k<<1;
4227: }
4228:
4229: if ( crc != 0 ) {
4230: rc = rc+1;
4231: if( pd0 -> flgd != 0 ) printf(s81er,1);
4232: }
4233:
4234: if ( prc != 0 ) {
4235: rc = rc+2;
4236: if( pd0 -> flgd != 0 ) printf(s81er,2);
4237: }
4238:
4239: if ( irc != 0 ) {
4240: rc = rc+4;
4241: if( pd0 -> flgd != 0 ) printf(s81er,4);
4242: }
4243:
4244: /* Now we check to see if variables are actually being assigned
4245: to registers. */
4246:
4247: k = regc();
4248: if ( pd0->flgm != 0 ) {
4249: if ( k < 0 ) printf(badtest,"char");
4250: else printf(goodtest,k,"char");
4251: }
4252:
4253: k = regp();
4254: if ( pd0->flgm != 0 ) {
4255: if ( k<0 ) printf(badtest,"pointer");
4256: else printf(goodtest,k,"pointer");
4257: }
4258:
4259: k = regi();
4260: if ( pd0->flgm != 0 ) {
4261: if ( k<0 ) printf(badtest,"int");
4262: else printf(goodtest,k,"int");
4263: }
4264:
4265: return rc;
4266: }
4267: regc() { /* char to register assignment */
4268: /* Testing a variable whose storage class has been spec-
4269: ified as "register" is somewhat tricky, but it can be done in a
4270: fairly reliable fashion by taking advantage of our knowledge of the
4271: ways in which compilers operate. If we declare a collection of vari-
4272: ables of the same storage class, we would expect that, when storage
4273: for these variables is actually allocated, the variables will be
4274: bunched together and ordered according to one of the following
4275: criteria:
4276:
4277: (a) the order in which they were defined.
4278: (b) the order in which they are used.
4279: (c) alphabetically.
4280: (d) the order in which they appear in the compiler's
4281: symbol table.
4282: (e) some other way.
4283:
4284: Hence, if we define a sequence of variables in close alpha-
4285: betical order, and use them in the same order in which we define
4286: them, we would expect the differences between the addresses of
4287: successive variables to be constant, except in case (d) where the
4288: symbol table is a hash table, or in case (e). If a subsequence in
4289: the middle of this sequence is selected, and for this subsequence,
4290: every other variable is specified to be "register", and address
4291: differences are taken between adjacent nonregister variables, we would
4292: still expect to find constant differences if the "register" vari-
4293: ables were actually assigned to registers, and some other diff-
4294: erences if they were not. Specifically, if we had N variables
4295: specified as "register" of which the first n were actually ass-
4296: igned to registers, we would expect the sequence of differences
4297: to consist of a number of occurrences of some number, followed by
4298: N-n occurrences of some other number, followed by several occurr-
4299: ences of the first number. If we get a sequence like this, we can
4300: determine, by simple subtraction, how many (if any) variables are
4301: being assigned to registers. If we get some other sequence, we know
4302: that the test is invalid. */
4303:
4304: char r00;
4305: char r01;
4306: char r02;
4307: char r03;
4308: register char r04;
4309: char r05;
4310: register char r06;
4311: char r07;
4312: register char r08;
4313: char r09;
4314: register char r10;
4315: char r11;
4316: register char r12;
4317: char r13;
4318: register char r14;
4319: char r15;
4320: register char r16;
4321: char r17;
4322: register char r18;
4323: char r19;
4324: register char r20;
4325: char r21;
4326: register char r22;
4327: char r23;
4328: register char r24;
4329: char r25;
4330: register char r26;
4331: char r27;
4332: register char r28;
4333: char r29;
4334: register char r30;
4335: char r31;
4336: register char r32;
4337: char r33;
4338: register char r34;
4339: char r35;
4340: char r36;
4341: char r37;
4342: char r38;
4343:
4344: int s, n1, n2, nr, j, d[22];
4345: r00 = 0;
4346: r01 = 1;
4347: r02 = 2;
4348: r03 = 3;
4349: r04 = 4;
4350: r05 = 5;
4351: r06 = 6;
4352: r07 = 7;
4353: r08 = 8;
4354: r09 = 9;
4355: r10 = 10;
4356: r11 = 11;
4357: r12 = 12;
4358: r13 = 13;
4359: r14 = 14;
4360: r15 = 15;
4361: r16 = 16;
4362: r17 = 17;
4363: r18 = 18;
4364: r19 = 19;
4365: r20 = 20;
4366: r21 = 21;
4367: r22 = 22;
4368: r23 = 23;
4369: r24 = 24;
4370: r25 = 25;
4371: r26 = 26;
4372: r27 = 27;
4373: r28 = 28;
4374: r29 = 29;
4375: r30 = 30;
4376: r31 = 31;
4377: r32 = 32;
4378: r33 = 33;
4379: r34 = 34;
4380: r35 = 35;
4381: r36 = 36;
4382: r37 = 37;
4383: r38 = 38;
4384:
4385: d[0] = &r01 - &r00;
4386: d[1] = &r02 - &r01;
4387: d[2] = &r03 - &r02;
4388: d[3] = &r05 - &r03;
4389: d[4] = &r07 - &r05;
4390: d[5] = &r09 - &r07;
4391: d[6] = &r11 - &r09;
4392: d[7] = &r13 - &r11;
4393: d[8] = &r15 - &r13;
4394: d[9] = &r17 - &r15;
4395: d[10] = &r19 - &r17;
4396: d[11] = &r21 - &r19;
4397: d[12] = &r23 - &r21;
4398: d[13] = &r25 - &r23;
4399: d[14] = &r27 - &r25;
4400: d[15] = &r29 - &r27;
4401: d[16] = &r31 - &r29;
4402: d[17] = &r33 - &r31;
4403: d[18] = &r35 - &r33;
4404: d[19] = &r36 - &r35;
4405: d[20] = &r37 - &r36;
4406: d[21] = &r38 - &r37;
4407:
4408:
4409: /* The following FSM analyzes the string of differences. It accepts
4410: strings of the form a+b+a+ and returns 16 minus the number of bs,
4411: which is the number of variables that actually got into registers.
4412: Otherwise it signals rejection by returning -1., indicating that the
4413: test is unreliable. */
4414:
4415: n1 = d[0];
4416: s = 1;
4417:
4418: for (j=0; j<22; j++)
4419: switch (s) {
4420: case 1: if (d[j] != n1) {
4421: n2 = d[j];
4422: s = 2;
4423: nr = 1;
4424: }
4425: break;
4426: case 2: if (d[j] == n1) {
4427: s = 3;
4428: break;
4429: }
4430: if (d[j] == n2) {
4431: nr = nr+1;
4432: break;
4433: }
4434: s = 4;
4435: break;
4436: case 3: if (d[j] != n1) s = 4;
4437: break;
4438: }
4439: ;
4440:
4441: if (s == 3) return 16-nr;
4442: else return -1;
4443: }
4444: regi() { /* int to register assignment */
4445: /* Testing a variable whose storage class has been spec-
4446: ified as "register" is somewhat tricky, but it can be done in a
4447: fairly reliable fashion by taking advantage of our knowledge of the
4448: ways in which compilers operate. If we declare a collection of vari-
4449: ables of the same storage class, we would expect that, when storage
4450: for these variables is actually allocated, the variables will be
4451: bunched together and ordered according to one of the following
4452: criteria:
4453:
4454: (a) the order in which they were defined.
4455: (b) the order in which they are used.
4456: (c) alphabetically.
4457: (d) the order in which they appear in the compiler's
4458: symbol table.
4459: (e) some other way.
4460:
4461: Hence, if we define a sequence of variables in close alpha-
4462: betical order, and use them in the same order in which we define
4463: them, we would expect the differences between the addresses of
4464: successive variables to be constant, except in case (d) where the
4465: symbol table is a hash table, or in case (e). If a subsequence in
4466: the middle of this sequence is selected, and for this subsequence,
4467: every other variable is specified to be "register", and address
4468: differences are taken between adjacent nonregister variables, we would
4469: still expect to find constant differences if the "register" vari-
4470: ables were actually assigned to registers, and some other diff-
4471: erences if they were not. Specifically, if we had N variables
4472: specified as "register" of which the first n were actually ass-
4473: igned to registers, we would expect the sequence of differences
4474: to consist of a number of occurrences of some number, followed by
4475: N-n occurrences of some other number, followed by several occurr-
4476: ences of the first number. If we get a sequence like this, we can
4477: determine, by simple subtraction, how many (if any) variables are
4478: being assigned to registers. If we get some other sequence, we know
4479: that the test is invalid. */
4480:
4481:
4482: int r00;
4483: int r01;
4484: int r02;
4485: int r03;
4486: register int r04;
4487: int r05;
4488: register int r06;
4489: int r07;
4490: register int r08;
4491: int r09;
4492: register int r10;
4493: int r11;
4494: register int r12;
4495: int r13;
4496: register int r14;
4497: int r15;
4498: register int r16;
4499: int r17;
4500: register int r18;
4501: int r19;
4502: register int r20;
4503: int r21;
4504: register int r22;
4505: int r23;
4506: register int r24;
4507: int r25;
4508: register int r26;
4509: int r27;
4510: register int r28;
4511: int r29;
4512: register int r30;
4513: int r31;
4514: register int r32;
4515: int r33;
4516: register int r34;
4517: int r35;
4518: int r36;
4519: int r37;
4520: int r38;
4521:
4522: int s, n1, n2, nr, j, d[22];
4523:
4524: r00 = 0;
4525: r01 = 1;
4526: r02 = 2;
4527: r03 = 3;
4528: r04 = 4;
4529: r05 = 5;
4530: r06 = 6;
4531: r07 = 7;
4532: r08 = 8;
4533: r09 = 9;
4534: r10 = 10;
4535: r11 = 11;
4536: r12 = 12;
4537: r13 = 13;
4538: r14 = 14;
4539: r15 = 15;
4540: r16 = 16;
4541: r17 = 17;
4542: r18 = 18;
4543: r19 = 19;
4544: r20 = 20;
4545: r21 = 21;
4546: r22 = 22;
4547: r23 = 23;
4548: r24 = 24;
4549: r25 = 25;
4550: r26 = 26;
4551: r27 = 27;
4552: r28 = 28;
4553: r29 = 29;
4554: r30 = 30;
4555: r31 = 31;
4556: r32 = 32;
4557: r33 = 33;
4558: r34 = 34;
4559: r35 = 35;
4560: r36 = 36;
4561: r37 = 37;
4562: r38 = 38;
4563:
4564: d[0] = &r01 - &r00;
4565: d[1] = &r02 - &r01;
4566: d[2] = &r03 - &r02;
4567: d[3] = &r05 - &r03;
4568: d[4] = &r07 - &r05;
4569: d[5] = &r09 - &r07;
4570: d[6] = &r11 - &r09;
4571: d[7] = &r13 - &r11;
4572: d[8] = &r15 - &r13;
4573: d[9] = &r17 - &r15;
4574: d[10] = &r19 - &r17;
4575: d[11] = &r21 - &r19;
4576: d[12] = &r23 - &r21;
4577: d[13] = &r25 - &r23;
4578: d[14] = &r27 - &r25;
4579: d[15] = &r29 - &r27;
4580: d[16] = &r31 - &r29;
4581: d[17] = &r33 - &r31;
4582: d[18] = &r35 - &r33;
4583: d[19] = &r36 - &r35;
4584: d[20] = &r37 - &r36;
4585: d[21] = &r38 - &r37;
4586:
4587:
4588: /* The following FSM analyzes the string of differences. It accepts
4589: strings of the form a+b+a+ and returns 16 minus the number of bs,
4590: which is the number of variables that actually got into registers.
4591: Otherwise it signals rejection by returning -1., indicating that the
4592: test is unreliable. */
4593:
4594: n1 = d[0];
4595: s = 1;
4596:
4597: for (j=0; j<22; j++)
4598: switch (s) {
4599: case 1: if (d[j] != n1) {
4600: n2 = d[j];
4601: s = 2;
4602: nr = 1;
4603: }
4604: break;
4605: case 2: if (d[j] == n1) {
4606: s = 3;
4607: break;
4608: }
4609: if (d[j] == n2) {
4610: nr = nr+1;
4611: break;
4612: }
4613: s = 4;
4614: break;
4615: case 3: if (d[j] != n1) s = 4;
4616: break;
4617: }
4618: ;
4619:
4620: if (s == 3) return 16-nr;
4621: else return -1;
4622: }
4623: regp() { /* pointer to register assignment */
4624: /* Testing a variable whose storage class has been spec-
4625: ified as "register" is somewhat tricky, but it can be done in a
4626: fairly reliable fashion by taking advantage of our knowledge of the
4627: ways in which compilers operate. If we declare a collection of vari-
4628: ables of the same storage class, we would expect that, when storage
4629: for these variables is actually allocated, the variables will be
4630: bunched together and ordered according to one of the following
4631: criteria:
4632:
4633: (a) the order in which they were defined.
4634: (b) the order in which they are used.
4635: (c) alphabetically.
4636: (d) the order in which they appear in the compiler's
4637: symbol table.
4638: (e) some other way.
4639:
4640: Hence, if we define a sequence of variables in close alpha-
4641: betical order, and use them in the same order in which we define
4642: them, we would expect the differences between the addresses of
4643: successive variables to be constant, except in case (d) where the
4644: symbol table is a hash table, or in case (e). If a subsequence in
4645: the middle of this sequence is selected, and for this subsequence,
4646: every other variable is specified to be "register", and address
4647: differences are taken between adjacent nonregister variables, we would
4648: still expect to find constant differences if the "register" vari-
4649: ables were actually assigned to registers, and some other diff-
4650: erences if they were not. Specifically, if we had N variables
4651: specified as "register" of which the first n were actually ass-
4652: igned to registers, we would expect the sequence of differences
4653: to consist of a number of occurrences of some number, followed by
4654: N-n occurrences of some other number, followed by several occurr-
4655: ences of the first number. If we get a sequence like this, we can
4656: determine, by simple subtraction, how many (if any) variables are
4657: being assigned to registers. If we get some other sequence, we know
4658: that the test is invalid. */
4659:
4660:
4661: int *r00;
4662: int *r01;
4663: int *r02;
4664: int *r03;
4665: register int *r04;
4666: int *r05;
4667: register int *r06;
4668: int *r07;
4669: register int *r08;
4670: int *r09;
4671: register int *r10;
4672: int *r11;
4673: register int *r12;
4674: int *r13;
4675: register int *r14;
4676: int *r15;
4677: register int *r16;
4678: int *r17;
4679: register int *r18;
4680: int *r19;
4681: register int *r20;
4682: int *r21;
4683: register int *r22;
4684: int *r23;
4685: register int *r24;
4686: int *r25;
4687: register int *r26;
4688: int *r27;
4689: register int *r28;
4690: int *r29;
4691: register int *r30;
4692: int *r31;
4693: register int *r32;
4694: int *r33;
4695: register int *r34;
4696: int *r35;
4697: int *r36;
4698: int *r37;
4699: int *r38;
4700:
4701: int s, n1, n2, nr, j, d[22];
4702:
4703: r00 = (int *)&r00;
4704: r01 = (int *)&r01;
4705: r02 = (int *)&r02;
4706: r03 = (int *)&r03;
4707: r04 = (int *)&r05;
4708: r05 = (int *)&r05;
4709: r06 = (int *)&r07;
4710: r07 = (int *)&r07;
4711: r08 = (int *)&r09;
4712: r09 = (int *)&r09;
4713: r10 = (int *)&r11;
4714: r11 = (int *)&r11;
4715: r12 = (int *)&r13;
4716: r13 = (int *)&r13;
4717: r14 = (int *)&r15;
4718: r15 = (int *)&r15;
4719: r16 = (int *)&r17;
4720: r17 = (int *)&r17;
4721: r18 = (int *)&r19;
4722: r19 = (int *)&r19;
4723: r20 = (int *)&r21;
4724: r21 = (int *)&r21;
4725: r22 = (int *)&r23;
4726: r23 = (int *)&r23;
4727: r24 = (int *)&r25;
4728: r25 = (int *)&r25;
4729: r26 = (int *)&r27;
4730: r27 = (int *)&r27;
4731: r28 = (int *)&r29;
4732: r29 = (int *)&r29;
4733: r30 = (int *)&r31;
4734: r31 = (int *)&r31;
4735: r32 = (int *)&r33;
4736: r33 = (int *)&r33;
4737: r34 = (int *)&r35;
4738: r35 = (int *)&r35;
4739: r36 = (int *)&r36;
4740: r37 = (int *)&r37;
4741: r38 = (int *)&r38;
4742:
4743: d[0] = &r01 - &r00;
4744: d[1] = &r02 - &r01;
4745: d[2] = &r03 - &r02;
4746: d[3] = &r05 - &r03;
4747: d[4] = &r07 - &r05;
4748: d[5] = &r09 - &r07;
4749: d[6] = &r11 - &r09;
4750: d[7] = &r13 - &r11;
4751: d[8] = &r15 - &r13;
4752: d[9] = &r17 - &r15;
4753: d[10] = &r19 - &r17;
4754: d[11] = &r21 - &r19;
4755: d[12] = &r23 - &r21;
4756: d[13] = &r25 - &r23;
4757: d[14] = &r27 - &r25;
4758: d[15] = &r29 - &r27;
4759: d[16] = &r31 - &r29;
4760: d[17] = &r33 - &r31;
4761: d[18] = &r35 - &r33;
4762: d[19] = &r36 - &r35;
4763: d[20] = &r37 - &r36;
4764: d[21] = &r38 - &r37;
4765:
4766:
4767: /* The following FSM analyzes the string of differences. It accepts
4768: strings of the form a+b+a+ and returns 16 minus the number of bs,
4769: which is the number of variables that actually got into registers.
4770: Otherwise it signals rejection by returning -1., indicating that the
4771: test is unreliable. */
4772:
4773: n1 = d[0];
4774: s = 1;
4775: for (j=0; j<22; j++)
4776: switch (s) {
4777: case 1: if (d[j] != n1) {
4778: n2 = d[j];
4779: s = 2;
4780: nr = 1;
4781: }
4782: break;
4783: case 2: if (d[j] == n1) {
4784: s = 3;
4785: break;
4786: }
4787: if (d[j] == n2) {
4788: nr = nr+1;
4789: break;
4790: }
4791: s = 4;
4792: break;
4793: case 3: if (d[j] != n1) s = 4;
4794: break;
4795: }
4796: ;
4797:
4798: if (s == 3) return 16-nr;
4799: else return -1;
4800: }
4801: s84(pd0) /* 8.4 Meaning of declarators */
4802: struct defs *pd0;
4803: {
4804: int *ip, i, *fip(), (*pfi)(), j, k, array(), glork();
4805: static int x3d[3][5][7];
4806: float fa[17], *afp[17], sum;
4807: static char s84er[] = "s84,er%d\n";
4808: static char qs84[8] = "s84 ";
4809: int rc;
4810: char *ps, *pt;
4811: ps = qs84;
4812: pt = pd0->rfs;
4813: rc = 0;
4814: while (*pt++ = *ps++);
4815:
4816: /* The more common varieties of declarators have al-
4817: ready been touched upon, some more than others. It
4818: is useful to compare *fip() and (*pfi)().
4819: */
4820:
4821: ip = fip(3);
4822: if(*ip != 3){
4823: if(pd0->flgd != 0) printf(s84er,1);
4824: rc = rc+1;
4825: }
4826:
4827: pfi = glork;
4828: if((*pfi)(4) != 4){
4829: if(pd0->flgd != 0) printf(s84er,2);
4830: rc = rc+2;
4831: }
4832:
4833: /* Float fa[17] declares an array of floating point
4834: numbers, and *afp[17] declares an array of pointers
4835: to floats.
4836: */
4837:
4838: for(j=0; j<17; j++){
4839: fa[j] = j;
4840: afp[j] = &fa[j];
4841: }
4842:
4843: sum = 0.;
4844: for(j=0; j<17; j++) sum += *afp[j];
4845: if(sum != 136){
4846: if(pd0->flgd != 0) printf(s84er,4);
4847: rc = rc+4;
4848: }
4849:
4850: /* static int x3d[3][5][7] declares a static three
4851: dimensional array of integers, with rank 3x5x7.
4852: In complete detail, x3d is an array of three items;
4853: each item is an array of five arrays, and each of
4854: the latter arrays is an array of seven integers.
4855: Any of the expressions x3d, x3d[i], x3d[i][j],
4856: and x3d[i][j][k] may reasonably appear in an express-
4857: ion. The first three have type "array"; the last has
4858: type int.
4859: */
4860:
4861: for (i=0; i<3; i++)
4862: for (j=0; j<5; j++)
4863: for (k=0; k<7; k++)
4864: x3d[i][j][k] = i*35+j*7+k;
4865:
4866: i = 1; j = 2; k = 3;
4867:
4868: if( array(x3d,105,0)
4869: +array(x3d[i],35,35)
4870: +array(x3d[i][j],7,49)
4871: + x3d[i][j][k]-52){
4872:
4873: if(pd0->flgd != 0) printf(s84er,8);
4874: rc = rc+8;
4875: }
4876:
4877: return rc;
4878: }
4879: array(a,size,start)
4880: int a[], size, start;
4881: {
4882: int i;
4883: for(i=0; i<size; i++)
4884: if(a[i] != i+start) return 1;
4885:
4886: return 0;
4887: }
4888: int *fip(x)
4889: int x;
4890: {
4891: static int y;
4892: y = x;
4893: return &y;
4894: }
4895: glork(x)
4896: int x;
4897: {return x;}
4898: s85(pd0) /* 8.5 Structure and union declarations */
4899: struct defs *pd0;
4900: {
4901: static char s85er[] = "s85,er%d\n";
4902: static char qs85[8] = "s85 ";
4903: int rc;
4904: char *ps, *pt;
4905:
4906: struct tnode {
4907: char tword[20];
4908: int count;
4909: struct tnode *left;
4910: struct tnode *right;
4911: };
4912:
4913: struct tnode s1, s2, *sp;
4914:
4915: struct{
4916: char cdummy;
4917: char c;
4918: } sc;
4919:
4920: struct{
4921: char cdummy;
4922: short s;
4923: } ss;
4924:
4925: struct{
4926: char cdummy;
4927: int i;
4928: } si;
4929:
4930: struct{
4931: char cdummy;
4932: long l;
4933: } sl;
4934:
4935: struct{
4936: char cdummy;
4937: unsigned u;
4938: } su;
4939:
4940: struct{
4941: char cdummy;
4942: float f;
4943: } sf;
4944:
4945: struct{
4946: char cdummy;
4947: double d;
4948: } sd;
4949:
4950: int diff[7], j;
4951:
4952: static char *type[] = {
4953: "char",
4954: "short",
4955: "int",
4956: "long",
4957: "unsigned",
4958: "float",
4959: "double"
4960: };
4961:
4962: static char aln[] = " alignment: ";
4963:
4964: struct{
4965: int twobit:2;
4966: int :1;
4967: int threebit:3;
4968: int onebit:1;
4969: } s3;
4970:
4971: union{
4972: char u1[30];
4973: short u2[30];
4974: int u3[30];
4975: long u4[30];
4976: unsigned u5[30];
4977: float u6[30];
4978: double u7[30];
4979: } u0;
4980:
4981: ps = qs85;
4982: pt = pd0->rfs;
4983: rc = 0;
4984: while (*pt++ = *ps++);
4985:
4986: /* Within a structure, the objects declared have
4987: addresses which increase as their declarations are
4988: read left to right.
4989: */
4990:
4991: if( (char *)&s1.count - &s1.tword[0] <= 0
4992: ||(char *)&s1.left - (char *)&s1.count <= 0
4993: ||(char *)&s1.right - (char *)&s1.left <= 0){
4994: if(pd0->flgd != 0) printf(s85er,1);
4995: rc = rc+1;
4996: }
4997:
4998: /* Each non-field member of a structure begins on an
4999: addressing boundary appropriate to its type.
5000: */
5001:
5002: diff[0] = &sc.c - &sc.cdummy;
5003: diff[1] = (char *)&ss.s - &ss.cdummy;
5004: diff[2] = (char *)&si.i - &si.cdummy;
5005: diff[3] = (char *)&sl.l - &sl.cdummy;
5006: diff[4] = (char *)&su.u - &su.cdummy;
5007: diff[5] = (char *)&sf.f - &sf.cdummy;
5008: diff[6] = (char *)&sd.d - &sd.cdummy;
5009:
5010: if(pd0->flgm != 0)
5011: for(j=0; j<7; j++)
5012: printf("%s%s%d\n",type[j],aln,diff[j]);
5013:
5014: /* Field specifications are highly implementation de-
5015: pendent. About the only thing we can do here is to
5016: check is that the compiler accepts the field constructs,
5017: and that they seem to work, after a fashion, at
5018: run time...
5019: */
5020:
5021: s3.threebit = 7;
5022: s3.twobit = s3.threebit;
5023: s3.threebit = s3.twobit;
5024:
5025: if(s3.threebit != 3){
5026: if(s3.threebit == -1){
5027: if(pd0->flgm != 0) printf("Sign extension in fields\n");
5028: }
5029: else{
5030: if(pd0->flgd != 0) printf(s85er,2);
5031: rc = rc+2;
5032: }
5033: }
5034:
5035: s3.onebit = 1;
5036: if(s3.onebit != 1){
5037: if(pd0->flgm != 0)
5038: printf("Be especially careful with 1-bit fields!\n");
5039: }
5040:
5041: /* A union may be thought of as a structure all of whose
5042: members begin at offset 0 and whose size is sufficient
5043: to contain any of its members.
5044: */
5045:
5046: if( (char *)u0.u1 - (char *)&u0 != 0
5047: ||(char *)u0.u2 - (char *)&u0 != 0
5048: ||(char *)u0.u3 - (char *)&u0 != 0
5049: ||(char *)u0.u4 - (char *)&u0 != 0
5050: ||(char *)u0.u5 - (char *)&u0 != 0
5051: ||(char *)u0.u6 - (char *)&u0 != 0
5052: ||(char *)u0.u7 - (char *)&u0 != 0){
5053:
5054: if(pd0->flgd != 0) printf(s85er,4);
5055: rc = rc+4;
5056: }
5057:
5058: if( sizeof u0 < sizeof u0.u1
5059: ||sizeof u0 < sizeof u0.u2
5060: ||sizeof u0 < sizeof u0.u3
5061: ||sizeof u0 < sizeof u0.u4
5062: ||sizeof u0 < sizeof u0.u5
5063: ||sizeof u0 < sizeof u0.u6
5064: ||sizeof u0 < sizeof u0.u7){
5065:
5066: if(pd0->flgd != 0) printf(s85er,8);
5067: rc = rc+8;
5068: }
5069:
5070: /* Finally, we check that the pointers work. */
5071:
5072: s1.right = &s2;
5073: s2.tword[0] = 2;
5074: s1.right->tword[0] += 1;
5075: if(s2.tword[0] != 3){
5076: if(pd0->flgd != 0) printf(s85er,16);
5077: rc = rc+16;
5078: }
5079: return rc;
5080: }
5081: s86(pd0) /* 8.6 Initialization */
5082: struct defs *pd0;
5083: {
5084: static char s86er[] = "s86,er%d\n";
5085: static char qs86[8] = "s86 ";
5086: int lrc, rc;
5087: char *ps, *pt;
5088: int one(), i, j, k;
5089: static int x[] = {1,3,5};
5090: static int *pint = x+2;
5091: static int zero[10];
5092: int *apint = pint-1;
5093: register int *rpint = apint+one();
5094: static float y0[] = {1,3,5,2,4,6,3,5,7,0,0,0};
5095: static float y1[4][3] = {
5096: {1,3,5},
5097: {2,4,6},
5098: {3,5,7},
5099: };
5100: static float y2[4][3] = {1,3,5,2,4,6,3,5,7};
5101: static float y3[4][3] = {
5102: {1},{2},{3},{4}
5103: };
5104: ps = qs86;
5105: pt = pd0->rfs;
5106: rc = 0;
5107: while (*pt++ = *ps++);
5108:
5109: /* The expression in an initializer for a static or
5110: external variable must be a constant expression or
5111: an expression that reduces to the address of a pre-
5112: viously declared variable, possibly offset by a
5113: constant expression.
5114: */
5115:
5116: if(*pint != 5){
5117: if(pd0->flgd != 0) printf(s86er,1);
5118: rc = rc+1;
5119: }
5120:
5121: /* Automatic and register variables may be initialized
5122: by arbitrary expressions involving constants and previously
5123: declared variables and functions.
5124: */
5125:
5126: if(*apint != 3){
5127: if(pd0->flgd != 0) printf(s86er,2);
5128: rc = rc+2;
5129: }
5130:
5131: if(*rpint != 5){
5132: if(pd0->flgd != 0) printf(s86er,4);
5133: rc = rc+4;
5134: }
5135:
5136: /* Static variables that are not initialized are guar-
5137: anteed to start off as zero.
5138: */
5139:
5140: lrc = 0;
5141: for(j=0; j<10; j++)
5142: if(zero[j] != 0) lrc = 1;
5143: if(lrc != 0){
5144: if(pd0->flgd != 0) printf(s86er,8);
5145: rc = rc+8;
5146: }
5147:
5148: /* y0, y1, and y2, as declared, should define and
5149: initialize identical arrays.
5150: */
5151: lrc = 0;
5152: for(i=0; i<4; i++)
5153: for(j=0; j<3; j++){
5154: k = 3*i+j;
5155: if( y1[i][j] != y2[i][j]
5156: ||y1[i][j] != y0[k]) lrc = 1;
5157: }
5158:
5159: if(lrc != 0){
5160: if(pd0->flgd != 0) printf(s86er,16);
5161: rc = rc+16;
5162: }
5163:
5164: /* y3 initializes the first column of the array and
5165: leaves the rest zero.
5166: */
5167:
5168: lrc = 0;
5169: for(j=0; j<4; j++) if(y3[j][0] != j+1) lrc = 1;
5170:
5171: if(lrc != 0){
5172: if(pd0->flgd != 0) printf(s86er,32);
5173: rc = rc+32;
5174: }
5175: return rc;
5176: }
5177: one(){
5178: return 1;
5179: }
5180: int *metricp;
5181: s88(pd0) /* 8.8 Typedef */
5182: struct defs *pd0;
5183: {
5184: static char s88er[] = "s88,er%d\n";
5185: static char qs88[8] = "s88 ";
5186: int rc;
5187: char *ps, *pt;
5188:
5189: /* Declarations whose "storage class" is typdef do not
5190: define storage, but instead define identifiers which
5191: can later be used as if they were type keywords naming
5192: fundamental or derived types.
5193: */
5194:
5195: typedef int MILES, *KLICKSP;
5196: typedef struct {double re, im;} complex;
5197:
5198: MILES distance;
5199: extern KLICKSP metricp;
5200: complex z, *zp;
5201:
5202: ps = qs88;
5203: pt = pd0->rfs;
5204: rc = 0;
5205: while(*pt++ = *ps++);
5206:
5207: /* Hopefully, all of this stuff will compile. After that,
5208: we can only make some superficial tests.
5209:
5210: The type of distance is int,
5211: */
5212:
5213: if(sizeof distance != sizeof(int)){
5214: if(pd0->flgd != 0) printf(s88er,1);
5215: rc = rc+1;
5216: }
5217:
5218: /* that of metricp is "pointer to int", */
5219:
5220: metricp = &distance;
5221: distance = 2;
5222: *metricp = 3;
5223:
5224: if(distance != 3){
5225: if(pd0->flgd != 0) printf(s88er,2);
5226: rc = rc+2;
5227: }
5228:
5229: /* and that of z is the specified structure. zp is a
5230: pointer to such a structure.
5231: */
5232:
5233: z.re = 0.;
5234: z.im = 0.;
5235: zp = &z;
5236: zp->re = 1.;
5237: zp->im = 1.;
5238: if(z.re+z.im != 2.){
5239: if(pd0->flgd != 0) printf(s88er,4);
5240: rc = rc+4;
5241: }
5242:
5243: return rc;
5244: }
5245: s9(pd0) /* 9 Statements */
5246: struct defs *pd0;
5247: {
5248: static char s9er[] = "s9,er%d\n";
5249: static char qs9[8] = "s9 ";
5250: int rc;
5251: char *ps, *pt;
5252: int lrc, i;
5253:
5254: ps = qs9;
5255: pt = pd0->rfs;
5256: rc = 0;
5257: while (*pt++ = *ps++);
5258:
5259: /* One would think that the section on statements would
5260: provide the most variety in the entire sequence of tests.
5261: As it turns out, most of the material in this section has
5262: already been checked in the process of checking out
5263: everything else, and the section at this point is somewhat
5264: anticlimactic. For this reason, we restrict ourselves
5265: to testing two features not already covered.
5266:
5267: Compound statements are delimited by braces. They have the
5268: nice property that identifiers of the auto and register
5269: variety are pushed and popped. It is currently legal to
5270: transfer into a block, but we wont...
5271: */
5272:
5273: lrc = 0;
5274: for(i=0; i<2; i++){
5275: int j;
5276: register int k;
5277: j = k = 2;
5278: {
5279: int j;
5280: register int k;
5281: j = k = 3;
5282: if((j != 3) || (k != 3)) lrc = 1;
5283: }
5284: if((j != 2) || (k != 2)) lrc = 1;
5285: }
5286:
5287: if(lrc != 0){
5288: if(pd0->flgd != 0) printf(s9er,1);
5289: rc = rc+1;
5290: }
5291:
5292: /* Goto statements go to labeled statements, we hope. */
5293:
5294: goto nobarf;
5295: if(pd0->flgd != 0) printf(s9er,2);
5296: rc = rc+2;
5297: nobarf:;
5298:
5299: return rc;
5300: }
5301: setev(){ /* Sets an external variable. Used */
5302: extern int extvar; /* by s4, and should be compiled */
5303: extvar = 1066; /* separately from s4. */
5304: }
5305: int lbits; /* long */
5306: int ubits; /* unsigned */
5307: int fbits; /* float */
5308: int dbits; /* double */
5309: float fprec; /* Smallest number that can be */
5310: float dprec; /* significantly added to 1. */
5311: int flgs; /* Print return codes, by section */
5312: int flgm; /* Announce machine dependencies */
5313: int flgd; /* give explicit diagnostics */
5314: int flgl; /* Report local return codes. */
5315: int rrc; /* recent return code */
5316: int crc; /* Cumulative return code */
5317: char rfs[8]; /* Return from section */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.