@@ -29,12 +29,12 @@ Licensed under the Apache License, Version 2.0.
29
29
See: http://www.apache.org/licenses/LICENSE-2.0
30
30
}
31
31
32
- catalog : context [
32
+ catalog: object [
33
33
; Static (non-changing) values, blocks, objects
34
34
datatypes: []
35
35
actions: none
36
36
natives: none
37
- errors: none
37
+ errors: none
38
38
; Reflectors are used on boot to create *-of functions
39
39
reflectors: [
40
40
spec [any-function! any-object! vector! datatype! ]
@@ -51,7 +51,7 @@ catalog: context [
51
51
help vers quiet verbose
52
52
secure-min secure-max trace halt cgi boot-level no-window
53
53
]
54
- bitsets : context [
54
+ bitsets: object [
55
55
crlf: #[bitset! #{ 0024 } ] ;charset "^/^M"
56
56
whitespace: #[bitset! #{ 0064000080 } ] ;charset "^/^M^- "
57
57
numeric: #[bitset! #{ 000000000000FFC0 } ] ;0-9
@@ -64,18 +64,17 @@ catalog: context [
64
64
]
65
65
]
66
66
67
- contexts : context [
67
+ contexts: construct [
68
68
root:
69
69
sys:
70
70
lib:
71
71
user:
72
- none
73
72
]
74
73
75
- state : context [
74
+ state: object [
76
75
; Mutable system state variables
77
76
note: "contains protected hidden fields"
78
- policies : context [ ; Security policies
77
+ policies: construct [ ; Security policies
79
78
file: ; file access
80
79
net: ; network access
81
80
eval: ; evaluation limit
@@ -94,20 +93,19 @@ state: context [
94
93
95
94
modules: []
96
95
97
- codecs : context []
96
+ codecs: object []
98
97
99
- dialects : context [
98
+ dialects: construct [
100
99
secure:
101
100
draw:
102
101
effect:
103
102
text:
104
103
rebcode:
105
- none
106
104
]
107
105
108
- schemes : context []
106
+ schemes: object []
109
107
110
- ports : context [
108
+ ports: object [
111
109
wait-list: [] ; List of ports to add to 'wait
112
110
input: ; Port for user input.
113
111
output: ; Port for user output
@@ -117,7 +115,7 @@ ports: context [
117
115
; serial: none ; serial device name block
118
116
]
119
117
120
- locale : context [
118
+ locale: object [
121
119
language: ; Human language locale
122
120
language*:
123
121
locale:
@@ -131,7 +129,7 @@ locale: context [
131
129
]
132
130
]
133
131
134
- options : context [ ; Options supplied to REBOL during startup
132
+ options: object [ ; Options supplied to REBOL during startup
135
133
boot: ; The path to the executable
136
134
path: ; Where script was started or the startup dir
137
135
home: ; Path of home directory
@@ -159,59 +157,55 @@ options: context [ ; Options supplied to REBOL during startup
159
157
160
158
; verbosity of logs per service (codecs, schemes)
161
159
; 0 = nothing; 1 = info; 2 = more; 3 = debug
162
- log: make object! [
160
+ log: construct [
163
161
http:
164
162
tls:
165
163
zip:
166
164
tar: 1
167
165
]
168
166
]
169
167
170
- script : context [
168
+ script: construct [
171
169
title: ; Title string of script
172
170
header: ; Script header as evaluated
173
171
parent: ; Script that loaded the current one
174
172
path: ; Location of the script being evaluated
175
173
args: ; args passed to script
176
- none
177
174
]
178
175
179
- standard : context [
176
+ standard: object [
180
177
181
- codec : context [
178
+ codec: construct [
182
179
name: ;word!
183
180
title: ;string!
184
181
suffixes: ;block!
185
182
decode: ;[any-function! none!]
186
183
encode: ;[any-function! none!]
187
184
identify: ;[any-function! none!]
188
- none
189
185
]
190
186
191
187
enum: none ; is defined later in %mezz-func.r file
192
188
193
- error : context [ ; Template used for all errors:
189
+ error: construct [ ; Template used for all errors:
194
190
code: 0
195
- type: ' user
196
- id: ' message
191
+ type: user
192
+ id: message
197
193
arg1:
198
194
arg2:
199
195
arg3:
200
196
near:
201
197
where:
202
- none
203
198
]
204
199
205
- script : context [
200
+ script: construct [
206
201
title:
207
202
header:
208
203
parent:
209
204
path:
210
205
args:
211
- none
212
206
]
213
207
214
- header : context [
208
+ header: construct [
215
209
title: {Untitled}
216
210
name:
217
211
type:
@@ -225,10 +219,9 @@ standard: context [
225
219
; compress:
226
220
; exports:
227
221
; content:
228
- none
229
222
]
230
223
231
- scheme : context [
224
+ scheme: construct [
232
225
name: ; word of http, ftp, sound, etc.
233
226
title: ; user-friendly title for the scheme
234
227
spec: ; custom spec for scheme (if needed)
@@ -237,10 +230,9 @@ standard: context [
237
230
; type: ; bytes, integers, objects, values, block
238
231
actor: ; standard action handler for scheme port functions
239
232
awake: ; standard awake handler for this scheme's ports
240
- none
241
233
]
242
234
243
- port : context [ ; Port specification object
235
+ port: construct [ ; Port specification object
244
236
spec: ; published specification of the port
245
237
scheme: ; scheme object used for this port
246
238
actor: ; port action handler (script driven)
@@ -249,14 +241,13 @@ standard: context [
249
241
data: ; data buffer (usually binary or block)
250
242
locals: ; user-defined storage of local data
251
243
; stats: ; stats on operation (optional)
252
- none
253
244
]
254
245
255
- port-spec-head : context [
246
+ port-spec-head: construct [
256
247
title: ; user-friendly title for port
257
248
scheme: ; reference to scheme that defines this port
258
249
ref: ; reference path or url (for errors)
259
- none ; (extended here)
250
+ ; (extended here)
260
251
]
261
252
262
253
port-spec-file: make port-spec-head [
@@ -279,38 +270,35 @@ standard: context [
279
270
device-out: none
280
271
]
281
272
282
- file-info : context [
273
+ file-info: construct [
283
274
name:
284
275
size:
285
276
date:
286
277
type:
287
- none
288
278
]
289
279
290
- net-info : context [
280
+ net-info: construct [
291
281
local-ip:
292
282
local-port:
293
283
remote-ip:
294
284
remote-port:
295
- none
296
285
]
297
286
298
- console-info : context [
299
- buffer-cols: none
300
- buffer-rows: none
301
- window-cols: none
302
- window-rows: none
287
+ console-info: construct [
288
+ buffer-cols:
289
+ buffer-rows:
290
+ window-cols:
291
+ window-rows:
303
292
]
304
293
305
- vector-info : context [
294
+ vector-info: construct [
306
295
signed: ; false if unsigned (always true for decimals)
307
296
type: ; integer! or decimal! so far
308
297
size: ; size per value in bits
309
298
length: ; number of values
310
- none
311
299
]
312
300
313
- date-info : context [
301
+ date-info: construct [
314
302
year:
315
303
month:
316
304
day:
@@ -327,26 +315,23 @@ standard: context [
327
315
;isoweek:
328
316
utc:
329
317
julian:
330
- none
331
318
]
332
319
333
- midi-info : context [
320
+ midi-info: construct [
334
321
devices-in:
335
322
devices-out:
336
- none
337
323
]
338
324
339
- extension : context [
325
+ extension: construct [
340
326
lib-base: ; handle to DLL
341
327
lib-file: ; file name loaded
342
328
lib-boot: ; module header and body
343
329
command: ; command function
344
330
cmd-index: ; command index counter
345
331
words: ; symbol references
346
- none
347
332
]
348
333
349
- stats : context [ ; port stats
334
+ stats: construct [ ; port stats
350
335
timer: ; timer (nanos)
351
336
evals: ; evaluations
352
337
eval-natives:
@@ -359,13 +344,11 @@ standard: context [
359
344
made-blocks:
360
345
made-objects:
361
346
recycles:
362
- none
363
347
]
364
348
365
- type-spec : context [
349
+ type-spec: construct [
366
350
title:
367
351
type:
368
- none
369
352
]
370
353
371
354
bincode: none
@@ -374,16 +357,16 @@ standard: context [
374
357
para: none ; mezz-graphics.h
375
358
]
376
359
377
- view : context [
360
+ view: object [
378
361
screen-gob: none
379
362
handler: none
380
363
event-port: none
381
- metrics : context [
382
- screen-size: 0x0
383
- border-size: 0x0
384
- border-fixed: 0x0
385
- title-size: 0x0
386
- work-origin: 0x0
364
+ metrics: construct [
365
+ screen-size:
366
+ border-size:
367
+ border-fixed:
368
+ title-size:
369
+ work-origin:
387
370
work-size: 0x0
388
371
]
389
372
event-types: [
0 commit comments