PageRenderTime 48ms CodeModel.GetById 30ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/one-true-awk/proto.h

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