2 /********************************************
4 copyright 1991, Michael D. Brennan
6 This is a source file for mawk, an implementation of
7 the AWK programming language.
9 Mawk is distributed without warranty under the terms of
10 the GNU General Public License, version 2, 1991.
11 ********************************************/
15 * Revision 1.3 1993/07/15 23:56:18 mike
18 * Revision 1.2 1993/07/04 12:52:15 mike
19 * start on autoconfig changes
21 * Revision 5.1 1991/12/05 07:59:39 brennan
42 /*could be STRNUM, has not been checked */
47 /* split on the empty string */
49 /* a replacement string '\&' changed to & */
51 /* a vector replacement -- broken on & */
52 #define NUM_CELL_TYPES 10
54 /* these defines are used to check types for two
55 CELLs which are adjacent in memory */
57 #define TWO_NOINITS (2*(1<<C_NOINIT))
58 #define TWO_DOUBLES (2*(1<<C_DOUBLE))
59 #define TWO_STRINGS (2*(1<<C_STRING))
60 #define TWO_STRNUMS (2*(1<<C_STRNUM))
61 #define TWO_MBSTRNS (2*(1<<C_MBSTRN))
62 #define NOINIT_AND_DOUBLE ((1<<C_NOINIT)+(1<<C_DOUBLE))
63 #define NOINIT_AND_STRING ((1<<C_NOINIT)+(1<<C_STRING))
64 #define NOINIT_AND_STRNUM ((1<<C_NOINIT)+(1<<C_STRNUM))
65 #define DOUBLE_AND_STRING ((1<<C_DOUBLE)+(1<<C_STRING))
66 #define DOUBLE_AND_STRNUM ((1<<C_STRNUM)+(1<<C_DOUBLE))
67 #define STRING_AND_STRNUM ((1<<C_STRING)+(1<<C_STRNUM))
68 #define NOINIT_AND_MBSTRN ((1<<C_NOINIT)+(1<<C_MBSTRN))
69 #define DOUBLE_AND_MBSTRN ((1<<C_DOUBLE)+(1<<C_MBSTRN))
70 #define STRING_AND_MBSTRN ((1<<C_STRING)+(1<<C_MBSTRN))
71 #define STRNUM_AND_MBSTRN ((1<<C_STRNUM)+(1<<C_MBSTRN))
75 unsigned short ref_cnt ;
79 /* number of bytes more than the characters to store a
81 #define STRING_OH (sizeof(STRING)-1)
86 short vcnt ; /* only used if type == C_REPLV */
92 /* all builtins are passed the evaluation stack pointer and
93 return its new value, here is the type */
96 typedef CELL *(*PF_CP)(CELL *) ;
98 typedef CELL *(*PF_CP)() ;
101 /* an element of code (instruction) */
107 #endif /* MAWK_TYPES_H */