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