From a14e59866e91284f575e6b774d769dcb900df9a0 Mon Sep 17 00:00:00 2001 From: rlar Date: Wed, 23 Jun 2010 19:33:54 +0000 Subject: [PATCH] ansi function declarations (prototypes) --- ChangeLog | 21 ++++ src/frontend/help/help.c | 2 +- src/frontend/inpcom.c | 4 +- src/frontend/numparam/numpaif.h | 4 +- src/frontend/numparam/xpressn.c | 2 +- src/include/cpextern.h | 32 ++--- src/include/cpstd.h | 8 +- src/include/dgen.h | 2 +- src/include/ftedbgra.h | 6 +- src/include/fteext.h | 186 ++++++++++++++-------------- src/include/hlpdefs.h | 2 +- src/include/inpptree.h | 62 +++++----- src/include/sensgen.h | 4 +- src/include/tfdefs.h | 4 +- src/maths/cmaths/cmath2.c | 2 +- src/maths/ni/niniter.c | 2 +- src/ngmultidec.c | 6 +- src/spicelib/devices/cpl/cplload.c | 11 +- src/spicelib/devices/cpl/cplsetup.c | 8 +- 19 files changed, 201 insertions(+), 167 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dc1c1f21..826431720 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-06-23 Robert Larice + * src/ngmultidec.c, + * src/frontend/inpcom.c, + * src/frontend/help/help.c, + * src/frontend/numparam/numpaif.h, + * src/frontend/numparam/xpressn.c, + * src/include/cpextern.h, + * src/include/cpstd.h, + * src/include/dgen.h, + * src/include/ftedbgra.h, + * src/include/fteext.h, + * src/include/hlpdefs.h, + * src/include/inpptree.h, + * src/include/sensgen.h, + * src/include/tfdefs.h, + * src/maths/cmaths/cmath2.c, + * src/maths/ni/niniter.c, + * src/spicelib/devices/cpl/cplload.c, + * src/spicelib/devices/cpl/cplsetup.c : + ansi function declarations (prototypes) + 2010-06-23 Robert Larice * src/main.c, * src/frontend/com_measure2.c, diff --git a/src/frontend/help/help.c b/src/frontend/help/help.c index 603b4c99e..506362009 100644 --- a/src/frontend/help/help.c +++ b/src/frontend/help/help.c @@ -136,7 +136,7 @@ hlp_pathfix(char *buf) { char *s, *t, *u, bufx[1025]; char *dir_pathsep; - extern char *cp_tildexpand( ); + extern char *cp_tildexpand(char *string); dir_pathsep = DIR_PATHSEP; diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 3000576a7..452574315 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -104,10 +104,10 @@ static void inp_stripcomments_line(char * s); static void inp_fix_for_numparam(struct line *deck); static void inp_remove_excess_ws(struct line *deck); static void inp_determine_libraries(struct line *deck, char *lib_name); -static void inp_init_lib_data(); +static void inp_init_lib_data(void); static void inp_grab_func(struct line *deck); static void inp_fix_inst_calls_for_numparam( struct line *deck); -static void inp_expand_macros_in_func(); +static void inp_expand_macros_in_func(void); static void inp_expand_macros_in_deck( struct line *deck ); static void inp_fix_param_values( struct line *deck ); static void inp_reorder_params( struct line *deck, struct line *list_head, struct line *end ); diff --git a/src/frontend/numparam/numpaif.h b/src/frontend/numparam/numpaif.h index 8e659b576..6d2426b18 100644 --- a/src/frontend/numparam/numpaif.h +++ b/src/frontend/numparam/numpaif.h @@ -16,11 +16,11 @@ extern char * nupa_copy(char *s, int linenum); extern int nupa_eval(char *s, int linenum, int orig_linenum); extern int nupa_signal(int sig, char *info); extern void nupa_scan(char * s, int linenum, int is_subckt); -extern void nupa_list_params(); +extern void nupa_list_params(FILE *cp_out); extern double nupa_get_param(char *param_name, int *found); extern void nupa_add_param(char *param_name, double value); extern void nupa_add_inst_param(char *param_name, double value); -extern void nupa_copy_inst_dico(); +extern void nupa_copy_inst_dico(void); extern int dynMaxckt; /* number of lines in deck after expansion */ diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index abebcb3e9..3f558af34 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -17,7 +17,7 @@ #include "compatmode.h" /* random numbers in /maths/misc/randnumb.c */ -extern double gauss(); +extern double gauss(void); extern COMPATMODE_T ngspice_compat_mode(void) ; /************ keywords ************/ diff --git a/src/include/cpextern.h b/src/include/cpextern.h index 4c00031f9..b8b25a990 100644 --- a/src/include/cpextern.h +++ b/src/include/cpextern.h @@ -29,7 +29,7 @@ extern wordlist *cp_doalias(wordlist *wlist); /* backquote.c */ extern char cp_back; -extern wordlist *cp_bquote(); +extern wordlist *cp_bquote(wordlist *wlist); /* complete.c */ @@ -63,8 +63,8 @@ extern void com_strcmp(wordlist *wl); extern void com_rehash(wordlist *wl); extern void com_shell(wordlist *wl); extern void cp_ioreset(void); -extern wordlist *cp_redirect(); -extern wordlist *cp_parse(); +extern wordlist *cp_redirect(wordlist *wlist); +extern wordlist *cp_parse(char *string); /* control.c */ @@ -104,9 +104,9 @@ extern char cp_hat; extern int cp_maxhistlength; extern struct histent *cp_lastone; extern void com_history(wordlist *wl); -extern void cp_addhistent(); +extern void cp_addhistent(int event, wordlist *wlist); void cp_hprint(int eventhi, int eventlo, bool rev); -extern wordlist *cp_histsubst(); +extern wordlist *cp_histsubst(wordlist *wlist); /* lexical.c */ @@ -130,7 +130,7 @@ extern void cp_init(void); extern char out_pbuf[]; extern bool out_moremode; extern bool out_isatty; -extern void out_init(); +extern void out_init(void); #ifndef out_printf /* don't want to declare it if we have #define'ed it */ #ifdef __GNUC__ @@ -140,7 +140,7 @@ extern void out_printf(char *fmt, ...); #endif #endif -extern void out_send(); +extern void out_send(char *string); /* quote.c */ @@ -154,8 +154,8 @@ extern void cp_printword(char *string, FILE *fp); /* unixcom.c */ -extern bool cp_unixcom(); -extern void cp_hstat(); +extern bool cp_unixcom(wordlist *wlist); +extern void cp_hstat(void); void cp_rehash(char *pathlist, bool docc); /* variable.c */ @@ -189,16 +189,16 @@ extern bool cp_getvar(char *name, int type, void *retval); /* cpinterface.c etc -- stuff CP needs from FTE */ extern bool cp_istrue(wordlist *wl); -extern bool cp_oddcomm(); -extern void cp_doquit(); -extern void cp_periodic(); -extern void ft_cpinit(); +extern bool cp_oddcomm(char *s, wordlist *wlist); +extern void cp_doquit(void); +extern void cp_periodic(void); +extern void ft_cpinit(void); extern struct comm *cp_coms; extern char *cp_program; extern bool ft_nutmeg; -extern struct variable *cp_enqvar(); -extern void cp_usrvars(); +extern struct variable *cp_enqvar(char *word); +extern void cp_usrvars(struct variable **v1, struct variable **v2); int cp_usrset(struct variable *var, bool isset); -extern void fatal(); +extern void fatal(void); #endif diff --git a/src/include/cpstd.h b/src/include/cpstd.h index 8b2b297fa..c68f73b3f 100644 --- a/src/include/cpstd.h +++ b/src/include/cpstd.h @@ -30,11 +30,11 @@ Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group extern char *getusername(); extern char *gethome(); -extern char *tildexpand(); -extern void printnum(); +extern char *tildexpand(char *string); +extern void printnum(char *buf, double num); extern int cp_numdgt; -extern void fatal(); +extern void fatal(void); -extern void cp_printword(); +extern void cp_printword(char *string, FILE *fp); #endif /* _STD_H_*/ diff --git a/src/include/dgen.h b/src/include/dgen.h index 041de4d64..e0dd4c9ed 100644 --- a/src/include/dgen.h +++ b/src/include/dgen.h @@ -26,6 +26,6 @@ struct st_dgen { #define DGEN_DEFPARAMS 0x001 #define DGEN_ALLPARAMS 0x002 -extern dgen *dgen_init( ); +extern dgen *dgen_init(GENcircuit *ckt, wordlist *wl, int nomix, int flag, int model); #endif /* DGEN_H */ diff --git a/src/include/ftedbgra.h b/src/include/ftedbgra.h index 6518313c3..0356dd429 100644 --- a/src/include/ftedbgra.h +++ b/src/include/ftedbgra.h @@ -11,8 +11,8 @@ Author: 1987 Jeffrey M. Hsu extern GRAPH *currentgraph; -extern GRAPH *NewGraph(); +extern GRAPH *NewGraph(void); -extern GRAPH *FindGraph(); +extern GRAPH *FindGraph(int id); -extern GRAPH *CopyGraph(); +extern GRAPH *CopyGraph(GRAPH *graph); diff --git a/src/include/fteext.h b/src/include/fteext.h index 96348abe4..5cc625dc8 100644 --- a/src/include/fteext.h +++ b/src/include/fteext.h @@ -23,20 +23,20 @@ Modified: 1999 Paolo Nenzi - 2000 AlansFixes /* arg.c */ -extern void arg_plot(); -extern void arg_display(); -extern void arg_print(); -extern void arg_let(); -extern void arg_load(); -extern void arg_set(); -extern void outmenuprompt(); +extern void arg_plot(wordlist *wl, struct comm *command); +extern void arg_display(void); +extern void arg_print(wordlist *wl, struct comm *command); +extern void arg_let(wordlist *wl, struct comm *command); +extern void arg_load(wordlist *wl, struct comm *command); +extern void arg_set(wordlist *wl, struct comm *command); +extern void outmenuprompt(char *string); /* aspice.c */ extern void com_aspice(wordlist *wl); extern void com_jobs(wordlist *wl); extern void com_rspice(wordlist *wl); -extern void ft_checkkids(); +extern void ft_checkkids(void); /* binary.c */ @@ -45,7 +45,7 @@ extern struct plot *braw_read(); /* breakpoint.c */ -extern bool ft_bpcheck(); +extern bool ft_bpcheck(struct plot *runplot, int iteration); extern void com_delete(wordlist *wl); extern void com_iplot(wordlist *wl); extern void com_save(wordlist *wl); @@ -54,7 +54,7 @@ extern void com_step(wordlist *wl); extern void com_stop(wordlist *wl); extern void com_sttus(wordlist *wl); extern void com_trce(wordlist *wl); -extern void ft_trquery(); +extern void ft_trquery(void); extern void dbfree( ); @@ -68,12 +68,12 @@ extern int ft_getSaves(struct save_info **); extern struct circ *ft_curckt; extern struct circ *ft_circuits; extern struct subcirc *ft_subcircuits; -extern void ft_newcirc(); +extern void ft_newcirc(struct circ *ckt); /* clip.c */ -extern bool clip_line(); -extern bool clip_to_circle(); +extern bool clip_line(int *pX1, int *pY1, int *pX2, int *pY2, int l, int b, int r, int t); +extern bool clip_to_circle(int *x1, int *y1, int *x2, int *y2, int cx, int cy, int rad); /* cmath1.c */ @@ -154,10 +154,10 @@ extern void com_state(wordlist *wl); /* define.c */ -extern struct pnode *ft_substdef(); +extern struct pnode *ft_substdef(char *name, struct pnode *args); extern void com_define(wordlist *wl); extern void com_undefine(wordlist *wl); -extern void ft_pnode(); +extern void ft_pnode(struct pnode *pn); /* device.c */ @@ -188,14 +188,14 @@ extern bool ft_nomod; extern bool ft_nodesprint; extern bool ft_optsprint; extern int ft_cktcoms(bool terse); -extern void ft_dotsaves(); -extern int ft_savedotargs(); +extern void ft_dotsaves(void); +extern int ft_savedotargs(void); /* error.c */ -extern void fatal(); -extern void fperror(); -extern void ft_sperror(); +extern void fatal(void); +extern void fperror(char *mess, int code); +extern void ft_sperror(int code, char *mess); extern char ErrorMessage[]; extern void internalerror(char *); extern void externalerror(char *); @@ -204,26 +204,26 @@ extern void externalerror(char *); /* evaluate.c */ -extern struct dvec *op_and(); -extern struct dvec *op_comma(); -extern struct dvec *op_divide(); -extern struct dvec *op_eq(); -extern struct dvec *ft_evaluate(); -extern struct dvec *op_ge(); -extern struct dvec *op_gt(); -extern struct dvec *op_le(); -extern struct dvec *op_lt(); -extern struct dvec *op_minus(); -extern struct dvec *op_mod(); -extern struct dvec *op_ne(); -extern struct dvec *op_not(); -extern struct dvec *op_or(); -extern struct dvec *op_ind(); -extern struct dvec *op_plus(); -extern struct dvec *op_power(); -extern struct dvec *op_times(); -extern struct dvec *op_uminus(); -extern struct dvec *op_range(); +extern struct dvec *op_and(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_comma(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_divide(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_eq(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *ft_evaluate(struct pnode *node); +extern struct dvec *op_ge(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_gt(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_le(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_lt(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_minus(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_mod(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_ne(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_not(struct pnode *arg); +extern struct dvec *op_or(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_ind(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_plus(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_power(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_times(struct pnode *arg1, struct pnode *arg2); +extern struct dvec *op_uminus(struct pnode *arg); +extern struct dvec *op_range(struct pnode *arg1, struct pnode *arg2); /* spec.c */ extern void com_spec(wordlist *wl); @@ -262,13 +262,13 @@ extern void gi_update(); extern bool gr_gmode; extern bool gr_hmode; -extern void gr_clean(); -extern void gr_end(); -extern void gr_iplot(); +extern void gr_clean(void); +extern void gr_end(struct dvec *dv); +extern void gr_iplot(struct plot *plot); extern void gr_iplot_end(); -extern void gr_pmsg(); -extern void gr_point(); -extern void gr_start(); +extern void gr_pmsg(char *text); +extern void gr_point(struct dvec *dv, double newx, double newy, double oldx, double oldy, int np); +extern void gr_start(struct dvec *dv); extern double gr_xrange[2]; extern double gr_yrange[2]; extern int gr_xmargin; @@ -289,12 +289,12 @@ extern void com_listing(wordlist *wl); extern void com_source(wordlist *wl); void inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, struct line *options, char *filename); -extern void inp_source(); +extern void inp_source(char *file); void inp_spsource(FILE *fp, bool comfile, char *filename); -extern void inp_casefix(); -extern void inp_list(); -extern void inp_readall(); -extern FILE *inp_pathopen(); +extern void inp_casefix(char *string); +extern void inp_list(FILE *file, struct line *deck, struct line *extras, int type); +extern void inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name); +extern FILE *inp_pathopen(char *name, char *mode); /* nutinp.c */ @@ -305,10 +305,10 @@ extern void nutcom_source(wordlist *wl); /* interpolate.c */ -extern bool ft_interpolate(); -extern bool ft_polyfit(); -extern double ft_peval(); -extern void ft_polyderiv( ); +extern bool ft_interpolate(double *data, double *ndata, double *oscale, int olen, double *nscale, int nlen, int degree); +extern bool ft_polyfit(double *xdata, double *ydata, double *result, int degree, double *scratch); +extern double ft_peval(double x, double *coeffs, int degree); +extern void ft_polyderiv(double *coeffs, int degree); extern void com_linearize(wordlist *wl); /* mfbinterface.c */ @@ -332,7 +332,7 @@ extern void com_ghelp(wordlist *wl); extern void com_help(wordlist *wl); extern void com_quit(wordlist *wl); extern void com_version(wordlist *wl); -extern int hcomp(); +extern int hcomp(const void *a, const void *b); extern void com_where(wordlist *wl); /* mw_coms.c */ @@ -354,8 +354,8 @@ extern bool ft_gidb; extern bool ft_controldb; extern bool ft_asyncdb; extern char *ft_setkwords[]; -extern struct line *inp_getopts(); -extern struct variable *cp_enqvar(); +extern struct line *inp_getopts(struct line *deck); +extern struct variable *cp_enqvar(char *word); extern struct variable *cp_uservars(); extern int cp_userset(); extern bool ft_ngdebug; @@ -367,7 +367,7 @@ extern struct func func_not; extern struct func func_uminus; extern struct pnode * ft_getpnames(wordlist *wl, bool check); #define free_pnode(ptr) free_pnode_x(ptr); ptr=NULL -extern void free_pnode_x(); +extern void free_pnode_x(struct pnode *t); /* plotcurve.c */ @@ -405,7 +405,7 @@ extern void com_transpose(wordlist *wl); /* rawfile.c */ extern int raw_prec; extern void raw_write(char *name, struct plot *pl, bool app, bool binary); -extern struct plot *raw_read(); +extern struct plot *raw_read(char *name); /* meas.c */ extern void do_measure(char *what, bool chk_only); @@ -415,8 +415,8 @@ extern void com_meas(wordlist *wl); /* resource.c */ extern void com_rusage(wordlist *wl); -extern void ft_ckspace(); -extern void init_rlimits(); +extern void ft_ckspace(void); +extern void init_rlimits(void); /* runcoms.c */ @@ -433,7 +433,7 @@ extern void com_tf(wordlist *wl); extern void com_scirc(wordlist *wl); extern void com_disto(wordlist *wl); extern void com_noise(wordlist *wl); -extern int ft_dorun(); +extern int ft_dorun(char *file); extern bool ft_getOutReq(FILE **, struct plot **, bool *, char *, char *); @@ -443,26 +443,26 @@ extern bool ft_nutmeg; extern IFsimulator *ft_sim; extern char *ft_rawfile; extern char *cp_program; -extern RETSIGTYPE ft_sigintr(); -extern RETSIGTYPE sigfloat(); -extern RETSIGTYPE sigstop(); +extern RETSIGTYPE ft_sigintr(void); +extern RETSIGTYPE sigfloat(int sig, int code); +extern RETSIGTYPE sigstop(void); extern RETSIGTYPE sigquit(); extern RETSIGTYPE sigill(); extern RETSIGTYPE sigbus(); extern RETSIGTYPE sigsegv(); extern RETSIGTYPE sig_sys(); -extern int main(); +extern int main(int argc, char **argv); /* spiceif.c & nutmegif.c */ extern bool if_tranparams(); -extern char *if_errstring(); +extern char *if_errstring(int code); extern char *if_inpdeck(); extern int if_run(); extern int if_sens_run(); extern struct variable *(*if_getparam)(); extern struct variable *nutif_getparam(); -extern struct variable *spif_getparam(); +extern struct variable *spif_getparam(void *ckt, char **name, char *param, int ind, int do_model); extern struct variable *spif_getparam_special(); extern void if_cktfree(); extern void if_dump(); @@ -474,8 +474,8 @@ extern struct variable *if_getstat(); /* subckt.c */ -extern struct line *inp_deckcopy(); -extern struct line *inp_subcktexpand(); +extern struct line *inp_deckcopy(struct line *deck); +extern struct line *inp_subcktexpand(struct line *deck); /* typesdef.c */ @@ -488,30 +488,30 @@ extern int ft_typnum(char *); /* vectors.c */ -extern bool vec_eq(); +extern bool vec_eq(struct dvec *v1, struct dvec *v2); extern int plot_num; -extern struct dvec *vec_fromplot(); -extern struct dvec *vec_copy(); -extern struct dvec *vec_get(); -extern struct dvec *vec_mkfamily(); +extern struct dvec *vec_fromplot(char *word, struct plot *plot); +extern struct dvec *vec_copy(struct dvec *v); +extern struct dvec *vec_get(char *word); +extern struct dvec *vec_mkfamily(struct dvec *v); extern struct plot *plot_cur; -extern struct plot *plot_alloc(); +extern struct plot *plot_alloc(char *name); extern struct plot *plot_list; extern int plotl_changed; -extern void plot_add(); +extern void plot_add(struct plot *pl); #define vec_free(ptr) vec_free_x(ptr); ptr=NULL -extern void vec_free_x(); -extern void vec_gc(); -extern void ft_loadfile(); -extern void vec_new(); -extern void plot_docoms(); -extern void vec_remove(); +extern void vec_free_x(struct dvec *v); +extern void vec_gc(void); +extern void ft_loadfile(char *file); +extern void vec_new(struct dvec *d); +extern void plot_docoms(wordlist *wl); +extern void vec_remove(char *name); extern void ft_sdatafree(); -extern void plot_setcur(); -extern void plot_new(); -extern char *vec_basename(); -extern bool plot_prefix(); -extern void vec_transpose(); +extern void plot_setcur(char *name); +extern void plot_new(struct plot *pl); +extern char *vec_basename(struct dvec *v); +extern bool plot_prefix(char *pre, char *str); +extern void vec_transpose(struct dvec *v); /* main.c */ extern bool ft_intrpt; @@ -521,9 +521,9 @@ extern bool ft_setflag; extern void com_reshape(wordlist *wl); /* dimens.c */ -extern void dimstring(); -extern int atodims(); -extern void indexstring(); -extern int incindex( ); +extern void dimstring(int *data, int length, char *retstring); +extern int atodims(char *p, int *data, int *outlength); +extern void indexstring(int *data, int length, char *retstring); +extern int incindex(int *counts, int numcounts, int *dims, int numdims); #endif /* FTEext_h */ diff --git a/src/include/hlpdefs.h b/src/include/hlpdefs.h index c2ff3f004..b26754394 100644 --- a/src/include/hlpdefs.h +++ b/src/include/hlpdefs.h @@ -118,7 +118,7 @@ extern void hlp_pathfix(char *buf); extern topic *hlp_read(fplace *place); extern void hlp_free(void); extern long findsubject(char *filename, char *subject); -extern bool hlp_approvedfile(); +extern bool hlp_approvedfile(char *filename); /* provide.c */ diff --git a/src/include/inpptree.h b/src/include/inpptree.h index cd666c57a..769d15855 100644 --- a/src/include/inpptree.h +++ b/src/include/inpptree.h @@ -149,38 +149,38 @@ typedef struct PTelement { /* These are things defined in PTfunctions.c */ -extern double PTplus(); -extern double PTminus(); -extern double PTtimes(); -extern double PTdivide(); -extern double PTpower(); -extern double PTacos(); -extern double PTabs(); -extern double PTacosh(); -extern double PTasin(); -extern double PTasinh(); -extern double PTatan(); -extern double PTatanh(); -extern double PTcos(); -extern double PTcosh(); -extern double PTexp(); -extern double PTln(); -extern double PTlog(); -extern double PTsgn(); -extern double PTsin(); -extern double PTsinh(); -extern double PTsqrt(); -extern double PTtan(); -extern double PTtanh(); -extern double PTustep(); +extern double PTplus(double arg1, double arg2); +extern double PTminus(double arg1, double arg2); +extern double PTtimes(double arg1, double arg2); +extern double PTdivide(double arg1, double arg2); +extern double PTpower(double arg1, double arg2); +extern double PTacos(double arg); +extern double PTabs(double arg); +extern double PTacosh(double arg); +extern double PTasin(double arg); +extern double PTasinh(double arg); +extern double PTatan(double arg); +extern double PTatanh(double arg); +extern double PTcos(double arg); +extern double PTcosh(double arg); +extern double PTexp(double arg); +extern double PTln(double arg); +extern double PTlog(double arg); +extern double PTsgn(double arg); +extern double PTsin(double arg); +extern double PTsinh(double arg); +extern double PTsqrt(double arg); +extern double PTtan(double arg); +extern double PTtanh(double arg); +extern double PTustep(double arg); /* MW. PTcif declaration */ -extern double PTustep2(); -extern double PTpwl(); -extern double PTpwl_derivative(); -extern double PTuramp(); -extern double PTuminus(); -extern double PTmin(); -extern double PTmax(); +extern double PTustep2(double arg); +extern double PTpwl(double arg, void *data); +extern double PTpwl_derivative(double arg, void *data); +extern double PTuramp(double arg); +extern double PTuminus(double arg); +extern double PTmin(double arg1, double arg2); +extern double PTmax(double arg1, double arg2); extern double PTeq0(double arg); extern double PTne0(double arg); extern double PTgt0(double arg); diff --git a/src/include/sensgen.h b/src/include/sensgen.h index fe3a4e004..6d6193443 100644 --- a/src/include/sensgen.h +++ b/src/include/sensgen.h @@ -16,6 +16,6 @@ struct s_sgen { int is_zerook; }; -extern sgen *sgen_init( ); -extern int sgen_next( ); +extern sgen *sgen_init(CKTcircuit *ckt, int is_dc); +extern int sgen_next(sgen **xsg); extern int sgen_setp(sgen*, CKTcircuit*, IFvalue* ); /* AlansFixes */ diff --git a/src/include/tfdefs.h b/src/include/tfdefs.h index 4beb6543e..4b05876df 100644 --- a/src/include/tfdefs.h +++ b/src/include/tfdefs.h @@ -32,6 +32,6 @@ typedef struct { #define TF_OUTSRC 3 #define TF_INSRC 4 #define TF_OUTNAME 5 -extern int TFsetParm(); -extern int TFaskQuest(); +extern int TFsetParm(CKTcircuit *ckt, void *anal, int which, IFvalue *value); +extern int TFaskQuest(CKTcircuit *ckt, void *anal, int which, IFvalue *value); #endif /*TF*/ diff --git a/src/maths/cmaths/cmath2.c b/src/maths/cmaths/cmath2.c index fef403dac..41b6bde59 100644 --- a/src/maths/cmaths/cmath2.c +++ b/src/maths/cmaths/cmath2.c @@ -30,7 +30,7 @@ extern long int random (void); extern void srandom (unsigned int seed); #endif -extern void checkseed(); /* seed random or set by 'set rndseed=value'*/ +extern void checkseed(void); /* seed random or set by 'set rndseed=value'*/ static double * d_tan(double *dd, int length) diff --git a/src/maths/ni/niniter.c b/src/maths/ni/niniter.c index fc09a209c..c7bc257bf 100644 --- a/src/maths/ni/niniter.c +++ b/src/maths/ni/niniter.c @@ -17,7 +17,7 @@ Author: 1987 Gary W. Ng */ -extern void SMPcaSolve(); +extern void SMPcaSolve(SMPmatrix *Matrix, double RHS[], double iRHS[], double Spare[], double iSpare[]); void NInzIter(CKTcircuit *ckt, int posDrive, int negDrive) diff --git a/src/ngmultidec.c b/src/ngmultidec.c index 14c748b51..cdf8a1dbb 100644 --- a/src/ngmultidec.c +++ b/src/ngmultidec.c @@ -16,9 +16,9 @@ Author: 1990 Jaijeet Roychowdury /* `-u' option showing the usage help is changed to `-h'. -- ro */ -extern void usage(); -extern void comments(); -extern double phi(); +extern void usage(char **argv); +extern void comments(double r,double l,double g,double c,double ctot,double cm,double lm,double k,char *name,int num, double len); +extern double phi(int i, double arg); extern void spErrorMessage(char*, FILE*, char*); int diff --git a/src/spicelib/devices/cpl/cplload.c b/src/spicelib/devices/cpl/cplload.c index 04346273b..63272e2d5 100644 --- a/src/spicelib/devices/cpl/cplload.c +++ b/src/spicelib/devices/cpl/cplload.c @@ -16,7 +16,16 @@ VI_list *pool_vi; static double ratio[MAX_CP_TX_LINES]; static VI_list *new_vi(void); static void free_vi(VI_list*); -static int get_pvs_vi(); +static int get_pvs_vi(int t1, int t2, + CPLine *cp, + double v1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double v2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double i1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double i2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double v1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double v2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double i1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], + double i2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]); static int update_cnv(CPLine*, double); static int add_new_vi(CPLinstance*, CKTcircuit*, int); static int right_consts(CPLinstance*, CPLine*, int, int, double, double, int*, int*, CKTcircuit*); diff --git a/src/spicelib/devices/cpl/cplsetup.c b/src/spicelib/devices/cpl/cplsetup.c index 16ff68df3..04e77b033 100644 --- a/src/spicelib/devices/cpl/cplsetup.c +++ b/src/spicelib/devices/cpl/cplsetup.c @@ -88,7 +88,7 @@ static int match(int, double*, double*, double*); static int Gaussian_Elimination2(int, int); static void eval_Si_Si_1(int, double); static void loop_ZY(int, double); -static void poly_matrix(); /* quale è il prototipo ? */ +static void poly_matrix(double *A[MAX_DIM][MAX_DIM], int dim, int deg); /* static int checkW(double*, double); */ static void poly_W(int, int); static void eval_frequency(int, int); @@ -102,7 +102,11 @@ static int ReadCpL(CPLinstance*, CKTcircuit*); /* mult */ static void mult_p(double*, double*, double*, int, int, int); -static void matrix_p_mult(); /* quale è il prototipo ?*/ +static void matrix_p_mult(double *A[MAX_DIM][MAX_DIM], + double *D[MAX_DIM], + double *B[MAX_DIM][MAX_DIM], + int dim, int deg, int deg_o, + Mult_Out X[MAX_DIM][MAX_DIM]); static double approx_mode(double*, double*, double); static double eval2(double, double, double, double); static int get_c(double, double, double, double, double, double, double, double*, double*);