Skip to content

Latest commit

 

History

History
806 lines (755 loc) · 22.3 KB

cuser.pas

File metadata and controls

806 lines (755 loc) · 22.3 KB
 
Nov 25, 2000
Nov 25, 2000
1
{$A+,B+,E+,F+,I+,L+,N-,O+,R-,S+,V-}
Nov 18, 2000
Nov 18, 2000
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
unit cuser;
interface
uses
crt, dos,
{rcg11172000 no overlay under Linux.}
{overlay,}
common;
procedure cstuff(which,how:byte; var user:userrec);
implementation
(******************************************************************************
procedure: cstuff(which,how:byte; var user:userrec);
---
purpose: Inputs user information.
---
variables passed:
which- 1:Address 6:Occupation 11:Screen size
2:Age 7:User name 12:Sex
3:ANSI status 8:Phone # 13:BBS reference
4:City & State 9:Password 14:Zip code
5:Computer type 10:Real name
how- 1:New user logon in process
2:Menu edit command
3:Called by the user-list editor
user- User information to modify
******************************************************************************)
var callfromarea:integer;
procedure cstuff(which,how:byte; var user:userrec);
var done,done1:boolean;
try:integer;
fi:text;
s:astr;
i:integer;
procedure findarea;
var c:char;
begin
print('Are you calling from:');
print(' 1. United States');
print(' 2. Canada');
print(' 3. Other country');
nl;
prt('Select (1-3) : '); onek(c,'123');
if (hangup) then exit;
callfromarea:=ord(c)-48;
done1:=TRUE;
end;
procedure doaddress;
begin
if (how=3) then print('Enter new mailing address.')
else print('Enter your mailing address: <House number> <Street> [APT#]');
prt(':');
if (how=3) then inputl(s,30) else inputcaps(s,30);
if (s<>'') then begin
user.street:=s;
done1:=TRUE;
end;
end;
procedure doage;
var b:byte;
s:astr;
function numsok(s:astr):boolean;
var i:integer;
begin
numsok:=FALSE;
for i:=1 to 8 do
if not ((s[i] in ['0'..'9']) or (i=3) or (i=6)) then exit;
numsok:=TRUE;
end;
begin
Mar 2, 2001
Mar 2, 2001
87
88
89
90
{rcg11272000 y2k stuff.}
{if (how=3) then prompt('Enter date of birth (mm/dd/yy) : ')}
if (how=3) then prompt('Enter date of birth (mm/dd/yyyy) : ')
Nov 18, 2000
Nov 18, 2000
91
92
93
94
95
else begin
sprint('^301^5=January ^304^5=April ^307^5=July ^310^5=October');
sprint('^302^5=February ^305^5=May ^308^5=August ^311^5=November');
sprint('^303^5=March ^306^5=June ^309^5=September ^312^5=December');
nl;
Mar 2, 2001
Mar 2, 2001
96
97
98
{rcg11272000 y2k stuff.}
{prt('Enter your date of birth (mm/dd/yy) : ');}
prt('Enter your date of birth (mm/dd/yyyy) : ');
Nov 18, 2000
Nov 18, 2000
99
end;
Mar 2, 2001
Mar 2, 2001
100
101
102
{rcg11272000 y2k stuff.}
{
Nov 18, 2000
Nov 18, 2000
103
104
cl(3); input(s,8);
if ((length(s)=8) and (s[3]='/') and (s[6]='/')) then
Mar 2, 2001
Mar 2, 2001
105
106
107
108
}
cl(3); input(s,10);
if ((length(s)=10) and (s[3]='/') and (s[6]='/')) then
Nov 18, 2000
Nov 18, 2000
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
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
if (numsok(s)) then
if (ageuser(s)<3) then
sprint(#3#7+'Isn''t '+cstr(ageuser(s))+' years old a little YOUNG???')
else begin
user.bday:=s;
done1:=TRUE;
end;
if ((not done1) and (how=1)) then sprint(#3#7+'Sorry, try again!');
end;
procedure doansi;
begin
pr(#27+'[0;1;5;33;40mANSI test'); tc(14+128); writeln('ANSI test');
nl;
if pynq('Do you have ANSI (are the above words blinking)? ') then begin
user.ac:=user.ac+[ansi];
if pynq('Do you have a color monitor? ') then user.ac:=user.ac+[color];
end;
done1:=TRUE;
end;
procedure docitystate;
var s,s1,s2:astr;
begin
case how of
2:findarea;
3:callfromarea:=1;
end;
if (callfromarea<>3) then begin
if (how=3) then begin
print('Enter new city & state: ');
prt(':'); inputl(s,30);
if (s<>'') then user.citystate:=s;
done1:=TRUE;
exit;
end;
case callfromarea of
1:print('City & State entry.');
2:print('City & Province entry.');
end;
nl;
if (callfromarea=1) then s1:='state' else s1:='province';
print('First enter your city name (do not include '+s1+'):');
prt(':'); inputcaps(s1,26);
while (copy(s1,1,1)=' ') do s1:=copy(s1,2,length(s1)-1);
while (copy(s1,length(s1),1)=' ') do s1:=copy(s1,1,length(s1)-1);
nl;
if (length(s1)<2) then begin
sprint(#3#7+'Why do I find it hard to believe');
sprint(#3#7+'that that is '+#3#5+'not'+#3#7+' a real city?');
nl;
if (callfromarea=1) then s2:='Detroit' else s2:='Toronto';
sprint(#3#7+'Example: "'+s2+'" is a real city.');
exit;
end;
if (pos(',',s1)<>0) then begin
if (callfromarea=1) then s2:='state' else s2:='province';
sprint(#3#7+'NO COMMAS! Don''t enter your '+s2+' YET,');
sprint(#3#7+'just enter your CITY!!! I''ll ask for your');
sprint(#3#7+allcaps(s2)+' as soon as I know your CITY!!!');
nl;
if (callfromarea=1) then s2:='Detroit' else s2:='Toronto';
sprint(#3#7+'Example: "'+s2+'" is a city!');
exit;
end;
if (callfromarea=1) then s2:='state' else s2:='province';
prompt('Now enter your 2-letter '+s2+' abbreviation: ');
cl(3); input(s2,2);
nl;
if (length(s2)<2) then begin
sprint(#3#0+'TWO '+#3#7+'characters. '+#3#0+'TWO '+#3#7+'characters. Can''t you count?');
sprint(#3#7+'(Hint: notice the word "'+#3#0+'TWO'+#3#7+'")');
exit;
end;
user.citystate:=s1+', '+s2;
done1:=TRUE;
end else begin
print('First enter your city name, and nothing else:');
prt(':'); inputcaps(s1,26);
if (length(s1)<2) then exit;
nl;
print('Now enter your country name:');
prt(':'); inputcaps(s2,26);
if (length(s2)<2) then exit;
nl;
s:=s1+', '+s2;
print('Final result: "'+s+'"');
if (length(s)>30) then begin
print('Too long! Max total length is 30 characters.');
print('Find some way to abbreviate.');
exit;
end;
user.citystate:=s;
done1:=TRUE;
end;
end;
procedure docomputer;
var fp:text;
ctyp:array[1..31] of string[30];
i,n:integer;
s,s1:astr;
c:char;
abort,next,other,cexist:boolean;
begin
other:=TRUE; cexist:=FALSE;
assign(fp,systat.afilepath+'computer.txt');
{$I-} reset(fp); {$I+}
if (ioresult=0) then begin
cexist:=TRUE;
other:=FALSE; i:=0;
repeat
inc(i);
readln(fp,ctyp[i]);
until eof(fp) or (i=30);
close(fp);
n:=i+1; ctyp[n]:='Other'; abort:=FALSE;
for i:=1 to n do begin
s:=#3#1+mln(cstr(i)+'.',3)+ctyp[i];
if (odd(i)) then s1:=s else printacr(mln(s1,33)+s,abort,next);
end;
if (odd(n)) then printacr(s1,abort,next);
nl;
if (how=3) then prt('Enter new computer type: ')
else prt('Enter your computer type: ');
input(s,2); i:=value(s);
if (i>=1) and (i<n) then begin
user.computer:=ctyp[i];
done1:=TRUE;
end else
if i=n then other:=TRUE;
end;
if (other) then begin
if cexist then prt('Other computer type: ')
else prt('Enter your computer type: ');
if (how=3) then inputl(s,30) else inputcaps(s,30);
if (s<>'') then begin
user.computer:=s;
done1:=TRUE;
end;
end;
s:=''; i:=1;
while (i<=length(user.computer)) do begin
if (user.computer[i]<>#3) then s:=s+user.computer[i] else inc(i);
inc(i);
end;
end;
procedure dojob;
begin
if (how=3) then print('Enter new occupation.')
else print('Enter your occupation:');
prt(':');
if (how=3) then inputl(s,40) else inputcaps(s,40);
if (s<>'') then begin
user.occupation:=s;
done1:=TRUE;
end;
end;
procedure doname;
var i:integer;
s1,s2:astr;
sfo:boolean;
sr:smalrec;
begin
if (systat.allowalias) then begin
print('Enter your handle, or your first & last');
print('name if you don''t want to use one.')
end else
print('Enter your first & last name. Handles are NOT ALLOWED!');
prt(':'); input(s,36);
done1:=TRUE;
nl;
if ((not (s[1] in ['A'..'Z','?'])) or (s='')) then done1:=FALSE;
sfo:=(filerec(sf).mode<>fmclosed);
if (not sfo) then reset(sf);
for i:=1 to filesize(sf)-1 do begin
seek(sf,i); read(sf,sr);
if (sr.name=s) then begin
done1:=FALSE;
sprint(#3#7+'That name is already being used.');
end;
end;
if (not sfo) then close(sf);
assign(fi,systat.afilepath+'trashcan.txt');
{$I-} reset(fi); {$I+}
if (ioresult=0) then begin
s2:=' '+s+' ';
while not eof(fi) do begin
readln(fi,s1);
if s1[length(s1)]=#1 then s1[length(s1)]:=' ' else s1:=s1+' ';
s1:=' '+s1;
for i:=1 to length(s1) do s1[i]:=upcase(s1[i]);
if pos(s1,s2)<>0 then begin
sprint(#3#7+'"'+copy(s1,pos(s1,s2),length(s1))+'" may not be used!');
done1:=FALSE;
end;
end;
close(fi);
end;
if (not done1) and (not hangup) then begin
sprint(#3#7+^G'Sorry, can''t use that name.');
inc(try);
sl1('Unacceptable name : '+s);
end;
if (try>=3) then hangup:=TRUE;
if (done1) then user.name:=s;
if ((done) and (how=1) and (not systat.allowalias)) then
user.realname:=caps(s);
end;
procedure dophone;
begin
case how of
2:findarea;
3:callfromarea:=1;
end;
if (how=3) then print('Enter new VOICE phone number:')
else print('Enter your VOICE phone number:');
if (((how=1) and (callfromarea=3)) or (how=3)) then begin
prt(':'); input(s,12);
if (length(s)>5) then begin user.ph:=s; done1:=TRUE; end;
end else begin
print(' ###-###-####.');
prt(':'); input(s,12);
if (length(s)=12) and (s[4]='-') and (s[8]='-') then begin
user.ph:=s;
done1:=TRUE;
end else
if (how=1) then sprint(#3#7+'Please enter it correctly!');
end;
end;
procedure dopw;
var s:astr;
begin
case how of
1:begin
print('Enter a password that you will use to log on again.');
print('It must be between 4 and 20 characters in length.');
prt(':'); input(s,20);
if (length(s)<4) then
sprint(#3#7+'Must be at least 4 characters long.')
else
if (length(s)>20) then
sprint(#3#7+'Must be less than 20 characters long.')
else begin
nl;
sprint(#3#3+'Your password: '+#3#5+s);
done1:=pynq('Is this correct? ');
if (done1) then user.pw:=s;
end;
end;
2:begin
sprint(#3#5+'For security reasons, when changing passwords');
sprint(#3#5+'you must first enter your old password.');
nl;
sprompt(#3#0+'User password : '+#3#5); input(s,20);
if (s<>user.pw) then sprint(^G+#3#7+'>> INCORRECT PASSWORD <<')
else begin
nl;
print('Your new password must be 4-20 chrs in length.');
nl;
repeat
prt('New password: '); mpl(20); input(s,20);
nl;
until (((length(s)>=4) and (length(s)<=20)) or (s='') or (hangup));
if (s<>'') then begin
nl; nl;
sprint(#3#3+'New Password: "'+#3#5+s+#3#3+'"');
if pynq('Are you SURE this is what you want? ') then begin
if (not hangup) then user.pw:=s;
sysoplog('Changed password.');
done1:=TRUE;
end else
print('Aborted.');
end else
print('Aborted.');
end;
nl;
end;
3:begin
print('Enter new password.'); prt(':'); input(s,20);
if (s<>'') then begin
done1:=TRUE;
user.pw:=s;
end;
end;
end;
end;
procedure dorealname;
var i:integer;
begin
if ((how=1) and (not systat.allowalias)) then begin
user.realname:=caps(user.name);
done1:=TRUE;
exit;
end;
if (how=3) then print('Enter new REAL first & last name, or')
else print('Enter your REAL first & last name, or');
print('enter "=" if same as your user name.');
prt(':');
if (how=3) then inputl(s,36) else inputcaps(s,36);
if (s='=') then s:=caps(user.name);
while copy(s,1,1)=' ' do s:=copy(s,2,length(s)-1);
while copy(s,length(s),1)=' ' do s:=copy(s,1,length(s)-1);
if (pos(' ',s)=0) and (how<>3) then begin
print('Enter it correctly! First AND last name please!');
s:='';
end;
if (s<>'') then begin
user.realname:=s;
done1:=TRUE;
end;
end;
procedure doscreen;
var v:string;
bb:byte;
begin
if (how=1) then begin
user.linelen:=systat.linelen;
user.pagelen:=systat.pagelen;
end;
prt('How many columns wide is your screen (32-132) ['+
cstr(thisuser.linelen)+'] : ');
ini(bb); if (not badini) then user.linelen:=bb;
prt('Number of lines per page (4-50) ['+cstr(thisuser.pagelen)+'] : ');
ini(bb); if (not badini) then user.pagelen:=bb;
if (user.pagelen>50) then user.pagelen:=50;
if (user.pagelen<4) then user.pagelen:=4;
if (user.linelen>132) then user.linelen:=132;
done1:=TRUE;
end;
procedure dosex;
var c:char;
begin
if (how=3) then begin
prt('New sex (M,F) : ');
onek(c,'MF '^M);
if (c in ['M','F']) then user.sex:=c;
end else begin
user.sex:=#0;
repeat
prt('Your sex (M,F) ? ');
onek(user.sex,'MF'^M);
if (user.sex=^M) then begin
nl;
sprint(#3#7+'Don''t know your own sex, eh? Better see a doctor!');
nl;
end;
until ((user.sex in ['M','F']) or (hangup));
end;
done1:=TRUE;
end;
procedure dowherebbs;
begin
if (how=3) then print('Enter new BBS reference.')
else begin
print('Where did you hear about this BBS from? (be specific;');
print('do not say, for example, "some guy on another board")');
end;
prt(':');
if (how=3) then inputl(s,40) else inputcaps(s,40);
if (s<>'') then begin user.wherebbs:=s; done1:=TRUE; end;
end;
procedure dozipcode;
begin
case how of
2:findarea;
3:callfromarea:=1;
end;
case callfromarea of
1:begin
if (how=3) then
print('Enter new postal code (##### or #####-####)')
else begin
print('Enter your zipcode (9 digit if available)');
print(' ##### or #####-####');
end;
prt(':'); input(s,10);
if (length(s) in [5,10]) then begin user.zipcode:=s; done1:=TRUE; end;
end;
2:begin
print('Enter your zipcode (@#@#@# format -- "@"=letter "#"=number)');
prt(':'); input(s,6);
if ((length(s)=6) and
(s[1] in ['A'..'Z']) and (s[2] in ['0'..'9']) and
(s[3] in ['A'..'Z']) and (s[4] in ['0'..'9']) and
(s[5] in ['A'..'Z']) and (s[6] in ['0'..'9'])) then
done1:=TRUE
else
print('Illegal format!');
end;
3:begin
print('Enter your postal code:');
prt(':'); input(s,10);
if (length(s)>2) then begin user.zipcode:=s; done1:=TRUE; end;
end;
end;
end;
procedure forwardmail;
var u:userrec;
s:astr;
i:integer;
b,ufo:boolean;
begin
nl;
print('If you forward your mail, all mail');
print('addressed to you will go to that person');
print('Now enter the user''s number, or just');
print('hit <CR> to deactivate mail forwarding.');
prt(':'); input(s,4);
i:=value(s);
nl;
if (i=0) then begin
user.forusr:=0;
print('Forwarding deactivated.');
end else begin
ufo:=(filerec(uf).mode<>fmclosed);
if (not ufo) then reset(uf);
b:=TRUE;
if (i>=filesize(uf)) then b:=FALSE
else begin
seek(uf,i); read(uf,u);
if (u.deleted) or (nomail in u.ac) then b:=FALSE;
end;
if (i=usernum) then b:=FALSE;
if (b) then begin
user.forusr:=i;
print('Forwarding set to: '+caps(u.name)+' #'+cstr(i));
sysoplog('Started forwarding mail to '+caps(u.name)+' #'+cstr(i));
end else
print('Sorry, can''t forward to that user.');
if (not ufo) then close(uf);
end;
end;
procedure mailbox;
begin
if (nomail in user.ac) then begin
user.ac:=user.ac-[nomail];
sprint(#3#5+'Mailbox now open.');
sysoplog('Opened mailbox.');
end else
if (user.forusr<>0) then begin
user.forusr:=0;
print('Mail no longer forwarded.');
sysoplog('Stopped forwarding mail.');
end else begin
if pynq('Do you want to close your mailbox? ') then begin
user.ac:=user.ac+[nomail];
sprint(#3#5+'Mailbox now closed.');
sprint(#3#5+'You >CAN NOT< recieve mail now.');
sysoplog('Closed mailbox.');
end else
if pynq('Do you want your mail forwarded? ') then forwardmail;
end;
done1:=TRUE;
end;
procedure tog_ansi;
var c:char;
begin
prompt('Which emulation? (1) TTY (none), (2) ANSI, (3) AVATAR : ');
cl(3); onek(c,'123');
user.ac:=user.ac-[ansi];
user.ac:=user.ac-[avatar];
case c of
'2':user.ac:=user.ac+[ansi];
'3':user.ac:=user.ac+[avatar];
end;
(*
if (ansi in user.ac) then begin
user.ac:=user.ac-[ansi];
print('ANSI disabled.');
end else begin
user.ac:=user.ac+[ansi];
print('ANSI activated.');
end;
*)
done1:=TRUE;
end;
procedure tog_color;
begin
if (color in user.ac) then begin
user.ac:=user.ac-[color];
print('ANSI color disabled.');
end else begin
user.ac:=user.ac+[color];
print('ANSI color activated.');
end;
done1:=TRUE;
end;
procedure tog_pause;
begin
if (pause in user.ac) then begin
user.ac:=user.ac-[pause];
print('No pause on screen.');
end else begin
user.ac:=user.ac+[pause];
print('Pause on screen active.');
end;
done1:=TRUE;
end;
procedure tog_input;
begin
if (onekey in user.ac) then begin
user.ac:=user.ac-[onekey];
print('Full line input.');
end else begin
user.ac:=user.ac+[onekey];
print('One key input.');
end;
done1:=TRUE;
end;
procedure tog_clsmsg;
begin
if (user.clsmsg=1) then begin
user.clsmsg:=2;
print('Clear screen for messages OFF.');
end else begin
user.clsmsg:=1;
print('Clear screen for messages ON.');
end;
done1:=TRUE;
end;
procedure tog_avadj;
begin
if (user.avadjust=2) then begin
user.avadjust:=1;
print('AVATAR color adjustment disabled.');
end else begin
user.avadjust:=2;
print('AVATAR color adjustment enabled.');
end;
done1:=TRUE;
end;
procedure tog_expert;
begin
if (novice in user.ac) then begin
user.ac:=user.ac-[novice];
chelplevel:=1;
print('Expert mode ON.');
end else begin
user.ac:=user.ac+[novice];
chelplevel:=2;
print('Expert mode OFF.');
end;
done1:=TRUE;
end;
procedure chcolors;
var s:astr;
c,c1,c2:integer;
ch:char;
mcol,ocol:byte;
ctyp,done:boolean;
function colo(n:integer):astr;
begin
case n of
0:colo:='Black';
1:colo:='Blue';
2:colo:='Green';
3:colo:='Cyan';
4:colo:='Red';
5:colo:='Magenta';
6:colo:='Yellow';
7:colo:='White';
end;
end;
function dt(n:integer):astr;
var s:astr;
begin
s:=colo(n and 7)+' on '+colo((n shr 4) and 7);
if (n and 8)<>0 then s:=s+', High Intensity';
if (n and 128)<>0 then s:=s+', Blinking';
dt:=s;
end;
function stf(n:integer):astr;
var s:astr;
begin
case n of
0:s:='Other';
1:s:='Default';
2:s:='Unused';
3:s:='Yes/No';
4:s:='Prompts';
5:s:='Note';
6:s:='Input line';
7:s:='Y/N question';
8:s:='Blinking';
9:s:='Other';
end;
stf:=cstr(n)+'. '+mln(s,20);
end;
procedure liststf;
var c:integer;
begin
nl;
for c:=0 to 9 do begin
setc(7); prompt(stf(c));
setc(user.cols[ctyp][c]); print(dt(user.cols[ctyp][c]));
end;
end;
begin
ctyp:=color in user.ac;
setc(7);
if (ctyp) then print('Set multiple colors.') else print('Set B&W colors.');
ch:='?'; done:=FALSE;
repeat
case ch of
'Q':done:=TRUE;
'L':liststf;
'0'..'9':begin
nl; setc(7); print('Current:'); nl;
c1:=value(ch);
setc(7); prompt(stf(c1));
setc(user.cols[ctyp][c1]); print(dt(user.cols[ctyp,c1]));
nl; setc(7); print('Colors:'); nl;
for c:=0 to 7 do begin
setc(7); prompt(cstr(c)+'. '); setc(c); prompt(mln(colo(c),12));
setc(7); prompt(mrn(cstr(c+8),2)+'. '); setc(c+8); print(mln(colo(c)+'!',9));
end;
ocol:=user.cols[ctyp][c1]; nl;
prt('Foreground: '); input(s,2);
if (s='') then mcol:=ocol and 7 else mcol:=value(s);
prt('Background: '); input(s,2);
if (s='') then
mcol:=mcol or (ocol and 112)
else
mcol:=mcol or (value(s) shl 4);
if pynq('Blinking? ') then mcol:=mcol or 128;
nl; setc(7); prompt(stf(c1)); setc(mcol); print(dt(mcol)); nl;
if pynq('Is this correct? ') then user.cols[ctyp][c1]:=mcol;
end;
end;
if (not done) then begin
nl; prt('Colors: (0-9) (L)ist (Q)uit :'); onek(ch,'QL0123456789');
end;
until done or hangup;
done1:=TRUE;
end;
procedure checkwantpause;
begin
if pynq('Should screen pausing be active? ') then
user.ac:=user.ac+[pause]
else
user.ac:=user.ac-[pause];
done1:=TRUE;
end;
procedure ww(www:integer);
begin
nl;
case www of
1:doaddress; 2:doage; 3:doansi;
4:docitystate; 5:docomputer; 6:dojob;
7:doname; 8:dophone; 9:dopw;
10:dorealname; 11:doscreen; 12:dosex;
13:dowherebbs; 14:dozipcode; 15:mailbox;
16:tog_ansi; 17:tog_color; 18:tog_pause;
19:tog_input; 20:tog_clsmsg; 21:chcolors;
22:tog_expert; 23:findarea; 24:checkwantpause;
25:tog_avadj;
end;
end;
begin
try:=0; done1:=FALSE;
case how of
1:repeat ww(which) until (done1) or (hangup);
2,3:begin
ww(which);
if not done1 then print('Function aborted!');
end;
end;
end;
end.