1202719Sgabor/* $FreeBSD: releng/10.3/usr.bin/bc/extern.h 292753 2015-12-26 18:26:44Z pfg $ */ 2292753Spfg/* $OpenBSD: extern.h,v 1.12 2014/04/17 19:07:14 otto Exp $ */ 3202719Sgabor 4202719Sgabor/* 5202719Sgabor * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> 6202719Sgabor * 7202719Sgabor * Permission to use, copy, modify, and distribute this software for any 8202719Sgabor * purpose with or without fee is hereby granted, provided that the above 9202719Sgabor * copyright notice and this permission notice appear in all copies. 10202719Sgabor * 11202719Sgabor * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12202719Sgabor * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13202719Sgabor * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14202719Sgabor * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15202719Sgabor * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16202719Sgabor * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17202719Sgabor * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18202719Sgabor */ 19202719Sgabor 20265533Sdelphij#include <stdbool.h> 21202719Sgabor#include <stdio.h> 22202719Sgabor 23202719Sgaborstruct lvalue { 24265533Sdelphij ssize_t load; 25265533Sdelphij ssize_t store; 26202719Sgabor}; 27202719Sgabor 28265533Sdelphijint yylex(void); 29265533Sdelphijvoid yyerror(const char *); 30265533Sdelphijvoid fatal(const char *); 31265533Sdelphijvoid abort_line(int); 32265533Sdelphijstruct termios; 33265533Sdelphijint gettty(struct termios *); 34265533Sdelphijvoid tstpcont(int); 35265533Sdelphijunsigned char bc_eof(EditLine *, int); 36202719Sgabor 37265533Sdelphijextern int lineno; 38265533Sdelphijextern int fileindex; 39265533Sdelphijextern int sargc; 40202719Sgaborextern const char **sargv; 41202719Sgaborextern const char *filename; 42292753Spfgextern bool interactive; 43292753Spfgextern EditLine *el; 44292753Spfgextern History *hist; 45292753Spfgextern HistEvent he; 46265533Sdelphijextern char *cmdexpr; 47265533Sdelphijextern struct termios ttysaved; 48