xref: /freebsd/usr.bin/bc/extern.h (revision 2a63c3be)
1 /*      $OpenBSD: extern.h,v 1.12 2014/04/17 19:07:14 otto Exp $	*/
2 
3 /*
4  * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #include <stdbool.h>
20 #include <stdio.h>
21 
22 struct lvalue {
23 	ssize_t load;
24 	ssize_t store;
25 };
26 
27 int		yylex(void);
28 void		yyerror(const char *);
29 void		fatal(const char *);
30 void		abort_line(int);
31 struct termios;
32 int		gettty(struct termios *);
33 void		tstpcont(int);
34 unsigned char	bc_eof(EditLine *, int);
35 
36 extern int	lineno;
37 extern int	fileindex;
38 extern int	sargc;
39 extern const char	**sargv;
40 extern const char	*filename;
41 extern bool	 interactive;
42 extern EditLine	*el;
43 extern History	*hist;
44 extern HistEvent he;
45 extern char	*cmdexpr;
46 extern struct termios ttysaved;
47