home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / perl / Source / H / Arg next >
Encoding:
Text File  |  1990-11-15  |  14.3 KB  |  718 lines

  1. /* $Header: arg.h,v 3.0.1.8 90/11/10 01:04:36 lwall Locked $
  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.
  7.  *
  8.  * $Log:    arg.h,v $
  9.  * Revision 3.0.1.8  90/11/10  01:04:36  lwall
  10.  * patch38: added alarm function
  11.  * patch38: socket, recv, select, socketpair, setsockopt didn't eval all args
  12.  * 
  13.  * Revision 3.0.1.7  90/10/15  14:53:59  lwall
  14.  * patch29: added SysV IPC
  15.  * patch29: added waitpid
  16.  * patch29: added cmp and <=>
  17.  * patch29: added caller
  18.  * patch29: added scalar
  19.  * patch29: added sysread and syswrite
  20.  * patch29: added -M, -A and -C
  21.  * patch29: index and substr now have optional 3rd args
  22.  * patch29: you can now read into the middle string
  23.  * patch29: various portability fixes
  24.  * 
  25.  * Revision 3.0.1.6  90/08/09  02:25:14  lwall
  26.  * patch19: added require operator
  27.  * patch19: added truncate operator
  28.  * 
  29.  * Revision 3.0.1.5  90/03/27  15:29:41  lwall
  30.  * patch16: MSDOS support
  31.  * 
  32.  * Revision 3.0.1.4  90/03/12  16:18:21  lwall
  33.  * patch13: added list slice operator (LIST)[LIST]
  34.  * patch13: added splice operator: @oldelems = splice(@array,$offset,$len,LIST)
  35.  * 
  36.  * Revision 3.0.1.3  90/02/28  16:21:55  lwall
  37.  * patch9: added pipe function
  38.  * 
  39.  * Revision 3.0.1.2  89/12/21  19:13:14  lwall
  40.  * patch7: send() didn't allow a TO argument
  41.  * 
  42.  * Revision 3.0.1.1  89/10/26  23:02:35  lwall
  43.  * patch1: reverse didn't work
  44.  * 
  45.  * Revision 3.0  89/10/18  15:08:27  lwall
  46.  * 3.0 baseline
  47.  * 
  48.  */
  49.  
  50. #define O_NULL 0
  51. #define O_ITEM 1
  52. #define O_ITEM2 2
  53. #define O_ITEM3 3
  54. #define O_CONCAT 4
  55. #define O_MATCH 5
  56. #define O_NMATCH 6
  57. #define O_SUBST 7
  58. #define O_NSUBST 8
  59. #define O_ASSIGN 9
  60. #define O_MULTIPLY 10
  61. #define O_DIVIDE 11
  62. #define O_MODULO 12
  63. #define O_ADD 13
  64. #define O_SUBTRACT 14
  65. #define O_LEFT_SHIFT 15
  66. #define O_RIGHT_SHIFT 16
  67. #define O_LT 17
  68. #define O_GT 18
  69. #define O_LE 19
  70. #define O_GE 20
  71. #define O_EQ 21
  72. #define O_NE 22
  73. #define O_BIT_AND 23
  74. #define O_XOR 24
  75. #define O_BIT_OR 25
  76. #define O_AND 26
  77. #define O_OR 27
  78. #define O_COND_EXPR 28
  79. #define O_COMMA 29
  80. #define O_NEGATE 30
  81. #define O_NOT 31
  82. #define O_COMPLEMENT 32
  83. #define O_WRITE 33
  84. #define O_OPEN 34
  85. #define O_TRANS 35
  86. #define O_NTRANS 36
  87. #define O_CLOSE 37
  88. #define O_ARRAY 38
  89. #define O_HASH 39
  90. #define O_LARRAY 40
  91. #define O_LHASH 41
  92. #define O_PUSH 42
  93. #define O_POP 43
  94. #define O_SHIFT 44
  95. #define O_SPLIT 45
  96. #define O_LENGTH 46
  97. #define O_SPRINTF 47
  98. #define O_SUBSTR 48
  99. #define O_JOIN 49
  100. #define O_SLT 50
  101. #define O_SGT 51
  102. #define O_SLE 52
  103. #define O_SGE 53
  104. #define O_SEQ 54
  105. #define O_SNE 55
  106. #define O_SUBR 56
  107. #define O_PRINT 57
  108. #define O_CHDIR 58
  109. #define O_DIE 59
  110. #define O_EXIT 60
  111. #define O_RESET 61
  112. #define O_LIST 62
  113. #define O_SELECT 63
  114. #define O_EOF 64
  115. #define O_TELL 65
  116. #define O_SEEK 66
  117. #define O_LAST 67
  118. #define O_NEXT 68
  119. #define O_REDO 69
  120. #define O_GOTO 70
  121. #define O_INDEX 71
  122. #define O_TIME 72
  123. #define O_LOCALTIME 73
  124. #define O_GMTIME 74
  125. #define O_STAT 75
  126. #define O_CRYPT 76
  127. #define O_EXP 77
  128. #define O_LOG 78
  129. #define O_SQRT 79
  130. #define O_INT 80
  131. #define O_PRTF 81
  132. #define O_ORD 82
  133. #define O_SLEEP 83
  134. #define O_FLIP 84
  135. #define O_FLOP 85
  136. #define O_KEYS 86
  137. #define O_VALUES 87
  138. #define O_EACH 88
  139. #define O_CHOP 89
  140. #define O_EXEC_OP 90
  141. #define O_SYSTEM 91
  142. #define O_OCT 92
  143. #define O_HEX 93
  144. #define O_RENAME 94
  145. #define O_UNLINK 95
  146. #define O_UNSHIFT 96
  147. #define O_REPEAT 97
  148. #define O_EVAL 98
  149. #define O_FTREAD 99
  150. #define O_FTWRITE 100
  151. #define O_FTLOCK 101
  152. #define O_FTPREAD 102
  153. #define O_FTPWRITE 103
  154. #define O_FTIS 104
  155. #define O_FTZERO 105
  156. #define O_FTSIZE 106
  157. #define O_FTFILE 107
  158. #define O_FTDIR 108
  159. #define O_FTTTY 109
  160. #define O_DOFILE 110
  161. #define O_FTTEXT 111
  162. #define O_FTBINARY 112
  163. #define O_SORT 113
  164. #define O_DELETE 114
  165. #define O_STUDY 115
  166. #define O_ATAN2 116
  167. #define O_SIN 117
  168. #define O_COS 118
  169. #define O_RAND 119
  170. #define O_SRAND 120
  171. #define O_POW 121
  172. #define O_RETURN 122
  173. #define O_GETC 123
  174. #define O_MKDIR 124
  175. #define O_RMDIR 125
  176. #define O_RINDEX 126
  177. #define O_PACK 127
  178. #define O_UNPACK 128
  179. #define O_READ 129
  180. #define O_WARN 130
  181. #define O_DBMOPEN 131
  182. #define O_DBMCLOSE 132
  183. #define O_ASLICE 133
  184. #define O_HSLICE 134
  185. #define O_LASLICE 135
  186. #define O_LHSLICE 136
  187. #define O_F_OR_R 137
  188. #define O_RANGE 138
  189. #define O_RCAT 139
  190. #define O_AASSIGN 140
  191. #define O_SASSIGN 141
  192. #define O_REVERSE 142
  193. #define O_ADDROF 143
  194. #define O_DBSUBR 144
  195. #define O_DEFINED 145
  196. #define O_UNDEF 146
  197. #define O_AELEM 147
  198. #define O_HELEM 148
  199. #define O_LAELEM 149
  200. #define O_LHELEM 150
  201. #define O_LOCAL 151
  202. #define O_VEC 152
  203. #define O_GREP 153
  204. #define O_OPENDIR 154
  205. #define O_READDIR 155
  206. #define O_TELLDIR 156
  207. #define O_SEEKDIR 157
  208. #define O_REWINDDIR 158
  209. #define O_CLOSEDIR 159
  210. #define O_SYSCALL 160
  211. #define O_LSLICE 161
  212. #define O_SPLICE 162
  213. #define O_REQUIRE 163
  214. #define O_TRUNCATE 164
  215. #define O_NCMP 165
  216. #define O_SCMP 166
  217. #define O_CALLER 167
  218. #define O_SCALAR 168
  219. #define O_FTTIME 169
  220. #define O_KILL 170
  221. #define MAXO 171
  222.  
  223. #ifndef DOINIT
  224. extern char *opname[];
  225. #else
  226. char *opname[] = {
  227.     "NULL",
  228.     "ITEM",
  229.     "ITEM2",
  230.     "ITEM3",
  231.     "CONCAT",
  232.     "MATCH",
  233.     "NMATCH",
  234.     "SUBST",
  235.     "NSUBST",
  236.     "ASSIGN",
  237.     "MULTIPLY",
  238.     "DIVIDE",
  239.     "MODULO",
  240.     "ADD",
  241.     "SUBTRACT",
  242.     "LEFT_SHIFT",
  243.     "RIGHT_SHIFT",
  244.     "LT",
  245.     "GT",
  246.     "LE",
  247.     "GE",
  248.     "EQ",
  249.     "NE",
  250.     "BIT_AND",
  251.     "XOR",
  252.     "BIT_OR",
  253.     "AND",
  254.     "OR",
  255.     "COND_EXPR",
  256.     "COMMA",
  257.     "NEGATE",
  258.     "NOT",
  259.     "COMPLEMENT",
  260.     "WRITE",
  261.     "OPEN",
  262.     "TRANS",
  263.     "NTRANS",
  264.     "CLOSE",
  265.     "ARRAY",
  266.     "HASH",
  267.     "LARRAY",
  268.     "LHASH",
  269.     "PUSH",
  270.     "POP",
  271.     "SHIFT",
  272.     "SPLIT",
  273.     "LENGTH",
  274.     "SPRINTF",
  275.     "SUBSTR",
  276.     "JOIN",
  277.     "SLT",
  278.     "SGT",
  279.     "SLE",
  280.     "SGE",
  281.     "SEQ",
  282.     "SNE",
  283.     "SUBR",
  284.     "PRINT",
  285.     "CHDIR",
  286.     "DIE",
  287.     "EXIT",
  288.     "RESET",
  289.     "LIST",
  290.     "SELECT",
  291.     "EOF",
  292.     "TELL",
  293.     "SEEK",
  294.     "LAST",
  295.     "NEXT",
  296.     "REDO",
  297.     "GOTO",/* shudder */
  298.     "INDEX",
  299.     "TIME",
  300.     "LOCALTIME",
  301.     "GMTIME",
  302.     "STAT",
  303.     "CRYPT",
  304.     "EXP",
  305.     "LOG",
  306.     "SQRT",
  307.     "INT",
  308.     "PRINTF",
  309.     "ORD",
  310.     "SLEEP",
  311.     "FLIP",
  312.     "FLOP",
  313.     "KEYS",
  314.     "VALUES",
  315.     "EACH",
  316.     "CHOP",
  317.     "EXEC",
  318.     "SYSTEM",
  319.     "OCT",
  320.     "HEX",
  321.     "RENAME",
  322.     "UNLINK",
  323.     "UNSHIFT",
  324.     "REPEAT",
  325.     "EVAL",
  326.     "FTREAD",
  327.     "FTWRITE",
  328.     "FTLOCK",
  329.     "FTPREAD",
  330.     "FTPWRITE",
  331.     "FTIS",
  332.     "FTZERO",
  333.     "FTSIZE",
  334.     "FTFILE",
  335.     "FTDIR",
  336.     "FTTTY",
  337.     "DOFILE",
  338.     "FTTEXT",
  339.     "FTBINARY",
  340.     "SORT",
  341.     "DELETE",
  342.     "STUDY",
  343.     "ATAN2",
  344.     "SIN",
  345.     "COS",
  346.     "RAND",
  347.     "SRAND",
  348.     "POW",
  349.     "RETURN",
  350.     "GETC",
  351.     "MKDIR",
  352.     "RMDIR",
  353.     "RINDEX",
  354.     "PACK",
  355.     "UNPACK",
  356.     "READ",
  357.     "WARN",
  358.     "DBMOPEN",
  359.     "DBMCLOSE",
  360.     "ASLICE",
  361.     "HSLICE",
  362.     "LASLICE",
  363.     "LHSLICE",
  364.     "FLIP_OR_RANGE",
  365.     "RANGE",
  366.     "RCAT",
  367.     "AASSIGN",
  368.     "SASSIGN",
  369.     "REVERSE",
  370.     "ADDRESS_OF",
  371.     "DBSUBR",
  372.     "DEFINED",
  373.     "UNDEF",
  374.     "AELEM",
  375.     "HELEM",
  376.     "LAELEM",
  377.     "LHELEM",
  378.     "LOCAL",
  379.     "VEC",
  380.     "GREP",
  381.     "OPENDIR",
  382.     "READDIR",
  383.     "TELLDIR",
  384.     "SEEKDIR",
  385.     "REWINDDIR",
  386.     "CLOSEDIR",
  387.     "SYSCALL",
  388.     "LSLICE",
  389.     "SPLICE",
  390.     "REQUIRE",
  391.     "TRUNCATE",
  392.     "NCMP",
  393.     "SCMP",
  394.     "CALLER",
  395.     "SCALAR",
  396.     "FTTIME",
  397.     "KILL",
  398.     "171"
  399. };
  400. #endif
  401.  
  402. #define A_NULL 0
  403. #define A_EXPR 1
  404. #define A_CMD 2
  405. #define A_STAB 3
  406. #define A_LVAL 4
  407. #define A_SINGLE 5
  408. #define A_DOUBLE 6
  409. #define A_BACKTICK 7
  410. #define A_READ 8
  411. #define A_SPAT 9
  412. #define A_LEXPR 10
  413. #define A_ARYLEN 11
  414. #define A_ARYSTAB 12
  415. #define A_LARYLEN 13
  416. #define A_GLOB 14
  417. #define A_WORD 15
  418. #define A_INDREAD 16
  419. #define A_LARYSTAB 17
  420. #define A_STAR 18
  421. #define A_LSTAR 19
  422. #define A_WANTARRAY 20
  423.  
  424. #define A_MASK 31
  425. #define A_DONT 32        /* or this into type to suppress evaluation */
  426.  
  427. #ifndef DOINIT
  428. extern char *argname[];
  429. #else
  430. char *argname[] = {
  431.     "A_NULL",
  432.     "EXPR",
  433.     "CMD",
  434.     "STAB",
  435.     "LVAL",
  436.     "SINGLE",
  437.     "DOUBLE",
  438.     "BACKTICK",
  439.     "READ",
  440.     "SPAT",
  441.     "LEXPR",
  442.     "ARYLEN",
  443.     "ARYSTAB",
  444.     "LARYLEN",
  445.     "GLOB",
  446.     "WORD",
  447.     "INDREAD",
  448.     "LARYSTAB",
  449.     "STAR",
  450.     "LSTAR",
  451.     "WANTARRAY",
  452.     "21"
  453. };
  454. #endif
  455.  
  456. #ifndef DOINIT
  457. extern bool hoistable[];
  458. #else
  459. bool hoistable[] =
  460.   {0,    /* A_NULL */
  461.    0,    /* EXPR */
  462.    1,    /* CMD */
  463.    1,    /* STAB */
  464.    0,    /* LVAL */
  465.    1,    /* SINGLE */
  466.    0,    /* DOUBLE */
  467.    0,    /* BACKTICK */
  468.    0,    /* READ */
  469.    0,    /* SPAT */
  470.    0,    /* LEXPR */
  471.    1,    /* ARYLEN */
  472.    1,    /* ARYSTAB */
  473.    0,    /* LARYLEN */
  474.    0,    /* GLOB */
  475.    1,    /* WORD */
  476.    0,    /* INDREAD */
  477.    0,    /* LARYSTAB */
  478.    1,    /* STAR */
  479.    1,    /* LSTAR */
  480.    1,    /* WANTARRAY */
  481.    0,    /* 21 */
  482. };
  483. #endif
  484.  
  485. union argptr {
  486.     ARG        *arg_arg;
  487.     char    *arg_cval;
  488.     STAB    *arg_stab;
  489.     SPAT    *arg_spat;
  490.     CMD        *arg_cmd;
  491.     STR        *arg_str;
  492.     HASH    *arg_hash;
  493. };
  494.  
  495. struct arg {
  496.     union argptr arg_ptr;
  497.     short    arg_len;
  498.     unsigned short arg_type;
  499.     unsigned short arg_flags;
  500. };
  501.  
  502. #define AF_ARYOK 1        /* op can handle multiple values here */
  503. #define AF_POST 2        /* post *crement this item */
  504. #define AF_PRE 4        /* pre *crement this item */
  505. #define AF_UP 8            /* increment rather than decrement */
  506. #define AF_COMMON 16        /* left and right have symbols in common */
  507. #define AF_UNUSED 32        /*  */
  508. #define AF_LISTISH 64        /* turn into list if important */
  509. #define AF_LOCAL 128        /* list of local variables */
  510.  
  511. /*
  512.  * Most of the ARG pointers are used as pointers to arrays of ARG.  When
  513.  * so used, the 0th element is special, and represents the operator to
  514.  * use on the list of arguments following.  The arg_len in the 0th element
  515.  * gives the maximum argument number, and the arg_str is used to store
  516.  * the return value in a more-or-less static location.  Sorry it's not
  517.  * re-entrant (yet), but it sure makes it efficient.  The arg_type of the
  518.  * 0th element is an operator (O_*) rather than an argument type (A_*).
  519.  */
  520.  
  521. #define Nullarg Null(ARG*)
  522.  
  523. #ifndef DOINIT
  524. EXT unsigned short opargs[MAXO+1];
  525. #else
  526. #define A(e1,e2,e3)        (e1+(e2<<2)+(e3<<4))
  527. #define A5(e1,e2,e3,e4,e5) (e1+(e2<<2)+(e3<<4)+(e4<<6)+(e5<<8))
  528. unsigned short opargs[MAXO+1] = {
  529.     A(0,0,0),    /* NULL */
  530.     A(1,0,0),    /* ITEM */
  531.     A(0,0,0),    /* ITEM2 */
  532.     A(0,0,0),    /* ITEM3 */
  533.     A(1,1,0),    /* CONCAT */
  534.     A(1,0,0),    /* MATCH */
  535.     A(1,0,0),    /* NMATCH */
  536.     A(1,0,0),    /* SUBST */
  537.     A(1,0,0),    /* NSUBST */
  538.     A(1,1,0),    /* ASSIGN */
  539.     A(1,1,0),    /* MULTIPLY */
  540.     A(1,1,0),    /* DIVIDE */
  541.     A(1,1,0),    /* MODULO */
  542.     A(1,1,0),    /* ADD */
  543.     A(1,1,0),    /* SUBTRACT */
  544.     A(1,1,0),    /* LEFT_SHIFT */
  545.     A(1,1,0),    /* RIGHT_SHIFT */
  546.     A(1,1,0),    /* LT */
  547.     A(1,1,0),    /* GT */
  548.     A(1,1,0),    /* LE */
  549.     A(1,1,0),    /* GE */
  550.     A(1,1,0),    /* EQ */
  551.     A(1,1,0),    /* NE */
  552.     A(1,1,0),    /* BIT_AND */
  553.     A(1,1,0),    /* XOR */
  554.     A(1,1,0),    /* BIT_OR */
  555.     A(1,0,0),    /* AND */
  556.     A(1,0,0),    /* OR */
  557.     A(1,0,0),    /* COND_EXPR */
  558.     A(1,1,0),    /* COMMA */
  559.     A(1,0,0),    /* NEGATE */
  560.     A(1,0,0),    /* NOT */
  561.     A(1,0,0),    /* COMPLEMENT */
  562.     A(1,0,0),    /* WRITE */
  563.     A(1,1,0),    /* OPEN */
  564.     A(1,0,0),    /* TRANS */
  565.     A(1,0,0),    /* NTRANS */
  566.     A(1,0,0),    /* CLOSE */
  567.     A(0,0,0),    /* ARRAY */
  568.     A(0,0,0),    /* HASH */
  569.     A(0,0,0),    /* LARRAY */
  570.     A(0,0,0),    /* LHASH */
  571.     A(0,3,0),    /* PUSH */
  572.     A(0,0,0),    /* POP */
  573.     A(0,0,0),    /* SHIFT */
  574.     A(1,0,1),    /* SPLIT */
  575.     A(1,0,0),    /* LENGTH */
  576.     A(3,0,0),    /* SPRINTF */
  577.     A(1,1,1),    /* SUBSTR */
  578.     A(1,3,0),    /* JOIN */
  579.     A(1,1,0),    /* SLT */
  580.     A(1,1,0),    /* SGT */
  581.     A(1,1,0),    /* SLE */
  582.     A(1,1,0),    /* SGE */
  583.     A(1,1,0),    /* SEQ */
  584.     A(1,1,0),    /* SNE */
  585.     A(0,3,0),    /* SUBR */
  586.     A(1,3,0),    /* PRINT */
  587.     A(1,0,0),    /* CHDIR */
  588.     A(0,3,0),    /* DIE */
  589.     A(1,0,0),    /* EXIT */
  590.     A(1,0,0),    /* RESET */
  591.     A(3,0,0),    /* LIST */
  592.     A(1,0,0),    /* SELECT */
  593.     A(1,0,0),    /* EOF */
  594.     A(1,0,0),    /* TELL */
  595.     A(1,1,1),    /* SEEK */
  596.     A(0,0,0),    /* LAST */
  597.     A(0,0,0),    /* NEXT */
  598.     A(0,0,0),    /* REDO */
  599.     A(0,0,0),    /* GOTO */
  600.     A(1,1,1),    /* INDEX */
  601.     A(0,0,0),    /* TIME */
  602.     A(1,0,0),    /* LOCALTIME */
  603.     A(1,0,0),    /* GMTIME */
  604.     A(1,0,0),    /* STAT */
  605.     A(1,1,0),    /* CRYPT */
  606.     A(1,0,0),    /* EXP */
  607.     A(1,0,0),    /* LOG */
  608.     A(1,0,0),    /* SQRT */
  609.     A(1,0,0),    /* INT */
  610.     A(1,3,0),    /* PRINTF */
  611.     A(1,0,0),    /* ORD */
  612.     A(1,0,0),    /* SLEEP */
  613.     A(1,0,0),    /* FLIP */
  614.     A(0,1,0),    /* FLOP */
  615.     A(0,0,0),    /* KEYS */
  616.     A(0,0,0),    /* VALUES */
  617.     A(0,0,0),    /* EACH */
  618.     A(3,0,0),    /* CHOP */
  619.     A(1,3,0),    /* EXEC */
  620.     A(1,3,0),    /* SYSTEM */
  621.     A(1,0,0),    /* OCT */
  622.     A(1,0,0),    /* HEX */
  623.     A(1,1,0),    /* RENAME */
  624.     A(0,3,0),    /* UNLINK */
  625.     A(0,3,0),    /* UNSHIFT */
  626.     A(1,1,0),    /* REPEAT */
  627.     A(1,0,0),    /* EVAL */
  628.     A(1,0,0),    /* FTREAD */
  629.     A(1,0,0),    /* FTWRITE */
  630.     A(1,0,0),    /* FTLOCK */
  631.     A(1,0,0),    /* FTPREAD */
  632.     A(1,0,0),    /* FTPWRITE */
  633.     A(1,0,0),    /* FTIS */
  634.     A(1,0,0),    /* FTZERO */
  635.     A(1,0,0),    /* FTSIZE */
  636.     A(1,0,0),    /* FTFILE */
  637.     A(1,0,0),    /* FTDIR */
  638.     A(1,0,0),    /* FTTTY */
  639.     A(1,0,0),    /* DOFILE */
  640.     A(1,0,0),    /* FTTEXT */
  641.     A(1,0,0),    /* FTBINARY */
  642.     A(1,3,0),    /* SORT */
  643.     A(0,1,0),    /* DELETE */
  644.     A(1,0,0),    /* STUDY */
  645.     A(1,1,0),    /* ATAN2 */
  646.     A(1,0,0),    /* SIN */
  647.     A(1,0,0),    /* COS */
  648.     A(1,0,0),    /* RAND */
  649.     A(1,0,0),    /* SRAND */
  650.     A(1,1,0),    /* POW */
  651.     A(0,3,0),    /* RETURN */
  652.     A(1,0,0),    /* GETC */
  653.     A(1,0,0),    /* MKDIR */
  654.     A(1,0,0),    /* RMDIR */
  655.     A(1,1,1),    /* RINDEX */
  656.     A(1,3,0),    /* PACK */
  657.     A(1,1,0),    /* UNPACK */
  658.     A(1,1,3),    /* READ */
  659.     A(0,3,0),    /* WARN */
  660.     A(1,1,1),    /* DBMOPEN */
  661.     A(1,0,0),    /* DBMCLOSE */
  662.     A(0,3,0),    /* ASLICE */
  663.     A(0,3,0),    /* HSLICE */
  664.     A(0,3,0),    /* LASLICE */
  665.     A(0,3,0),    /* LHSLICE */
  666.     A(1,0,0),    /* F_OR_R */
  667.     A(1,1,0),    /* RANGE */
  668.     A(1,1,0),    /* RCAT */
  669.     A(3,3,0),    /* AASSIGN */
  670.     A(0,0,0),    /* SASSIGN */
  671.     A(0,3,0),    /* REVERSE */
  672.     A(1,0,0),    /* ADDROF */
  673.     A(0,3,0),    /* DBSUBR */
  674.     A(1,0,0),    /* DEFINED */
  675.     A(1,0,0),    /* UNDEF */
  676.     A(0,1,0),    /* AELEM */
  677.     A(0,1,0),    /* HELEM */
  678.     A(0,1,0),    /* LAELEM */
  679.     A(0,1,0),    /* LHELEM */
  680.     A(1,0,0),    /* LOCAL */
  681.     A(1,1,1),    /* VEC */
  682.     A(0,3,0),    /* GREP */
  683.     A(1,1,0),    /* OPENDIR */
  684.     A(1,0,0),    /* READDIR */
  685.     A(1,0,0),    /* TELLDIR */
  686.     A(1,1,0),    /* SEEKDIR */
  687.     A(1,0,0),    /* REWINDDIR */
  688.     A(1,0,0),    /* CLOSEDIR */
  689.     A(1,3,0),    /* SYSCALL */
  690.     A(0,3,3),    /* LSLICE */
  691.     A(0,3,1),    /* SPLICE */
  692.     A(1,0,0),    /* REQUIRE */
  693.     A(1,1,0),    /* TRUNCATE */
  694.     A(1,1,0),    /* NCMP */
  695.     A(1,1,0),    /* SCMP */
  696.     A(1,0,0),    /* CALLER */
  697.     A(1,0,0),    /* SCALAR */
  698.     A(1,0,0),    /* FTTIME */
  699.     A(1,0,0),    /* KILL */
  700.     0
  701. };
  702. #undef A
  703. #undef A5
  704. #endif
  705.  
  706. extern int do_trans PROTO((STR *, ARG *));
  707. extern int do_split PROTO((STR *, SPAT *, int, int, int *));
  708. extern bool do_eof PROTO((STAB *));
  709. extern long do_tell PROTO((STAB *));
  710. extern bool do_seek PROTO((STAB *, long, int));
  711. extern int do_tms PROTO((STR *, int, int *));
  712. extern int do_time PROTO((STR *, struct tm *, int, int *));
  713. extern int do_stat PROTO((STR *, ARG *, int, int *));
  714. extern STR *do_push PROTO((ARRAY *, int *));
  715. extern FILE *nextargv PROTO((STAB *));
  716. extern STR *do_fttext PROTO((ARG *, STR *));
  717. extern int do_slice PROTO((STAB *, STR *, int, int, int, int *));
  718.