File: macros

package info (click to toggle)
unzip 5.40-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 4,120 kB
  • ctags: 5,900
  • sloc: ansic: 40,977; cpp: 3,778; makefile: 1,384; asm: 1,228; sh: 133
file content (230 lines) | stat: -rw-r--r-- 5,479 bytes parent folder | download
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
?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 ZIPLIB
#APPEND bin CLEAR
add^list CRC32O
add^list CRCTABO
add^list DEFLATEO
add^list FILEIOO
add^list GLOBALSO
add^list TANDEMO
add^list TREESO
add^list TTYIOO
add^list UTILO
add^list ZIPFILEO
add^list ZIPUPO
#APPEND bin INFO UNRESOLVED *
#APPEND bin BUILD ZIPLIB ! , LIST * OFF

#SET libtime [#FILEINFO /MODIFICATION/ ZIPLIB]
[#IF libtime < ntime
|THEN|
  #OUTPUT ZIPLIB needs re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound ZIPLIB OK
  | 1         | #OUTPUT ZIPLIB: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT ZIPLIB: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT ZIPLIB 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%, ZIPLIB)
#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/ ZIPLIB] |THEN|
  #OUTPUT %1% is older than ZIPLIB
  #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],ZIPLIB)
#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/ ZIPLIB] |THEN|
  #OUTPUT %1% is older than ZIPLIB
  #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 UNZIPLIB
#APPEND bin CLEAR
add^list CRC32O
add^list CRCTABO
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 TTYIOO
==add^list UNREDUCO
add^list UNSHRINO
add^list ZIPINFOO
#APPEND bin INFO UNRESOLVED *
#APPEND bin BUILD UNZIPLIB ! , LIST * OFF

#SET libtime [#FILEINFO /MODIFICATION/ UNZIPLIB]
[#IF libtime < ntime
|THEN|
  #OUTPUT UNZIPLIB needs re-building
  BIND /NAME,INV BIN/
  [#CASE [tacl^completioncode]
  | 0         | #OUTPUT Bound UNZIPLIB OK
  | 1         | #OUTPUT UNZIPLIB: BIND Failed with Warnings
  | OTHERWISE | #OUTPUT UNZIPLIB: BIND Failed with ERRORS !
  ]
|ELSE|
  #OUTPUT UNZIPLIB 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%,UNZIPLIB)
#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/ UNZIPLIB] |THEN|
  #OUTPUT %1% is older than UNZIPLIB
  #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