extern.h revision 265533
11573Srgrimes/* $FreeBSD: stable/10/usr.bin/bc/extern.h 265533 2014-05-07 08:06:54Z delphij $ */ 21573Srgrimes/* $OpenBSD: extern.h,v 1.10 2013/09/19 16:12:01 otto Exp $ */ 31573Srgrimes 41573Srgrimes/* 51573Srgrimes * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> 61573Srgrimes * 71573Srgrimes * Permission to use, copy, modify, and distribute this software for any 81573Srgrimes * purpose with or without fee is hereby granted, provided that the above 91573Srgrimes * copyright notice and this permission notice appear in all copies. 101573Srgrimes * 111573Srgrimes * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 121573Srgrimes * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 131573Srgrimes * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 141573Srgrimes * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 151573Srgrimes * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 161573Srgrimes * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 171573Srgrimes * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 181573Srgrimes */ 191573Srgrimes 201573Srgrimes#include <stdbool.h> 211573Srgrimes#include <stdio.h> 221573Srgrimes 231573Srgrimesstruct lvalue { 241573Srgrimes ssize_t load; 251573Srgrimes ssize_t store; 261573Srgrimes}; 271573Srgrimes 281573Srgrimesint yylex(void); 291573Srgrimesvoid yyerror(const char *); 301573Srgrimesvoid fatal(const char *); 311573Srgrimesvoid abort_line(int); 321573Srgrimesstruct termios; 3390045Sobrienint gettty(struct termios *); 3490045Sobrienvoid tstpcont(int); 351573Srgrimesunsigned char bc_eof(EditLine *, int); 361573Srgrimes 371573Srgrimesextern int lineno; 3819031Sjoergextern int fileindex; 391573Srgrimesextern int sargc; 401573Srgrimesextern const char **sargv; 411573Srgrimesextern const char *filename; 42267236Snwhitehornextern bool interactive; 43267236Snwhitehornextern EditLine *el; 44267236Snwhitehornextern History *hist; 451573Srgrimesextern HistEvent he; 461573Srgrimesextern char *cmdexpr; 4719031Sjoergextern struct termios ttysaved; 4819031Sjoerg