xref: /aoo42x/main/rsc/source/rscpp/cpp.h (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir 
29*cdf0e10cSrcweir #ifndef TRUE
30*cdf0e10cSrcweir #define TRUE            1
31*cdf0e10cSrcweir #define FALSE           0
32*cdf0e10cSrcweir #endif
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir /* in cpp1.c: file-pointer auf stdout oder file */
35*cdf0e10cSrcweir extern FILE *pCppOut;                                   /* BP */
36*cdf0e10cSrcweir #define PUTCHAR( d )   fprintf( pCppOut, "%c", (d) )    /* BP */
37*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1
38*cdf0e10cSrcweir extern FILE *pDefOut;                                   /* ER */
39*cdf0e10cSrcweir #ifdef EVALDEFS
40*cdf0e10cSrcweir #define NEVALBUF		2048
41*cdf0e10cSrcweir #endif
42*cdf0e10cSrcweir #endif
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir /* limit for reading commandfiles */
45*cdf0e10cSrcweir #define	PARALIMIT		100
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir #ifndef EOS
48*cdf0e10cSrcweir /*
49*cdf0e10cSrcweir  * This is predefined in Decus C
50*cdf0e10cSrcweir  */
51*cdf0e10cSrcweir #define EOS             '\0'            /* End of string                */
52*cdf0e10cSrcweir #endif
53*cdf0e10cSrcweir #define EOF_CHAR        0               /* Returned by get() on eof     */
54*cdf0e10cSrcweir #define NULLST          ((char *) NULL) /* Pointer to nowhere (linted)  */
55*cdf0e10cSrcweir #define DEF_NOARGS      (-1)            /* #define foo vs #define foo() */
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir /*
58*cdf0e10cSrcweir  * The following may need to change if the host system doesn't use ASCII.
59*cdf0e10cSrcweir  */
60*cdf0e10cSrcweir #define DEF_MAGIC       0x1D            /* Magic for #defines           */
61*cdf0e10cSrcweir #define TOK_SEP         0x1E            /* Token concatenation delim.   */
62*cdf0e10cSrcweir #define COM_SEP         0x1F            /* Magic comment separator      */
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir #ifdef 	EBCDIC
65*cdf0e10cSrcweir #define HT				0x05			/* horizontal tab				*/
66*cdf0e10cSrcweir #define NL				0x15			/* new line						*/
67*cdf0e10cSrcweir #define CR				0x0D			/* carriage return				*/
68*cdf0e10cSrcweir #define DEL				0x07
69*cdf0e10cSrcweir #else
70*cdf0e10cSrcweir #define HT				0x09			/* horizontal tab				*/
71*cdf0e10cSrcweir #define NL				0x0A			/* new line						*/
72*cdf0e10cSrcweir #define CR				0x0D			/* carriage return				*/
73*cdf0e10cSrcweir #define DEL				0x7F
74*cdf0e10cSrcweir #endif
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir #ifdef 	SOLAR
78*cdf0e10cSrcweir #define MAC_PARM        0x01            /* Macro formals start here     */
79*cdf0e10cSrcweir #else
80*cdf0e10cSrcweir /*
81*cdf0e10cSrcweir  * Note -- in Ascii, the following will map macro formals onto DEL + the
82*cdf0e10cSrcweir  * C1 control character region (decimal 128 .. (128 + PAR_MAC)) which will
83*cdf0e10cSrcweir  * be ok as long as PAR_MAC is less than 33).  Note that the last PAR_MAC
84*cdf0e10cSrcweir  * value is reserved for string substitution.
85*cdf0e10cSrcweir  */
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir #define MAC_PARM        DEL				/* Macro formals start here     */
88*cdf0e10cSrcweir #if PAR_MAC >= 33
89*cdf0e10cSrcweir         assertion fails -- PAR_MAC is not less than 33
90*cdf0e10cSrcweir #endif
91*cdf0e10cSrcweir #endif
92*cdf0e10cSrcweir #define LASTPARM        (PAR_MAC - 1)
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir /*
95*cdf0e10cSrcweir  * Character type codes.
96*cdf0e10cSrcweir  */
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir #define INV             0               /* Invalid, must be zero        */
99*cdf0e10cSrcweir #define OP_EOE          INV             /* End of expression            */
100*cdf0e10cSrcweir #define DIG             1               /* Digit                        */
101*cdf0e10cSrcweir #define LET             2               /* Identifier start             */
102*cdf0e10cSrcweir #define FIRST_BINOP     OP_ADD
103*cdf0e10cSrcweir #define OP_ADD          3
104*cdf0e10cSrcweir #define OP_SUB          4
105*cdf0e10cSrcweir #define OP_MUL          5
106*cdf0e10cSrcweir #define OP_DIV          6
107*cdf0e10cSrcweir #define OP_MOD          7
108*cdf0e10cSrcweir #define OP_ASL          8
109*cdf0e10cSrcweir #define OP_ASR          9
110*cdf0e10cSrcweir #define OP_AND          10              /* &, not &&                    */
111*cdf0e10cSrcweir #define OP_OR           11              /* |, not ||                    */
112*cdf0e10cSrcweir #define OP_XOR          12
113*cdf0e10cSrcweir #define OP_EQ           13
114*cdf0e10cSrcweir #define OP_NE           14
115*cdf0e10cSrcweir #define OP_LT           15
116*cdf0e10cSrcweir #define OP_LE           16
117*cdf0e10cSrcweir #define OP_GE           17
118*cdf0e10cSrcweir #define OP_GT           18
119*cdf0e10cSrcweir #define OP_ANA          19              /* &&                           */
120*cdf0e10cSrcweir #define OP_ORO          20              /* ||                           */
121*cdf0e10cSrcweir #define OP_QUE          21              /* ?                            */
122*cdf0e10cSrcweir #define OP_COL          22              /* :                            */
123*cdf0e10cSrcweir #define OP_CMA          23              /* , (relevant?)                */
124*cdf0e10cSrcweir #define LAST_BINOP      OP_CMA          /* Last binary operand          */
125*cdf0e10cSrcweir /*
126*cdf0e10cSrcweir  * The following are unary.
127*cdf0e10cSrcweir  */
128*cdf0e10cSrcweir #define FIRST_UNOP      OP_PLU          /* First Unary operand          */
129*cdf0e10cSrcweir #define OP_PLU          24              /* + (draft ANSI standard)      */
130*cdf0e10cSrcweir #define OP_NEG          25              /* -                            */
131*cdf0e10cSrcweir #define OP_COM          26              /* ~                            */
132*cdf0e10cSrcweir #define OP_NOT          27              /* !                            */
133*cdf0e10cSrcweir #define LAST_UNOP       OP_NOT
134*cdf0e10cSrcweir #define OP_LPA          28              /* (                            */
135*cdf0e10cSrcweir #define OP_RPA          29              /* )                            */
136*cdf0e10cSrcweir #define OP_END          30              /* End of expression marker     */
137*cdf0e10cSrcweir #define OP_MAX          (OP_END + 1)    /* Number of operators          */
138*cdf0e10cSrcweir #define OP_FAIL         (OP_END + 1)    /* For error returns            */
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir /*
141*cdf0e10cSrcweir  * The following are for lexical scanning only.
142*cdf0e10cSrcweir  */
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir #define QUO             65              /* Both flavors of quotation    */
145*cdf0e10cSrcweir #define DOT             66              /* . might start a number       */
146*cdf0e10cSrcweir #define SPA             67              /* Space and tab                */
147*cdf0e10cSrcweir #define BSH             68              /* Just a backslash             */
148*cdf0e10cSrcweir #define END             69              /* EOF                          */
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir /*
151*cdf0e10cSrcweir  * These bits are set in ifstack[]
152*cdf0e10cSrcweir  */
153*cdf0e10cSrcweir #define WAS_COMPILING   1               /* TRUE if compile set at entry */
154*cdf0e10cSrcweir #define ELSE_SEEN       2               /* TRUE when #else processed    */
155*cdf0e10cSrcweir #define TRUE_SEEN       4               /* TRUE when #if TRUE processed */
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir /*
158*cdf0e10cSrcweir  * Define bits for the basic types and their adjectives
159*cdf0e10cSrcweir  */
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir #define T_CHAR            1
162*cdf0e10cSrcweir #define T_INT             2
163*cdf0e10cSrcweir #define T_FLOAT           4
164*cdf0e10cSrcweir #define T_DOUBLE          8
165*cdf0e10cSrcweir #define T_SHORT          16
166*cdf0e10cSrcweir #define T_LONG           32
167*cdf0e10cSrcweir #define T_SIGNED         64
168*cdf0e10cSrcweir #define T_UNSIGNED      128
169*cdf0e10cSrcweir #define T_PTR           256             /* Pointer                      */
170*cdf0e10cSrcweir #define T_FPTR          512             /* Pointer to functions         */
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir /*
173*cdf0e10cSrcweir  * The DEFBUF structure stores information about #defined
174*cdf0e10cSrcweir  * macros.  Note that the defbuf->repl information is always
175*cdf0e10cSrcweir  * in malloc storage.
176*cdf0e10cSrcweir  */
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir typedef struct defbuf {
179*cdf0e10cSrcweir         struct defbuf   *link;          /* Next define in chain */
180*cdf0e10cSrcweir         char            *repl;          /* -> replacement       */
181*cdf0e10cSrcweir         int             hash;           /* Symbol table hash    */
182*cdf0e10cSrcweir         int             nargs;          /* For define(args)     */
183*cdf0e10cSrcweir         char            name[1];        /* #define name         */
184*cdf0e10cSrcweir } DEFBUF;
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir /*
187*cdf0e10cSrcweir  * The FILEINFO structure stores information about open files
188*cdf0e10cSrcweir  * and macros being expanded.
189*cdf0e10cSrcweir  */
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir typedef struct fileinfo {
192*cdf0e10cSrcweir         char            *bptr;          /* Buffer pointer       */
193*cdf0e10cSrcweir         int             line;           /* for include or macro */
194*cdf0e10cSrcweir         FILE            *fp;            /* File if non-null     */
195*cdf0e10cSrcweir         struct fileinfo *parent;        /* Link to includer     */
196*cdf0e10cSrcweir         char            *filename;      /* File/macro name      */
197*cdf0e10cSrcweir         char            *progname;      /* From #line statement */
198*cdf0e10cSrcweir         unsigned int    unrecur;        /* For macro recursion  */
199*cdf0e10cSrcweir         char            buffer[1];      /* current input line   */
200*cdf0e10cSrcweir } FILEINFO;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir /*
203*cdf0e10cSrcweir  * The SIZES structure is used to store the values for #if sizeof
204*cdf0e10cSrcweir  */
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir typedef struct sizes {
207*cdf0e10cSrcweir     short       bits;                   /* If this bit is set,          */
208*cdf0e10cSrcweir     int         size;                   /* this is the datum size value */
209*cdf0e10cSrcweir     int         psize;                  /* this is the pointer size     */
210*cdf0e10cSrcweir } SIZES;
211*cdf0e10cSrcweir /*
212*cdf0e10cSrcweir  * nomacarg is a built-in #define on Decus C.
213*cdf0e10cSrcweir  */
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir #ifdef  nomacarg
216*cdf0e10cSrcweir #define cput            output          /* cput concatenates tokens     */
217*cdf0e10cSrcweir #else
218*cdf0e10cSrcweir #if COMMENT_INVISIBLE
219*cdf0e10cSrcweir #define cput(c)         { if (c != TOK_SEP && c != COM_SEP) PUTCHAR(c); }
220*cdf0e10cSrcweir #else
221*cdf0e10cSrcweir #define cput(c)         { if (c != TOK_SEP) PUTCHAR(c); }
222*cdf0e10cSrcweir #endif
223*cdf0e10cSrcweir #endif
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir #ifndef nomacarg
226*cdf0e10cSrcweir #define streq(s1, s2)   (strcmp(s1, s2) == 0)
227*cdf0e10cSrcweir #endif
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir /*
230*cdf0e10cSrcweir  * Error codes.  VMS uses system definitions.
231*cdf0e10cSrcweir  * Decus C codes are defined in stdio.h.
232*cdf0e10cSrcweir  * Others are cooked to order.
233*cdf0e10cSrcweir  */
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir #if HOST == SYS_VMS
236*cdf0e10cSrcweir #include                <ssdef.h>
237*cdf0e10cSrcweir #include                <stsdef.h>
238*cdf0e10cSrcweir #define IO_NORMAL       (SS$_NORMAL | STS$M_INHIB_MSG)
239*cdf0e10cSrcweir #define IO_ERROR        SS$_ABORT
240*cdf0e10cSrcweir #endif
241*cdf0e10cSrcweir /*
242*cdf0e10cSrcweir  * Note: IO_NORMAL and IO_ERROR are defined in the Decus C stdio.h file
243*cdf0e10cSrcweir  */
244*cdf0e10cSrcweir #ifndef IO_NORMAL
245*cdf0e10cSrcweir #define IO_NORMAL       0
246*cdf0e10cSrcweir #endif
247*cdf0e10cSrcweir #ifndef IO_ERROR
248*cdf0e10cSrcweir #define IO_ERROR        1
249*cdf0e10cSrcweir #endif
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir /*
252*cdf0e10cSrcweir  * Externs
253*cdf0e10cSrcweir  */
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir extern int      line;                   /* Current line number          */
256*cdf0e10cSrcweir extern int      wrongline;              /* Force #line to cc pass 1     */
257*cdf0e10cSrcweir extern char     type[];                 /* Character classifier         */
258*cdf0e10cSrcweir extern char     token[IDMAX + 1];       /* Current input token          */
259*cdf0e10cSrcweir extern int      instring;               /* TRUE if scanning string      */
260*cdf0e10cSrcweir extern int      inmacro;                /* TRUE if scanning #define     */
261*cdf0e10cSrcweir extern int      errors;                 /* Error counter                */
262*cdf0e10cSrcweir extern int      recursion;              /* Macro depth counter          */
263*cdf0e10cSrcweir extern char     ifstack[BLK_NEST];      /* #if information              */
264*cdf0e10cSrcweir #define compiling ifstack[0]
265*cdf0e10cSrcweir extern char     *ifptr;                 /* -> current ifstack item      */
266*cdf0e10cSrcweir extern char     *incdir[NINCLUDE];      /* -i directories               */
267*cdf0e10cSrcweir extern char     **incend;               /* -> active end of incdir      */
268*cdf0e10cSrcweir extern int      cflag;                  /* -C option (keep comments)    */
269*cdf0e10cSrcweir extern int      eflag;                  /* -E option (ignore errors)    */
270*cdf0e10cSrcweir extern int      nflag;                  /* -N option (no pre-defines)   */
271*cdf0e10cSrcweir extern int      rec_recover;            /* unwind recursive macros      */
272*cdf0e10cSrcweir extern char     *preset[];              /* Standard predefined symbols  */
273*cdf0e10cSrcweir extern char     *magic[];               /* Magic predefined symbols     */
274*cdf0e10cSrcweir extern FILEINFO *infile;                /* Current input file           */
275*cdf0e10cSrcweir extern char     work[NWORK + 1];        /* #define scratch              */
276*cdf0e10cSrcweir extern char     *workp;                 /* Free space in work           */
277*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1
278*cdf0e10cSrcweir extern int      debug;                  /* Debug level                  */
279*cdf0e10cSrcweir /* ER dump & evaluate #define's */
280*cdf0e10cSrcweir extern int      bDumpDefs;				/* TRUE if #define's dump req.  */
281*cdf0e10cSrcweir extern int		bIsInEval;				/* TRUE if #define dumping now  */
282*cdf0e10cSrcweir #ifdef EVALDEFS
283*cdf0e10cSrcweir extern char		EvalBuf[NEVALBUF + 1];	/* evaluation buffer            */
284*cdf0e10cSrcweir extern int		nEvalOff;				/* offset to free buffer pos	*/
285*cdf0e10cSrcweir #endif
286*cdf0e10cSrcweir #endif
287*cdf0e10cSrcweir extern int      keepcomments;           /* Don't remove comments if set */
288*cdf0e10cSrcweir extern SIZES    size_table[];           /* For #if sizeof sizes         */
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir #ifdef NOMAIN                /* BP */
291*cdf0e10cSrcweir #ifndef _NO_PROTO
292*cdf0e10cSrcweir int start_cpp( int argc, char *argv[] );
293*cdf0e10cSrcweir #endif
294*cdf0e10cSrcweir #define MAIN   start_cpp     /* fuer die cpp.lib muss main() geandert werden */
295*cdf0e10cSrcweir #else
296*cdf0e10cSrcweir #ifdef WNT
297*cdf0e10cSrcweir #define MAIN   __cdecl main
298*cdf0e10cSrcweir #else
299*cdf0e10cSrcweir #define MAIN   main
300*cdf0e10cSrcweir #endif
301*cdf0e10cSrcweir #endif
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir void InitCpp1();
305*cdf0e10cSrcweir void InitCpp2();
306*cdf0e10cSrcweir void InitCpp3();
307*cdf0e10cSrcweir void InitCpp4();
308*cdf0e10cSrcweir void InitCpp5();
309*cdf0e10cSrcweir void InitCpp6();
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir #define HELLO()   fprintf( stderr, "[Hello at %s, %d] ", __FILE__, __LINE__ )
312*cdf0e10cSrcweir 
313*cdf0e10cSrcweir #ifndef _STDIO_H
314*cdf0e10cSrcweir #include <stdio.h>
315*cdf0e10cSrcweir #endif
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir #ifndef _STDLIB_H
318*cdf0e10cSrcweir #include <stdlib.h>
319*cdf0e10cSrcweir #endif
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir #ifndef _STRING_H
322*cdf0e10cSrcweir #include <string.h>
323*cdf0e10cSrcweir #endif
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir /* cpp1.c */
326*cdf0e10cSrcweir void output( int c );
327*cdf0e10cSrcweir void sharp();
328*cdf0e10cSrcweir void cppmain();
329*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1
330*cdf0e10cSrcweir #ifdef EVALDEFS
331*cdf0e10cSrcweir int outputEval( int c );
332*cdf0e10cSrcweir #endif
333*cdf0e10cSrcweir #endif
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir /* cpp2.c */
337*cdf0e10cSrcweir int control( int counter );
338*cdf0e10cSrcweir void doinclude();
339*cdf0e10cSrcweir void dodefine();
340*cdf0e10cSrcweir void doif( int hash );
341*cdf0e10cSrcweir int openinclude( char *, int );
342*cdf0e10cSrcweir int hasdirectory(char *, char * );
343*cdf0e10cSrcweir int openfile( char * );
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir /* cpp3.c */
346*cdf0e10cSrcweir int openfiles( char *filename );
347*cdf0e10cSrcweir void addfile( FILE *fp, char *filename );
348*cdf0e10cSrcweir void setincdirs();
349*cdf0e10cSrcweir int AddInclude( char *pIncStr );
350*cdf0e10cSrcweir int getredirection( int argc, char **argv );
351*cdf0e10cSrcweir void zap_uc( char *ap );
352*cdf0e10cSrcweir 
353*cdf0e10cSrcweir void initdefines();
354*cdf0e10cSrcweir int dooptions( int argc, char *argv[] );
355*cdf0e10cSrcweir int readoptions(char* filename, char*** pfargv);
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir /* cpp4.c */
358*cdf0e10cSrcweir void dodefines();
359*cdf0e10cSrcweir void checkparm( int c, DEFBUF *dp );
360*cdf0e10cSrcweir int expcollect();
361*cdf0e10cSrcweir void expstuff( DEFBUF *dp );
362*cdf0e10cSrcweir 
363*cdf0e10cSrcweir #if STRING_FORMAL
364*cdf0e10cSrcweir void stparmscan( int delim, DEFBUF *dp);
365*cdf0e10cSrcweir #else
366*cdf0e10cSrcweir void stparmscan( int delim);
367*cdf0e10cSrcweir #endif
368*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1
369*cdf0e10cSrcweir void dumpparm( char *why );
370*cdf0e10cSrcweir #endif
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir void doundef();
373*cdf0e10cSrcweir void textput( char *text );
374*cdf0e10cSrcweir void charput( int c );
375*cdf0e10cSrcweir void expand( DEFBUF *tokenp );
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir /* cpp5.c */
378*cdf0e10cSrcweir int eval();
379*cdf0e10cSrcweir int evallex(int);
380*cdf0e10cSrcweir int *evaleval(int *, int, int );
381*cdf0e10cSrcweir int evalchar(int);
382*cdf0e10cSrcweir int dosizeof();
383*cdf0e10cSrcweir int evalnum( int c );
384*cdf0e10cSrcweir int bittest( int );
385*cdf0e10cSrcweir 
386*cdf0e10cSrcweir /* cpp6.c */
387*cdf0e10cSrcweir 
388*cdf0e10cSrcweir void skipnl();
389*cdf0e10cSrcweir int skipws();
390*cdf0e10cSrcweir void scanid( int c );
391*cdf0e10cSrcweir int macroid( int c );
392*cdf0e10cSrcweir int catenate();
393*cdf0e10cSrcweir int scanstring( int c, void (*outfun)( int c ) );
394*cdf0e10cSrcweir void scannumber( int c, void (*outfun)( int c ) );
395*cdf0e10cSrcweir void save( int c );
396*cdf0e10cSrcweir char *savestring( char *text );
397*cdf0e10cSrcweir FILEINFO *getfile( int bufsize, char *name);
398*cdf0e10cSrcweir char *getmem( int size );
399*cdf0e10cSrcweir DEFBUF *lookid( int c );
400*cdf0e10cSrcweir DEFBUF *defendel( char *name, int delete );
401*cdf0e10cSrcweir void dunpdef( char *why );
402*cdf0e10cSrcweir void dumpadef( char *why, DEFBUF *dp);
403*cdf0e10cSrcweir int get();
404*cdf0e10cSrcweir int cget();
405*cdf0e10cSrcweir void unget();
406*cdf0e10cSrcweir void ungetstring( char *text );
407*cdf0e10cSrcweir void cerror( char *format, char *sarg);
408*cdf0e10cSrcweir void cwarn( char *format, char *sarg);
409*cdf0e10cSrcweir void cfatal( char *format, char *sarg);
410*cdf0e10cSrcweir void cierror( char *format, int n);
411*cdf0e10cSrcweir void ciwarn( char *format, int n);
412*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1
413*cdf0e10cSrcweir void dumpdef( char *why );
414*cdf0e10cSrcweir void dumpadef( char *why, DEFBUF *dp );
415*cdf0e10cSrcweir #endif
416