summaryrefslogtreecommitdiff
path: root/tandem/macros
blob: 5db5a7dcfd03814304ba733d96aad323f7d49fc6 (plain)
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
?section ADD^LIST routine
[#IF [#ARGUMENT /VALUE item/ WORD/SPACE/]]
#APPEND bin ADD * FROM [item]
#SET itime [#FILEINFO /MODIFICATION/ [item]]
[#IF itime > ntime |THEN| #SETV ntime itime]

?section BBZIPLIB MACRO
#FRAME
#push bin item ntime itime libtime
#SET ntime 0

#OUTPUT Building [lib]
#APPEND bin CLEAR
add^list CRC32O
add^list CRCTABO
add^list CRYPTO
add^list DEFLATEO
add^list FILEIOO
add^list GLOBALSO
add^list TANDEMO
add^list TANZIPO
add^list TREESO
add^list TTYIOO
add^list UTILO
add^list ZIPFILEO
add^list ZIPUPO
#APPEND bin INFO UNRESOLVED *
#APPEND bin BUILD [lib] ! , LIST * OFF

#SET libtime [#FILEINFO /MODIFICATION/ [lib]]
[#IF libtime < ntime
|THEN|
  #OUTPUT [lib] needs re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound [lib] OK
  | 1         | #OUTPUT [lib]: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT [lib]: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT [lib] is up to date
]

#UNFRAME

?section BBZIP MACRO
#FRAME
#push bin ziptime build
#SET build 0
#OUTPUT Building %1% with %2% memory model
#APPEND bin CLEAR
#APPEND bin ADD * FROM ZIPO
#APPEND bin select search ($system.system.c%2%, [lib])
#APPEND bin select runnable object on
#APPEND bin select list * off
#APPEND bin set heap 20 pages
#APPEND bin set symbols on
#APPEND bin set saveabend on
#APPEND bin set inspect on
#APPEND bin info unresolved *
#APPEND bin BUILD %1%   !

#SET ziptime [#FILEINFO /MODIFICATION/ %1%]
[#IF ziptime < [#FILEINFO /MODIFICATION/ ZIPO] |THEN|
  #OUTPUT %1% is older than ZIPO
  #SET build -1
]
[#IF ziptime < [#FILEINFO /MODIFICATION/ [lib]] |THEN|
  #OUTPUT %1% is older than [lib]
  #SET build -1
]
[#IF build
|THEN|
  #OUTPUT %1% is out of date, re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound %1% OK
  | 1         | #OUTPUT %1%: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT %1%: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT %1% is up to date, no re-build required
]

#UNFRAME

?section BBANY MACRO
#FRAME
#push bin memory anytime build
#SET build 0
#SETMANY memory, %2% LARGE
#OUTPUT Building %1% with [memory] memory model
#APPEND bin CLEAR
#APPEND bin ADD * FROM %1%O
#APPEND bin select search ($system.system.c[memory],[lib])
#APPEND bin select runnable object on
#APPEND bin select list * off
#APPEND bin set heap 20 pages
#APPEND bin set symbols on
#APPEND bin set saveabend on
#APPEND bin set inspect on
#APPEND bin info unresolved *
#APPEND bin BUILD %1%   !

#SET anytime [#FILEINFO /MODIFICATION/ %1%]
[#IF anytime < [#FILEINFO /MODIFICATION/ %1%O] |THEN|
  #OUTPUT %1% is older than %1%O
  #SET build -1
]
[#IF anytime < [#FILEINFO /MODIFICATION/ [lib]] |THEN|
  #OUTPUT %1% is older than [lib]
  #SET build -1
]
[#IF build
|THEN|
  #OUTPUT %1% is out of date, re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound %1% OK
  | 1         | #OUTPUT %1%: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT %1%: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT %1% is up to date, no re-build required
]

#UNFRAME


?section BBUNZIPLIB MACRO
#FRAME
#push bin item ntime itime libtime
#SET ntime 0

#OUTPUT Building [lib]
#APPEND bin CLEAR
add^list CRC32O
add^list CRCTABO
add^list CRYPTO
add^list ENVARGSO
add^list EXPLODEO
add^list EXTRACTO
add^list FILEIOO
add^list GLOBALSO
add^list INFLATEO
add^list LISTO
add^list MATCHO
add^list PROCESSO
add^list TANDEMO
add^list TANUNZO
add^list TTYIOO
add^list UNSHRINO
add^list ZIPINFOO
#APPEND bin INFO UNRESOLVED *
#APPEND bin BUILD [lib] ! , LIST * OFF

#SET libtime [#FILEINFO /MODIFICATION/ [lib]]
[#IF libtime < ntime
|THEN|
  #OUTPUT [lib] needs re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound [lib] OK
  | 1         | #OUTPUT [lib]: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT [lib]: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT [lib] is up to date
]

#UNFRAME

?section BBUNZIP MACRO
#FRAME
#push bin ziptime build
#SET build 0
#OUTPUT Building %1% with %2% memory model
#APPEND bin CLEAR
#APPEND bin ADD * FROM UNZIPO
#APPEND bin select search ($system.system.c%2%,[lib])
#APPEND bin select runnable object on
#APPEND bin select list * off
#APPEND bin set heap 20 pages
#APPEND bin set symbols on
#APPEND bin set saveabend on
#APPEND bin set inspect on
#APPEND bin info unresolved *
#APPEND bin BUILD %1%   !

#SET ziptime [#FILEINFO /MODIFICATION/ %1%]
[#IF ziptime < [#FILEINFO /MODIFICATION/ UNZIPO] |THEN|
  #OUTPUT %1% is older than UNZIPO
  #SET build -1
]
[#IF ziptime < [#FILEINFO /MODIFICATION/ [lib]] |THEN|
  #OUTPUT %1% is older than [lib]
  #SET build -1
]
[#IF build
|THEN|
  #OUTPUT %1% is out of date, re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound %1% OK
  | 1         | #OUTPUT %1%: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT %1%: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT %1% is up to date, no re-build required
]

#UNFRAME

?section BBSFXLIB MACRO
#FRAME
#push bin item ntime itime libtime
#SET ntime 0

#OUTPUT Building [lib]
#APPEND bin CLEAR
add^list CRC32O
add^list CRCTABO
add^list EXTRACTX
add^list FILEIOO
add^list GLOBALSO
add^list INFLATEO
add^list MATCHO
add^list PROCESSX
add^list TANDEMO
add^list TANUNZX
add^list TTYIOO
#APPEND bin INFO UNRESOLVED *
#APPEND bin BUILD [lib] ! , LIST * OFF

#SET libtime [#FILEINFO /MODIFICATION/ [lib]]
[#IF libtime < ntime
|THEN|
  #OUTPUT [lib] needs re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound [lib] OK
  | 1         | #OUTPUT [lib]: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT [lib]: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT [lib] is up to date
]

#UNFRAME

?section BBSFX MACRO
#FRAME
#push bin ziptime build
#SET build 0
#OUTPUT Building %1% with %2% memory model
#APPEND bin CLEAR
#APPEND bin ADD * FROM UNZIPX
#APPEND bin select search ($system.system.c%2%,[lib])
#APPEND bin select runnable object on
#APPEND bin select list * off
#APPEND bin set heap 20 pages
#APPEND bin set symbols on
#APPEND bin set saveabend on
#APPEND bin set inspect on
#APPEND bin info unresolved *
#APPEND bin BUILD %1%   !

#SET ziptime [#FILEINFO /MODIFICATION/ %1%]
[#IF ziptime < [#FILEINFO /MODIFICATION/ UNZIPX] |THEN|
  #OUTPUT %1% is older than UNZIPX
  #SET build -1
]
[#IF ziptime < [#FILEINFO /MODIFICATION/ [lib]] |THEN|
  #OUTPUT %1% is older than [lib]
  #SET build -1
]
[#IF build
|THEN|
  #OUTPUT %1% is out of date, re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound %1% OK
  | 1         | #OUTPUT %1%: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT %1%: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT %1% is up to date, no re-build required
]

#UNFRAME

?section accel^file MACRO
#FRAME
#PUSH buf
[#IF [#FILEINFO /MODIFICATION/ %1%]
   > [#FILEINFO /MODIFICATION/ %2%]
|THEN|
  #OUTPUT %2% is older than %1%
  #OUTPUT Accelerating %1% to %2%
  AXCEL /IN [general_seg_subvol].DUMMY, OUTV buf/ %1%,%2%
  #OUTPUTV buf
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Accelerated %2% OK
  | 1         | #OUTPUT %2%: AXCEL Failed with Warnings
  | OTHERWISE | #OUTPUT %2%: AXCEL Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT %2% is up to date
]

#UNFRAME

?section fup^license ROUTINE
#FRAME
#PUSH #DEFAULTS filename old^user current^user

[#IF [#ARGUMENT /VALUE filename/ FILENAME]]

#SET old^user [#USERNAME [#PROCESSINFO /PAID/]]
#SETV current^user old^user
[#LOOP |WHILE| current^user '<>' "SUPER.SUPER"
               AND NOT [#INPUTEOF]
|DO|
  #OUTPUT Please log on as SUPER.SUPER (CTRL-Y aborts)
  logon SUPER.SUPER
  #SET current^user [#USERNAME [#PROCESSINFO /PAID/]]
  #OUTPUT
]

[#IF current^user '=' "SUPER.SUPER" |THEN|
  #OUTPUT Licensing [filename]
  $SYSTEM.SYSTEM.FUP LICENSE [filename]
]

[#LOOP |WHILE| current^user '<>' old^user
               AND NOT [#INPUTEOF]
|DO|
  #OUTPUT Please log on as [old^user] (CTRL-Y aborts)
  logon [old^user]
  #SET current^user [#USERNAME [#PROCESSINFO /PAID/]]
  #OUTPUT
]

#UNFRAME