ngspice/src/include/cpdefs.h

103 lines
2.4 KiB
C
Raw Normal View History

2000-04-27 22:03:57 +02:00
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
**********/
/*
* General stuff for the C-shell parser.
*/
/* Standard definitions */
#ifndef CPDEFS
#define CPDEFS
#include "cpstd.h"
#define MAXWORDS 512
/* Information about spice commands. */
struct comm {
* src/Makefile.am src/main.c src/sconvert.c src/analysis/cktdisto.c src/analysis/cktnoise.c src/analysis/noisean.c: Updates for the new header files. * src/maths/cmaths/cmath1.c src/maths/cmaths/cmath2.c src/maths/cmaths/cmath3.c src/maths/cmaths/cmath4.c: Updates for the new header files. * src/frontend/.cvsignore src/frontend/Makefile.am: Updates for the new files. * src/frontend/agraf.c src/frontend/aspice.c src/frontend/breakp.c src/frontend/breakp2.c src/frontend/circuits.c src/frontend/cpitf.c src/frontend/debugcom.c src/frontend/define.c src/frontend/diff.c src/frontend/dimens.c src/frontend/display.c src/frontend/doplot.c src/frontend/dotcards.c src/frontend/evaluate.c src/frontend/fourier.c src/frontend/graf.c src/frontend/grid.c src/frontend/inp.c src/frontend/inpcom.c src/frontend/interp.c src/frontend/linear.c src/frontend/misccoms.c src/frontend/misccoms.h src/frontend/miscvars.c src/frontend/mw_coms.c src/frontend/newcoms.c src/frontend/nutinp.c src/frontend/options.c src/frontend/outitf.c src/frontend/parse.c src/frontend/plotcurv.c src/frontend/points.c src/frontend/postcoms.c src/frontend/rawfile.c src/frontend/runcoms.c src/frontend/runcoms2.c src/frontend/shyu.c src/frontend/spec.c src/frontend/spiceif.c src/frontend/typesdef.c src/frontend/vectors.c src/frontend/where.c src/frontend/postcoms.c: Updates for the new header files. Some commands have moved into the new files below. * src/frontend/README src/frontend/com_compose.c src/frontend/com_compose.h src/frontend/com_display.c src/frontend/com_display.h src/frontend/com_let.c src/frontend/com_let.h src/frontend/com_setscale.c src/frontend/com_setscale.h src/frontend/commands.c src/frontend/commands.h src/frontend/completion.h src/frontend/streams.h src/frontend/testcommands.c: Separation into different com_* commands. This is a start. The rest of the subdirectory needs doing. * src/include/complex.h src/include/cpdefs.h src/include/cpextern.h src/include/cpstd.h src/include/fteconst.h src/include/ftedata.h src/include/ftedev.h src/include/fteext.h src/include/ftegraph.h src/include/fteparse.h src/include/dvec.h src/include/grid.h src/include/plot.h src/include/pnode.h src/include/sim.h src/include/variable.h src/include/wordlist.h src/include/bool.h: Separation of header files into smaller pieces. This limits recompilation to only the affected source files. The original header files have a warning message embedded to flag obsoleted use. * src/frontend/compose.c src/frontend/compose.h src/frontend/nutctab.c src/frontend/nutctab.h src/frontend/plot5.c src/frontend/plot5.h src/frontend/spcmdtab.c src/frontend/x11.c src/frontend/x11.h src/frontend/xgraph.c src/frontend/xgraph.h: Moved these files into src/frontend/plotting subdirectory. * src/frontend/plotting/.cvsignore src/frontend/plotting/Makefile.am src/frontend/plotting/plot5.c src/frontend/plotting/plot5.h src/frontend/plotting/plotting.c src/frontend/plotting/plotting.h src/frontend/plotting/pvec.c src/frontend/plotting/pvec.h src/frontend/plotting/x11.c src/frontend/plotting/x11.h src/frontend/plotting/xgraph.c src/frontend/plotting/xgraph.h: The new libplotting library with automake and CVS infrastructure.
2000-05-06 16:12:51 +02:00
/* The name of the command. */
char *co_comname;
/* The function that handles the command. */
void (*co_func) (wordlist *wl);
/* Collapse the arguments into a string. */
bool co_stringargs;
/* These can't be used from nutmeg. */
bool co_spiceonly;
/* Is this a "major" command? */
bool co_major;
/* Bitmasks for command completion. */
long co_cctypes[4];
/* print help message on this environment mask */
unsigned int co_env;
/* minimum number of arguments required */
int co_minargs;
/* maximum number of arguments allowed */
int co_maxargs;
/* The fn that prompts the user. */
void (*co_argfn) (wordlist *wl, struct comm *command);
/* When these are printed, printf(string, av[0]) .. */
char *co_help;
2000-04-27 22:03:57 +02:00
};
#define LOTS 1000
/* The history list. Things get put here after the first (basic) parse.
* The word list will change later, so be sure to copy it.
*/
struct histent {
int hi_event;
wordlist *hi_wlist;
struct histent *hi_next;
struct histent *hi_prev;
};
/* The values returned by cp_userset(). */
#define US_OK 1 /* Either not relevant or nothing special. */
#define US_READONLY 2 /* Complain and don't set this var. */
#define US_DONTRECORD 3 /* Ok, but don't keep track of this one. */
#define US_SIMVAR 4 /* OK, recorded in options struct */
#define US_NOSIMVAR 5 /* Not OK, simulation param but circuit not loaded */
/* Aliases. These will be expanded if the word is the first in an input
* line. The substitution string may contain arg selectors.
*/
struct alias {
char *al_name; /* The word to be substituted for. */
wordlist *al_text; /* What to substitute for it. */
struct alias *al_next;
struct alias *al_prev;
} ;
/* The current record of what characters are special. */
#define CPC_BRR 004 /* Break word to right of character. */
#define CPC_BRL 010 /* Break word to left of character. */
#define CT_ALIASES 1
#define CT_LABEL 15
/* Get all the extern definitions... */
#include "cpextern.h"
#endif /*CPDEFS*/