Browse Source

muffle `nested extern' warnings, and drop a handcrafted malloc prototype

pre-master-46
rlar 16 years ago
parent
commit
60ff9aaef2
  1. 8
      ChangeLog
  2. 3
      src/frontend/help/help.c
  3. 5
      src/frontend/misccoms.c
  4. 2
      src/spicelib/devices/dev.c
  5. 24
      src/xspice/cmpp/pp_mod.c
  6. 16
      src/xspice/cmpp/read_ifs.c

8
ChangeLog

@ -1,3 +1,11 @@
2010-07-24 Robert Larice
* src/frontend/help/help.c ,
* src/frontend/misccoms.c ,
* src/spicelib/devices/dev.c ,
* src/xspice/cmpp/pp_mod.c ,
* src/xspice/cmpp/read_ifs.c :
muffle `nested extern' warnings, and drop a handcrafted malloc prototype
2010-07-24 Robert Larice
* src/ciderlib/input/meshset.c ,
* src/frontend/breakp.c ,

3
src/frontend/help/help.c

@ -14,6 +14,8 @@ Modified 1999 Emmanuel Rouat
#include "hlpdefs.h"
#include "suffix.h"
extern char *cp_tildexpand(char *string);
char *hlp_directory;
extern char *hlp_filelist[];
int hlp_ftablesize = 0;
@ -136,7 +138,6 @@ hlp_pathfix(char *buf)
{
char *s, *t, *u, bufx[1025];
char *dir_pathsep;
extern char *cp_tildexpand(char *string);
dir_pathsep = DIR_PATHSEP;

5
src/frontend/misccoms.c

@ -17,12 +17,15 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#ifdef HAVE_GNUREADLINE
#include <readline/readline.h>
#include <readline/history.h>
extern char history_file[];
#endif /* HAVE_GNUREADLINE */
#ifdef HAVE_BSDEDITLINE
/* SJB added edit line support 2005-05-05 */
#include <editline/readline.h>
extern char history_file[];
#endif /* HAVE_BSDEDITLINE */
extern IFsimulator SIMinfo;
static void byemesg(void);
@ -242,8 +245,6 @@ byemesg(void)
{
#if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE)
extern char history_file[];
/* write out command history only when saying goodbye. */
if (cp_interactive && (cp_maxhistlength > 0)) {
stifle_history(cp_maxhistlength);

2
src/spicelib/devices/dev.c

@ -355,8 +355,6 @@ void load_alldevs(void){
#include "cktdefs.h" /* for DEVmaxnum */
static void relink(void) {
/* added by SDB; DEVmaxnum is an external int defined in cktdefs.h */
extern int DEVmaxnum;
/*
* This replacement done by SDB on 6.11.2003

24
src/xspice/cmpp/pp_mod.c

@ -63,6 +63,18 @@ NON-STANDARD FEATURES
extern int mod_yyparse(void);
extern void mod_yyrestart (FILE*);
extern FILE *mod_yyin;
extern FILE *mod_yyout;
extern int mod_yylineno;
extern char *mod_yytext;
extern int mod_num_errors;
extern Ifs_Table_t *mod_ifs_table;
extern char *current_filename;
extern char *prog_name;
/*---------------------------------------------------------------------------*/
static void change_extension (char *filename, char *ext, char *new_filename)
{
@ -99,12 +111,7 @@ utilities.
void preprocess_mod_file (
char *filename) /* The file to read */
{
extern FILE *mod_yyin;
extern FILE *mod_yyout;
extern char *current_filename;
extern int mod_yylineno;
extern int mod_num_errors;
extern Ifs_Table_t *mod_ifs_table;
Ifs_Table_t ifs_table; /* info read from ifspec.ifs file */
Status_t status; /* Return status */
@ -177,11 +184,6 @@ void preprocess_mod_file (
int
mod_yyerror (char *str)
{
extern int mod_yylineno;
extern char *mod_yytext;
extern char *current_filename;
extern char *prog_name;
fprintf (stderr, "%s: Error: \"%s\": line %d (near \'%s\'):\n\t%s.\n",
prog_name, current_filename, mod_yylineno, mod_yytext, str);

16
src/xspice/cmpp/read_ifs.c

@ -54,7 +54,12 @@ extern char *prog_name;
extern int ifs_yyparse (void);
extern void ifs_yyrestart (FILE*);
void *malloc(unsigned size);
extern FILE *ifs_yyin;
extern int ifs_yylineno;
extern char *ifs_yytext;
extern Ifs_Table_t *parser_ifs_table;
extern Boolean_t parser_just_names;
static Status_t read_ifs_table(FILE *fp, int mode, Ifs_Table_t *ifs_table);
@ -143,11 +148,6 @@ static Status_t read_ifs_table(
Ifs_Table_t *ifs_table) /* Table to put info in */
{
extern FILE *ifs_yyin;
extern Ifs_Table_t *parser_ifs_table;
extern Boolean_t parser_just_names;
extern int ifs_yylineno;
assert (ifs_table);
assert (fp);
@ -166,12 +166,10 @@ static Status_t read_ifs_table(
}
/*---------------------------------------------------------------------------*/
int
ifs_yyerror (char *str)
{
extern int ifs_yylineno;
extern char *ifs_yytext;
fprintf (stderr, "%s: Error: \"%s\": line %d (near \'%s\'):\n\t%s.\n",
prog_name, current_filename, ifs_yylineno, ifs_yytext, str);

Loading…
Cancel
Save