2001-10-27 08:07:37 +00:00
|
|
|
/****************************************************************
|
|
|
|
Copyright (C) Lucent Technologies 1997
|
|
|
|
All Rights Reserved
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this software and
|
|
|
|
its documentation for any purpose and without fee is hereby
|
|
|
|
granted, provided that the above copyright notice appear in all
|
|
|
|
copies and that both that the copyright notice and this
|
|
|
|
permission notice and warranty disclaimer appear in supporting
|
|
|
|
documentation, and that the name Lucent Technologies or any of
|
|
|
|
its entities not be used in advertising or publicity pertaining
|
|
|
|
to distribution of the software without specific, written prior
|
|
|
|
permission.
|
|
|
|
|
|
|
|
LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
|
|
|
|
IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
|
|
|
|
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
|
|
|
|
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
|
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
|
|
THIS SOFTWARE.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
extern int yywrap(void);
|
|
|
|
extern void setfname(Cell *);
|
|
|
|
extern int constnode(Node *);
|
|
|
|
extern char *strnode(Node *);
|
|
|
|
extern Node *notnull(Node *);
|
|
|
|
extern int yyparse(void);
|
|
|
|
|
|
|
|
extern int yylex(void);
|
|
|
|
extern void startreg(void);
|
|
|
|
extern int input(void);
|
|
|
|
extern void unput(int);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern void unputstr(const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern int yylook(void);
|
|
|
|
extern int yyback(int *, int);
|
|
|
|
extern int yyinput(void);
|
|
|
|
|
2002-12-13 04:59:48 +00:00
|
|
|
extern fa *makedfa(const char *, int);
|
|
|
|
extern fa *mkdfa(const char *, int);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern int makeinit(fa *, int);
|
|
|
|
extern void penter(Node *);
|
|
|
|
extern void freetr(Node *);
|
2011-08-09 12:23:27 +00:00
|
|
|
extern int hexstr(uschar **);
|
|
|
|
extern int quoted(uschar **);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern char *cclenter(const char *);
|
2013-01-02 21:53:45 +00:00
|
|
|
extern void overflo(const char *) __attribute__((__noreturn__));
|
2001-10-27 08:07:37 +00:00
|
|
|
extern void cfoll(fa *, Node *);
|
|
|
|
extern int first(Node *);
|
|
|
|
extern void follow(Node *);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern int member(int, const char *);
|
|
|
|
extern int match(fa *, const char *);
|
|
|
|
extern int pmatch(fa *, const char *);
|
|
|
|
extern int nematch(fa *, const char *);
|
|
|
|
extern Node *reparse(const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern Node *regexp(void);
|
|
|
|
extern Node *primary(void);
|
|
|
|
extern Node *concat(Node *);
|
|
|
|
extern Node *alt(Node *);
|
|
|
|
extern Node *unary(Node *);
|
|
|
|
extern int relex(void);
|
|
|
|
extern int cgoto(fa *, int, int);
|
|
|
|
extern void freefa(fa *);
|
|
|
|
|
|
|
|
extern int pgetc(void);
|
|
|
|
extern char *cursource(void);
|
|
|
|
|
|
|
|
extern Node *nodealloc(int);
|
|
|
|
extern Node *exptostat(Node *);
|
|
|
|
extern Node *node1(int, Node *);
|
|
|
|
extern Node *node2(int, Node *, Node *);
|
|
|
|
extern Node *node3(int, Node *, Node *, Node *);
|
|
|
|
extern Node *node4(int, Node *, Node *, Node *, Node *);
|
|
|
|
extern Node *stat3(int, Node *, Node *, Node *);
|
|
|
|
extern Node *op2(int, Node *, Node *);
|
|
|
|
extern Node *op1(int, Node *);
|
|
|
|
extern Node *stat1(int, Node *);
|
|
|
|
extern Node *op3(int, Node *, Node *, Node *);
|
|
|
|
extern Node *op4(int, Node *, Node *, Node *, Node *);
|
|
|
|
extern Node *stat2(int, Node *, Node *);
|
|
|
|
extern Node *stat4(int, Node *, Node *, Node *, Node *);
|
|
|
|
extern Node *celltonode(Cell *, int);
|
|
|
|
extern Node *rectonode(void);
|
|
|
|
extern Node *makearr(Node *);
|
|
|
|
extern Node *pa2stat(Node *, Node *, Node *);
|
|
|
|
extern Node *linkum(Node *, Node *);
|
|
|
|
extern void defn(Cell *, Node *, Node *);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern int isarg(const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern char *tokname(int);
|
|
|
|
extern Cell *(*proctab[])(Node **, int);
|
|
|
|
extern int ptoi(void *);
|
|
|
|
extern Node *itonp(int);
|
|
|
|
|
|
|
|
extern void syminit(void);
|
|
|
|
extern void arginit(int, char **);
|
|
|
|
extern void envinit(char **);
|
|
|
|
extern Array *makesymtab(int);
|
|
|
|
extern void freesymtab(Cell *);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern void freeelem(Cell *, const char *);
|
|
|
|
extern Cell *setsymtab(const char *, const char *, double, unsigned int, Array *);
|
|
|
|
extern int hash(const char *, int);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern void rehash(Array *);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern Cell *lookup(const char *, Array *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern double setfval(Cell *, double);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern void funnyvar(Cell *, const char *);
|
|
|
|
extern char *setsval(Cell *, const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern double getfval(Cell *);
|
|
|
|
extern char *getsval(Cell *);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern char *getpssval(Cell *); /* for print */
|
|
|
|
extern char *tostring(const char *);
|
|
|
|
extern char *qstring(const char *, int);
|
2001-10-27 08:07:37 +00:00
|
|
|
|
|
|
|
extern void recinit(unsigned int);
|
|
|
|
extern void initgetrec(void);
|
|
|
|
extern void makefields(int, int);
|
|
|
|
extern void growfldtab(int n);
|
|
|
|
extern int getrec(char **, int *, int);
|
|
|
|
extern void nextfile(void);
|
|
|
|
extern int readrec(char **buf, int *bufsize, FILE *inf);
|
|
|
|
extern char *getargv(int);
|
|
|
|
extern void setclvar(char *);
|
|
|
|
extern void fldbld(void);
|
|
|
|
extern void cleanfld(int, int);
|
|
|
|
extern void newfld(int);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern int refldbld(const char *, const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern void recbld(void);
|
|
|
|
extern Cell *fieldadr(int);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern void yyerror(const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern void fpecatch(int);
|
|
|
|
extern void bracecheck(void);
|
|
|
|
extern void bcheck2(int, int, int);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern void SYNTAX(const char *, ...);
|
2013-01-02 21:53:45 +00:00
|
|
|
extern void FATAL(const char *, ...) __attribute__((__noreturn__));
|
2002-12-13 04:59:48 +00:00
|
|
|
extern void WARNING(const char *, ...);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern void error(void);
|
|
|
|
extern void eprint(void);
|
|
|
|
extern void bclass(int);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern double errcheck(double, const char *);
|
|
|
|
extern int isclvar(const char *);
|
|
|
|
extern int is_number(const char *);
|
2001-10-27 08:07:37 +00:00
|
|
|
|
2002-12-13 04:59:48 +00:00
|
|
|
extern int adjbuf(char **pb, int *sz, int min, int q, char **pbp, const char *what);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern void run(Node *);
|
|
|
|
extern Cell *execute(Node *);
|
|
|
|
extern Cell *program(Node **, int);
|
|
|
|
extern Cell *call(Node **, int);
|
|
|
|
extern Cell *copycell(Cell *);
|
|
|
|
extern Cell *arg(Node **, int);
|
|
|
|
extern Cell *jump(Node **, int);
|
2010-01-09 23:04:24 +00:00
|
|
|
extern Cell *awkgetline(Node **, int);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern Cell *getnf(Node **, int);
|
|
|
|
extern Cell *array(Node **, int);
|
|
|
|
extern Cell *awkdelete(Node **, int);
|
|
|
|
extern Cell *intest(Node **, int);
|
|
|
|
extern Cell *matchop(Node **, int);
|
|
|
|
extern Cell *boolop(Node **, int);
|
|
|
|
extern Cell *relop(Node **, int);
|
|
|
|
extern void tfree(Cell *);
|
|
|
|
extern Cell *gettemp(void);
|
|
|
|
extern Cell *field(Node **, int);
|
|
|
|
extern Cell *indirect(Node **, int);
|
|
|
|
extern Cell *substr(Node **, int);
|
|
|
|
extern Cell *sindex(Node **, int);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern int format(char **, int *, const char *, Node *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern Cell *awksprintf(Node **, int);
|
|
|
|
extern Cell *awkprintf(Node **, int);
|
|
|
|
extern Cell *arith(Node **, int);
|
|
|
|
extern double ipow(double, int);
|
|
|
|
extern Cell *incrdecr(Node **, int);
|
|
|
|
extern Cell *assign(Node **, int);
|
|
|
|
extern Cell *cat(Node **, int);
|
|
|
|
extern Cell *pastat(Node **, int);
|
|
|
|
extern Cell *dopa2(Node **, int);
|
|
|
|
extern Cell *split(Node **, int);
|
|
|
|
extern Cell *condexpr(Node **, int);
|
|
|
|
extern Cell *ifstat(Node **, int);
|
|
|
|
extern Cell *whilestat(Node **, int);
|
|
|
|
extern Cell *dostat(Node **, int);
|
|
|
|
extern Cell *forstat(Node **, int);
|
|
|
|
extern Cell *instat(Node **, int);
|
|
|
|
extern Cell *bltin(Node **, int);
|
|
|
|
extern Cell *printstat(Node **, int);
|
|
|
|
extern Cell *nullproc(Node **, int);
|
|
|
|
extern FILE *redirect(int, Node *);
|
2002-12-13 04:59:48 +00:00
|
|
|
extern FILE *openfile(int, const char *);
|
|
|
|
extern const char *filename(FILE *);
|
2001-10-27 08:07:37 +00:00
|
|
|
extern Cell *closefile(Node **, int);
|
|
|
|
extern void closeall(void);
|
|
|
|
extern Cell *sub(Node **, int);
|
|
|
|
extern Cell *gsub(Node **, int);
|
|
|
|
|
|
|
|
extern FILE *popen(const char *, const char *);
|
|
|
|
extern int pclose(FILE *);
|