OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libm/] [test/] [test_is.c] - Blame information for rev 171

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#include "test.h"
2
#include <ctype.h>
3
 
4
int setascii;
5
int setlower;
6
int setupper;
7
int myascii;
8
int mycntrl;
9
int myspace;
10
int myprint;
11
int myalnum;
12
int mydigit;
13
int myxdigit;
14
int myalpha;
15
int myupper;
16
int mylower;
17
int mygraph;
18
int mypunct;
19
 
20
void
21
_DEFUN(test_is_single,(i),
22
       int i)
23
{
24
  setascii = 0;
25
  setlower = 0;
26
  setupper = 0;
27
 
28
  myascii = 0;
29
  mycntrl = 0;
30
  myspace = 0;
31
  myprint = 0;
32
  myalnum = 0;
33
  mydigit = 0;
34
  myxdigit = 0;
35
  myalpha = 0;
36
  myupper = 0;
37
  mylower = 0;
38
  mygraph = 0;
39
  mypunct = 0;
40
 
41
  switch (i) {
42
    case 0000:
43
      myascii = 1;
44
      mycntrl = 1;
45
      setascii = 0;
46
      setlower = 0;
47
      setupper = 0;
48
      break;
49
    case 0001:
50
      myascii = 1;
51
      mycntrl = 1;
52
      setascii = 1;
53
      setlower = 1;
54
      setupper = 1;
55
      break;
56
    case 0002:
57
      myascii = 1;
58
      mycntrl = 1;
59
      setascii = 2;
60
      setlower = 2;
61
      setupper = 2;
62
      break;
63
    case 0003:
64
      myascii = 1;
65
      mycntrl = 1;
66
      setascii = 3;
67
      setlower = 3;
68
      setupper = 3;
69
      break;
70
    case 0004:
71
      myascii = 1;
72
      mycntrl = 1;
73
      setascii = 4;
74
      setlower = 4;
75
      setupper = 4;
76
      break;
77
    case 0005:
78
      myascii = 1;
79
      mycntrl = 1;
80
      setascii = 5;
81
      setlower = 5;
82
      setupper = 5;
83
      break;
84
    case 0006:
85
      myascii = 1;
86
      mycntrl = 1;
87
      setascii = 6;
88
      setlower = 6;
89
      setupper = 6;
90
      break;
91
    case 0007:
92
      myascii = 1;
93
      mycntrl = 1;
94
      setascii = 7;
95
      setlower = 7;
96
      setupper = 7;
97
      break;
98
    case 0010:
99
      myascii = 1;
100
      mycntrl = 1;
101
      setascii = 8;
102
      setlower = 8;
103
      setupper = 8;
104
      break;
105
    case 0011:
106
      myascii = 1;
107
      mycntrl = 1;
108
      myspace = 1;
109
      setascii = 9;
110
      setlower = 9;
111
      setupper = 9;
112
      break;
113
    case 0012:
114
      myascii = 1;
115
      mycntrl = 1;
116
      myspace = 1;
117
      setascii = 10;
118
      setlower = 10;
119
      setupper = 10;
120
      break;
121
    case 0013:
122
      myascii = 1;
123
      mycntrl = 1;
124
      myspace = 1;
125
      setascii = 11;
126
      setlower = 11;
127
      setupper = 11;
128
      break;
129
    case 0014:
130
      myascii = 1;
131
      mycntrl = 1;
132
      myspace = 1;
133
      setascii = 12;
134
      setlower = 12;
135
      setupper = 12;
136
      break;
137
    case 0015:
138
      myascii = 1;
139
      mycntrl = 1;
140
      myspace = 1;
141
      setascii = 13;
142
      setlower = 13;
143
      setupper = 13;
144
      break;
145
    case 0016:
146
      myascii = 1;
147
      mycntrl = 1;
148
      setascii = 14;
149
      setlower = 14;
150
      setupper = 14;
151
      break;
152
    case 0017:
153
      myascii = 1;
154
      mycntrl = 1;
155
      setascii = 15;
156
      setlower = 15;
157
      setupper = 15;
158
      break;
159
    case 0020:
160
      myascii = 1;
161
      mycntrl = 1;
162
      setascii = 16;
163
      setlower = 16;
164
      setupper = 16;
165
      break;
166
    case 0021:
167
      myascii = 1;
168
      mycntrl = 1;
169
      setascii = 17;
170
      setlower = 17;
171
      setupper = 17;
172
      break;
173
    case 0022:
174
      myascii = 1;
175
      mycntrl = 1;
176
      setascii = 18;
177
      setlower = 18;
178
      setupper = 18;
179
      break;
180
    case 0023:
181
      myascii = 1;
182
      mycntrl = 1;
183
      setascii = 19;
184
      setlower = 19;
185
      setupper = 19;
186
      break;
187
    case 0024:
188
      myascii = 1;
189
      mycntrl = 1;
190
      setascii = 20;
191
      setlower = 20;
192
      setupper = 20;
193
      break;
194
    case 0025:
195
      myascii = 1;
196
      mycntrl = 1;
197
      setascii = 21;
198
      setlower = 21;
199
      setupper = 21;
200
      break;
201
    case 0026:
202
      myascii = 1;
203
      mycntrl = 1;
204
      setascii = 22;
205
      setlower = 22;
206
      setupper = 22;
207
      break;
208
    case 0027:
209
      myascii = 1;
210
      mycntrl = 1;
211
      setascii = 23;
212
      setlower = 23;
213
      setupper = 23;
214
      break;
215
    case 0030:
216
      myascii = 1;
217
      mycntrl = 1;
218
      setascii = 24;
219
      setlower = 24;
220
      setupper = 24;
221
      break;
222
    case 0031:
223
      myascii = 1;
224
      mycntrl = 1;
225
      setascii = 25;
226
      setlower = 25;
227
      setupper = 25;
228
      break;
229
    case 0032:
230
      myascii = 1;
231
      mycntrl = 1;
232
      setascii = 26;
233
      setlower = 26;
234
      setupper = 26;
235
      break;
236
    case 0033:
237
      myascii = 1;
238
      mycntrl = 1;
239
      setascii = 27;
240
      setlower = 27;
241
      setupper = 27;
242
      break;
243
    case 0034:
244
      myascii = 1;
245
      mycntrl = 1;
246
      setascii = 28;
247
      setlower = 28;
248
      setupper = 28;
249
      break;
250
    case 0035:
251
      myascii = 1;
252
      mycntrl = 1;
253
      setascii = 29;
254
      setlower = 29;
255
      setupper = 29;
256
      break;
257
    case 0036:
258
      myascii = 1;
259
      mycntrl = 1;
260
      setascii = 30;
261
      setlower = 30;
262
      setupper = 30;
263
      break;
264
    case 0037:
265
      myascii = 1;
266
      mycntrl = 1;
267
      setascii = 31;
268
      setlower = 31;
269
      setupper = 31;
270
      break;
271
    case ' ':
272
      myascii = 1;
273
      myprint = 1;
274
      myspace = 1;
275
      setascii = 32;
276
      setlower = 32;
277
      setupper = 32;
278
      break;
279
    case '!':
280
      myascii = 1;
281
      mygraph = 1;
282
      myprint = 1;
283
      mypunct = 1;
284
      setascii = 33;
285
      setlower = 33;
286
      setupper = 33;
287
      break;
288
    case '"':
289
      myascii = 1;
290
      mygraph = 1;
291
      myprint = 1;
292
      mypunct = 1;
293
      setascii = 34;
294
      setlower = 34;
295
      setupper = 34;
296
      break;
297
    case '#':
298
      myascii = 1;
299
      mygraph = 1;
300
      myprint = 1;
301
      mypunct = 1;
302
      setascii = 35;
303
      setlower = 35;
304
      setupper = 35;
305
      break;
306
    case '$':
307
      myascii = 1;
308
      mygraph = 1;
309
      myprint = 1;
310
      mypunct = 1;
311
      setascii = 36;
312
      setlower = 36;
313
      setupper = 36;
314
      break;
315
    case '%':
316
      myascii = 1;
317
      mygraph = 1;
318
      myprint = 1;
319
      mypunct = 1;
320
      setascii = 37;
321
      setlower = 37;
322
      setupper = 37;
323
      break;
324
    case '&':
325
      myascii = 1;
326
      mygraph = 1;
327
      myprint = 1;
328
      mypunct = 1;
329
      setascii = 38;
330
      setlower = 38;
331
      setupper = 38;
332
      break;
333
    case '\'':
334
      myascii = 1;
335
      mygraph = 1;
336
      myprint = 1;
337
      mypunct = 1;
338
      setascii = 39;
339
      setlower = 39;
340
      setupper = 39;
341
      break;
342
    case '\(':
343
      myascii = 1;
344
      mygraph = 1;
345
      myprint = 1;
346
      mypunct = 1;
347
      setascii = 40;
348
      setlower = 40;
349
      setupper = 40;
350
      break;
351
    case ')':
352
      myascii = 1;
353
      mygraph = 1;
354
      myprint = 1;
355
      mypunct = 1;
356
      setascii = 41;
357
      setlower = 41;
358
      setupper = 41;
359
      break;
360
    case '*':
361
      myascii = 1;
362
      mygraph = 1;
363
      myprint = 1;
364
      mypunct = 1;
365
      setascii = 42;
366
      setlower = 42;
367
      setupper = 42;
368
      break;
369
    case '+':
370
      myascii = 1;
371
      mygraph = 1;
372
      myprint = 1;
373
      mypunct = 1;
374
      setascii = 43;
375
      setlower = 43;
376
      setupper = 43;
377
      break;
378
    case ',':
379
      myascii = 1;
380
      mygraph = 1;
381
      myprint = 1;
382
      mypunct = 1;
383
      setascii = 44;
384
      setlower = 44;
385
      setupper = 44;
386
      break;
387
    case '-':
388
      myascii = 1;
389
      mygraph = 1;
390
      myprint = 1;
391
      mypunct = 1;
392
      setascii = 45;
393
      setlower = 45;
394
      setupper = 45;
395
      break;
396
    case '.':
397
      myascii = 1;
398
      mygraph = 1;
399
      myprint = 1;
400
      mypunct = 1;
401
      setascii = 46;
402
      setlower = 46;
403
      setupper = 46;
404
      break;
405
    case '/':
406
      myascii = 1;
407
      mygraph = 1;
408
      myprint = 1;
409
      mypunct = 1;
410
      setascii = 47;
411
      setlower = 47;
412
      setupper = 47;
413
      break;
414
    case '0':
415
      myalnum = 1;
416
      myascii = 1;
417
      mydigit = 1;
418
      mygraph = 1;
419
      myprint = 1;
420
      myxdigit = 1;
421
      setascii = 48;
422
      setlower = 48;
423
      setupper = 48;
424
      break;
425
    case '1':
426
      myalnum = 1;
427
      myascii = 1;
428
      mydigit = 1;
429
      mygraph = 1;
430
      myprint = 1;
431
      myxdigit = 1;
432
      setascii = 49;
433
      setlower = 49;
434
      setupper = 49;
435
      break;
436
    case '2':
437
      myalnum = 1;
438
      myascii = 1;
439
      mydigit = 1;
440
      mygraph = 1;
441
      myprint = 1;
442
      myxdigit = 1;
443
      setascii = 50;
444
      setlower = 50;
445
      setupper = 50;
446
      break;
447
    case '3':
448
      myalnum = 1;
449
      myascii = 1;
450
      mydigit = 1;
451
      mygraph = 1;
452
      myprint = 1;
453
      myxdigit = 1;
454
      setascii = 51;
455
      setlower = 51;
456
      setupper = 51;
457
      break;
458
    case '4':
459
      myalnum = 1;
460
      myascii = 1;
461
      mydigit = 1;
462
      mygraph = 1;
463
      myprint = 1;
464
      myxdigit = 1;
465
      setascii = 52;
466
      setlower = 52;
467
      setupper = 52;
468
      break;
469
    case '5':
470
      myalnum = 1;
471
      myascii = 1;
472
      mydigit = 1;
473
      mygraph = 1;
474
      myprint = 1;
475
      myxdigit = 1;
476
      setascii = 53;
477
      setlower = 53;
478
      setupper = 53;
479
      break;
480
    case '6':
481
      myalnum = 1;
482
      myascii = 1;
483
      mydigit = 1;
484
      mygraph = 1;
485
      myprint = 1;
486
      myxdigit = 1;
487
      setascii = 54;
488
      setlower = 54;
489
      setupper = 54;
490
      break;
491
    case '7':
492
      myalnum = 1;
493
      myascii = 1;
494
      mydigit = 1;
495
      mygraph = 1;
496
      myprint = 1;
497
      myxdigit = 1;
498
      setascii = 55;
499
      setlower = 55;
500
      setupper = 55;
501
      break;
502
    case '8':
503
      myalnum = 1;
504
      myascii = 1;
505
      mydigit = 1;
506
      mygraph = 1;
507
      myprint = 1;
508
      myxdigit = 1;
509
      setascii = 56;
510
      setlower = 56;
511
      setupper = 56;
512
      break;
513
    case '9':
514
      myalnum = 1;
515
      myascii = 1;
516
      mydigit = 1;
517
      mygraph = 1;
518
      myprint = 1;
519
      myxdigit = 1;
520
      setascii = 57;
521
      setlower = 57;
522
      setupper = 57;
523
      break;
524
    case ':':
525
      myascii = 1;
526
      mygraph = 1;
527
      myprint = 1;
528
      mypunct = 1;
529
      setascii = 58;
530
      setlower = 58;
531
      setupper = 58;
532
      break;
533
    case ';':
534
      myascii = 1;
535
      mygraph = 1;
536
      myprint = 1;
537
      mypunct = 1;
538
      setascii = 59;
539
      setlower = 59;
540
      setupper = 59;
541
      break;
542
    case '<':
543
      myascii = 1;
544
      mygraph = 1;
545
      myprint = 1;
546
      mypunct = 1;
547
      setascii = 60;
548
      setlower = 60;
549
      setupper = 60;
550
      break;
551
    case '=':
552
      myascii = 1;
553
      mygraph = 1;
554
      myprint = 1;
555
      mypunct = 1;
556
      setascii = 61;
557
      setlower = 61;
558
      setupper = 61;
559
      break;
560
    case '>':
561
      myascii = 1;
562
      mygraph = 1;
563
      myprint = 1;
564
      mypunct = 1;
565
      setascii = 62;
566
      setlower = 62;
567
      setupper = 62;
568
      break;
569
    case '?':
570
      myascii = 1;
571
      mygraph = 1;
572
      myprint = 1;
573
      mypunct = 1;
574
      setascii = 63;
575
      setlower = 63;
576
      setupper = 63;
577
      break;
578
    case '@':
579
      myascii = 1;
580
      mygraph = 1;
581
      myprint = 1;
582
      mypunct = 1;
583
      setascii = 64;
584
      setlower = 64;
585
      setupper = 64;
586
      break;
587
    case 'A':
588
      myalnum = 1;
589
      myalpha = 1;
590
      myascii = 1;
591
      mygraph = 1;
592
      myprint = 1;
593
      myupper = 1;
594
      myxdigit = 1;
595
      setascii = 65;
596
      setlower = 97;
597
      setupper = 65;
598
      break;
599
    case 'B':
600
      myalnum = 1;
601
      myalpha = 1;
602
      myascii = 1;
603
      mygraph = 1;
604
      myprint = 1;
605
      myupper = 1;
606
      myxdigit = 1;
607
      setascii = 66;
608
      setlower = 98;
609
      setupper = 66;
610
      break;
611
    case 'C':
612
      myalnum = 1;
613
      myalpha = 1;
614
      myascii = 1;
615
      mygraph = 1;
616
      myprint = 1;
617
      myupper = 1;
618
      myxdigit = 1;
619
      setascii = 67;
620
      setlower = 99;
621
      setupper = 67;
622
      break;
623
    case 'D':
624
      myalnum = 1;
625
      myalpha = 1;
626
      myascii = 1;
627
      mygraph = 1;
628
      myprint = 1;
629
      myupper = 1;
630
      myxdigit = 1;
631
      setascii = 68;
632
      setlower = 100;
633
      setupper = 68;
634
      break;
635
    case 'E':
636
      myalnum = 1;
637
      myalpha = 1;
638
      myascii = 1;
639
      mygraph = 1;
640
      myprint = 1;
641
      myupper = 1;
642
      myxdigit = 1;
643
      setascii = 69;
644
      setlower = 101;
645
      setupper = 69;
646
      break;
647
    case 'F':
648
      myalnum = 1;
649
      myalpha = 1;
650
      myascii = 1;
651
      mygraph = 1;
652
      myprint = 1;
653
      myupper = 1;
654
      myxdigit = 1;
655
      setascii = 70;
656
      setlower = 102;
657
      setupper = 70;
658
      break;
659
    case 'G':
660
      myalnum = 1;
661
      myalpha = 1;
662
      myascii = 1;
663
      mygraph = 1;
664
      myprint = 1;
665
      myupper = 1;
666
      setascii = 71;
667
      setlower = 103;
668
      setupper = 71;
669
      break;
670
    case 'H':
671
      myalnum = 1;
672
      myalpha = 1;
673
      myascii = 1;
674
      mygraph = 1;
675
      myprint = 1;
676
      myupper = 1;
677
      setascii = 72;
678
      setlower = 104;
679
      setupper = 72;
680
      break;
681
    case 'I':
682
      myalnum = 1;
683
      myalpha = 1;
684
      myascii = 1;
685
      mygraph = 1;
686
      myprint = 1;
687
      myupper = 1;
688
      setascii = 73;
689
      setlower = 105;
690
      setupper = 73;
691
      break;
692
    case 'J':
693
      myalnum = 1;
694
      myalpha = 1;
695
      myascii = 1;
696
      mygraph = 1;
697
      myprint = 1;
698
      myupper = 1;
699
      setascii = 74;
700
      setlower = 106;
701
      setupper = 74;
702
      break;
703
    case 'K':
704
      myalnum = 1;
705
      myalpha = 1;
706
      myascii = 1;
707
      mygraph = 1;
708
      myprint = 1;
709
      myupper = 1;
710
      setascii = 75;
711
      setlower = 107;
712
      setupper = 75;
713
      break;
714
    case 'L':
715
      myalnum = 1;
716
      myalpha = 1;
717
      myascii = 1;
718
      mygraph = 1;
719
      myprint = 1;
720
      myupper = 1;
721
      setascii = 76;
722
      setlower = 108;
723
      setupper = 76;
724
      break;
725
    case 'M':
726
      myalnum = 1;
727
      myalpha = 1;
728
      myascii = 1;
729
      mygraph = 1;
730
      myprint = 1;
731
      myupper = 1;
732
      setascii = 77;
733
      setlower = 109;
734
      setupper = 77;
735
      break;
736
    case 'N':
737
      myalnum = 1;
738
      myalpha = 1;
739
      myascii = 1;
740
      mygraph = 1;
741
      myprint = 1;
742
      myupper = 1;
743
      setascii = 78;
744
      setlower = 110;
745
      setupper = 78;
746
      break;
747
    case 'O':
748
      myalnum = 1;
749
      myalpha = 1;
750
      myascii = 1;
751
      mygraph = 1;
752
      myprint = 1;
753
      myupper = 1;
754
      setascii = 79;
755
      setlower = 111;
756
      setupper = 79;
757
      break;
758
    case 'P':
759
      myalnum = 1;
760
      myalpha = 1;
761
      myascii = 1;
762
      mygraph = 1;
763
      myprint = 1;
764
      myupper = 1;
765
      setascii = 80;
766
      setlower = 112;
767
      setupper = 80;
768
      break;
769
    case 'Q':
770
      myalnum = 1;
771
      myalpha = 1;
772
      myascii = 1;
773
      mygraph = 1;
774
      myprint = 1;
775
      myupper = 1;
776
      setascii = 81;
777
      setlower = 113;
778
      setupper = 81;
779
      break;
780
    case 'R':
781
      myalnum = 1;
782
      myalpha = 1;
783
      myascii = 1;
784
      mygraph = 1;
785
      myprint = 1;
786
      myupper = 1;
787
      setascii = 82;
788
      setlower = 114;
789
      setupper = 82;
790
      break;
791
    case 'S':
792
      myalnum = 1;
793
      myalpha = 1;
794
      myascii = 1;
795
      mygraph = 1;
796
      myprint = 1;
797
      myupper = 1;
798
      setascii = 83;
799
      setlower = 115;
800
      setupper = 83;
801
      break;
802
    case 'T':
803
      myalnum = 1;
804
      myalpha = 1;
805
      myascii = 1;
806
      mygraph = 1;
807
      myprint = 1;
808
      myupper = 1;
809
      setascii = 84;
810
      setlower = 116;
811
      setupper = 84;
812
      break;
813
    case 'U':
814
      myalnum = 1;
815
      myalpha = 1;
816
      myascii = 1;
817
      mygraph = 1;
818
      myprint = 1;
819
      myupper = 1;
820
      setascii = 85;
821
      setlower = 117;
822
      setupper = 85;
823
      break;
824
    case 'V':
825
      myalnum = 1;
826
      myalpha = 1;
827
      myascii = 1;
828
      mygraph = 1;
829
      myprint = 1;
830
      myupper = 1;
831
      setascii = 86;
832
      setlower = 118;
833
      setupper = 86;
834
      break;
835
    case 'W':
836
      myalnum = 1;
837
      myalpha = 1;
838
      myascii = 1;
839
      mygraph = 1;
840
      myprint = 1;
841
      myupper = 1;
842
      setascii = 87;
843
      setlower = 119;
844
      setupper = 87;
845
      break;
846
    case 'X':
847
      myalnum = 1;
848
      myalpha = 1;
849
      myascii = 1;
850
      mygraph = 1;
851
      myprint = 1;
852
      myupper = 1;
853
      setascii = 88;
854
      setlower = 120;
855
      setupper = 88;
856
      break;
857
    case 'Y':
858
      myalnum = 1;
859
      myalpha = 1;
860
      myascii = 1;
861
      mygraph = 1;
862
      myprint = 1;
863
      myupper = 1;
864
      setascii = 89;
865
      setlower = 121;
866
      setupper = 89;
867
      break;
868
    case 'Z':
869
      myalnum = 1;
870
      myalpha = 1;
871
      myascii = 1;
872
      mygraph = 1;
873
      myprint = 1;
874
      myupper = 1;
875
      setascii = 90;
876
      setlower = 122;
877
      setupper = 90;
878
      break;
879
    case '[':
880
      myascii = 1;
881
      mygraph = 1;
882
      myprint = 1;
883
      mypunct = 1;
884
      setascii = 91;
885
      setlower = 91;
886
      setupper = 91;
887
      break;
888
    case '\\':
889
      myascii = 1;
890
      mygraph = 1;
891
      myprint = 1;
892
      mypunct = 1;
893
      setascii = 92;
894
      setlower = 92;
895
      setupper = 92;
896
      break;
897
    case ']':
898
      myascii = 1;
899
      mygraph = 1;
900
      myprint = 1;
901
      mypunct = 1;
902
      setascii = 93;
903
      setlower = 93;
904
      setupper = 93;
905
      break;
906
    case '^':
907
      myascii = 1;
908
      mygraph = 1;
909
      myprint = 1;
910
      mypunct = 1;
911
      setascii = 94;
912
      setlower = 94;
913
      setupper = 94;
914
      break;
915
    case '_':
916
      myascii = 1;
917
      mygraph = 1;
918
      myprint = 1;
919
      mypunct = 1;
920
      setascii = 95;
921
      setlower = 95;
922
      setupper = 95;
923
      break;
924
    case '`':
925
      myascii = 1;
926
      mygraph = 1;
927
      myprint = 1;
928
      mypunct = 1;
929
      setascii = 96;
930
      setlower = 96;
931
      setupper = 96;
932
      break;
933
    case 'a':
934
      myalnum = 1;
935
      myalpha = 1;
936
      myascii = 1;
937
      mygraph = 1;
938
      mylower = 1;
939
      myprint = 1;
940
      myxdigit = 1;
941
      setascii = 97;
942
      setlower = 97;
943
      setupper = 65;
944
      break;
945
    case 'b':
946
      myalnum = 1;
947
      myalpha = 1;
948
      myascii = 1;
949
      mygraph = 1;
950
      mylower = 1;
951
      myprint = 1;
952
      myxdigit = 1;
953
      setascii = 98;
954
      setlower = 98;
955
      setupper = 66;
956
      break;
957
    case 'c':
958
      myalnum = 1;
959
      myalpha = 1;
960
      myascii = 1;
961
      mygraph = 1;
962
      mylower = 1;
963
      myprint = 1;
964
      myxdigit = 1;
965
      setascii = 99;
966
      setlower = 99;
967
      setupper = 67;
968
      break;
969
    case 'd':
970
      myalnum = 1;
971
      myalpha = 1;
972
      myascii = 1;
973
      mygraph = 1;
974
      mylower = 1;
975
      myprint = 1;
976
      myxdigit = 1;
977
      setascii = 100;
978
      setlower = 100;
979
      setupper = 68;
980
      break;
981
    case 'e':
982
      myalnum = 1;
983
      myalpha = 1;
984
      myascii = 1;
985
      mygraph = 1;
986
      mylower = 1;
987
      myprint = 1;
988
      myxdigit = 1;
989
      setascii = 101;
990
      setlower = 101;
991
      setupper = 69;
992
      break;
993
    case 'f':
994
      myalnum = 1;
995
      myalpha = 1;
996
      myascii = 1;
997
      mygraph = 1;
998
      mylower = 1;
999
      myprint = 1;
1000
      myxdigit = 1;
1001
      setascii = 102;
1002
      setlower = 102;
1003
      setupper = 70;
1004
      break;
1005
    case 'g':
1006
      myalnum = 1;
1007
      myalpha = 1;
1008
      myascii = 1;
1009
      mygraph = 1;
1010
      mylower = 1;
1011
      myprint = 1;
1012
      setascii = 103;
1013
      setlower = 103;
1014
      setupper = 71;
1015
      break;
1016
    case 'h':
1017
      myalnum = 1;
1018
      myalpha = 1;
1019
      myascii = 1;
1020
      mygraph = 1;
1021
      mylower = 1;
1022
      myprint = 1;
1023
      setascii = 104;
1024
      setlower = 104;
1025
      setupper = 72;
1026
      break;
1027
    case 'i':
1028
      myalnum = 1;
1029
      myalpha = 1;
1030
      myascii = 1;
1031
      mygraph = 1;
1032
      mylower = 1;
1033
      myprint = 1;
1034
      setascii = 105;
1035
      setlower = 105;
1036
      setupper = 73;
1037
      break;
1038
    case 'j':
1039
      myalnum = 1;
1040
      myalpha = 1;
1041
      myascii = 1;
1042
      mygraph = 1;
1043
      mylower = 1;
1044
      myprint = 1;
1045
      setascii = 106;
1046
      setlower = 106;
1047
      setupper = 74;
1048
      break;
1049
    case 'k':
1050
      myalnum = 1;
1051
      myalpha = 1;
1052
      myascii = 1;
1053
      mygraph = 1;
1054
      mylower = 1;
1055
      myprint = 1;
1056
      setascii = 107;
1057
      setlower = 107;
1058
      setupper = 75;
1059
      break;
1060
    case 'l':
1061
      myalnum = 1;
1062
      myalpha = 1;
1063
      myascii = 1;
1064
      mygraph = 1;
1065
      mylower = 1;
1066
      myprint = 1;
1067
      setascii = 108;
1068
      setlower = 108;
1069
      setupper = 76;
1070
      break;
1071
    case 'm':
1072
      myalnum = 1;
1073
      myalpha = 1;
1074
      myascii = 1;
1075
      mygraph = 1;
1076
      mylower = 1;
1077
      myprint = 1;
1078
      setascii = 109;
1079
      setlower = 109;
1080
      setupper = 77;
1081
      break;
1082
    case 'n':
1083
      myalnum = 1;
1084
      myalpha = 1;
1085
      myascii = 1;
1086
      mygraph = 1;
1087
      mylower = 1;
1088
      myprint = 1;
1089
      setascii = 110;
1090
      setlower = 110;
1091
      setupper = 78;
1092
      break;
1093
    case 'o':
1094
      myalnum = 1;
1095
      myalpha = 1;
1096
      myascii = 1;
1097
      mygraph = 1;
1098
      mylower = 1;
1099
      myprint = 1;
1100
      setascii = 111;
1101
      setlower = 111;
1102
      setupper = 79;
1103
      break;
1104
    case 'p':
1105
      myalnum = 1;
1106
      myalpha = 1;
1107
      myascii = 1;
1108
      mygraph = 1;
1109
      mylower = 1;
1110
      myprint = 1;
1111
      setascii = 112;
1112
      setlower = 112;
1113
      setupper = 80;
1114
      break;
1115
    case 'q':
1116
      myalnum = 1;
1117
      myalpha = 1;
1118
      myascii = 1;
1119
      mygraph = 1;
1120
      mylower = 1;
1121
      myprint = 1;
1122
      setascii = 113;
1123
      setlower = 113;
1124
      setupper = 81;
1125
      break;
1126
    case 'r':
1127
      myalnum = 1;
1128
      myalpha = 1;
1129
      myascii = 1;
1130
      mygraph = 1;
1131
      mylower = 1;
1132
      myprint = 1;
1133
      setascii = 114;
1134
      setlower = 114;
1135
      setupper = 82;
1136
      break;
1137
    case 's':
1138
      myalnum = 1;
1139
      myalpha = 1;
1140
      myascii = 1;
1141
      mygraph = 1;
1142
      mylower = 1;
1143
      myprint = 1;
1144
      setascii = 115;
1145
      setlower = 115;
1146
      setupper = 83;
1147
      break;
1148
    case 't':
1149
      myalnum = 1;
1150
      myalpha = 1;
1151
      myascii = 1;
1152
      mygraph = 1;
1153
      mylower = 1;
1154
      myprint = 1;
1155
      setascii = 116;
1156
      setlower = 116;
1157
      setupper = 84;
1158
      break;
1159
    case 'u':
1160
      myalnum = 1;
1161
      myalpha = 1;
1162
      myascii = 1;
1163
      mygraph = 1;
1164
      mylower = 1;
1165
      myprint = 1;
1166
      setascii = 117;
1167
      setlower = 117;
1168
      setupper = 85;
1169
      break;
1170
    case 'v':
1171
      myalnum = 1;
1172
      myalpha = 1;
1173
      myascii = 1;
1174
      mygraph = 1;
1175
      mylower = 1;
1176
      myprint = 1;
1177
      setascii = 118;
1178
      setlower = 118;
1179
      setupper = 86;
1180
      break;
1181
    case 'w':
1182
      myalnum = 1;
1183
      myalpha = 1;
1184
      myascii = 1;
1185
      mygraph = 1;
1186
      mylower = 1;
1187
      myprint = 1;
1188
      setascii = 119;
1189
      setlower = 119;
1190
      setupper = 87;
1191
      break;
1192
    case 'x':
1193
      myalnum = 1;
1194
      myalpha = 1;
1195
      myascii = 1;
1196
      mygraph = 1;
1197
      mylower = 1;
1198
      myprint = 1;
1199
      setascii = 120;
1200
      setlower = 120;
1201
      setupper = 88;
1202
      break;
1203
    case 'y':
1204
      myalnum = 1;
1205
      myalpha = 1;
1206
      myascii = 1;
1207
      mygraph = 1;
1208
      mylower = 1;
1209
      myprint = 1;
1210
      setascii = 121;
1211
      setlower = 121;
1212
      setupper = 89;
1213
      break;
1214
    case 'z':
1215
      myalnum = 1;
1216
      myalpha = 1;
1217
      myascii = 1;
1218
      mygraph = 1;
1219
      mylower = 1;
1220
      myprint = 1;
1221
      setascii = 122;
1222
      setlower = 122;
1223
      setupper = 90;
1224
      break;
1225
    case '{':
1226
      myascii = 1;
1227
      mygraph = 1;
1228
      myprint = 1;
1229
      mypunct = 1;
1230
      setascii = 123;
1231
      setlower = 123;
1232
      setupper = 123;
1233
      break;
1234
    case '|':
1235
      myascii = 1;
1236
      mygraph = 1;
1237
      myprint = 1;
1238
      mypunct = 1;
1239
      setascii = 124;
1240
      setlower = 124;
1241
      setupper = 124;
1242
      break;
1243
    case '}':
1244
      myascii = 1;
1245
      mygraph = 1;
1246
      myprint = 1;
1247
      mypunct = 1;
1248
      setascii = 125;
1249
      setlower = 125;
1250
      setupper = 125;
1251
      break;
1252
    case '~':
1253
      myascii = 1;
1254
      mygraph = 1;
1255
      myprint = 1;
1256
      mypunct = 1;
1257
      setascii = 126;
1258
      setlower = 126;
1259
      setupper = 126;
1260
      break;
1261
    case 0177:
1262
      myascii = 1;
1263
      mycntrl = 1;
1264
      setascii = 127;
1265
      setlower = 127;
1266
      setupper = 127;
1267
      break;
1268
    case 0200:
1269
      setascii = 0;
1270
      setlower = 128;
1271
      setupper = 128;
1272
      break;
1273
    case 0201:
1274
      setascii = 1;
1275
      setlower = 129;
1276
      setupper = 129;
1277
      break;
1278
    case 0202:
1279
      setascii = 2;
1280
      setlower = 130;
1281
      setupper = 130;
1282
      break;
1283
    case 0203:
1284
      setascii = 3;
1285
      setlower = 131;
1286
      setupper = 131;
1287
      break;
1288
    case 0204:
1289
      setascii = 4;
1290
      setlower = 132;
1291
      setupper = 132;
1292
      break;
1293
    case 0205:
1294
      setascii = 5;
1295
      setlower = 133;
1296
      setupper = 133;
1297
      break;
1298
    case 0206:
1299
      setascii = 6;
1300
      setlower = 134;
1301
      setupper = 134;
1302
      break;
1303
    case 0207:
1304
      setascii = 7;
1305
      setlower = 135;
1306
      setupper = 135;
1307
      break;
1308
    case 0210:
1309
      setascii = 8;
1310
      setlower = 136;
1311
      setupper = 136;
1312
      break;
1313
    case 0211:
1314
      setascii = 9;
1315
      setlower = 137;
1316
      setupper = 137;
1317
      break;
1318
    case 0212:
1319
      setascii = 10;
1320
      setlower = 138;
1321
      setupper = 138;
1322
      break;
1323
    case 0213:
1324
      setascii = 11;
1325
      setlower = 139;
1326
      setupper = 139;
1327
      break;
1328
    case 0214:
1329
      setascii = 12;
1330
      setlower = 140;
1331
      setupper = 140;
1332
      break;
1333
    case 0215:
1334
      setascii = 13;
1335
      setlower = 141;
1336
      setupper = 141;
1337
      break;
1338
    case 0216:
1339
      setascii = 14;
1340
      setlower = 142;
1341
      setupper = 142;
1342
      break;
1343
    case 0217:
1344
      setascii = 15;
1345
      setlower = 143;
1346
      setupper = 143;
1347
      break;
1348
    case 0220:
1349
      setascii = 16;
1350
      setlower = 144;
1351
      setupper = 144;
1352
      break;
1353
    case 0221:
1354
      setascii = 17;
1355
      setlower = 145;
1356
      setupper = 145;
1357
      break;
1358
    case 0222:
1359
      setascii = 18;
1360
      setlower = 146;
1361
      setupper = 146;
1362
      break;
1363
    case 0223:
1364
      setascii = 19;
1365
      setlower = 147;
1366
      setupper = 147;
1367
      break;
1368
    case 0224:
1369
      setascii = 20;
1370
      setlower = 148;
1371
      setupper = 148;
1372
      break;
1373
    case 0225:
1374
      setascii = 21;
1375
      setlower = 149;
1376
      setupper = 149;
1377
      break;
1378
    case 0226:
1379
      setascii = 22;
1380
      setlower = 150;
1381
      setupper = 150;
1382
      break;
1383
    case 0227:
1384
      setascii = 23;
1385
      setlower = 151;
1386
      setupper = 151;
1387
      break;
1388
    case 0230:
1389
      setascii = 24;
1390
      setlower = 152;
1391
      setupper = 152;
1392
      break;
1393
    case 0231:
1394
      setascii = 25;
1395
      setlower = 153;
1396
      setupper = 153;
1397
      break;
1398
    case 0232:
1399
      setascii = 26;
1400
      setlower = 154;
1401
      setupper = 154;
1402
      break;
1403
    case 0233:
1404
      setascii = 27;
1405
      setlower = 155;
1406
      setupper = 155;
1407
      break;
1408
    case 0234:
1409
      setascii = 28;
1410
      setlower = 156;
1411
      setupper = 156;
1412
      break;
1413
    case 0235:
1414
      setascii = 29;
1415
      setlower = 157;
1416
      setupper = 157;
1417
      break;
1418
    case 0236:
1419
      setascii = 30;
1420
      setlower = 158;
1421
      setupper = 158;
1422
      break;
1423
    case 0237:
1424
      setascii = 31;
1425
      setlower = 159;
1426
      setupper = 159;
1427
      break;
1428
    case 0240:
1429
      setascii = 32;
1430
      setlower = 160;
1431
      setupper = 160;
1432
      break;
1433
    case 0241:
1434
      setascii = 33;
1435
      setlower = 161;
1436
      setupper = 161;
1437
      break;
1438
    case 0242:
1439
      setascii = 34;
1440
      setlower = 162;
1441
      setupper = 162;
1442
      break;
1443
    case 0243:
1444
      setascii = 35;
1445
      setlower = 163;
1446
      setupper = 163;
1447
      break;
1448
    case 0244:
1449
      setascii = 36;
1450
      setlower = 164;
1451
      setupper = 164;
1452
      break;
1453
    case 0245:
1454
      setascii = 37;
1455
      setlower = 165;
1456
      setupper = 165;
1457
      break;
1458
    case 0246:
1459
      setascii = 38;
1460
      setlower = 166;
1461
      setupper = 166;
1462
      break;
1463
    case 0247:
1464
      setascii = 39;
1465
      setlower = 167;
1466
      setupper = 167;
1467
      break;
1468
    case 0250:
1469
      setascii = 40;
1470
      setlower = 168;
1471
      setupper = 168;
1472
      break;
1473
    case 0251:
1474
      setascii = 41;
1475
      setlower = 169;
1476
      setupper = 169;
1477
      break;
1478
    case 0252:
1479
      setascii = 42;
1480
      setlower = 170;
1481
      setupper = 170;
1482
      break;
1483
    case 0253:
1484
      setascii = 43;
1485
      setlower = 171;
1486
      setupper = 171;
1487
      break;
1488
    case 0254:
1489
      setascii = 44;
1490
      setlower = 172;
1491
      setupper = 172;
1492
      break;
1493
    case 0255:
1494
      setascii = 45;
1495
      setlower = 173;
1496
      setupper = 173;
1497
      break;
1498
    case 0256:
1499
      setascii = 46;
1500
      setlower = 174;
1501
      setupper = 174;
1502
      break;
1503
    case 0257:
1504
      setascii = 47;
1505
      setlower = 175;
1506
      setupper = 175;
1507
      break;
1508
    case 0260:
1509
      setascii = 48;
1510
      setlower = 176;
1511
      setupper = 176;
1512
      break;
1513
    case 0261:
1514
      setascii = 49;
1515
      setlower = 177;
1516
      setupper = 177;
1517
      break;
1518
    case 0262:
1519
      setascii = 50;
1520
      setlower = 178;
1521
      setupper = 178;
1522
      break;
1523
    case 0263:
1524
      setascii = 51;
1525
      setlower = 179;
1526
      setupper = 179;
1527
      break;
1528
    case 0264:
1529
      setascii = 52;
1530
      setlower = 180;
1531
      setupper = 180;
1532
      break;
1533
    case 0265:
1534
      setascii = 53;
1535
      setlower = 181;
1536
      setupper = 181;
1537
      break;
1538
    case 0266:
1539
      setascii = 54;
1540
      setlower = 182;
1541
      setupper = 182;
1542
      break;
1543
    case 0267:
1544
      setascii = 55;
1545
      setlower = 183;
1546
      setupper = 183;
1547
      break;
1548
    case 0270:
1549
      setascii = 56;
1550
      setlower = 184;
1551
      setupper = 184;
1552
      break;
1553
    case 0271:
1554
      setascii = 57;
1555
      setlower = 185;
1556
      setupper = 185;
1557
      break;
1558
    case 0272:
1559
      setascii = 58;
1560
      setlower = 186;
1561
      setupper = 186;
1562
      break;
1563
    case 0273:
1564
      setascii = 59;
1565
      setlower = 187;
1566
      setupper = 187;
1567
      break;
1568
    case 0274:
1569
      setascii = 60;
1570
      setlower = 188;
1571
      setupper = 188;
1572
      break;
1573
    case 0275:
1574
      setascii = 61;
1575
      setlower = 189;
1576
      setupper = 189;
1577
      break;
1578
    case 0276:
1579
      setascii = 62;
1580
      setlower = 190;
1581
      setupper = 190;
1582
      break;
1583
    case 0277:
1584
      setascii = 63;
1585
      setlower = 191;
1586
      setupper = 191;
1587
      break;
1588
    case 0300:
1589
      setascii = 64;
1590
      setlower = 192;
1591
      setupper = 192;
1592
      break;
1593
    case 0301:
1594
      setascii = 65;
1595
      setlower = 193;
1596
      setupper = 193;
1597
      break;
1598
    case 0302:
1599
      setascii = 66;
1600
      setlower = 194;
1601
      setupper = 194;
1602
      break;
1603
    case 0303:
1604
      setascii = 67;
1605
      setlower = 195;
1606
      setupper = 195;
1607
      break;
1608
    case 0304:
1609
      setascii = 68;
1610
      setlower = 196;
1611
      setupper = 196;
1612
      break;
1613
    case 0305:
1614
      setascii = 69;
1615
      setlower = 197;
1616
      setupper = 197;
1617
      break;
1618
    case 0306:
1619
      setascii = 70;
1620
      setlower = 198;
1621
      setupper = 198;
1622
      break;
1623
    case 0307:
1624
      setascii = 71;
1625
      setlower = 199;
1626
      setupper = 199;
1627
      break;
1628
    case 0310:
1629
      setascii = 72;
1630
      setlower = 200;
1631
      setupper = 200;
1632
      break;
1633
    case 0311:
1634
      setascii = 73;
1635
      setlower = 201;
1636
      setupper = 201;
1637
      break;
1638
    case 0312:
1639
      setascii = 74;
1640
      setlower = 202;
1641
      setupper = 202;
1642
      break;
1643
    case 0313:
1644
      setascii = 75;
1645
      setlower = 203;
1646
      setupper = 203;
1647
      break;
1648
    case 0314:
1649
      setascii = 76;
1650
      setlower = 204;
1651
      setupper = 204;
1652
      break;
1653
    case 0315:
1654
      setascii = 77;
1655
      setlower = 205;
1656
      setupper = 205;
1657
      break;
1658
    case 0316:
1659
      setascii = 78;
1660
      setlower = 206;
1661
      setupper = 206;
1662
      break;
1663
    case 0317:
1664
      setascii = 79;
1665
      setlower = 207;
1666
      setupper = 207;
1667
      break;
1668
    case 0320:
1669
      setascii = 80;
1670
      setlower = 208;
1671
      setupper = 208;
1672
      break;
1673
    case 0321:
1674
      setascii = 81;
1675
      setlower = 209;
1676
      setupper = 209;
1677
      break;
1678
    case 0322:
1679
      setascii = 82;
1680
      setlower = 210;
1681
      setupper = 210;
1682
      break;
1683
    case 0323:
1684
      setascii = 83;
1685
      setlower = 211;
1686
      setupper = 211;
1687
      break;
1688
    case 0324:
1689
      setascii = 84;
1690
      setlower = 212;
1691
      setupper = 212;
1692
      break;
1693
    case 0325:
1694
      setascii = 85;
1695
      setlower = 213;
1696
      setupper = 213;
1697
      break;
1698
    case 0326:
1699
      setascii = 86;
1700
      setlower = 214;
1701
      setupper = 214;
1702
      break;
1703
    case 0327:
1704
      setascii = 87;
1705
      setlower = 215;
1706
      setupper = 215;
1707
      break;
1708
    case 0330:
1709
      setascii = 88;
1710
      setlower = 216;
1711
      setupper = 216;
1712
      break;
1713
    case 0331:
1714
      setascii = 89;
1715
      setlower = 217;
1716
      setupper = 217;
1717
      break;
1718
    case 0332:
1719
      setascii = 90;
1720
      setlower = 218;
1721
      setupper = 218;
1722
      break;
1723
    case 0333:
1724
      setascii = 91;
1725
      setlower = 219;
1726
      setupper = 219;
1727
      break;
1728
    case 0334:
1729
      setascii = 92;
1730
      setlower = 220;
1731
      setupper = 220;
1732
      break;
1733
    case 0335:
1734
      setascii = 93;
1735
      setlower = 221;
1736
      setupper = 221;
1737
      break;
1738
    case 0336:
1739
      setascii = 94;
1740
      setlower = 222;
1741
      setupper = 222;
1742
      break;
1743
    case 0337:
1744
      setascii = 95;
1745
      setlower = 223;
1746
      setupper = 223;
1747
      break;
1748
    case 0340:
1749
      setascii = 96;
1750
      setlower = 224;
1751
      setupper = 224;
1752
      break;
1753
    case 0341:
1754
      setascii = 97;
1755
      setlower = 225;
1756
      setupper = 225;
1757
      break;
1758
    case 0342:
1759
      setascii = 98;
1760
      setlower = 226;
1761
      setupper = 226;
1762
      break;
1763
    case 0343:
1764
      setascii = 99;
1765
      setlower = 227;
1766
      setupper = 227;
1767
      break;
1768
    case 0344:
1769
      setascii = 100;
1770
      setlower = 228;
1771
      setupper = 228;
1772
      break;
1773
    case 0345:
1774
      setascii = 101;
1775
      setlower = 229;
1776
      setupper = 229;
1777
      break;
1778
    case 0346:
1779
      setascii = 102;
1780
      setlower = 230;
1781
      setupper = 230;
1782
      break;
1783
    case 0347:
1784
      setascii = 103;
1785
      setlower = 231;
1786
      setupper = 231;
1787
      break;
1788
    case 0350:
1789
      setascii = 104;
1790
      setlower = 232;
1791
      setupper = 232;
1792
      break;
1793
    case 0351:
1794
      setascii = 105;
1795
      setlower = 233;
1796
      setupper = 233;
1797
      break;
1798
    case 0352:
1799
      setascii = 106;
1800
      setlower = 234;
1801
      setupper = 234;
1802
      break;
1803
    case 0353:
1804
      setascii = 107;
1805
      setlower = 235;
1806
      setupper = 235;
1807
      break;
1808
    case 0354:
1809
      setascii = 108;
1810
      setlower = 236;
1811
      setupper = 236;
1812
      break;
1813
    case 0355:
1814
      setascii = 109;
1815
      setlower = 237;
1816
      setupper = 237;
1817
      break;
1818
    case 0356:
1819
      setascii = 110;
1820
      setlower = 238;
1821
      setupper = 238;
1822
      break;
1823
    case 0357:
1824
      setascii = 111;
1825
      setlower = 239;
1826
      setupper = 239;
1827
      break;
1828
    case 0360:
1829
      setascii = 112;
1830
      setlower = 240;
1831
      setupper = 240;
1832
      break;
1833
    case 0361:
1834
      setascii = 113;
1835
      setlower = 241;
1836
      setupper = 241;
1837
      break;
1838
    case 0362:
1839
      setascii = 114;
1840
      setlower = 242;
1841
      setupper = 242;
1842
      break;
1843
    case 0363:
1844
      setascii = 115;
1845
      setlower = 243;
1846
      setupper = 243;
1847
      break;
1848
    case 0364:
1849
      setascii = 116;
1850
      setlower = 244;
1851
      setupper = 244;
1852
      break;
1853
    case 0365:
1854
      setascii = 117;
1855
      setlower = 245;
1856
      setupper = 245;
1857
      break;
1858
    case 0366:
1859
      setascii = 118;
1860
      setlower = 246;
1861
      setupper = 246;
1862
      break;
1863
    case 0367:
1864
      setascii = 119;
1865
      setlower = 247;
1866
      setupper = 247;
1867
      break;
1868
    case 0370:
1869
      setascii = 120;
1870
      setlower = 248;
1871
      setupper = 248;
1872
      break;
1873
    case 0371:
1874
      setascii = 121;
1875
      setlower = 249;
1876
      setupper = 249;
1877
      break;
1878
    case 0372:
1879
      setascii = 122;
1880
      setlower = 250;
1881
      setupper = 250;
1882
      break;
1883
    case 0373:
1884
      setascii = 123;
1885
      setlower = 251;
1886
      setupper = 251;
1887
      break;
1888
    case 0374:
1889
      setascii = 124;
1890
      setlower = 252;
1891
      setupper = 252;
1892
      break;
1893
    case 0375:
1894
      setascii = 125;
1895
      setlower = 253;
1896
      setupper = 253;
1897
      break;
1898
    case 0376:
1899
      setascii = 126;
1900
      setlower = 254;
1901
      setupper = 254;
1902
      break;
1903
    case 0377:
1904
      setascii = 127;
1905
      setlower = 255;
1906
      setupper = 255;
1907
      break;
1908
    default:
1909
      abort();
1910
 
1911
    }
1912
 
1913
}
1914
 
