Commit | Line | Data |
0f85fab0 |
1 | /* $Header: arg.h,v 3.0.1.5 90/03/27 15:29:41 lwall Locked $ |
a687059c |
2 | * |
3 | * Copyright (c) 1989, Larry Wall |
4 | * |
5 | * You may distribute under the terms of the GNU General Public License |
6 | * as specified in the README file that comes with the perl 3.0 kit. |
8d063cd8 |
7 | * |
8 | * $Log: arg.h,v $ |
0f85fab0 |
9 | * Revision 3.0.1.5 90/03/27 15:29:41 lwall |
10 | * patch16: MSDOS support |
11 | * |
ff2452de |
12 | * Revision 3.0.1.4 90/03/12 16:18:21 lwall |
13 | * patch13: added list slice operator (LIST)[LIST] |
14 | * patch13: added splice operator: @oldelems = splice(@array,$offset,$len,LIST) |
15 | * |
449aadca |
16 | * Revision 3.0.1.3 90/02/28 16:21:55 lwall |
17 | * patch9: added pipe function |
18 | * |
d8f2e4cc |
19 | * Revision 3.0.1.2 89/12/21 19:13:14 lwall |
20 | * patch7: send() didn't allow a TO argument |
21 | * |
03a14243 |
22 | * Revision 3.0.1.1 89/10/26 23:02:35 lwall |
23 | * patch1: reverse didn't work |
24 | * |
a687059c |
25 | * Revision 3.0 89/10/18 15:08:27 lwall |
26 | * 3.0 baseline |
8d063cd8 |
27 | * |
28 | */ |
29 | |
30 | #define O_NULL 0 |
31 | #define O_ITEM 1 |
32 | #define O_ITEM2 2 |
33 | #define O_ITEM3 3 |
34 | #define O_CONCAT 4 |
35 | #define O_MATCH 5 |
36 | #define O_NMATCH 6 |
37 | #define O_SUBST 7 |
38 | #define O_NSUBST 8 |
39 | #define O_ASSIGN 9 |
40 | #define O_MULTIPLY 10 |
41 | #define O_DIVIDE 11 |
42 | #define O_MODULO 12 |
43 | #define O_ADD 13 |
44 | #define O_SUBTRACT 14 |
45 | #define O_LEFT_SHIFT 15 |
46 | #define O_RIGHT_SHIFT 16 |
47 | #define O_LT 17 |
48 | #define O_GT 18 |
49 | #define O_LE 19 |
50 | #define O_GE 20 |
51 | #define O_EQ 21 |
52 | #define O_NE 22 |
53 | #define O_BIT_AND 23 |
54 | #define O_XOR 24 |
55 | #define O_BIT_OR 25 |
56 | #define O_AND 26 |
57 | #define O_OR 27 |
58 | #define O_COND_EXPR 28 |
59 | #define O_COMMA 29 |
60 | #define O_NEGATE 30 |
61 | #define O_NOT 31 |
62 | #define O_COMPLEMENT 32 |
63 | #define O_WRITE 33 |
64 | #define O_OPEN 34 |
65 | #define O_TRANS 35 |
66 | #define O_NTRANS 36 |
67 | #define O_CLOSE 37 |
68 | #define O_ARRAY 38 |
69 | #define O_HASH 39 |
70 | #define O_LARRAY 40 |
71 | #define O_LHASH 41 |
72 | #define O_PUSH 42 |
73 | #define O_POP 43 |
74 | #define O_SHIFT 44 |
75 | #define O_SPLIT 45 |
76 | #define O_LENGTH 46 |
77 | #define O_SPRINTF 47 |
78 | #define O_SUBSTR 48 |
79 | #define O_JOIN 49 |
80 | #define O_SLT 50 |
81 | #define O_SGT 51 |
82 | #define O_SLE 52 |
83 | #define O_SGE 53 |
84 | #define O_SEQ 54 |
85 | #define O_SNE 55 |
86 | #define O_SUBR 56 |
87 | #define O_PRINT 57 |
88 | #define O_CHDIR 58 |
89 | #define O_DIE 59 |
90 | #define O_EXIT 60 |
91 | #define O_RESET 61 |
92 | #define O_LIST 62 |
93 | #define O_SELECT 63 |
94 | #define O_EOF 64 |
95 | #define O_TELL 65 |
96 | #define O_SEEK 66 |
97 | #define O_LAST 67 |
98 | #define O_NEXT 68 |
99 | #define O_REDO 69 |
100 | #define O_GOTO 70 |
101 | #define O_INDEX 71 |
102 | #define O_TIME 72 |
103 | #define O_TMS 73 |
104 | #define O_LOCALTIME 74 |
105 | #define O_GMTIME 75 |
106 | #define O_STAT 76 |
107 | #define O_CRYPT 77 |
108 | #define O_EXP 78 |
109 | #define O_LOG 79 |
110 | #define O_SQRT 80 |
111 | #define O_INT 81 |
112 | #define O_PRTF 82 |
113 | #define O_ORD 83 |
114 | #define O_SLEEP 84 |
115 | #define O_FLIP 85 |
116 | #define O_FLOP 86 |
117 | #define O_KEYS 87 |
118 | #define O_VALUES 88 |
119 | #define O_EACH 89 |
120 | #define O_CHOP 90 |
121 | #define O_FORK 91 |
122 | #define O_EXEC 92 |
123 | #define O_SYSTEM 93 |
124 | #define O_OCT 94 |
125 | #define O_HEX 95 |
126 | #define O_CHMOD 96 |
127 | #define O_CHOWN 97 |
128 | #define O_KILL 98 |
129 | #define O_RENAME 99 |
130 | #define O_UNLINK 100 |
131 | #define O_UMASK 101 |
132 | #define O_UNSHIFT 102 |
133 | #define O_LINK 103 |
134 | #define O_REPEAT 104 |
a559c259 |
135 | #define O_EVAL 105 |
378cc40b |
136 | #define O_FTEREAD 106 |
137 | #define O_FTEWRITE 107 |
138 | #define O_FTEEXEC 108 |
139 | #define O_FTEOWNED 109 |
140 | #define O_FTRREAD 110 |
141 | #define O_FTRWRITE 111 |
142 | #define O_FTREXEC 112 |
143 | #define O_FTROWNED 113 |
144 | #define O_FTIS 114 |
145 | #define O_FTZERO 115 |
146 | #define O_FTSIZE 116 |
147 | #define O_FTFILE 117 |
148 | #define O_FTDIR 118 |
149 | #define O_FTLINK 119 |
150 | #define O_SYMLINK 120 |
151 | #define O_FTPIPE 121 |
152 | #define O_FTSOCK 122 |
153 | #define O_FTBLK 123 |
154 | #define O_FTCHR 124 |
155 | #define O_FTSUID 125 |
156 | #define O_FTSGID 126 |
157 | #define O_FTSVTX 127 |
158 | #define O_FTTTY 128 |
159 | #define O_DOFILE 129 |
160 | #define O_FTTEXT 130 |
161 | #define O_FTBINARY 131 |
162 | #define O_UTIME 132 |
163 | #define O_WAIT 133 |
164 | #define O_SORT 134 |
165 | #define O_DELETE 135 |
166 | #define O_STUDY 136 |
a687059c |
167 | #define O_ATAN2 137 |
168 | #define O_SIN 138 |
169 | #define O_COS 139 |
170 | #define O_RAND 140 |
171 | #define O_SRAND 141 |
172 | #define O_POW 142 |
173 | #define O_RETURN 143 |
174 | #define O_GETC 144 |
175 | #define O_MKDIR 145 |
176 | #define O_RMDIR 146 |
177 | #define O_GETPPID 147 |
178 | #define O_GETPGRP 148 |
179 | #define O_SETPGRP 149 |
180 | #define O_GETPRIORITY 150 |
181 | #define O_SETPRIORITY 151 |
182 | #define O_CHROOT 152 |
183 | #define O_IOCTL 153 |
184 | #define O_FCNTL 154 |
185 | #define O_FLOCK 155 |
186 | #define O_RINDEX 156 |
187 | #define O_PACK 157 |
188 | #define O_UNPACK 158 |
189 | #define O_READ 159 |
190 | #define O_WARN 160 |
191 | #define O_DBMOPEN 161 |
192 | #define O_DBMCLOSE 162 |
193 | #define O_ASLICE 163 |
194 | #define O_HSLICE 164 |
195 | #define O_LASLICE 165 |
196 | #define O_LHSLICE 166 |
197 | #define O_F_OR_R 167 |
198 | #define O_RANGE 168 |
199 | #define O_RCAT 169 |
200 | #define O_AASSIGN 170 |
201 | #define O_SASSIGN 171 |
202 | #define O_DUMP 172 |
203 | #define O_REVERSE 173 |
204 | #define O_ADDROF 174 |
205 | #define O_SOCKET 175 |
206 | #define O_BIND 176 |
207 | #define O_CONNECT 177 |
208 | #define O_LISTEN 178 |
209 | #define O_ACCEPT 179 |
210 | #define O_SEND 180 |
211 | #define O_RECV 181 |
212 | #define O_SSELECT 182 |
213 | #define O_SOCKETPAIR 183 |
214 | #define O_DBSUBR 184 |
215 | #define O_DEFINED 185 |
216 | #define O_UNDEF 186 |
217 | #define O_READLINK 187 |
218 | #define O_LSTAT 188 |
219 | #define O_AELEM 189 |
220 | #define O_HELEM 190 |
221 | #define O_LAELEM 191 |
222 | #define O_LHELEM 192 |
223 | #define O_LOCAL 193 |
449aadca |
224 | #define O_PIPE 194 |
a687059c |
225 | #define O_FILENO 195 |
226 | #define O_GHBYNAME 196 |
227 | #define O_GHBYADDR 197 |
228 | #define O_GHOSTENT 198 |
229 | #define O_SHOSTENT 199 |
230 | #define O_EHOSTENT 200 |
231 | #define O_GSBYNAME 201 |
232 | #define O_GSBYPORT 202 |
233 | #define O_GSERVENT 203 |
234 | #define O_SSERVENT 204 |
235 | #define O_ESERVENT 205 |
236 | #define O_GPBYNAME 206 |
237 | #define O_GPBYNUMBER 207 |
238 | #define O_GPROTOENT 208 |
239 | #define O_SPROTOENT 209 |
240 | #define O_EPROTOENT 210 |
241 | #define O_GNBYNAME 211 |
242 | #define O_GNBYADDR 212 |
243 | #define O_GNETENT 213 |
244 | #define O_SNETENT 214 |
245 | #define O_ENETENT 215 |
246 | #define O_VEC 216 |
247 | #define O_GREP 217 |
248 | #define O_GPWNAM 218 |
249 | #define O_GPWUID 219 |
250 | #define O_GPWENT 220 |
251 | #define O_SPWENT 221 |
252 | #define O_EPWENT 222 |
253 | #define O_GGRNAM 223 |
254 | #define O_GGRGID 224 |
255 | #define O_GGRENT 225 |
256 | #define O_SGRENT 226 |
257 | #define O_EGRENT 227 |
258 | #define O_SHUTDOWN 228 |
259 | #define O_OPENDIR 229 |
260 | #define O_READDIR 230 |
261 | #define O_TELLDIR 231 |
262 | #define O_SEEKDIR 232 |
263 | #define O_REWINDDIR 233 |
264 | #define O_CLOSEDIR 234 |
265 | #define O_GETLOGIN 235 |
266 | #define O_SYSCALL 236 |
267 | #define O_GSOCKOPT 237 |
268 | #define O_SSOCKOPT 238 |
269 | #define O_GETSOCKNAME 239 |
270 | #define O_GETPEERNAME 240 |
ff2452de |
271 | #define O_LSLICE 241 |
272 | #define O_SPLICE 242 |
0f85fab0 |
273 | #define O_BINMODE 243 |
274 | #define MAXO 244 |
8d063cd8 |
275 | |
276 | #ifndef DOINIT |
277 | extern char *opname[]; |
278 | #else |
279 | char *opname[] = { |
280 | "NULL", |
281 | "ITEM", |
282 | "ITEM2", |
283 | "ITEM3", |
284 | "CONCAT", |
285 | "MATCH", |
286 | "NMATCH", |
287 | "SUBST", |
288 | "NSUBST", |
289 | "ASSIGN", |
290 | "MULTIPLY", |
291 | "DIVIDE", |
292 | "MODULO", |
293 | "ADD", |
294 | "SUBTRACT", |
295 | "LEFT_SHIFT", |
296 | "RIGHT_SHIFT", |
297 | "LT", |
298 | "GT", |
299 | "LE", |
300 | "GE", |
301 | "EQ", |
302 | "NE", |
303 | "BIT_AND", |
304 | "XOR", |
305 | "BIT_OR", |
306 | "AND", |
307 | "OR", |
308 | "COND_EXPR", |
309 | "COMMA", |
310 | "NEGATE", |
311 | "NOT", |
312 | "COMPLEMENT", |
313 | "WRITE", |
314 | "OPEN", |
315 | "TRANS", |
316 | "NTRANS", |
317 | "CLOSE", |
318 | "ARRAY", |
319 | "HASH", |
320 | "LARRAY", |
321 | "LHASH", |
322 | "PUSH", |
323 | "POP", |
324 | "SHIFT", |
325 | "SPLIT", |
326 | "LENGTH", |
327 | "SPRINTF", |
328 | "SUBSTR", |
329 | "JOIN", |
330 | "SLT", |
331 | "SGT", |
332 | "SLE", |
333 | "SGE", |
334 | "SEQ", |
335 | "SNE", |
336 | "SUBR", |
337 | "PRINT", |
338 | "CHDIR", |
339 | "DIE", |
340 | "EXIT", |
341 | "RESET", |
342 | "LIST", |
343 | "SELECT", |
344 | "EOF", |
345 | "TELL", |
346 | "SEEK", |
347 | "LAST", |
348 | "NEXT", |
349 | "REDO", |
350 | "GOTO",/* shudder */ |
351 | "INDEX", |
352 | "TIME", |
353 | "TIMES", |
354 | "LOCALTIME", |
355 | "GMTIME", |
356 | "STAT", |
357 | "CRYPT", |
358 | "EXP", |
359 | "LOG", |
360 | "SQRT", |
361 | "INT", |
362 | "PRINTF", |
363 | "ORD", |
364 | "SLEEP", |
365 | "FLIP", |
366 | "FLOP", |
367 | "KEYS", |
368 | "VALUES", |
369 | "EACH", |
370 | "CHOP", |
371 | "FORK", |
372 | "EXEC", |
373 | "SYSTEM", |
374 | "OCT", |
375 | "HEX", |
376 | "CHMOD", |
377 | "CHOWN", |
378 | "KILL", |
379 | "RENAME", |
380 | "UNLINK", |
381 | "UMASK", |
382 | "UNSHIFT", |
383 | "LINK", |
384 | "REPEAT", |
a559c259 |
385 | "EVAL", |
378cc40b |
386 | "FTEREAD", |
387 | "FTEWRITE", |
388 | "FTEEXEC", |
389 | "FTEOWNED", |
390 | "FTRREAD", |
391 | "FTRWRITE", |
392 | "FTREXEC", |
393 | "FTROWNED", |
394 | "FTIS", |
395 | "FTZERO", |
396 | "FTSIZE", |
397 | "FTFILE", |
398 | "FTDIR", |
399 | "FTLINK", |
400 | "SYMLINK", |
401 | "FTPIPE", |
402 | "FTSOCK", |
403 | "FTBLK", |
404 | "FTCHR", |
405 | "FTSUID", |
406 | "FTSGID", |
407 | "FTSVTX", |
408 | "FTTTY", |
409 | "DOFILE", |
410 | "FTTEXT", |
411 | "FTBINARY", |
412 | "UTIME", |
413 | "WAIT", |
414 | "SORT", |
415 | "DELETE", |
416 | "STUDY", |
a687059c |
417 | "ATAN2", |
418 | "SIN", |
419 | "COS", |
420 | "RAND", |
421 | "SRAND", |
422 | "POW", |
423 | "RETURN", |
424 | "GETC", |
425 | "MKDIR", |
426 | "RMDIR", |
427 | "GETPPID", |
428 | "GETPGRP", |
429 | "SETPGRP", |
430 | "GETPRIORITY", |
431 | "SETPRIORITY", |
432 | "CHROOT", |
433 | "IOCTL", |
434 | "FCNTL", |
435 | "FLOCK", |
436 | "RINDEX", |
437 | "PACK", |
438 | "UNPACK", |
439 | "READ", |
440 | "WARN", |
441 | "DBMOPEN", |
442 | "DBMCLOSE", |
443 | "ASLICE", |
444 | "HSLICE", |
445 | "LASLICE", |
446 | "LHSLICE", |
447 | "FLIP_OR_RANGE", |
448 | "RANGE", |
449 | "RCAT", |
450 | "AASSIGN", |
451 | "SASSIGN", |
452 | "DUMP", |
453 | "REVERSE", |
454 | "ADDRESS_OF", |
455 | "SOCKET", |
456 | "BIND", |
457 | "CONNECT", |
458 | "LISTEN", |
459 | "ACCEPT", |
460 | "SEND", |
461 | "RECV", |
462 | "SSELECT", |
463 | "SOCKETPAIR", |
464 | "DBSUBR", |
465 | "DEFINED", |
466 | "UNDEF", |
467 | "READLINK", |
468 | "LSTAT", |
469 | "AELEM", |
470 | "HELEM", |
471 | "LAELEM", |
472 | "LHELEM", |
473 | "LOCAL", |
449aadca |
474 | "PIPE", |
a687059c |
475 | "FILENO", |
476 | "GHBYNAME", |
477 | "GHBYADDR", |
478 | "GHOSTENT", |
479 | "SHOSTENT", |
480 | "EHOSTENT", |
481 | "GSBYNAME", |
482 | "GSBYPORT", |
483 | "GSERVENT", |
484 | "SSERVENT", |
485 | "ESERVENT", |
486 | "GPBYNAME", |
487 | "GPBYNUMBER", |
488 | "GPROTOENT", |
489 | "SPROTOENT", |
490 | "EPROTOENT", |
491 | "GNBYNAME", |
492 | "GNBYADDR", |
493 | "GNETENT", |
494 | "SNETENT", |
495 | "ENETENT", |
496 | "VEC", |
497 | "GREP", |
498 | "GPWNAM", |
499 | "GPWUID", |
500 | "GPWENT", |
501 | "SPWENT", |
502 | "EPWENT", |
503 | "GGRNAM", |
504 | "GGRGID", |
505 | "GGRENT", |
506 | "SGRENT", |
507 | "EGRENT", |
508 | "SHUTDOWN", |
509 | "OPENDIR", |
510 | "READDIR", |
511 | "TELLDIR", |
512 | "SEEKDIR", |
513 | "REWINDDIR", |
514 | "CLOSEDIR", |
515 | "GETLOGIN", |
516 | "SYSCALL", |
517 | "GSOCKOPT", |
518 | "SSOCKOPT", |
519 | "GETSOCKNAME", |
520 | "GETPEERNAME", |
ff2452de |
521 | "LSLICE", |
522 | "SPLICE", |
0f85fab0 |
523 | "BINMODE", |
524 | "244" |
8d063cd8 |
525 | }; |
526 | #endif |
527 | |
528 | #define A_NULL 0 |
529 | #define A_EXPR 1 |
530 | #define A_CMD 2 |
531 | #define A_STAB 3 |
532 | #define A_LVAL 4 |
533 | #define A_SINGLE 5 |
534 | #define A_DOUBLE 6 |
535 | #define A_BACKTICK 7 |
536 | #define A_READ 8 |
537 | #define A_SPAT 9 |
538 | #define A_LEXPR 10 |
539 | #define A_ARYLEN 11 |
a687059c |
540 | #define A_ARYSTAB 12 |
378cc40b |
541 | #define A_LARYLEN 13 |
542 | #define A_GLOB 14 |
543 | #define A_WORD 15 |
544 | #define A_INDREAD 16 |
a687059c |
545 | #define A_LARYSTAB 17 |
546 | #define A_STAR 18 |
547 | #define A_LSTAR 19 |
548 | #define A_WANTARRAY 20 |
549 | |
550 | #define A_MASK 31 |
551 | #define A_DONT 32 /* or this into type to suppress evaluation */ |
8d063cd8 |
552 | |
553 | #ifndef DOINIT |
554 | extern char *argname[]; |
555 | #else |
556 | char *argname[] = { |
557 | "A_NULL", |
558 | "EXPR", |
559 | "CMD", |
560 | "STAB", |
561 | "LVAL", |
562 | "SINGLE", |
563 | "DOUBLE", |
564 | "BACKTICK", |
565 | "READ", |
566 | "SPAT", |
567 | "LEXPR", |
568 | "ARYLEN", |
a687059c |
569 | "ARYSTAB", |
378cc40b |
570 | "LARYLEN", |
571 | "GLOB", |
572 | "WORD", |
573 | "INDREAD", |
a687059c |
574 | "LARYSTAB", |
575 | "STAR", |
576 | "LSTAR", |
577 | "WANTARRAY", |
578 | "21" |
8d063cd8 |
579 | }; |
580 | #endif |
581 | |
582 | #ifndef DOINIT |
583 | extern bool hoistable[]; |
584 | #else |
a687059c |
585 | bool hoistable[] = |
586 | {0, /* A_NULL */ |
587 | 0, /* EXPR */ |
588 | 1, /* CMD */ |
589 | 1, /* STAB */ |
590 | 0, /* LVAL */ |
591 | 1, /* SINGLE */ |
592 | 0, /* DOUBLE */ |
593 | 0, /* BACKTICK */ |
594 | 0, /* READ */ |
595 | 0, /* SPAT */ |
596 | 0, /* LEXPR */ |
597 | 1, /* ARYLEN */ |
598 | 1, /* ARYSTAB */ |
599 | 0, /* LARYLEN */ |
600 | 0, /* GLOB */ |
601 | 1, /* WORD */ |
602 | 0, /* INDREAD */ |
603 | 0, /* LARYSTAB */ |
604 | 1, /* STAR */ |
605 | 1, /* LSTAR */ |
606 | 1, /* WANTARRAY */ |
607 | 0, /* 21 */ |
608 | }; |
8d063cd8 |
609 | #endif |
610 | |
378cc40b |
611 | union argptr { |
612 | ARG *arg_arg; |
613 | char *arg_cval; |
614 | STAB *arg_stab; |
615 | SPAT *arg_spat; |
616 | CMD *arg_cmd; |
617 | STR *arg_str; |
a687059c |
618 | HASH *arg_hash; |
378cc40b |
619 | }; |
620 | |
8d063cd8 |
621 | struct arg { |
378cc40b |
622 | union argptr arg_ptr; |
8d063cd8 |
623 | short arg_len; |
a687059c |
624 | #ifdef mips |
625 | short pad; |
626 | #endif |
378cc40b |
627 | unsigned char arg_type; |
628 | unsigned char arg_flags; |
8d063cd8 |
629 | }; |
630 | |
a687059c |
631 | #define AF_ARYOK 1 /* op can handle multiple values here */ |
8d063cd8 |
632 | #define AF_POST 2 /* post *crement this item */ |
633 | #define AF_PRE 4 /* pre *crement this item */ |
634 | #define AF_UP 8 /* increment rather than decrement */ |
635 | #define AF_COMMON 16 /* left and right have symbols in common */ |
a687059c |
636 | #define AF_UNUSED 32 /* */ |
8d063cd8 |
637 | #define AF_LISTISH 64 /* turn into list if important */ |
378cc40b |
638 | #define AF_LOCAL 128 /* list of local variables */ |
8d063cd8 |
639 | |
640 | /* |
641 | * Most of the ARG pointers are used as pointers to arrays of ARG. When |
642 | * so used, the 0th element is special, and represents the operator to |
643 | * use on the list of arguments following. The arg_len in the 0th element |
644 | * gives the maximum argument number, and the arg_str is used to store |
645 | * the return value in a more-or-less static location. Sorry it's not |
a687059c |
646 | * re-entrant (yet), but it sure makes it efficient. The arg_type of the |
8d063cd8 |
647 | * 0th element is an operator (O_*) rather than an argument type (A_*). |
648 | */ |
649 | |
650 | #define Nullarg Null(ARG*) |
651 | |
a687059c |
652 | #ifndef DOINIT |
653 | EXT char opargs[MAXO+1]; |
654 | #else |
655 | #define A(e1,e2,e3) (e1+(e2<<2)+(e3<<4)) |
656 | char opargs[MAXO+1] = { |
657 | A(0,0,0), /* NULL */ |
658 | A(1,0,0), /* ITEM */ |
659 | A(0,0,0), /* ITEM2 */ |
660 | A(0,0,0), /* ITEM3 */ |
661 | A(1,1,0), /* CONCAT */ |
662 | A(1,0,0), /* MATCH */ |
663 | A(1,0,0), /* NMATCH */ |
664 | A(1,0,0), /* SUBST */ |
665 | A(1,0,0), /* NSUBST */ |
666 | A(1,1,0), /* ASSIGN */ |
667 | A(1,1,0), /* MULTIPLY */ |
668 | A(1,1,0), /* DIVIDE */ |
669 | A(1,1,0), /* MODULO */ |
670 | A(1,1,0), /* ADD */ |
671 | A(1,1,0), /* SUBTRACT */ |
672 | A(1,1,0), /* LEFT_SHIFT */ |
673 | A(1,1,0), /* RIGHT_SHIFT */ |
674 | A(1,1,0), /* LT */ |
675 | A(1,1,0), /* GT */ |
676 | A(1,1,0), /* LE */ |
677 | A(1,1,0), /* GE */ |
678 | A(1,1,0), /* EQ */ |
679 | A(1,1,0), /* NE */ |
680 | A(1,1,0), /* BIT_AND */ |
681 | A(1,1,0), /* XOR */ |
682 | A(1,1,0), /* BIT_OR */ |
683 | A(1,0,0), /* AND */ |
684 | A(1,0,0), /* OR */ |
685 | A(1,0,0), /* COND_EXPR */ |
686 | A(1,1,0), /* COMMA */ |
687 | A(1,0,0), /* NEGATE */ |
688 | A(1,0,0), /* NOT */ |
689 | A(1,0,0), /* COMPLEMENT */ |
690 | A(1,0,0), /* WRITE */ |
691 | A(1,1,0), /* OPEN */ |
692 | A(1,0,0), /* TRANS */ |
693 | A(1,0,0), /* NTRANS */ |
694 | A(1,0,0), /* CLOSE */ |
695 | A(0,0,0), /* ARRAY */ |
696 | A(0,0,0), /* HASH */ |
697 | A(0,0,0), /* LARRAY */ |
698 | A(0,0,0), /* LHASH */ |
699 | A(0,3,0), /* PUSH */ |
700 | A(0,0,0), /* POP */ |
701 | A(0,0,0), /* SHIFT */ |
702 | A(1,0,1), /* SPLIT */ |
703 | A(1,0,0), /* LENGTH */ |
704 | A(3,0,0), /* SPRINTF */ |
705 | A(1,1,1), /* SUBSTR */ |
706 | A(1,3,0), /* JOIN */ |
707 | A(1,1,0), /* SLT */ |
708 | A(1,1,0), /* SGT */ |
709 | A(1,1,0), /* SLE */ |
710 | A(1,1,0), /* SGE */ |
711 | A(1,1,0), /* SEQ */ |
712 | A(1,1,0), /* SNE */ |
713 | A(0,3,0), /* SUBR */ |
714 | A(1,3,0), /* PRINT */ |
715 | A(1,0,0), /* CHDIR */ |
716 | A(0,3,0), /* DIE */ |
717 | A(1,0,0), /* EXIT */ |
718 | A(1,0,0), /* RESET */ |
719 | A(3,0,0), /* LIST */ |
720 | A(1,0,0), /* SELECT */ |
721 | A(1,0,0), /* EOF */ |
722 | A(1,0,0), /* TELL */ |
723 | A(1,1,1), /* SEEK */ |
724 | A(0,0,0), /* LAST */ |
725 | A(0,0,0), /* NEXT */ |
726 | A(0,0,0), /* REDO */ |
727 | A(0,0,0), /* GOTO */ |
728 | A(1,1,0), /* INDEX */ |
729 | A(0,0,0), /* TIME */ |
730 | A(0,0,0), /* TIMES */ |
731 | A(1,0,0), /* LOCALTIME */ |
732 | A(1,0,0), /* GMTIME */ |
733 | A(1,0,0), /* STAT */ |
734 | A(1,1,0), /* CRYPT */ |
735 | A(1,0,0), /* EXP */ |
736 | A(1,0,0), /* LOG */ |
737 | A(1,0,0), /* SQRT */ |
738 | A(1,0,0), /* INT */ |
739 | A(1,3,0), /* PRINTF */ |
740 | A(1,0,0), /* ORD */ |
741 | A(1,0,0), /* SLEEP */ |
742 | A(1,0,0), /* FLIP */ |
743 | A(0,1,0), /* FLOP */ |
744 | A(0,0,0), /* KEYS */ |
745 | A(0,0,0), /* VALUES */ |
746 | A(0,0,0), /* EACH */ |
747 | A(3,0,0), /* CHOP */ |
748 | A(0,0,0), /* FORK */ |
749 | A(1,3,0), /* EXEC */ |
750 | A(1,3,0), /* SYSTEM */ |
751 | A(1,0,0), /* OCT */ |
752 | A(1,0,0), /* HEX */ |
753 | A(0,3,0), /* CHMOD */ |
754 | A(0,3,0), /* CHOWN */ |
755 | A(0,3,0), /* KILL */ |
756 | A(1,1,0), /* RENAME */ |
757 | A(0,3,0), /* UNLINK */ |
758 | A(1,0,0), /* UMASK */ |
759 | A(0,3,0), /* UNSHIFT */ |
760 | A(1,1,0), /* LINK */ |
761 | A(1,1,0), /* REPEAT */ |
762 | A(1,0,0), /* EVAL */ |
763 | A(1,0,0), /* FTEREAD */ |
764 | A(1,0,0), /* FTEWRITE */ |
765 | A(1,0,0), /* FTEEXEC */ |
766 | A(1,0,0), /* FTEOWNED */ |
767 | A(1,0,0), /* FTRREAD */ |
768 | A(1,0,0), /* FTRWRITE */ |
769 | A(1,0,0), /* FTREXEC */ |
770 | A(1,0,0), /* FTROWNED */ |
771 | A(1,0,0), /* FTIS */ |
772 | A(1,0,0), /* FTZERO */ |
773 | A(1,0,0), /* FTSIZE */ |
774 | A(1,0,0), /* FTFILE */ |
775 | A(1,0,0), /* FTDIR */ |
776 | A(1,0,0), /* FTLINK */ |
777 | A(1,1,0), /* SYMLINK */ |
778 | A(1,0,0), /* FTPIPE */ |
779 | A(1,0,0), /* FTSOCK */ |
780 | A(1,0,0), /* FTBLK */ |
781 | A(1,0,0), /* FTCHR */ |
782 | A(1,0,0), /* FTSUID */ |
783 | A(1,0,0), /* FTSGID */ |
784 | A(1,0,0), /* FTSVTX */ |
785 | A(1,0,0), /* FTTTY */ |
786 | A(1,0,0), /* DOFILE */ |
787 | A(1,0,0), /* FTTEXT */ |
788 | A(1,0,0), /* FTBINARY */ |
789 | A(0,3,0), /* UTIME */ |
790 | A(0,0,0), /* WAIT */ |
791 | A(1,3,0), /* SORT */ |
792 | A(0,1,0), /* DELETE */ |
793 | A(1,0,0), /* STUDY */ |
794 | A(1,1,0), /* ATAN2 */ |
795 | A(1,0,0), /* SIN */ |
796 | A(1,0,0), /* COS */ |
797 | A(1,0,0), /* RAND */ |
798 | A(1,0,0), /* SRAND */ |
799 | A(1,1,0), /* POW */ |
800 | A(0,3,0), /* RETURN */ |
801 | A(1,0,0), /* GETC */ |
802 | A(1,1,0), /* MKDIR */ |
803 | A(1,0,0), /* RMDIR */ |
804 | A(0,0,0), /* GETPPID */ |
805 | A(1,0,0), /* GETPGRP */ |
806 | A(1,1,0), /* SETPGRP */ |
807 | A(1,1,0), /* GETPRIORITY */ |
808 | A(1,1,1), /* SETPRIORITY */ |
809 | A(1,0,0), /* CHROOT */ |
810 | A(1,1,1), /* IOCTL */ |
811 | A(1,1,1), /* FCNTL */ |
812 | A(1,1,0), /* FLOCK */ |
813 | A(1,1,0), /* RINDEX */ |
814 | A(1,3,0), /* PACK */ |
815 | A(1,1,0), /* UNPACK */ |
816 | A(1,1,1), /* READ */ |
817 | A(0,3,0), /* WARN */ |
818 | A(1,1,1), /* DBMOPEN */ |
819 | A(1,0,0), /* DBMCLOSE */ |
820 | A(0,3,0), /* ASLICE */ |
821 | A(0,3,0), /* HSLICE */ |
822 | A(0,3,0), /* LASLICE */ |
823 | A(0,3,0), /* LHSLICE */ |
824 | A(1,0,0), /* F_OR_R */ |
825 | A(1,1,0), /* RANGE */ |
826 | A(1,1,0), /* RCAT */ |
827 | A(3,3,0), /* AASSIGN */ |
828 | A(0,0,0), /* SASSIGN */ |
829 | A(0,0,0), /* DUMP */ |
03a14243 |
830 | A(0,3,0), /* REVERSE */ |
a687059c |
831 | A(1,0,0), /* ADDROF */ |
832 | A(1,1,1), /* SOCKET */ |
833 | A(1,1,0), /* BIND */ |
834 | A(1,1,0), /* CONNECT */ |
835 | A(1,1,0), /* LISTEN */ |
836 | A(1,1,0), /* ACCEPT */ |
d8f2e4cc |
837 | A(1,1,3), /* SEND */ |
a687059c |
838 | A(1,1,1), /* RECV */ |
839 | A(1,1,1), /* SSELECT */ |
840 | A(1,1,1), /* SOCKETPAIR */ |
841 | A(0,3,0), /* DBSUBR */ |
842 | A(1,0,0), /* DEFINED */ |
843 | A(1,0,0), /* UNDEF */ |
844 | A(1,0,0), /* READLINK */ |
845 | A(1,0,0), /* LSTAT */ |
846 | A(0,1,0), /* AELEM */ |
847 | A(0,1,0), /* HELEM */ |
848 | A(0,1,0), /* LAELEM */ |
849 | A(0,1,0), /* LHELEM */ |
850 | A(1,0,0), /* LOCAL */ |
449aadca |
851 | A(0,0,0), /* PIPE */ |
a687059c |
852 | A(1,0,0), /* FILENO */ |
853 | A(1,0,0), /* GHBYNAME */ |
854 | A(1,1,0), /* GHBYADDR */ |
855 | A(0,0,0), /* GHOSTENT */ |
856 | A(1,0,0), /* SHOSTENT */ |
857 | A(0,0,0), /* EHOSTENT */ |
858 | A(1,1,0), /* GSBYNAME */ |
859 | A(1,1,0), /* GSBYPORT */ |
860 | A(0,0,0), /* GSERVENT */ |
861 | A(1,0,0), /* SSERVENT */ |
862 | A(0,0,0), /* ESERVENT */ |
863 | A(1,0,0), /* GPBYNAME */ |
864 | A(1,0,0), /* GPBYNUMBER */ |
865 | A(0,0,0), /* GPROTOENT */ |
866 | A(1,0,0), /* SPROTOENT */ |
867 | A(0,0,0), /* EPROTOENT */ |
868 | A(1,0,0), /* GNBYNAME */ |
869 | A(1,1,0), /* GNBYADDR */ |
870 | A(0,0,0), /* GNETENT */ |
871 | A(1,0,0), /* SNETENT */ |
872 | A(0,0,0), /* ENETENT */ |
873 | A(1,1,1), /* VEC */ |
874 | A(0,3,0), /* GREP */ |
875 | A(1,0,0), /* GPWNAM */ |
876 | A(1,0,0), /* GPWUID */ |
877 | A(0,0,0), /* GPWENT */ |
878 | A(0,0,0), /* SPWENT */ |
879 | A(0,0,0), /* EPWENT */ |
880 | A(1,0,0), /* GGRNAM */ |
881 | A(1,0,0), /* GGRGID */ |
882 | A(0,0,0), /* GGRENT */ |
883 | A(0,0,0), /* SGRENT */ |
884 | A(0,0,0), /* EGRENT */ |
885 | A(1,1,0), /* SHUTDOWN */ |
886 | A(1,1,0), /* OPENDIR */ |
887 | A(1,0,0), /* READDIR */ |
888 | A(1,0,0), /* TELLDIR */ |
889 | A(1,1,0), /* SEEKDIR */ |
890 | A(1,0,0), /* REWINDDIR */ |
891 | A(1,0,0), /* CLOSEDIR */ |
892 | A(0,0,0), /* GETLOGIN */ |
893 | A(1,3,0), /* SYSCALL */ |
894 | A(1,1,1), /* GSOCKOPT */ |
895 | A(1,1,1), /* SSOCKOPT */ |
896 | A(1,0,0), /* GETSOCKNAME */ |
897 | A(1,0,0), /* GETPEERNAME */ |
ff2452de |
898 | A(0,3,3), /* LSLICE */ |
899 | A(0,3,1), /* SPLICE */ |
0f85fab0 |
900 | A(1,0,0), /* BINMODE */ |
a687059c |
901 | 0 |
902 | }; |
903 | #undef A |
904 | #endif |
8d063cd8 |
905 | |
906 | int do_trans(); |
907 | int do_split(); |
908 | bool do_eof(); |
909 | long do_tell(); |
910 | bool do_seek(); |
911 | int do_tms(); |
912 | int do_time(); |
913 | int do_stat(); |
378cc40b |
914 | STR *do_push(); |
915 | FILE *nextargv(); |
916 | STR *do_fttext(); |
a687059c |
917 | int do_slice(); |