From 196262dd1b8843fe0a6a53c629a41cc12e264a9b Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 16 Oct 2010 17:09:46 +0000 Subject: [PATCH] move the com_*() prototypes around. --- ChangeLog | 27 ++++++++++ src/frontend/Makefile.am | 1 + src/frontend/breakp.c | 1 + src/frontend/com_ahelp.c | 1 + src/frontend/com_commands.h | 11 ++++ src/frontend/com_measure2.c | 1 + src/frontend/com_option.c | 1 + src/frontend/com_sysinfo.c | 1 + src/frontend/commands.c | 26 ++++++++++ src/frontend/cpitf.c | 4 ++ src/frontend/device.c | 5 +- src/frontend/device.h | 5 -- src/frontend/dotcards.c | 8 +-- src/frontend/inp.c | 1 + src/frontend/measure.c | 3 ++ src/frontend/misccoms.h | 2 - src/frontend/plotting/x11.c | 1 + src/frontend/postcoms.c | 1 + src/frontend/postcoms.h | 3 -- src/frontend/runcoms.c | 1 + src/include/cpextern.h | 17 ------ src/include/fteext.h | 101 ------------------------------------ src/main.c | 1 + visualc/vngspice.vcproj | 6 ++- 24 files changed, 95 insertions(+), 134 deletions(-) create mode 100644 src/frontend/com_commands.h diff --git a/ChangeLog b/ChangeLog index ce2efd099..3b9955c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2010-10-16 Robert Larice + * src/main.c , + * src/frontend/Makefile.am , + * src/frontend/breakp.c , + * src/frontend/com_ahelp.c , + * src/frontend/com_measure2.c , + * src/frontend/com_option.c , + * src/frontend/com_sysinfo.c , + * src/frontend/commands.c , + * src/frontend/cpitf.c , + * src/frontend/device.c , + * src/frontend/device.h , + * src/frontend/dotcards.c , + * src/frontend/inp.c , + * src/frontend/measure.c , + * src/frontend/misccoms.h , + * src/frontend/postcoms.c , + * src/frontend/postcoms.h , + * src/frontend/runcoms.c , + * src/frontend/plotting/x11.c , + * src/include/cpextern.h , + * src/include/fteext.h , + * visualc/vngspice.vcproj , +New include File: + * src/frontend/com_commands.h : + move the com_*() prototypes around. + 2010-10-16 Robert Larice * src/include/devdefs.h : unconditional visibility of the cider prototypes limit*() diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am index 11da8ff40..b8de0faa1 100644 --- a/src/frontend/Makefile.am +++ b/src/frontend/Makefile.am @@ -26,6 +26,7 @@ libfte_la_SOURCES = \ com_chdir.h \ com_compose.c \ com_compose.h \ + com_commands.h \ com_dl.c \ com_dl.h \ com_display.c \ diff --git a/src/frontend/breakp.c b/src/frontend/breakp.c index 4ae94c830..af173aa34 100644 --- a/src/frontend/breakp.c +++ b/src/frontend/breakp.c @@ -15,6 +15,7 @@ $Id$ #include "ftedebug.h" #include "breakp.h" #include "breakp2.h" +#include "runcoms2.h" #include "completion.h" diff --git a/src/frontend/com_ahelp.c b/src/frontend/com_ahelp.c index 23e0cb661..6f8449007 100644 --- a/src/frontend/com_ahelp.c +++ b/src/frontend/com_ahelp.c @@ -7,6 +7,7 @@ #include "variable.h" #include "com_help.h" +#include "com_ahelp.h" #include "hcomp.h" #include "ftehelp.h" diff --git a/src/frontend/com_commands.h b/src/frontend/com_commands.h new file mode 100644 index 000000000..f9e296482 --- /dev/null +++ b/src/frontend/com_commands.h @@ -0,0 +1,11 @@ +#ifndef _COM_COMMANDS_H +#define _COM_COMMANDS_H + +void com_showmod(wordlist *wl); +void com_show(wordlist *wl); +void com_alter(wordlist *wl); +void com_altermod(wordlist *wl); +void com_meas(wordlist *wl); +void com_sysinfo(wordlist *wl); + +#endif diff --git a/src/frontend/com_measure2.c b/src/frontend/com_measure2.c index 6b218ebd3..dd5b5bc95 100644 --- a/src/frontend/com_measure2.c +++ b/src/frontend/com_measure2.c @@ -16,6 +16,7 @@ #include #include "dotcards.h" #include "com_measure2.h" +#include "breakp2.h" #include "error.h" /* controlled_exit() */ diff --git a/src/frontend/com_option.c b/src/frontend/com_option.c index e7afba929..314344d98 100644 --- a/src/frontend/com_option.c +++ b/src/frontend/com_option.c @@ -5,6 +5,7 @@ #include "circuits.h" #include #include "variable.h" +#include "com_option.h" /* The option command. Syntax is option [opt ...] [opt = val ...]. diff --git a/src/frontend/com_sysinfo.c b/src/frontend/com_sysinfo.c index 2bb41bb53..159c95c25 100644 --- a/src/frontend/com_sysinfo.c +++ b/src/frontend/com_sysinfo.c @@ -12,6 +12,7 @@ #include "ngspice.h" #include "cpdefs.h" #include "fteext.h" +#include "com_commands.h" /* We might compile for Windows, but only as a console application (e.g. tcl) */ #if defined(HAS_WINDOWS) || defined(__MINGW32__) || defined(_MSC_VER) diff --git a/src/frontend/commands.c b/src/frontend/commands.c index 8db17b2e8..cc3337b6a 100644 --- a/src/frontend/commands.c +++ b/src/frontend/commands.c @@ -57,6 +57,32 @@ #include "com_shift.h" #include "com_unset.h" #include "fourier.h" +#include "newcoms.h" +#include "define.h" +#include "com_set.h" +#include "misccoms.h" +#include "com_commands.h" +#include "runcoms.h" +#include "com_alias.h" +#include "typesdef.h" +#include "postcoms.h" +#include "com_option.h" +#include "inp.h" +#include "com_dump.h" +#include "com_fft.h" +#include "spec.h" +#include "runcoms2.h" +#include "breakp.h" +#include "breakp2.h" +#include "aspice.h" +#include "com_history.h" +#include "com_cdump.h" +#include "linear.h" +#include "where.h" +#include "mw_coms.h" +#include "resource.h" +#include "diff.h" +#include "com_strcmp.h" #include "arg.h" diff --git a/src/frontend/cpitf.c b/src/frontend/cpitf.c index 4e86de7c7..3a060174c 100644 --- a/src/frontend/cpitf.c +++ b/src/frontend/cpitf.c @@ -12,6 +12,10 @@ $Id$ #include "dvec.h" #include "fteparse.h" #include "cpitf.h" +#include "com_let.h" +#include "com_set.h" +#include "define.h" +#include "misccoms.h" #include diff --git a/src/frontend/device.c b/src/frontend/device.c index d7c3a7384..4b75fb1d8 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -18,6 +18,7 @@ Modified: 2000 AlansFixes #include "circuits.h" #include "device.h" #include "variable.h" +#include "com_commands.h" #include "gens.h" /* wl_forall */ @@ -846,6 +847,8 @@ old_show(wordlist *wl) * but no strings ... for booleans, use 0/1). */ +static void com_alter_common(wordlist *wl, int do_model); + void com_alter(wordlist *wl) { @@ -864,7 +867,7 @@ com_altermod(wordlist *wl) com_alter_common(wl, 1); } -void +static void com_alter_common(wordlist *wl, int do_model) { wordlist *eqword = NULL, *words; diff --git a/src/frontend/device.h b/src/frontend/device.h index dda9d3d88..b4289aa9f 100644 --- a/src/frontend/device.h +++ b/src/frontend/device.h @@ -10,8 +10,6 @@ #define LEFT_WIDTH 11 #define DEV_WIDTH 21 -void com_showmod(wordlist *wl); -void com_show(wordlist *wl); int printstr_n(dgen *dg, IFparm *, int); int printstr_m(dgen *dg, IFparm *, int); void param_forall(dgen *dg, int flags); @@ -22,9 +20,6 @@ int bogus2(dgen *dg, IFparm *, int); int printvals(dgen *dg, IFparm *p, int i); int printvals_old(dgen *dg, IFparm *p, int i); void old_show(wordlist *wl); -void com_alter(wordlist *wl); -void com_altermod(wordlist *wl); -void com_alter_common(wordlist *wl, int do_model); diff --git a/src/frontend/dotcards.c b/src/frontend/dotcards.c index 5ea676497..4fec3b978 100644 --- a/src/frontend/dotcards.c +++ b/src/frontend/dotcards.c @@ -11,19 +11,21 @@ $Id$ #include "ngspice.h" #include - #include "cpdefs.h" #include "ftedefs.h" #include "dvec.h" #include "fteinp.h" #include - #include "circuits.h" #include "dotcards.h" #include "variable.h" #include "fourier.h" #include "breakp2.h" #include "com_measure2.h" +#include "com_commands.h" +#include "com_asciiplot.h" +#include "resource.h" +#include "postcoms.h" /* Extract all the .save lines */ @@ -46,8 +48,6 @@ setcplot(char *name) return NULL; } - - /* All lines with .width, .plot, .print, .save, .op, .meas, .tf have been assembled into a wordlist (wl_first) in inp.c:inp_spsource(), and then stored to ci_commands in inp.c:inp_dodeck(). diff --git a/src/frontend/inp.c b/src/frontend/inp.c index ed3a68205..0d343718f 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -23,6 +23,7 @@ $Id$ #include "fteinp.h" #include "inp.h" +#include "runcoms.h" #include "inpcom.h" #include "circuits.h" #include "completion.h" diff --git a/src/frontend/measure.c b/src/frontend/measure.c index 5e0b549af..5cf722097 100644 --- a/src/frontend/measure.c +++ b/src/frontend/measure.c @@ -18,6 +18,9 @@ #include "numparam/numpaif.h" #include "missing_math.h" #include "com_measure2.h" +#include "com_let.h" +#include "com_commands.h" +#include "com_display.h" #include "error.h" /* controlled_exit() */ diff --git a/src/frontend/misccoms.h b/src/frontend/misccoms.h index d478a25ab..e6b1e0dd3 100644 --- a/src/frontend/misccoms.h +++ b/src/frontend/misccoms.h @@ -6,8 +6,6 @@ #ifndef MISCCOMS_H_INCLUDED #define MISCCOMS_H_INCLUDED -void com_help(wordlist *wl); -void com_ahelp(wordlist *wl); void com_ghelp(wordlist *wl); void com_quit(wordlist *wl); void com_bug(wordlist *wl); diff --git a/src/frontend/plotting/x11.c b/src/frontend/plotting/x11.c index 2db881468..22dd5edf5 100644 --- a/src/frontend/plotting/x11.c +++ b/src/frontend/plotting/x11.c @@ -23,6 +23,7 @@ $Id$ # include # include # include +# include "../com_hardcopy.h" /* Added X11/ prefix to the next includes - ER */ diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index 96f1de647..b0034fd25 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -15,6 +15,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #include #include #include "ftedbgra.h" +#include "com_display.h" #include "completion.h" #include "postcoms.h" diff --git a/src/frontend/postcoms.h b/src/frontend/postcoms.h index 18c6a864c..105305b6c 100644 --- a/src/frontend/postcoms.h +++ b/src/frontend/postcoms.h @@ -6,15 +6,12 @@ #ifndef POSTCOMS_H_INCLUDED #define POSTCOMS_H_INCLUDED -void com_let(wordlist *wl); void com_unlet(wordlist *wl); void com_load(wordlist *wl); void com_print(wordlist *wl); void com_write(wordlist *wl); void com_write_sparam(wordlist *wl); void com_transpose(wordlist *wl); -void com_setscale(wordlist *wl); -void com_display(wordlist *wl); void com_cross(wordlist *wl); void com_destroy(wordlist *wl); void com_splot(wordlist *wl); diff --git a/src/frontend/runcoms.c b/src/frontend/runcoms.c index c49dd01d9..5fabb4491 100644 --- a/src/frontend/runcoms.c +++ b/src/frontend/runcoms.c @@ -21,6 +21,7 @@ $Id$ #include "runcoms.h" #include "variable.h" #include "spiceif.h" +#include "runcoms2.h" #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - include ipc stuff */ diff --git a/src/include/cpextern.h b/src/include/cpextern.h index f69d6516e..319a2839b 100644 --- a/src/include/cpextern.h +++ b/src/include/cpextern.h @@ -18,8 +18,6 @@ Modified: 2000 AlansFixes /* com_alias.c */ extern struct alias *cp_aliases; -extern void com_alias(wordlist *wl); -extern void com_unalias(wordlist *wl); extern void cp_paliases(char *word); extern void cp_setalias(char *word, wordlist *wlist); extern void cp_unalias(char *word); @@ -57,11 +55,6 @@ extern bool cp_debug; extern char cp_amp; extern char cp_gt; extern char cp_lt; -extern void com_chdir(wordlist *wl); -extern void com_echo(wordlist *wl); -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(wordlist *wlist); extern wordlist *cp_parse(char *string); @@ -78,10 +71,6 @@ extern void cp_toplevel(void); extern void cp_popcontrol(void); extern void cp_pushcontrol(void); -/* com_cdump.c */ - -extern void com_cdump(wordlist *wl); - /* glob.c */ extern bool cp_globmatch(char *p, char *s); @@ -103,7 +92,6 @@ extern char cp_bang; extern char cp_hat; extern int cp_maxhistlength; extern struct histent *cp_lastone; -extern void com_history(wordlist *wl); extern void cp_addhistent(int event, wordlist *wlist); void cp_hprint(int eventhi, int eventlo, bool rev); extern wordlist *cp_histsubst(wordlist *wlist); @@ -179,11 +167,6 @@ extern wordlist *vareval(char *string); /* var2.c */ extern void cp_vprint(void); -extern void com_set(wordlist *wl); -extern void com_option(wordlist *wl); -extern void com_state(wordlist *wl); -extern void com_unset(wordlist *wl); -extern void com_shift(wordlist *wl); extern bool cp_getvar(char *name, enum cp_types type, void *retval); /* cpinterface.c etc -- stuff CP needs from FTE */ diff --git a/src/include/fteext.h b/src/include/fteext.h index 9fcc33968..7ff288ade 100644 --- a/src/include/fteext.h +++ b/src/include/fteext.h @@ -24,22 +24,11 @@ Modified: 1999 Paolo Nenzi - 2000 AlansFixes /* aspice.c */ -extern void com_aspice(wordlist *wl); -extern void com_jobs(wordlist *wl); -extern void com_rspice(wordlist *wl); extern void ft_checkkids(void); /* breakpoint.c */ 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); -extern void com_save2(wordlist *wl, char *name); -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 dbfree(struct dbcomm *db); @@ -100,40 +89,11 @@ extern void *cx_deriv(void *, short int , int , int *, short int *, struct plot extern void *cx_group_delay(void *, short int , int , int *, short int *, struct plot *, struct plot *, int ); -/* compose.c */ - -extern void com_compose(wordlist *wl); - -/* debugcoms.c */ - -extern void com_dump(wordlist *wl); -extern void com_state(wordlist *wl); - /* define.c */ extern struct pnode *ft_substdef(const char *name, struct pnode *args); -extern void com_define(wordlist *wl); -extern void com_undefine(wordlist *wl); extern void ft_pnode(struct pnode *pn); -/* device.c */ - -extern void com_show(wordlist *wl); -extern void com_showmod(wordlist *wl); -extern void com_alter(wordlist *wl); -extern void com_altermod(wordlist *wl); - -/* diff.c */ - -extern void com_diff(wordlist *wl); - -/* doplot.c */ - -extern void com_asciiplot(wordlist *wl); -extern void com_hardcopy(wordlist *wl); -extern void com_plot(wordlist *wl); -extern void com_xgraph(wordlist *wl); - /* dotcards.c */ extern bool ft_acctprint; @@ -162,15 +122,6 @@ extern void externalerror(char *); extern struct dvec *ft_evaluate(struct pnode *node); -/* spec.c */ -extern void com_spec(wordlist *wl); - -/* com_fft.c */ -extern void com_fft(wordlist*); - -/* com_sysinfo.c */ -extern void com_sysinfo(wordlist *wl); - /* ginterface.c extern bool gi_init(); @@ -210,9 +161,6 @@ extern bool gr_circular; /* inp.c */ -extern void com_edit(wordlist *wl); -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(char *file); @@ -235,20 +183,6 @@ extern bool ft_interpolate(double *data, double *ndata, double *oscale, int olen 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); - -/* misccoms.c */ - -extern void com_bug(wordlist *wl); -extern void com_ahelp(wordlist *wl); -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 void com_where(wordlist *wl); - -/* mw_coms.c */ -extern void com_removecirc(wordlist *wl); /* numparse.c */ @@ -285,21 +219,6 @@ extern int ft_findpoint(double pt, double *lims, int maxp, int minp, bool islog) extern double * ft_minmax(struct dvec *v, bool real); extern void ft_graf(struct dvec *v, struct dvec *xs, bool nostart); -/* postcoms.c */ - -extern void com_cross(wordlist *wl); -extern void com_display(wordlist *wl); -extern void com_let(wordlist *wl); -extern void com_unlet(wordlist *wl); -extern void com_load(wordlist *wl); -extern void com_print(wordlist *wl); -extern void com_write(wordlist *wl); -extern void com_write_sparam(wordlist *wl); -extern void com_destroy(wordlist *wl); -extern void com_splot(wordlist *wl); -extern void com_setscale(wordlist *wl); -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); @@ -309,30 +228,15 @@ extern struct plot *raw_read(char *name); /* meas.c */ extern void do_measure(char *what, bool chk_only); extern bool check_autostop(char *what); -extern void com_meas(wordlist *wl); /* randnumb.c */ extern void TausSeed(void); /* resource.c */ -extern void com_rusage(wordlist *wl); extern void ft_ckspace(void); /* runcoms.c */ -extern void com_ac(wordlist *wl); -extern void com_dc(wordlist *wl); -extern void com_op(wordlist *wl); -extern void com_pz(wordlist *wl); -extern void com_sens(wordlist *wl); -extern void com_rset(wordlist *wl); -extern void com_resume(wordlist *wl); -extern void com_run(wordlist *wl); -extern void com_tran(wordlist *wl); -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(char *file); extern bool ft_getOutReq(FILE **, struct plot **, bool *, char *, char *); @@ -360,8 +264,6 @@ extern struct variable *if_getstat(CKTcircuit *ckt, char *name); /* typesdef.c */ -extern void com_dftype(wordlist *); -extern void com_stype(wordlist *); extern char *ft_typabbrev(int); extern char *ft_typenames(int); extern char *ft_plotabbrev(char *); @@ -397,9 +299,6 @@ extern void vec_transpose(struct dvec *v); extern bool ft_intrpt; extern bool ft_setflag; -/* newcoms.c */ -extern void com_reshape(wordlist *wl); - /* dimens.c */ extern void dimstring(int *data, int length, char *retstring); extern int atodims(char *p, int *data, int *outlength); diff --git a/src/main.c b/src/main.c index 0a9da75fb..4bb97be8c 100644 --- a/src/main.c +++ b/src/main.c @@ -60,6 +60,7 @@ extern int rl_catch_signals; /* missing from editline/readline.h */ #include "frontend/variable.h" #include "frontend/display.h" /* added by SDB to pick up Input() fcn */ #include "frontend/signal_handler.h" +#include "frontend/misccoms.h" #include "compatmode.h" /* saj xspice headers */ diff --git a/visualc/vngspice.vcproj b/visualc/vngspice.vcproj index bd79c97d9..8aad3b0a1 100644 --- a/visualc/vngspice.vcproj +++ b/visualc/vngspice.vcproj @@ -1,4 +1,4 @@ - + + +