1915
 
1916
int _DEFUN(def_isascii,(i), int i) { return isascii(i); }
1917
int _DEFUN(def_iscntrl,(i), int i) { return iscntrl(i); }
1918
int _DEFUN(def_isspace,(i), int i) { return isspace(i); }
1919
int _DEFUN(def_isprint,(i), int i) { return isprint(i); }
1920
int _DEFUN(def_isalnum,(i), int i) { return isalnum(i); }
1921
int _DEFUN(def_isdigit,(i), int i) { return isdigit(i); }
1922
int _DEFUN(def_isxdigit,(i), int i) { return isxdigit(i); }
1923
int _DEFUN(def_isalpha,(i), int i) { return isalpha(i); }
1924
int _DEFUN(def_isupper,(i), int i) { return isupper(i); }
1925
int _DEFUN(def_islower,(i), int i) { return islower(i); }
1926
int _DEFUN(def_isgraph,(i), int i) { return isgraph(i); }
1927
int _DEFUN(def_ispunct,(i), int i) { return ispunct(i); }
1928
int _DEFUN(def_tolower,(i), int i) { return tolower(i); }
1929
int _DEFUN(def_toupper,(i), int i) { return toupper(i); }
1930
int _DEFUN(def_toascii,(i), int i) { return toascii(i); }
1931
int _DEFUN(def__tolower,(i), int i) { return _tolower(i); }
1932
int _DEFUN(def__toupper,(i), int i) { return _toupper(i); }
1933
 
