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