forked from mgius/zork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdt.c
788 lines (667 loc) · 17.7 KB
/
gdt.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
/* GDT- GAME DEBUGGING TOOL */
/*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
/* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
/* WRITTEN BY R. M. SUPNIK */
#include <stdio.h>
#include <ctype.h>
#include "funcs.h"
#include "vars.h"
#include "parse.h"
#ifdef ALLOW_GDT
void gdt_()
{
/* Initialized data */
const integer cmdmax = 38;
const char *dbgcmd =
"DRDODADCDXDHDLDVDFDSAFHENRNTNCNDRRRTRCRDTKEXARAOAAACAXAVD2DNANDMDTAHDPPDDZAZ";
static const integer argtyp[38] = { 2,2,2,2,2,0,0,2,2,0,1,0,0,0,0,0,0,
0,0,0,1,0,3,3,3,3,1,3,2,2,1,2,1,0,0,0,0,1 };
/* System generated locals */
integer i__1, i__2;
/* Local variables */
integer i, j, k, l, l1;
char cmd[3];
integer fmax, smax;
char buf[80];
char *z;
/* FIRST, VALIDATE THAT THE CALLER IS AN IMPLEMENTER. */
fmax = 46;
/* !SET ARRAY LIMITS. */
smax = 22;
if (debug_1.gdtflg != 0) {
goto L2000;
}
/* !IF OK, SKIP. */
more_output("You are not an authorized user.");
/* !NOT AN IMPLEMENTER. */
return;
/* !BOOT HIM OFF */
/* GDT, PAGE 2A */
/* HERE TO GET NEXT COMMAND */
L2000:
printf("GDT>");
/* !OUTPUT PROMPT. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
cmd[0] = ' ';
cmd[1] = ' ';
sscanf(buf, "%2s", cmd);
/* !GET COMMAND. */
if (cmd[0] == '\0')
goto L2000;
/* !IGNORE BLANKS. */
if (islower(cmd[0]))
cmd[0] = toupper(cmd[0]);
if (islower(cmd[1]))
cmd[1] = toupper(cmd[1]);
i__1 = cmdmax;
for (i = 1; i <= i__1; ++i) {
/* !LOOK IT UP. */
if (cmd[0] == dbgcmd[(i - 1) << 1] &&
cmd[1] == dbgcmd[((i - 1) << 1) + 1]) {
goto L2300;
}
/* !FOUND? */
/* L2100: */
}
L2200:
more_output("?");
/* !NO, LOSE. */
goto L2000;
/* L230: */
/* L240: */
/* L225: */
/* L235: */
/* L245: */
L2300:
switch (argtyp[i - 1] + 1) {
case 1: goto L2400;
case 2: goto L2500;
case 3: goto L2600;
case 4: goto L2700;
}
/* !BRANCH ON ARG TYPE. */
goto L2200;
/* !ILLEGAL TYPE. */
L2700:
printf("Idx,Ary: ");
/* !TYPE 3, REQUEST ARRAY COORDS. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
for (z = buf; *z != '\0'; z++)
if (*z == ',')
*z = ' ';
j = 0;
k = 0;
sscanf(buf, "%d %d", &j, &k);
goto L2400;
L2600:
printf("Limits: ");
/* !TYPE 2, READ BOUNDS. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
for (z = buf; *z != '\0'; z++)
if (*z == ',')
*z = ' ';
j = 0;
k = 0;
sscanf(buf, "%d %d", &j, &k);
if (k == 0) {
k = j;
}
goto L2400;
L2500:
printf("Entry: ");
/* !TYPE 1, READ ENTRY NO. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
j = 0;
sscanf(buf, "%d", &j);
L2400:
switch (i) {
case 1: goto L10000;
case 2: goto L11000;
case 3: goto L12000;
case 4: goto L13000;
case 5: goto L14000;
case 6: goto L15000;
case 7: goto L16000;
case 8: goto L17000;
case 9: goto L18000;
case 10: goto L19000;
case 11: goto L20000;
case 12: goto L21000;
case 13: goto L22000;
case 14: goto L23000;
case 15: goto L24000;
case 16: goto L25000;
case 17: goto L26000;
case 18: goto L27000;
case 19: goto L28000;
case 20: goto L29000;
case 21: goto L30000;
case 22: goto L31000;
case 23: goto L32000;
case 24: goto L33000;
case 25: goto L34000;
case 26: goto L35000;
case 27: goto L36000;
case 28: goto L37000;
case 29: goto L38000;
case 30: goto L39000;
case 31: goto L40000;
case 32: goto L41000;
case 33: goto L42000;
case 34: goto L43000;
case 35: goto L44000;
case 36: goto L45000;
case 37: goto L46000;
case 38: goto L47000;
}
goto L2200;
/* !WHAT??? */
/* GDT, PAGE 3 */
/* DR-- DISPLAY ROOMS */
L10000:
if (! (j > 0 && j <= rooms_1.rlnt && (k > 0 && k <= rooms_1.rlnt) && j <=
k)) {
goto L2200;
}
/* !ARGS VALID? */
more_output("RM# DESC1 DESC2 EXITS ACTION VALUE FLAGS");
/* !COL HDRS. */
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("%3d", i);
for (l = 1; l <= 6; ++l)
printf(" %6d", eqr[i + l * 200 - 201]);
printf("\n");
/* L10100: */
}
goto L2000;
/* DO-- DISPLAY OBJECTS */
L11000:
if (! (j > 0 && j <= objcts_1.olnt && (k > 0 && k <= objcts_1.olnt) && j
<= k)) {
goto L2200;
}
/* !ARGS VALID? */
more_output("OB# DESC1 DESC2 DESCO ACT FLAGS1 FLAGS2 FVL TVL SIZE CAPAC ROOM ADV CON READ");
/* !COL HDRS */
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("%3d%6d%6d%6d%4d%7d%7d%4d%4d%6d%6d %4d%4d%4d%6d\n",
i, eqo[i + 1 * 220 - 221], eqo[i + 2 * 220 - 221],
eqo[i + 3 * 220 - 221], eqo[i + 4 * 220 - 221],
eqo[i + 5 * 220 - 221], eqo[i + 6 * 220 - 221],
eqo[i + 7 * 220 - 221], eqo[i + 8 * 220 - 221],
eqo[i + 9 * 220 - 221], eqo[i + 10 * 220 - 221],
eqo[i + 11 * 220 - 221], eqo[i + 12 * 220 - 221],
eqo[i + 13 * 220 - 221], eqo[i + 14 * 220 - 221]);
/* L11100: */
}
goto L2000;
/* DA-- DISPLAY ADVENTURERS */
L12000:
if (! (j > 0 && j <= advs_1.alnt && (k > 0 && k <= advs_1.alnt) && j <= k)
) {
goto L2200;
}
/* !ARGS VALID? */
more_output("AD# ROOM SCORE VEHIC OBJECT ACTION STREN FLAGS");
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("%3d", i);
for (l = 1; l <= 7; ++l)
printf(" %6d", eqa[i + (l << 2) - 5]);
printf("\n");
/* L12100: */
}
goto L2000;
/* DC-- DISPLAY CLOCK EVENTS */
L13000:
if (! (j > 0 && j <= cevent_1.clnt && (k > 0 && k <= cevent_1.clnt) && j
<= k)) {
goto L2200;
}
/* !ARGS VALID? */
more_output("CL# TICK ACTION FLAG");
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("%3d %6d %6d %c\n", i, eqc[i + 1 * 25 - 26],
eqc[i + 2 * 25 - 26],
cevent_1.cflag[i - 1] ? 'T' : 'F');
/* L13100: */
}
goto L2000;
/* DX-- DISPLAY EXITS */
L14000:
if (! (j > 0 && j <= exits_1.xlnt && (k > 0 && k <= exits_1.xlnt) && j <=
k)) {
goto L2200;
}
/* !ARGS VALID? */
more_output(" RANGE CONTENTS");
/* !COL HDRS. */
i__1 = k;
for (i = j; i <= i__1; i += 10) {
/* !TEN PER LINE. */
/* Computing MIN */
i__2 = i + 9;
l = min(i__2,k);
/* !COMPUTE END OF LINE. */
more_output(NULL);
printf("%3d-%3d ", i, l);
for (l1 = i; l1 <= l; ++l1)
printf("%7d", exits_1.travel[l1 - 1]);
printf("\n");
/* L14100: */
}
goto L2000;
/* DH-- DISPLAY HACKS */
L15000:
more_output(NULL);
printf("THFPOS= %d, THFFLG= %c, THFACT= %c\n",
hack_1.thfpos, hack_1.thfflg ? 'T' : 'F',
hack_1.thfact ? 'T' : 'F');
more_output(NULL);
printf("SWDACT= %c, SWDSTA= %d\n", hack_1.swdact ? 'T' : 'F',
hack_1.swdsta);
goto L2000;
/* DL-- DISPLAY LENGTHS */
L16000:
more_output(NULL);
printf("R=%d, X=%d, O=%d, C=%d\n", rooms_1.rlnt, exits_1.xlnt,
objcts_1.olnt, cevent_1.clnt);
more_output(NULL);
printf("V=%d, A=%d, M=%d, R2=%d\n", vill_1.vlnt, advs_1.alnt,
rmsg_1.mlnt, oroom2_1.r2lnt);
more_output(NULL);
printf("MBASE=%d, STRBIT=%d\n", star_1.mbase, star_1.strbit);
goto L2000;
/* DV-- DISPLAY VILLAINS */
L17000:
if (! (j > 0 && j <= vill_1.vlnt && (k > 0 && k <= vill_1.vlnt) && j <= k)
) {
goto L2200;
}
/* !ARGS VALID? */
more_output("VL# OBJECT PROB OPPS BEST MELEE");
/* !COL HDRS */
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("%3d", i);
for (l = 1; l <= 5; ++l)
printf(" %6d", eqv[i + (l << 2) - 5]);
printf("\n");
/* L17100: */
}
goto L2000;
/* DF-- DISPLAY FLAGS */
L18000:
if (! (j > 0 && j <= fmax && (k > 0 && k <= fmax) && j <= k)) {
goto L2200;
}
/* !ARGS VALID? */
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("Flag #%-2d = %c\n", i, flags[i - 1] ? 'T' : 'F');
/* L18100: */
}
goto L2000;
/* DS-- DISPLAY STATE */
L19000:
more_output(NULL);
printf("Parse vector= %6d %6d %6d %c %6d\n",
prsvec_1.prsa, prsvec_1.prso, prsvec_1.prsi,
prsvec_1.prswon ? 'T' : 'F', prsvec_1.prscon);
more_output(NULL);
printf("Play vector= %6d %6d %c\n", play_1.winner, play_1.here,
play_1.telflg ? 'T' : 'F');
more_output(NULL);
printf("State vector= %6d %6d %6d %6d %6d %6d %6d %6d %6d\n",
state_1.moves, state_1.deaths, state_1.rwscor, state_1.mxscor,
state_1.mxload, state_1.ltshft, state_1.bloc, state_1.mungrm,
state_1.hs);
more_output(NULL);
printf(" %6d %6d\n", state_1.egscor, state_1.egmxsc);
more_output(NULL);
printf("Scol vector= %6d %6d %6d\n", screen_1.fromdr,
screen_1.scolrm, screen_1.scolac);
goto L2000;
/* GDT, PAGE 4 */
/* AF-- ALTER FLAGS */
L20000:
if (! (j > 0 && j <= fmax)) {
goto L2200;
}
/* !ENTRY NO VALID? */
printf("Old= %c New= ", flags[j - 1] ? 'T' : 'F');
/* !TYPE OLD, GET NEW. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
for (z = buf; *z != '\0'; z++) {
if (! isspace(*z)) {
if (*z == 't' || *z == 'T')
flags[j - 1] = 1;
else if (*z == 'f' || *z == 'F')
flags[j - 1] = 0;
break;
}
}
goto L2000;
/* 21000-- HELP */
L21000:
more_output("Valid commands are:");
more_output("AA- Alter ADVS DR- Display ROOMS");
more_output("AC- Alter CEVENT DS- Display state");
more_output("AF- Alter FINDEX DT- Display text");
more_output("AH- Alter HERE DV- Display VILLS");
more_output("AN- Alter switches DX- Display EXITS");
more_output("AO- Alter OBJCTS DZ- Display PUZZLE");
more_output("AR- Alter ROOMS D2- Display ROOM2");
more_output("AV- Alter VILLS EX- Exit");
more_output("AX- Alter EXITS HE- Type this message");
more_output("AZ- Alter PUZZLE NC- No cyclops");
more_output("DA- Display ADVS ND- No deaths");
more_output("DC- Display CEVENT NR- No robber");
more_output("DF- Display FINDEX NT- No troll");
more_output("DH- Display HACKS PD- Program detail");
more_output("DL- Display lengths RC- Restore cyclops");
more_output("DM- Display RTEXT RD- Restore deaths");
more_output("DN- Display switches RR- Restore robber");
more_output("DO- Display OBJCTS RT- Restore troll");
more_output("DP- Display parser TK- Take");
goto L2000;
/* NR-- NO ROBBER */
L22000:
hack_1.thfflg = FALSE_;
/* !DISABLE ROBBER. */
hack_1.thfact = FALSE_;
newsta_(oindex_1.thief, 0, 0, 0, 0);
/* !VANISH THIEF. */
more_output("No robber.");
goto L2000;
/* NT-- NO TROLL */
L23000:
findex_1.trollf = TRUE_;
newsta_(oindex_1.troll, 0, 0, 0, 0);
more_output("No troll.");
goto L2000;
/* NC-- NO CYCLOPS */
L24000:
findex_1.cyclof = TRUE_;
newsta_(oindex_1.cyclo, 0, 0, 0, 0);
more_output("No cyclops.");
goto L2000;
/* ND-- IMMORTALITY MODE */
L25000:
debug_1.dbgflg = 1;
more_output("No deaths.");
goto L2000;
/* RR-- RESTORE ROBBER */
L26000:
hack_1.thfact = TRUE_;
more_output("Restored robber.");
goto L2000;
/* RT-- RESTORE TROLL */
L27000:
findex_1.trollf = FALSE_;
newsta_(oindex_1.troll, 0, rindex_1.mtrol, 0, 0);
more_output("Restored troll.");
goto L2000;
/* RC-- RESTORE CYCLOPS */
L28000:
findex_1.cyclof = FALSE_;
findex_1.magicf = FALSE_;
newsta_(oindex_1.cyclo, 0, rindex_1.mcycl, 0, 0);
more_output("Restored cyclops.");
goto L2000;
/* RD-- MORTAL MODE */
L29000:
debug_1.dbgflg = 0;
more_output("Restored deaths.");
goto L2000;
/* GDT, PAGE 5 */
/* TK-- TAKE */
L30000:
if (! (j > 0 && j <= objcts_1.olnt)) {
goto L2200;
}
/* !VALID OBJECT? */
newsta_(j, 0, 0, 0, play_1.winner);
/* !YES, TAKE OBJECT. */
more_output("Taken.");
/* !TELL. */
goto L2000;
/* EX-- GOODBYE */
L31000:
prsvec_1.prscon = 1;
return;
/* AR-- ALTER ROOM ENTRY */
L32000:
if (! (j > 0 && j <= rooms_1.rlnt && (k > 0 && k <= 5))) {
goto L2200;
}
/* !INDICES VALID? */
printf("Old = %6d New = ", eqr[j + k * 200 - 201]);
/* !TYPE OLD, GET NEW. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &eqr[j + k * 200 - 201]);
goto L2000;
/* AO-- ALTER OBJECT ENTRY */
L33000:
if (! (j > 0 && j <= objcts_1.olnt && (k > 0 && k <= 14))) {
goto L2200;
}
/* !INDICES VALID? */
printf("Old = %6d New = ", eqo[j + k * 200 - 201]);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &eqo[j + k * 220 - 221]);
goto L2000;
/* AA-- ALTER ADVS ENTRY */
L34000:
if (! (j > 0 && j <= advs_1.alnt && (k > 0 && k <= 7))) {
goto L2200;
}
/* !INDICES VALID? */
printf("Old = %6d New = ", eqa[j + (k << 2) - 5]);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &eqa[j + (k << 2) - 5]);
goto L2000;
/* AC-- ALTER CLOCK EVENTS */
L35000:
if (! (j > 0 && j <= cevent_1.clnt && (k > 0 && k <= 3))) {
goto L2200;
}
/* !INDICES VALID? */
if (k == 3) {
goto L35500;
}
/* !FLAGS ENTRY? */
printf("Old = %6d New = ", eqc[j + k * 25 - 26]);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &eqc[j + k * 25 - 26]);
goto L2000;
L35500:
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
for (z = buf; *z != '\0'; z++) {
if (! isspace(*z)) {
if (*z == 't' || *z == 'T')
cevent_1.cflag[j - 1] = 1;
else if (*z == 'f' || *z == 'F')
cevent_1.cflag[j - 1] = 0;
break;
}
}
goto L2000;
/* GDT, PAGE 6 */
/* AX-- ALTER EXITS */
L36000:
if (! (j > 0 && j <= exits_1.xlnt)) {
goto L2200;
}
/* !ENTRY NO VALID? */
printf("Old= %6d New= ", exits_1.travel[j - 1]);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &exits_1.travel[j - 1]);
goto L2000;
/* AV-- ALTER VILLAINS */
L37000:
if (! (j > 0 && j <= vill_1.vlnt && (k > 0 && k <= 5))) {
goto L2200;
}
/* !INDICES VALID? */
printf("Old = %6d New= ", eqv[j + (k << 2) - 5]);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &eqv[j + (k << 2) - 5]);
goto L2000;
/* D2-- DISPLAY ROOM2 LIST */
L38000:
if (! (j > 0 && j <= oroom2_1.r2lnt && (k > 0 && k <= oroom2_1.r2lnt) &&
j <= k)) {
goto L2200;
}
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("#%2d Room=%6d Obj=%6d\n", i,
oroom2_1.rroom2[i - 1], oroom2_1.oroom2[i - 1]);
/* L38100: */
}
goto L2000;
/* DN-- DISPLAY SWITCHES */
L39000:
if (! (j > 0 && j <= smax && (k > 0 && k <= smax) && j <= k)) {
goto L2200;
}
/* !VALID? */
i__1 = k;
for (i = j; i <= i__1; ++i) {
more_output(NULL);
printf("Switch #%-2d = %d\n", i, switch_[i - 1]);
/* L39100: */
}
goto L2000;
/* AN-- ALTER SWITCHES */
L40000:
if (! (j > 0 && j <= smax)) {
goto L2200;
}
/* !VALID ENTRY? */
printf("Old= %6d New= ", switch_[j - 1]);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &switch_[j - 1]);
goto L2000;
/* DM-- DISPLAY MESSAGES */
L41000:
if (! (j > 0 && j <= rmsg_1.mlnt && (k > 0 && k <= rmsg_1.mlnt) && j <= k)
) {
goto L2200;
}
/* !VALID LIMITS? */
more_output(" RANGE CONTENTS");
i__1 = k;
for (i = j; i <= i__1; i += 10) {
more_output(NULL);
/* Computing MIN */
i__2 = i + 9;
l = min(i__2,k);
printf("%3d-%3d ", i, l);
for (l1 = i; l1 <= l; ++l1)
printf(" %6d", rmsg_1.rtext[l1 - 1]);
printf("\n");
/* L41100: */
}
goto L2000;
/* DT-- DISPLAY TEXT */
L42000:
rspeak_(j);
goto L2000;
/* AH-- ALTER HERE */
L43000:
printf("Old= %6d New= ", play_1.here);
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &play_1.here);
eqa[0] = play_1.here;
goto L2000;
/* DP-- DISPLAY PARSER STATE */
L44000:
more_output(NULL);
printf("ORPHS= %7d%7d%7d%7d%7d%7d\n",
orp[0], orp[1], orp[2], orp[3], orp[4], last_1.lastit);
more_output(NULL);
printf("PV= %7d%7d%7d%7d%7d\n",
pvec[0], pvec[1], pvec[2], pvec[3], pvec[4]);
more_output(NULL);
printf("SYN= %7d%7d%7d%7d%7d%7d\n",
syn[0], syn[1], syn[2], syn[3], syn[4], syn[5]);
more_output(NULL);
printf(" %7d%7d%7d%7d%7d\n",
syn[6], syn[7], syn[8], syn[9], syn[10]);
goto L2000;
/* PD-- PROGRAM DETAIL DEBUG */
L45000:
printf("Old= %6d New= ", debug_1.prsflg);
/* !TYPE OLD, GET NEW. */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &debug_1.prsflg);
goto L2000;
/* DZ-- DISPLAY PUZZLE ROOM */
L46000:
for (i = 1; i <= 64; i += 8) {
/* !DISPLAY PUZZLE */
more_output(NULL);
printf(" ");
for (j = i; j <= i + 7; ++j)
printf("%3d", puzzle_1.cpvec[j - 1]);
printf("\n");
/* L46100: */
}
goto L2000;
/* AZ-- ALTER PUZZLE ROOM */
L47000:
if (! (j > 0 && j <= 64)) {
goto L2200;
}
/* !VALID ENTRY? */
printf("Old= %6d New= ", puzzle_1.cpvec[j - 1]);
/* !OUTPUT OLD, */
(void) fflush(stdout);
(void) fgets(buf, sizeof buf, stdin);
more_input();
sscanf(buf, "%d", &puzzle_1.cpvec[j - 1]);
goto L2000;
} /* gdt_ */
#endif /* ALLOW_GDT */