1934
extern int inacc;
1935
void
1936
_DEFUN(test_is_set,(func, name, p),
1937
       int (*func)() _AND
1938
       char *name _AND
1939
       int *p)
1940
{
1941
  int i;
1942
  newfunc(name);
1943
  for (i = 0; i < 255; i++) {
1944
    int r = func(i) != 0;
1945
    line(i);
1946
    test_is_single(i);
1947
    if (*p  != r)
1948
      {
1949
        printf("%s:%d wrong result, is %d shouldbe %d\n", name, i, r,*p);
1950
        inacc++;
1951
      }
1952
  }
1953
}
1954
void
1955
_DEFUN(test_to_set,(func, name, p, low, high),
1956
       int (*func)() _AND
1957
       char *name _AND
1958
       int *p _AND
1959
       int low _AND
1960
       int high)
1961
{
1962
  int i;
1963
  newfunc(name);
1964
  for (i = low; i <= high; i++) {
1965
    int r = func(i) ;
1966
    line(i);
1967
    test_is_single(i);
1968
    if (*p  != r)
1969
      {
1970
        printf("%s:%d wrong result, is %d shouldbe %d\n", name, i, r,*p);
1971
        inacc++;
1972
      }
1973
  }
1974
}
1975
 
1976
 
1977
#undef isascii
1978
#undef iscntrl
1979
#undef isspace
1980
#undef isprint
1981
#undef isalnum
1982
#undef isdigit
1983
#undef isxdigit
1984
#undef isalpha
1985
#undef isupper
1986
#undef islower
1987
#undef isgraph
1988
#undef ispunct
1989
#undef tolower
1990
#undef toupper
1991
#undef toascii
1992
#undef _tolower
1993
#undef _toupper
1994
 
