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
|
?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 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 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 EXTRACTX
add^list FILEIOX
add^list GLOBALSX
add^list INFLATEX
add^list MATCHX
add^list PROCESSX
add^list TANDEMX
add^list TANUNZX
add^list TTYIOX
#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 /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
?section CODE routine
#FRAME
#PUSH delta arg
#SET /TYPE delta/ DELTA
[#LOOP |WHILE| [#COMPUTE [#ARGUMENT /VALUE arg/ NUMBER END] = 1 ]
|DO|
#APPEND DELTA [arg]I
]
#RESULT [#DELTA /COMMANDS DELTA/]
#UNFRAME
?section TACL^COMPLETIONCODE routine
#RESULT [_completion:completioncode]
?SECTION INCREMENT routine
#FRAME
#PUSH increment_variable increment_value
[#IF [#ARGUMENT /VALUE increment_variable/ VARIABLE]]
[#IF [#EMPTYV [increment_variable]]|THEN|#SET [increment_variable] 0]
[#IF [#MORE]
|THEN|
[#IF [#ARGUMENT /VALUE increment_value/ NUMBER]]
|ELSE|
#SET increment_value 1
]
[#IF [#ARGUMENT END]]
#SET [increment_variable] [#COMPUTE [increment_variable] + [increment_value]]
#UNFRAME
?section ERROR^IN^FUP^OUTPUT routine
#FRAME
#PUSH err output last line type
#SETMANY err output, 0 0
[#LOOP |WHILE| NOT [#EMPTYV fup^out]
|DO|
#EXTRACTV fup^out line
[#SETMANY type, [#CHARGET line 1 TO 7] .]
[#CASE [type]
| ERROR | #SETMANY output err, -1 -1
| WARNING | #SET output -1
| OTHERWISE |
]
[#IF output |THEN|
#OUTPUTV last
#OUTPUTV line
#SET output 0
#EXTRACTV fup^out line
]
#SETV last line
]
#RESULT [err]
#UNFRAME
?section SECURE^FILE routine
#FRAME
[#DEF fup^out TEXT |BODY|]
[#DEF fup^buf TEXT |BODY|]
[#DEF fup^cmd MACRO |BODY|
FUP /OUTV fup^out/ %*%
#SETV fup^buf fup^out
[#IF [error^in^fup^output]
|THEN|
#OUTPUT Error detected in FUP output, ABORTING !!
#OUTPUT ..............................................................
#OUTPUTV fup^buf
#OUTPUT ..............................................................
#RAISE _BREAK
]
]
[#DEF display^action MACRO |BODY|
[#IF NOT action |THEN|
#OUTPUT /HOLD/ Updating [file] ...
#SET action -1
#SET count 0
]
#OUTPUT /COLUMN 3/ ... %*%
]
[#DEF display^noaction MACRO |BODY|
[#IF count
|THEN|
increment count
|ELSE|
#OUTPUT
#SET count 1
]
[#IF count |THEN|
#OUTPUT /COLUMN [count]/ [code 27]A.
[#IF count > 75
|THEN|
#SET count 0
]
]
]
[#DEF process^file TEXT |BODY|
#SET action 0
#SETMANY cur^owner cur^security cur^license cur^progid, &
[#FILEINFO /OWNER, SECURITY, LICENSED, PROGID/ [file]]
#SET cur^owner [#USERNAME [cur^owner]]
[#IF NOT [#EMPTYV owner]
|THEN|
[#IF owner '<>' cur^owner
|THEN|
display^action giving to [owner] (was [cur^owner])
fup^cmd GIVE [file], [owner]
[#IF cur^progid
|THEN|
#OUTPUT /COLUMN 3/... WARNING! Loss of PROGID flag
#SET cur^progid 0
]
]
]
[#IF NOT [#EMPTYV security]
|THEN|
[#IF security '<>' cur^security
|THEN|
display^action securing to [security] (was [cur^security])
fup^cmd SECURE [file], [security]
]
]
[#IF license |THEN|
[#IF NOT cur^license
|THEN|
display^action licensed
fup^cmd LICENSE [file]
]
]
[#IF progid |THEN|
[#IF NOT cur^progid
|THEN|
display^action PROGID flag set
fup^cmd SECURE [file],, PROGID
]
]
[#IF action
|THEN|
fup^cmd INFO [file]
|ELSE|
[#IF tflag
|THEN|
display^noaction
|ELSE|
#OUTPUT /HOLD/ Unchanged : [file]
[#IF cur^progid |THEN| #OUTPUT /COLUMN 39,HOLD/ P]
[#IF cur^license |THEN| #OUTPUT /COLUMN 40,HOLD/ L]
#OUTPUTV /COLUMN 43,HOLD/ cur^security
#OUTPUTV /COLUMN 50,HOLD/ cur^owner
#OUTPUT
]
]
]
#PUSH arg template file security owner progid license prev action count tflag
#PUSH cur^security cur^owner cur^license cur^progid
#SETMANY license progid, 0 0
#SET count 0
#SET tflag 0
[#LOOP |WHILE| [#MORE]
|DO|
[#CASE [#ARGUMENT /VALUE arg/ FILENAME
USER /USERNAME/
USER
SECURITY
KEYWORD /WORDLIST LICENSE/
KEYWORD /WORDLIST PROGID/
TEMPLATE
]
| 1 | #SETV file arg
| 2 | #SETV owner arg
| 3 | #SET owner [#USERNAME [arg]]
| 4 | #SETV security arg
| 5 | #SET license -1
| 6 | #SET progid -1
| 7 | #SETV template arg
]
]
[#IF [#ARGUMENT END]]
[#IF [#EMPTYV template]
|THEN|
#SETV template file
|ELSE|
#SET tflag -1
#OUTPUT /HOLD/ Template : [template]
[#IF progid |THEN| #OUTPUT /COLUMN 39,HOLD/ P]
[#IF license |THEN| #OUTPUT /COLUMN 40,HOLD/ L]
[#IF NOT [#EMPTYV security] |THEN| #OUTPUTV /HOLD/ " "[security]""]
[#IF NOT [#EMPTYV owner] |THEN| #OUTPUTV /HOLD/ " [owner]"]
#OUTPUT
]
[#IF [#EMPTYV template]
|THEN|
#OUTPUT ERROR! No filename specified
#RESET FRAMES
#RETURN
|ELSE|
#SET file [#FILENAMES /MAXIMUM 1/ [template]]
[#LOOP |WHILE| NOT [#EMPTYV file]
|DO|
process^file
#SETV prev file
#SET file [#FILENAMES /MAXIMUM 1, PREVIOUS [prev]/ [template]]
]
]
#UNFRAME
|