4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
21 /* Copyright (c) 1988 AT&T */
22 /* All Rights Reserved */
26 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
33 int hshsize
= DEF_HSHSIZE
; /* hash table size (prime) */
34 int bufsize
= DEF_BUFSIZE
; /* pushback & arg text buffers */
35 int stksize
= DEF_STKSIZE
; /* call stack */
36 int toksize
= DEF_TOKSIZE
; /* biggest word ([a-z_][a-z0-9_]*) */
40 wchar_t *ibuf
; /* buffer */
41 wchar_t *ibuflm
; /* highest buffer addr */
42 wchar_t *ip
; /* current position */
43 wchar_t *ipflr
; /* buffer floor */
44 wchar_t *ipstk
[10]; /* stack for "ipflr"s */
47 /* arg collection buffer */
48 wchar_t *obuf
; /* buffer */
49 wchar_t *obuflm
; /* high address */
50 wchar_t *op
; /* current position */
54 struct call
*callst
; /* stack */
55 struct call
*Cp
= NULL
; /* position */
59 wchar_t *token
; /* buffer */
60 wchar_t *toklm
; /* high addr */
63 /* file name and current line storage for line sync and diagnostics */
64 char *fname
[11]; /* file name ptr stack */
65 int fline
[10]; /* current line nbr stack */
68 /* input file stuff for "include"s */
69 FILE *ifile
[10]; /* stack */
70 int ifx
; /* stack index */
71 ibuf_t ibuffer
[11]; /* input buffer */
73 /* stuff for output diversions */
74 FILE *cf
; /* current output file */
75 FILE *ofile
[11]; /* output file stack */
76 int ofx
; /* stack index */
80 wchar_t lcom
[MAXSYM
+1] = L
"#";
81 wchar_t rcom
[MAXSYM
+1] = L
"\n";
85 wchar_t lquote
[MAXSYM
+1] = L
"`";
86 wchar_t rquote
[MAXSYM
+1] = L
"\'";
89 /* argument ptr stack */
91 wchar_t *astklm
; /* high address */
92 wchar_t **Ap
; /* current position */
96 struct nlist
**hshtab
; /* hash table */
97 unsigned int hshval
; /* last hash val */
101 char *procnam
; /* argv[0] */
102 char *tempfile
; /* used for diversion files */
103 struct Wrap
*wrapstart
= NULL
; /* first entry in of list of "m4wrap" strings */
104 wchar_t nullstr
[] = {0};
105 int nflag
= 1; /* name flag, used for line sync code */
106 int sflag
; /* line sync flag */
107 int sysrval
; /* return val from syscmd */
108 int trace
; /* global trace flag */
109 int exitstat
= OK
; /* global exit status */
110 int wide
; /* multi-byte locale */