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