Skip to content

Latest commit

 

History

History
207 lines (197 loc) · 7.78 KB

sysop2fa.pas

File metadata and controls

207 lines (197 loc) · 7.78 KB
 
Nov 18, 2000
Nov 18, 2000
1
2
3
4
5
6
7
8
(*****************************************************************************)
(*> <*)
(*> SYSOP2FA.PAS - Written by Eric Oman <*)
(*> <*)
(*> SysOp functions: System Configuration Editor -- "F","A" command. <*)
(*> <*)
(*> <*)
(*****************************************************************************)
Nov 25, 2000
Nov 25, 2000
9
{$A+,B+,E+,F+,I+,L+,N-,O+,R-,S+,V-}
Nov 18, 2000
Nov 18, 2000
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
unit sysop2fa;
interface
uses
crt, dos,
{rcg11172000 no overlay under Linux.}
{overlay,}
common;
procedure poarcconfig;
implementation
function nt(s:string):string;
begin
if s<>'' then nt:=s else nt:='*None*';
if copy(s,1,1)='/' then begin
s:='"'+s+'" - ';
case s[3] of
'1':nt:=s+'*Internal* ZIP viewer';
'2':nt:=s+'*Internal* ARC/PAK viewer';
'3':nt:=s+'*Internal* ZOO viewer';
'4':nt:=s+'*Internal* LZH viewer';
end;
end;
end;
function nt2(i:integer):string;
begin
if i<>-1 then nt2:=cstr(i) else nt2:='-1 (ignores)';
end;
procedure poarcconfig;
var ii,i2,numarcs:integer;
c:char;
s:astr;
bb:byte;
abort,next,changed:boolean;
begin
numarcs:=1;
while (systat.filearcinfo[numarcs].ext<>'') and (numarcs<7) do
inc(numarcs);
dec(numarcs);
c:=' ';
while (c<>'Q') and (not hangup) do begin
repeat
if c<>'?' then begin
cls;
print('Archive configuration edit');
nl;
abort:=FALSE; next:=FALSE;
for bb:=1 to 3 do begin
s:=systat.filearccomment[bb]; if s='' then s:='*None*';
printacr(cstr(bb)+'. Archive comment: '+s,abort,next);
end;
nl;
printacr(#3#3+' NN'+sepr2+'Ext'+sepr2+'Compression cmdline '+
sepr2+'Decompression cmdline '+sepr2+'Success Code',abort,next);
printacr(#3#4+' ==:===:=========================:=========================:============',abort,next);
ii:=1;
while (ii<=numarcs) and (not abort) and (not hangup) do begin
with systat.filearcinfo[ii] do begin
if (active) then s:=#3#5+'+' else s:=#3#1+'-';
s:=s+#3#0+mn(ii,2)+' '+#3#3+mln(ext,3)+' '+
#3#5+mlnnomci(arcline,25)+' '+mlnnomci(unarcline,25)+' '+
nt2(succlevel);
printacr(s,abort,next);
end;
inc(ii);
end;
end;
nl;
prt('Archive edit (Q,?=help) : ');
onek(c,'Q?DIM123'^M);
nl;
case c of
'?':begin
print('<CR>Redisplay screen');
print('1-3:Archive comments');
lcmds(16,3,'Insert archive','Delete archive');
lcmds(16,3,'Modify archives','Quit and save');
end;
'M':begin
prt('Begin editing at which? '); ini(bb);
if (not badini) and (bb>=1) and (bb<=numarcs) then begin
i2:=bb;
while (c<>'Q') and (not hangup) do begin
repeat
if c<>'?' then begin
cls;
print('Archive #'+cstr(i2)+' of '+cstr(numarcs));
nl;
with systat.filearcinfo[i2] do begin
print('1. Active : '+syn(active));
print('2. Extension name : '+ext);
print('3. Interior list method : '+nt(listline));
print('4. Compression cmdline : '+nt(arcline));
print('5. Decompression cmdline : '+nt(unarcline));
print('6. Integrity check cmdline: '+nt(testline));
print('7. Add comment cmdline : '+nt(cmtline));
print('8. Errorlevel for success : '+nt2(succlevel));
print('Q. Quit');
end;
end;
nl;
prt('Edit menu: (1-8,[,],Q) : ');
onek(c,'Q12345678[]?'^M);
nl;
case c of
'?':begin
sprint(' #:Modify item <CR>Redisplay screen');
lcmds(14,3,'[Back archive',']Forward archive');
lcmds(14,3,'Quit and save','');
end;
'1'..'8':
with systat.filearcinfo[i2] do
case c of
'1':active:=not active;
'2':begin
prt('New extension: '); input(s,3);
if s<>'' then ext:=s;
end;
'3'..'7':
begin
prt('New commandline: ');
inputl(s,25);
if s<>'' then begin
if s=' ' then
if pynq('Set to NULL string? ') then
s:='';
if s<>' ' then
case c of
'3':listline:=s;
'4':arcline:=s;
'5':unarcline:=s;
'6':testline:=s;
'7':cmtline:=s;
end;
end;
end;
'8':begin
prt('New errorlevel: '); inu(ii);
if not badini then
systat.filearcinfo[i2].succlevel:=ii;
end;
end;
'[':if i2>1 then dec(i2) else c:=' ';
']':if i2<numarcs then inc(i2) else c:=' ';
end;
until (c in ['Q','[',']']) or (hangup);
end;
end;
c:=' ';
end;
'D':begin
prt('Delete which? '); ini(bb);
if (not badini) and (bb in [1..numarcs]) then begin
nl;
sprompt(#3#3+systat.filearcinfo[bb].ext);
if pynq(' Delete it? ') then begin
for i2:=bb to numarcs-1 do
systat.filearcinfo[i2]:=systat.filearcinfo[i2+1];
systat.filearcinfo[numarcs].ext:='';
dec(numarcs);
end;
end;
end;
'I':if numarcs<>maxarcs then begin
prt('Insert before which (1-'+cstr(numarcs+1)+') : ');
ini(bb);
if (not badini) and (bb in [1..numarcs+1]) then begin
if bb<>numarcs+1 then
for i2:=numarcs+1 downto bb+1 do
systat.filearcinfo[i2]:=systat.filearcinfo[i2-1];
with systat.filearcinfo[bb] do begin
active:=FALSE;
ext:='AAA';
listline:=''; arcline:=''; unarcline:='';
testline:=''; cmtline:=''; succlevel:=-1;
end;
inc(numarcs);
end;
end;
'1'..'3':
begin
bb:=ord(c)-48;
prt('New comment #'+c+': ');
inputwnwc(systat.filearccomment[bb],32,changed);
end;
end;
until (c='Q') or (hangup);
end;
end;
end.