Commit | Line | Data |
---|---|---|
79072805 LW |
1 | #!/usr/bin/perl |
2 | ||
3 | open(OC, ">opcode.h") || die "Can't create opcode.h: $!\n"; | |
4 | select OC; | |
5 | ||
6 | # Read data. | |
7 | ||
8 | while (<DATA>) { | |
9 | chop; | |
10 | next unless $_; | |
11 | next if /^#/; | |
c07a80fd | 12 | ($key, $desc, $check, $flags, $args) = split(/\t+/, $_, 5); |
13 | ||
14 | warn qq[Description "$desc" duplicates $seen{$desc}\n] if $seen{$desc}; | |
15 | die qq[Opcode "$key" duplicates $seen{$key}\n] if $seen{$key}; | |
16 | $seen{$desc} = qq[description of opcode "$key"]; | |
17 | $seen{$key} = qq[opcode "$key"]; | |
18 | ||
79072805 | 19 | push(@ops, $key); |
c07a80fd | 20 | $desc{$key} = $desc; |
79072805 LW |
21 | $check{$key} = $check; |
22 | $ckname{$check}++; | |
23 | $flags{$key} = $flags; | |
24 | $args{$key} = $args; | |
25 | } | |
26 | ||
27 | # Emit defines. | |
28 | ||
29 | $i = 0; | |
748a9306 LW |
30 | print <<"END"; |
31 | #define pp_i_preinc pp_preinc | |
32 | #define pp_i_predec pp_predec | |
33 | #define pp_i_postinc pp_postinc | |
34 | #define pp_i_postdec pp_postdec | |
35 | ||
36 | typedef enum { | |
37 | END | |
79072805 LW |
38 | for (@ops) { |
39 | print "\t", &tab(3,"OP_\U$_,"), "/* ", $i++, " */\n"; | |
40 | } | |
85e6fe83 | 41 | print "\t", &tab(3,"OP_max"), "\n"; |
79072805 LW |
42 | print "} opcode;\n"; |
43 | print "\n#define MAXO ", scalar @ops, "\n\n"; | |
44 | ||
c07a80fd | 45 | # Emit op names and descriptions. |
79072805 LW |
46 | |
47 | print <<END; | |
48 | #ifndef DOINIT | |
a0d0e21e | 49 | EXT char *op_name[]; |
79072805 | 50 | #else |
a0d0e21e | 51 | EXT char *op_name[] = { |
79072805 LW |
52 | END |
53 | ||
54 | for (@ops) { | |
c07a80fd | 55 | print qq(\t"$_",\n); |
56 | } | |
57 | ||
58 | print <<END; | |
59 | }; | |
60 | #endif | |
61 | ||
62 | END | |
63 | ||
64 | print <<END; | |
65 | #ifndef DOINIT | |
66 | EXT char *op_desc[]; | |
67 | #else | |
68 | EXT char *op_desc[] = { | |
69 | END | |
70 | ||
71 | for (@ops) { | |
72 | print qq(\t"$desc{$_}",\n); | |
79072805 LW |
73 | } |
74 | ||
75 | print <<END; | |
76 | }; | |
77 | #endif | |
78 | ||
79 | END | |
80 | ||
81 | # Emit function declarations. | |
82 | ||
83 | for (sort keys %ckname) { | |
a0d0e21e | 84 | print "OP *\t", &tab(3,$_),"_((OP* op));\n"; |
79072805 LW |
85 | } |
86 | ||
87 | print "\n"; | |
88 | ||
89 | for (@ops) { | |
a0d0e21e | 90 | print "OP *\t", &tab(3, "pp_\L$_"), "_((void));\n"; |
79072805 LW |
91 | } |
92 | ||
93 | # Emit ppcode switch array. | |
94 | ||
95 | print <<END; | |
96 | ||
97 | #ifndef DOINIT | |
a0d0e21e | 98 | EXT OP * (*ppaddr[])(); |
79072805 | 99 | #else |
a0d0e21e | 100 | EXT OP * (*ppaddr[])() = { |
79072805 LW |
101 | END |
102 | ||
103 | for (@ops) { | |
104 | print "\tpp_\L$_,\n"; | |
105 | } | |
106 | ||
107 | print <<END; | |
108 | }; | |
109 | #endif | |
110 | ||
111 | END | |
112 | ||
113 | # Emit check routines. | |
114 | ||
115 | print <<END; | |
116 | #ifndef DOINIT | |
c6ecf61f | 117 | EXT OP * (*check[]) _((OP *op)); |
79072805 | 118 | #else |
c6ecf61f | 119 | EXT OP * (*check[]) _((OP *op)) = { |
79072805 LW |
120 | END |
121 | ||
122 | for (@ops) { | |
123 | print "\t", &tab(3, "$check{$_},"), "/* \L$_ */\n"; | |
124 | } | |
125 | ||
126 | print <<END; | |
127 | }; | |
128 | #endif | |
129 | ||
130 | END | |
131 | ||
132 | # Emit allowed argument types. | |
133 | ||
134 | print <<END; | |
135 | #ifndef DOINIT | |
136 | EXT U32 opargs[]; | |
137 | #else | |
a0d0e21e | 138 | EXT U32 opargs[] = { |
79072805 LW |
139 | END |
140 | ||
141 | %argnum = ( | |
142 | S, 1, # scalar | |
143 | L, 2, # list | |
144 | A, 3, # array value | |
145 | H, 4, # hash value | |
146 | C, 5, # code value | |
147 | F, 6, # file value | |
148 | R, 7, # scalar reference | |
149 | ); | |
150 | ||
151 | for (@ops) { | |
152 | $argsum = 0; | |
153 | $flags = $flags{$_}; | |
154 | $argsum |= 1 if $flags =~ /m/; # needs stack mark | |
155 | $argsum |= 2 if $flags =~ /f/; # fold constants | |
156 | $argsum |= 4 if $flags =~ /s/; # always produces scalar | |
157 | $argsum |= 8 if $flags =~ /t/; # needs target scalar | |
158 | $argsum |= 16 if $flags =~ /i/; # always produces integer | |
159 | $argsum |= 32 if $flags =~ /I/; # has corresponding int op | |
160 | $argsum |= 64 if $flags =~ /d/; # danger, unknown side effects | |
a0d0e21e | 161 | $argsum |= 128 if $flags =~ /u/; # defaults to $_ |
79072805 LW |
162 | $mul = 256; |
163 | for $arg (split(' ',$args{$_})) { | |
164 | $argnum = ($arg =~ s/\?//) ? 8 : 0; | |
165 | $argnum += $argnum{$arg}; | |
166 | $argsum += $argnum * $mul; | |
167 | $mul <<= 4; | |
168 | } | |
169 | $argsum = sprintf("0x%08x", $argsum); | |
170 | print "\t", &tab(3, "$argsum,"), "/* \L$_ */\n"; | |
171 | } | |
172 | ||
173 | print <<END; | |
174 | }; | |
175 | #endif | |
176 | END | |
177 | ||
178 | ########################################################################### | |
179 | sub tab { | |
180 | local($l, $t) = @_; | |
181 | $t .= "\t" x ($l - (length($t) + 1) / 8); | |
182 | $t; | |
183 | } | |
184 | ########################################################################### | |
185 | __END__ | |
186 | ||
187 | # Nothing. | |
188 | ||
189 | null null operation ck_null 0 | |
93a17b20 LW |
190 | stub stub ck_null 0 |
191 | scalar scalar ck_fun s S | |
79072805 LW |
192 | |
193 | # Pushy stuff. | |
194 | ||
195 | pushmark pushmark ck_null s | |
196 | wantarray wantarray ck_null is | |
197 | ||
8990e307 | 198 | const constant item ck_svconst s |
79072805 LW |
199 | |
200 | gvsv scalar variable ck_null ds | |
201 | gv glob value ck_null ds | |
c07a80fd | 202 | gelem glob elem ck_null d S S |
748a9306 LW |
203 | padsv private variable ck_null ds |
204 | padav private array ck_null d | |
205 | padhv private hash ck_null d | |
206 | padany private something ck_null d | |
79072805 LW |
207 | |
208 | pushre push regexp ck_null 0 | |
209 | ||
210 | # References and stuff. | |
211 | ||
212 | rv2gv ref-to-glob cast ck_rvconst ds | |
a0d0e21e | 213 | rv2sv scalar deref ck_rvconst ds |
79072805 | 214 | av2arylen array length ck_null is |
a0d0e21e LW |
215 | rv2cv subroutine deref ck_rvconst d |
216 | anoncode anonymous subroutine ck_null 0 | |
c07a80fd | 217 | prototype subroutine prototype ck_null s S |
a0d0e21e LW |
218 | refgen reference constructor ck_spair m L |
219 | srefgen scalar ref constructor ck_null fs S | |
220 | ref reference-type operator ck_fun stu S? | |
463ee0b2 | 221 | bless bless ck_fun s S S? |
79072805 LW |
222 | |
223 | # Pushy I/O. | |
224 | ||
225 | backtick backticks ck_null t | |
a0d0e21e | 226 | glob glob ck_glob t S S |
79072805 LW |
227 | readline <HANDLE> ck_null t |
228 | rcatline append I/O operator ck_null t | |
229 | ||
230 | # Bindable operators. | |
231 | ||
463ee0b2 | 232 | regcmaybe regexp comp once ck_fun s S |
79072805 LW |
233 | regcomp regexp compilation ck_null s S |
234 | match pattern match ck_match d | |
235 | subst substitution ck_null dis S | |
236 | substcont substitution cont ck_null dis | |
237 | trans character translation ck_null is S | |
238 | ||
239 | # Lvalue operators. | |
240 | ||
241 | sassign scalar assignment ck_null s | |
242 | aassign list assignment ck_null t L L | |
243 | ||
a0d0e21e LW |
244 | chop chop ck_spair mts L |
245 | schop scalar chop ck_null stu S? | |
246 | chomp safe chop ck_spair mts L | |
247 | schomp scalar safe chop ck_null stu S? | |
248 | defined defined operator ck_rfun isu S? | |
79072805 | 249 | undef undef operator ck_lfun s S? |
c07a80fd | 250 | study study ck_fun su S? |
a0d0e21e LW |
251 | pos match position ck_lfun stu S? |
252 | ||
253 | preinc preincrement ck_lfun dIs S | |
254 | i_preinc integer preincrement ck_lfun dis S | |
255 | predec predecrement ck_lfun dIs S | |
256 | i_predec integer predecrement ck_lfun dis S | |
257 | postinc postincrement ck_lfun dIst S | |
258 | i_postinc integer postincrement ck_lfun dist S | |
259 | postdec postdecrement ck_lfun dIst S | |
260 | i_postdec integer postdecrement ck_lfun dist S | |
79072805 LW |
261 | |
262 | # Ordinary operators. | |
263 | ||
a0d0e21e | 264 | pow exponentiation ck_null fst S S |
79072805 | 265 | |
85e6fe83 LW |
266 | multiply multiplication ck_null Ifst S S |
267 | i_multiply integer multiplication ck_null ifst S S | |
268 | divide division ck_null Ifst S S | |
269 | i_divide integer division ck_null ifst S S | |
270 | modulo modulus ck_null Iifst S S | |
271 | i_modulo integer modulus ck_null ifst S S | |
79072805 LW |
272 | repeat repeat ck_repeat mt L S |
273 | ||
274 | add addition ck_null Ifst S S | |
85e6fe83 LW |
275 | i_add integer addition ck_null ifst S S |
276 | subtract subtraction ck_null Ifst S S | |
277 | i_subtract integer subtraction ck_null ifst S S | |
79072805 | 278 | concat concatenation ck_concat fst S S |
a0d0e21e | 279 | stringify string ck_fun fst S |
79072805 LW |
280 | |
281 | left_shift left bitshift ck_null ifst S S | |
282 | right_shift right bitshift ck_null ifst S S | |
283 | ||
85e6fe83 LW |
284 | lt numeric lt ck_null Iifs S S |
285 | i_lt integer lt ck_null ifs S S | |
286 | gt numeric gt ck_null Iifs S S | |
287 | i_gt integer gt ck_null ifs S S | |
288 | le numeric le ck_null Iifs S S | |
289 | i_le integer le ck_null ifs S S | |
290 | ge numeric ge ck_null Iifs S S | |
291 | i_ge integer ge ck_null ifs S S | |
292 | eq numeric eq ck_null Iifs S S | |
293 | i_eq integer eq ck_null ifs S S | |
294 | ne numeric ne ck_null Iifs S S | |
295 | i_ne integer ne ck_null ifs S S | |
a0d0e21e | 296 | ncmp spaceship operator ck_null Iifst S S |
85e6fe83 | 297 | i_ncmp integer spaceship ck_null ifst S S |
79072805 LW |
298 | |
299 | slt string lt ck_null ifs S S | |
300 | sgt string gt ck_null ifs S S | |
301 | sle string le ck_null ifs S S | |
302 | sge string ge ck_null ifs S S | |
303 | seq string eq ck_null ifs S S | |
304 | sne string ne ck_null ifs S S | |
305 | scmp string comparison ck_null ifst S S | |
306 | ||
a0d0e21e LW |
307 | bit_and bitwise and ck_null fst S S |
308 | bit_xor bitwise xor ck_null fst S S | |
309 | bit_or bitwise or ck_null fst S S | |
79072805 | 310 | |
85e6fe83 LW |
311 | negate negate ck_null Ifst S |
312 | i_negate integer negate ck_null ifst S | |
79072805 LW |
313 | not not ck_null ifs S |
314 | complement 1's complement ck_null fst S | |
315 | ||
316 | # High falutin' math. | |
317 | ||
318 | atan2 atan2 ck_fun fst S S | |
a0d0e21e LW |
319 | sin sin ck_fun fstu S? |
320 | cos cos ck_fun fstu S? | |
79072805 LW |
321 | rand rand ck_fun st S? |
322 | srand srand ck_fun s S? | |
a0d0e21e LW |
323 | exp exp ck_fun fstu S? |
324 | log log ck_fun fstu S? | |
325 | sqrt sqrt ck_fun fstu S? | |
79072805 | 326 | |
a0d0e21e LW |
327 | int int ck_fun fstu S? |
328 | hex hex ck_fun istu S? | |
329 | oct oct ck_fun istu S? | |
330 | abs abs ck_fun fstu S? | |
79072805 LW |
331 | |
332 | # String stuff. | |
333 | ||
a0d0e21e | 334 | length length ck_lengthconst istu S? |
79072805 LW |
335 | substr substr ck_fun st S S S? |
336 | vec vec ck_fun ist S S S | |
337 | ||
338 | index index ck_index ist S S S? | |
339 | rindex rindex ck_index ist S S S? | |
340 | ||
341 | sprintf sprintf ck_fun mst S L | |
342 | formline formline ck_formline ms S L | |
a0d0e21e LW |
343 | ord ord ck_fun ifstu S? |
344 | chr chr ck_fun fstu S? | |
79072805 | 345 | crypt crypt ck_fun fst S S |
a0d0e21e LW |
346 | ucfirst upper case first ck_fun fst S |
347 | lcfirst lower case first ck_fun fst S | |
348 | uc upper case ck_fun fst S | |
349 | lc lower case ck_fun fst S | |
350 | quotemeta quote metachars ck_fun fst S | |
79072805 LW |
351 | |
352 | # Arrays. | |
353 | ||
354 | rv2av array deref ck_rvconst dt | |
355 | aelemfast known array element ck_null s A S | |
8990e307 | 356 | aelem array element ck_null s A S |
79072805 LW |
357 | aslice array slice ck_null m A L |
358 | ||
359 | # Associative arrays. | |
360 | ||
361 | each each ck_fun t H | |
362 | values values ck_fun t H | |
363 | keys keys ck_fun t H | |
a0d0e21e LW |
364 | delete delete ck_delete s S |
365 | exists exists operator ck_delete is S | |
79072805 LW |
366 | rv2hv associative array deref ck_rvconst dt |
367 | helem associative array elem ck_null s H S | |
368 | hslice associative array slice ck_null m H L | |
369 | ||
370 | # Explosives and implosives. | |
371 | ||
372 | unpack unpack ck_fun 0 S S | |
373 | pack pack ck_fun mst S L | |
374 | split split ck_split t S S S | |
375 | join join ck_fun mst S L | |
376 | ||
377 | # List operators. | |
378 | ||
379 | list list ck_null m L | |
380 | lslice list slice ck_null 0 H L L | |
a0d0e21e LW |
381 | anonlist anonymous list ck_fun ms L |
382 | anonhash anonymous hash ck_fun ms L | |
79072805 | 383 | |
a0d0e21e | 384 | splice splice ck_fun m A S? S? L |
79072805 LW |
385 | push push ck_fun imst A L |
386 | pop pop ck_shift s A | |
387 | shift shift ck_shift s A | |
388 | unshift unshift ck_fun imst A L | |
389 | sort sort ck_sort m C? L | |
390 | reverse reverse ck_fun mt L | |
391 | ||
392 | grepstart grep ck_grep dm C L | |
393 | grepwhile grep iterator ck_null dt | |
394 | ||
a0d0e21e LW |
395 | mapstart map ck_grep dm C L |
396 | mapwhile map iterator ck_null dt | |
397 | ||
79072805 LW |
398 | # Range stuff. |
399 | ||
400 | range flipflop ck_null 0 S S | |
401 | flip range (or flip) ck_null 0 S S | |
402 | flop range (or flop) ck_null 0 | |
403 | ||
404 | # Control. | |
405 | ||
406 | and logical and ck_null 0 | |
407 | or logical or ck_null 0 | |
a0d0e21e | 408 | xor logical xor ck_null fs S S |
4633a7c4 | 409 | cond_expr conditional expression ck_null d |
79072805 LW |
410 | andassign logical and assignment ck_null s |
411 | orassign logical or assignment ck_null s | |
412 | ||
463ee0b2 | 413 | method method lookup ck_null d |
a0d0e21e LW |
414 | entersub subroutine entry ck_subr dmt L |
415 | leavesub subroutine exit ck_null 0 | |
79072805 LW |
416 | caller caller ck_fun t S? |
417 | warn warn ck_fun imst L | |
418 | die die ck_fun dimst L | |
419 | reset reset ck_fun is S? | |
420 | ||
421 | lineseq line sequence ck_null 0 | |
93a17b20 LW |
422 | nextstate next statement ck_null s |
423 | dbstate debug next statement ck_null s | |
79072805 LW |
424 | unstack unstack ck_null s |
425 | enter block entry ck_null 0 | |
426 | leave block exit ck_null 0 | |
463ee0b2 | 427 | scope block ck_null 0 |
79072805 LW |
428 | enteriter foreach loop entry ck_null d |
429 | iter foreach loop iterator ck_null 0 | |
430 | enterloop loop entry ck_null d | |
a0d0e21e | 431 | leaveloop loop exit ck_null 0 |
748a9306 | 432 | return return ck_null dm L |
79072805 LW |
433 | last last ck_null ds |
434 | next next ck_null ds | |
435 | redo redo ck_null ds | |
436 | dump dump ck_null ds | |
437 | goto goto ck_null ds | |
438 | exit exit ck_fun ds S? | |
439 | ||
a0d0e21e LW |
440 | #nswitch numeric switch ck_null d |
441 | #cswitch character switch ck_null d | |
79072805 LW |
442 | |
443 | # I/O. | |
444 | ||
445 | open open ck_fun ist F S? | |
446 | close close ck_fun is F? | |
447 | pipe_op pipe ck_fun is F F | |
448 | ||
449 | fileno fileno ck_fun ist F | |
450 | umask umask ck_fun ist S? | |
451 | binmode binmode ck_fun s F | |
452 | ||
463ee0b2 LW |
453 | tie tie ck_fun idms R S L |
454 | untie untie ck_fun is R | |
a5f75d66 | 455 | tied tied ck_fun s R |
463ee0b2 | 456 | dbmopen dbmopen ck_fun is H S S |
79072805 LW |
457 | dbmclose dbmclose ck_fun is H |
458 | ||
459 | sselect select system call ck_select t S S S S | |
460 | select select ck_select st F? | |
461 | ||
462 | getc getc ck_eof st F? | |
463 | read read ck_fun imst F R S S? | |
464 | enterwrite write ck_fun dis F? | |
465 | leavewrite write exit ck_null 0 | |
466 | ||
463ee0b2 | 467 | prtf printf ck_listiob ims F? L |
79072805 LW |
468 | print print ck_listiob ims F? L |
469 | ||
a5f75d66 | 470 | sysopen sysopen ck_fun s F S S S? |
79072805 LW |
471 | sysread sysread ck_fun imst F R S S? |
472 | syswrite syswrite ck_fun imst F S S S? | |
473 | ||
474 | send send ck_fun imst F S S S? | |
475 | recv recv ck_fun imst F R S S | |
476 | ||
477 | eof eof ck_eof is F? | |
478 | tell tell ck_fun st F? | |
479 | seek seek ck_fun s F S S | |
9b01e405 | 480 | # truncate really behaves as if it had both "S S" and "F S" |
481 | truncate truncate ck_trunc is S S | |
79072805 LW |
482 | |
483 | fcntl fcntl ck_fun st F S S | |
484 | ioctl ioctl ck_fun st F S S | |
485 | flock flock ck_fun ist F S | |
486 | ||
487 | # Sockets. | |
488 | ||
489 | socket socket ck_fun is F S S S | |
490 | sockpair socketpair ck_fun is F F S S S | |
491 | ||
492 | bind bind ck_fun is F S | |
493 | connect connect ck_fun is F S | |
494 | listen listen ck_fun is F S | |
495 | accept accept ck_fun ist F F | |
496 | shutdown shutdown ck_fun ist F S | |
497 | ||
498 | gsockopt getsockopt ck_fun is F S S | |
499 | ssockopt setsockopt ck_fun is F S S S | |
500 | ||
501 | getsockname getsockname ck_fun is F | |
502 | getpeername getpeername ck_fun is F | |
503 | ||
504 | # Stat calls. | |
505 | ||
a0d0e21e LW |
506 | lstat lstat ck_ftst u F |
507 | stat stat ck_ftst u F | |
508 | ftrread -R ck_ftst isu F | |
509 | ftrwrite -W ck_ftst isu F | |
510 | ftrexec -X ck_ftst isu F | |
511 | fteread -r ck_ftst isu F | |
512 | ftewrite -w ck_ftst isu F | |
513 | fteexec -x ck_ftst isu F | |
514 | ftis -e ck_ftst isu F | |
515 | fteowned -O ck_ftst isu F | |
516 | ftrowned -o ck_ftst isu F | |
517 | ftzero -z ck_ftst isu F | |
518 | ftsize -s ck_ftst istu F | |
519 | ftmtime -M ck_ftst stu F | |
520 | ftatime -A ck_ftst stu F | |
521 | ftctime -C ck_ftst stu F | |
522 | ftsock -S ck_ftst isu F | |
523 | ftchr -c ck_ftst isu F | |
524 | ftblk -b ck_ftst isu F | |
525 | ftfile -f ck_ftst isu F | |
526 | ftdir -d ck_ftst isu F | |
527 | ftpipe -p ck_ftst isu F | |
528 | ftlink -l ck_ftst isu F | |
529 | ftsuid -u ck_ftst isu F | |
530 | ftsgid -g ck_ftst isu F | |
531 | ftsvtx -k ck_ftst isu F | |
79072805 | 532 | fttty -t ck_ftst is F |
a0d0e21e LW |
533 | fttext -T ck_ftst isu F |
534 | ftbinary -B ck_ftst isu F | |
79072805 LW |
535 | |
536 | # File calls. | |
537 | ||
538 | chdir chdir ck_fun ist S? | |
539 | chown chown ck_fun imst L | |
a0d0e21e LW |
540 | chroot chroot ck_fun istu S? |
541 | unlink unlink ck_fun imstu L | |
79072805 LW |
542 | chmod chmod ck_fun imst L |
543 | utime utime ck_fun imst L | |
544 | rename rename ck_fun ist S S | |
545 | link link ck_fun ist S S | |
546 | symlink symlink ck_fun ist S S | |
a0d0e21e | 547 | readlink readlink ck_fun stu S? |
79072805 | 548 | mkdir mkdir ck_fun ist S S |
a0d0e21e | 549 | rmdir rmdir ck_fun istu S? |
79072805 LW |
550 | |
551 | # Directory calls. | |
552 | ||
553 | open_dir opendir ck_fun is F S | |
554 | readdir readdir ck_fun 0 F | |
555 | telldir telldir ck_fun st F | |
556 | seekdir seekdir ck_fun s F S | |
557 | rewinddir rewinddir ck_fun s F | |
558 | closedir closedir ck_fun is F | |
559 | ||
560 | # Process control. | |
561 | ||
562 | fork fork ck_null ist | |
563 | wait wait ck_null ist | |
564 | waitpid waitpid ck_fun ist S S | |
565 | system system ck_exec imst S? L | |
566 | exec exec ck_exec dimst S? L | |
567 | kill kill ck_fun dimst L | |
568 | getppid getppid ck_null ist | |
569 | getpgrp getpgrp ck_fun ist S? | |
a0d0e21e | 570 | setpgrp setpgrp ck_fun ist S? S? |
79072805 LW |
571 | getpriority getpriority ck_fun ist S S |
572 | setpriority setpriority ck_fun ist S S S | |
573 | ||
574 | # Time calls. | |
575 | ||
576 | time time ck_null ist | |
577 | tms times ck_null 0 | |
578 | localtime localtime ck_fun t S? | |
579 | gmtime gmtime ck_fun t S? | |
a0d0e21e | 580 | alarm alarm ck_fun istu S? |
79072805 LW |
581 | sleep sleep ck_fun ist S? |
582 | ||
583 | # Shared memory. | |
584 | ||
585 | shmget shmget ck_fun imst S S S | |
586 | shmctl shmctl ck_fun imst S S S | |
587 | shmread shmread ck_fun imst S S S S | |
16d20bd9 | 588 | shmwrite shmwrite ck_fun imst S S S S |
79072805 LW |
589 | |
590 | # Message passing. | |
591 | ||
592 | msgget msgget ck_fun imst S S | |
593 | msgctl msgctl ck_fun imst S S S | |
594 | msgsnd msgsnd ck_fun imst S S S | |
595 | msgrcv msgrcv ck_fun imst S S S S S | |
596 | ||
597 | # Semaphores. | |
598 | ||
599 | semget semget ck_fun imst S S S | |
600 | semctl semctl ck_fun imst S S S S | |
ecfc5424 | 601 | semop semop ck_fun imst S S |
79072805 LW |
602 | |
603 | # Eval. | |
604 | ||
a0d0e21e | 605 | require require ck_require du S? |
79072805 LW |
606 | dofile do 'file' ck_fun d S |
607 | entereval eval string ck_eval d S | |
608 | leaveeval eval exit ck_null 0 S | |
a0d0e21e | 609 | #evalonce eval constant string ck_null d S |
79072805 LW |
610 | entertry eval block ck_null 0 |
611 | leavetry eval block exit ck_null 0 | |
612 | ||
613 | # Get system info. | |
614 | ||
615 | ghbyname gethostbyname ck_fun 0 S | |
616 | ghbyaddr gethostbyaddr ck_fun 0 S S | |
617 | ghostent gethostent ck_null 0 | |
618 | gnbyname getnetbyname ck_fun 0 S | |
619 | gnbyaddr getnetbyaddr ck_fun 0 S S | |
620 | gnetent getnetent ck_null 0 | |
621 | gpbyname getprotobyname ck_fun 0 S | |
622 | gpbynumber getprotobynumber ck_fun 0 S | |
623 | gprotoent getprotoent ck_null 0 | |
624 | gsbyname getservbyname ck_fun 0 S S | |
625 | gsbyport getservbyport ck_fun 0 S S | |
626 | gservent getservent ck_null 0 | |
93a17b20 LW |
627 | shostent sethostent ck_fun is S |
628 | snetent setnetent ck_fun is S | |
629 | sprotoent setprotoent ck_fun is S | |
630 | sservent setservent ck_fun is S | |
631 | ehostent endhostent ck_null is | |
632 | enetent endnetent ck_null is | |
633 | eprotoent endprotoent ck_null is | |
634 | eservent endservent ck_null is | |
79072805 LW |
635 | gpwnam getpwnam ck_fun 0 S |
636 | gpwuid getpwuid ck_fun 0 S | |
637 | gpwent getpwent ck_null 0 | |
a0d0e21e LW |
638 | spwent setpwent ck_null is |
639 | epwent endpwent ck_null is | |
79072805 LW |
640 | ggrnam getgrnam ck_fun 0 S |
641 | ggrgid getgrgid ck_fun 0 S | |
642 | ggrent getgrent ck_null 0 | |
a0d0e21e LW |
643 | sgrent setgrent ck_null is |
644 | egrent endgrent ck_null is | |
79072805 LW |
645 | getlogin getlogin ck_null st |
646 | ||
647 | # Miscellaneous. | |
648 | ||
a0d0e21e | 649 | syscall syscall ck_fun imst S L |