proto.h (6923B)
1 /* $OpenBSD: proto.h,v 1.9 2011/09/28 19:27:18 millert Exp $ */ 2 /**************************************************************** 3 Copyright (C) Lucent Technologies 1997 4 All Rights Reserved 5 6 Permission to use, copy, modify, and distribute this software and 7 its documentation for any purpose and without fee is hereby 8 granted, provided that the above copyright notice appear in all 9 copies and that both that the copyright notice and this 10 permission notice and warranty disclaimer appear in supporting 11 documentation, and that the name Lucent Technologies or any of 12 its entities not be used in advertising or publicity pertaining 13 to distribution of the software without specific, written prior 14 permission. 15 16 LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 17 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 18 IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 19 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 21 IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 22 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 23 THIS SOFTWARE. 24 ****************************************************************/ 25 26 extern int yywrap(void); 27 extern void setfname(Cell *); 28 extern int constnode(Node *); 29 extern char *strnode(Node *); 30 extern Node *notnull(Node *); 31 extern int yyparse(void); 32 33 extern int yylex(void); 34 extern void startreg(void); 35 extern int input(void); 36 extern void unput(int); 37 extern void unputstr(const char *); 38 extern int yylook(void); 39 extern int yyback(int *, int); 40 extern int yyinput(void); 41 42 extern fa *makedfa(const char *, int); 43 extern fa *mkdfa(const char *, int); 44 extern int makeinit(fa *, int); 45 extern void penter(Node *); 46 extern void freetr(Node *); 47 extern int hexstr(uschar **); 48 extern int quoted(uschar **); 49 extern char *cclenter(const char *); 50 extern void overflo(const char *); 51 extern void cfoll(fa *, Node *); 52 extern int first(Node *); 53 extern void follow(Node *); 54 extern int member(int, const char *); 55 extern int match(fa *, const char *); 56 extern int pmatch(fa *, const char *); 57 extern int nematch(fa *, const char *); 58 extern Node *reparse(const char *); 59 extern Node *regexp(void); 60 extern Node *primary(void); 61 extern Node *concat(Node *); 62 extern Node *alt(Node *); 63 extern Node *unary(Node *); 64 extern int relex(void); 65 extern int cgoto(fa *, int, int); 66 extern void freefa(fa *); 67 68 extern int pgetc(void); 69 extern char *cursource(void); 70 71 extern Node *nodealloc(int); 72 extern Node *exptostat(Node *); 73 extern Node *node1(int, Node *); 74 extern Node *node2(int, Node *, Node *); 75 extern Node *node3(int, Node *, Node *, Node *); 76 extern Node *node4(int, Node *, Node *, Node *, Node *); 77 extern Node *stat3(int, Node *, Node *, Node *); 78 extern Node *op2(int, Node *, Node *); 79 extern Node *op1(int, Node *); 80 extern Node *stat1(int, Node *); 81 extern Node *op3(int, Node *, Node *, Node *); 82 extern Node *op4(int, Node *, Node *, Node *, Node *); 83 extern Node *stat2(int, Node *, Node *); 84 extern Node *stat4(int, Node *, Node *, Node *, Node *); 85 extern Node *celltonode(Cell *, int); 86 extern Node *rectonode(void); 87 extern Node *makearr(Node *); 88 extern Node *pa2stat(Node *, Node *, Node *); 89 extern Node *linkum(Node *, Node *); 90 extern void defn(Cell *, Node *, Node *); 91 extern int isarg(const char *); 92 extern char *tokname(int); 93 extern Cell *(*proctab[])(Node **, int); 94 extern int ptoi(void *); 95 extern Node *itonp(int); 96 97 extern void syminit(void); 98 extern void arginit(int, char **); 99 extern void envinit(char **); 100 extern Array *makesymtab(int); 101 extern void freesymtab(Cell *); 102 extern void freeelem(Cell *, const char *); 103 extern Cell *setsymtab(const char *, const char *, double, unsigned int, Array *); 104 extern int hash(const char *, int); 105 extern void rehash(Array *); 106 extern Cell *lookup(const char *, Array *); 107 extern double setfval(Cell *, double); 108 extern void funnyvar(Cell *, const char *); 109 extern char *setsval(Cell *, const char *); 110 extern double getfval(Cell *); 111 extern char *getsval(Cell *); 112 extern char *getpssval(Cell *); /* for print */ 113 extern char *tostring(const char *); 114 extern char *qstring(const char *, int); 115 116 extern void recinit(unsigned int); 117 extern void initgetrec(void); 118 extern void makefields(int, int); 119 extern void growfldtab(int n); 120 extern int getrec(char **, int *, int); 121 extern void nextfile(void); 122 extern int readrec(char **buf, int *bufsize, FILE *inf); 123 extern char *getargv(int); 124 extern void setclvar(char *); 125 extern void fldbld(void); 126 extern void cleanfld(int, int); 127 extern void newfld(int); 128 extern int refldbld(const char *, const char *); 129 extern void recbld(void); 130 extern Cell *fieldadr(int); 131 extern void yyerror(const char *); 132 extern void fpecatch(int); 133 extern void bracecheck(void); 134 extern void bcheck2(int, int, int); 135 extern void SYNTAX(const char *, ...); 136 extern void FATAL(const char *, ...); 137 extern void WARNING(const char *, ...); 138 extern void error(void); 139 extern void eprint(void); 140 extern void bclass(int); 141 extern double errcheck(double, const char *); 142 extern int isclvar(const char *); 143 extern int is_number(const char *); 144 145 extern int adjbuf(char **pb, int *sz, int min, int q, char **pbp, const char *what); 146 extern void run(Node *); 147 extern Cell *execute(Node *); 148 extern Cell *program(Node **, int); 149 extern Cell *call(Node **, int); 150 extern Cell *copycell(Cell *); 151 extern Cell *arg(Node **, int); 152 extern Cell *jump(Node **, int); 153 extern Cell *awkgetline(Node **, int); 154 extern Cell *getnf(Node **, int); 155 extern Cell *array(Node **, int); 156 extern Cell *awkdelete(Node **, int); 157 extern Cell *intest(Node **, int); 158 extern Cell *matchop(Node **, int); 159 extern Cell *boolop(Node **, int); 160 extern Cell *relop(Node **, int); 161 extern void tfree(Cell *); 162 extern Cell *gettemp(void); 163 extern Cell *field(Node **, int); 164 extern Cell *indirect(Node **, int); 165 extern Cell *substr(Node **, int); 166 extern Cell *sindex(Node **, int); 167 extern int format(char **, int *, const char *, Node *); 168 extern Cell *awksprintf(Node **, int); 169 extern Cell *awkprintf(Node **, int); 170 extern Cell *arith(Node **, int); 171 extern double ipow(double, int); 172 extern Cell *incrdecr(Node **, int); 173 extern Cell *assign(Node **, int); 174 extern Cell *cat(Node **, int); 175 extern Cell *pastat(Node **, int); 176 extern Cell *dopa2(Node **, int); 177 extern Cell *split(Node **, int); 178 extern Cell *condexpr(Node **, int); 179 extern Cell *ifstat(Node **, int); 180 extern Cell *whilestat(Node **, int); 181 extern Cell *dostat(Node **, int); 182 extern Cell *forstat(Node **, int); 183 extern Cell *instat(Node **, int); 184 extern Cell *bltin(Node **, int); 185 extern Cell *printstat(Node **, int); 186 extern Cell *nullproc(Node **, int); 187 extern FILE *redirect(int, Node *); 188 extern FILE *openfile(int, const char *); 189 extern const char *filename(FILE *); 190 extern Cell *closefile(Node **, int); 191 extern void closeall(void); 192 extern Cell *sub(Node **, int); 193 extern Cell *gsub(Node **, int); 194 195 extern FILE *popen(const char *, const char *); 196 extern int pclose(FILE *);