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
|
PACKET spool cmd (* Autor : R. Ruland *)
(* Stand : 13.08.87 *)
DEFINES
spool control password,
kill spool,
first spool,
start spool,
stop spool,
halt spool,
wait for halt :
LET error nak = 2 ,
entry line code = 23 ,
killer code = 24 ,
first code = 25 ,
start code = 26 ,
stop code = 27 ,
halt code = 28 ,
wait for halt code = 29 ;
DATASPACE VAR ds;
BOUND STRUCT (TEXT entry line, INT index, TEXT actual entries, password) VAR control msg;
BOUND TEXT VAR error msg;
INT VAR reply;
INITFLAG VAR in this task := FALSE;
BOOL VAR dialogue;
TEXT VAR control password, password;
control password := "";
PROC spool control password (TEXT CONST new password):
IF on line THEN say (""3""13""5"") FI;
disable stop;
do ("enter spool control password (""" + new password + """)");
clear error;
no do again;
cover tracks;
cover tracks (control password);
control password := new password;
END PROC spool control password;
PROC call spool (INT CONST op code, TEXT CONST name, TASK CONST spool) :
dialogue := command dialogue;
password := write password;
password CAT "/";
password CAT read password;
disable stop;
command dialogue (FALSE);
enter password (control password);
command dialogue (dialogue);
call (op code, name, spool);
command dialogue (FALSE);
enter password (password);
command dialogue (dialogue);
END PROC call spool;
PROC start spool (TASK CONST spool) :
enable stop;
call spool (halt code, "", spool);
call spool (start code, "", spool);
END PROC start spool;
PROC start spool (TASK CONST spool, INT CONST new channel) :
enable stop;
call spool (halt code, "", spool);
call spool (start code, text (new channel), spool);
END PROC start spool;
PROC stop spool (TASK CONST spool) :
call spool (stop code, "", spool);
END PROC stop spool;
PROC stop spool (TASK CONST spool, TEXT CONST deactive msg) :
call spool (stop code, deactive msg, spool);
END PROC stop spool;
PROC halt spool (TASK CONST spool) :
call spool (halt code, "", spool);
END PROC halt spool;
PROC halt spool (TASK CONST spool, TEXT CONST deactive msg) :
call spool (halt code, deactive msg, spool);
END PROC halt spool;
PROC wait for halt (TASK CONST spool) :
call spool (wait for halt code, "", spool);
END PROC wait for halt;
PROC wait for halt (TASK CONST spool, TEXT CONST deactive msg) :
call spool (wait for halt code, deactive msg, spool);
END PROC wait for halt;
PROC control spool (TASK CONST spool, INT CONST control code,
TEXT CONST question, BOOL CONST leave) :
enable stop;
initialize control msg;
WHILE valid spool entry
REP IF control question THEN control spool entry FI PER;
. initialize control msg :
IF NOT initialized (in this task) THEN ds := nilspace FI;
forget (ds); ds := nilspace; control msg := ds;
control msg. entry line := "";
control msg. password := control password;
control msg. index := 0;
say (""13""10"");
. valid spool entry :
call (spool, entry line code, ds, reply);
IF reply = error nak
THEN error msg := ds;
errorstop (error msg);
FI;
control msg. index <> 0
. control question :
say (control msg. entry line);
yes (question)
. control spool entry :
call (spool, control code, ds, reply);
IF reply = error nak
THEN error msg := ds;
errorstop (error msg);
FI;
IF leave THEN LEAVE control spool FI;
END PROC control spool;
PROC kill spool (TASK CONST spool) :
control spool (spool, killer code, " loeschen", FALSE)
END PROC kill spool;
PROC first spool (TASK CONST spool) :
control spool (spool, first code, " als erstes", TRUE)
END PROC first spool;
END PACKET spool cmd;
|