From 1c2bae2c48d18c181517a76d38b03f51ded154b7 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 15 Oct 2010 18:47:20 +0000 Subject: [PATCH] collect prototype for mod_yyerror() in "mod_yacc_y.h", and fix return type --- ChangeLog | 7 +++++++ src/xspice/cmpp/mod_lex.l | 1 - src/xspice/cmpp/mod_yacc.y | 1 - src/xspice/cmpp/mod_yacc_y.h | 2 ++ src/xspice/cmpp/pp_mod.c | 6 ++---- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c5454621..d5bf54f41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-15 Robert Larice + * src/xspice/cmpp/mod_lex.l , + * src/xspice/cmpp/mod_yacc.y , + * src/xspice/cmpp/mod_yacc_y.h , + * src/xspice/cmpp/pp_mod.c : + collect prototype for mod_yyerror() in "mod_yacc_y.h", and fix return type + 2010-10-15 Robert Larice * src/ciderlib/input/output.c : visibility for tildexpand() prototyp diff --git a/src/xspice/cmpp/mod_lex.l b/src/xspice/cmpp/mod_lex.l index 712d9a961..948b4fc8e 100755 --- a/src/xspice/cmpp/mod_lex.l +++ b/src/xspice/cmpp/mod_lex.l @@ -44,7 +44,6 @@ NON-STANDARD FEATURES #include "mod_yacc_y.h" #include "mod_yacc.h" -extern void mod_yyerror(char*); %} diff --git a/src/xspice/cmpp/mod_yacc.y b/src/xspice/cmpp/mod_yacc.y index 1b3595c5e..59b8cd022 100755 --- a/src/xspice/cmpp/mod_yacc.y +++ b/src/xspice/cmpp/mod_yacc.y @@ -100,7 +100,6 @@ Ifs_Table_t *mod_ifs_table; extern char *mod_yytext; extern FILE* mod_yyout; - extern void mod_yyerror(char*); #include #include diff --git a/src/xspice/cmpp/mod_yacc_y.h b/src/xspice/cmpp/mod_yacc_y.h index 4e1a1bca4..2b2b5cf49 100755 --- a/src/xspice/cmpp/mod_yacc_y.h +++ b/src/xspice/cmpp/mod_yacc_y.h @@ -47,3 +47,5 @@ typedef struct { Boolean_t has_subscript; char *subscript; } Sub_Id_t; + +extern void mod_yyerror(char*); diff --git a/src/xspice/cmpp/pp_mod.c b/src/xspice/cmpp/pp_mod.c index 8eec68b58..2ecd5cd3d 100755 --- a/src/xspice/cmpp/pp_mod.c +++ b/src/xspice/cmpp/pp_mod.c @@ -58,7 +58,7 @@ NON-STANDARD FEATURES #include #include #include -#include "cmpp.h" +#include "mod_yacc_y.h" extern int mod_yyparse(void); extern void mod_yyrestart (FILE*); @@ -181,12 +181,10 @@ void preprocess_mod_file ( } /*---------------------------------------------------------------------------*/ -int +void mod_yyerror (char *str) { fprintf (stderr, "%s: Error: \"%s\": line %d (near \'%s\'):\n\t%s.\n", prog_name, current_filename, mod_yylineno, mod_yytext, str); - - return 0; }