1995
void
1996
_DEFUN_VOID(test_is)
1997
{
1998
  test_is_set(def_isalnum, "isalnum define", &myalnum);
1999
  test_is_set(def_isalpha, "isalpha define", &myalpha);
2000
  test_is_set(def_isascii, "isascii define", &myascii);
2001
  test_is_set(def_iscntrl, "iscntrl define", &mycntrl);
2002
  test_is_set(def_isdigit, "isdigit define", &mydigit);
2003
  test_is_set(def_isgraph, "isgraph define", &mygraph);
2004
  test_is_set(def_islower, "islower define", &mylower);
2005
  test_is_set(def_isprint, "isprint define", &myprint);
2006
  test_is_set(def_ispunct, "ispunct define", &mypunct);
2007
  test_is_set(def_isspace, "isspace define", &myspace);
2008
  test_is_set(def_isupper, "isupper define", &myupper);
2009
  test_is_set(def_isxdigit, "isxdigit define", &myxdigit);
2010
  test_is_set(isalnum, "isalnum function", &myalnum);
2011
  test_is_set(isalpha, "isalpha function", &myalpha);
2012
  test_is_set(isascii, "isascii function", &myascii);
2013
  test_is_set(iscntrl, "iscntrl function", &mycntrl);
2014
  test_is_set(isgraph, "isgraph function", &mygraph);
2015
  test_is_set(islower, "islower function", &mylower);
2016
  test_is_set(isprint, "isprint function", &myprint);
2017
  test_is_set(ispunct, "ispunct function", &mypunct);
2018
  test_is_set(isspace, "isspace function", &myspace);
2019
  test_is_set(isupper, "isupper function", &myupper);
2020
  test_is_set(isxdigit, "isxdigit function", &myxdigit);
2021
  test_to_set(_tolower, "_tolower function", &setlower, 'A','Z');
2022
  test_to_set(_toupper, "_toupper function", &setupper, 'a','z');
2023
  test_to_set(def__tolower, "_tolower define", &setlower, 'A','Z');
2024
  test_to_set(def__toupper, "_toupper define", &setupper, 'a','z');
2025
  test_to_set(def_toascii, "toascii define", &setascii, 0,255);
2026
  test_to_set(def_tolower, "tolower define", &setlower, 0,255);
2027
  test_to_set(def_toupper, "toupper define", &setupper, 0,255);
2028
  test_to_set(toascii, "toascii function", &setascii, 0,255);
2029
  test_to_set(tolower, "tolower function", &setlower, 0,255);
2030
  test_to_set(toupper, "toupper function", &setupper, 0,255);
2031
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.