From 2cf2693706afb9390612eb37e61f3cb8f0aa5b6f Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 12 Nov 2023 17:04:36 +0100 Subject: [PATCH] few code cleanings --- src/frontend/inp.c | 5 +++-- src/frontend/inpcom.c | 2 ++ src/maths/cmaths/cmath2.h | 1 + src/xspice/cm/cmexport.c | 2 -- src/xspice/cm/cmutil.c | 2 -- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/frontend/inp.c b/src/frontend/inp.c index aba8450d1..80400988d 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -57,7 +57,7 @@ static wordlist *inp_savecurrents(struct card *deck, struct card *options, wordlist *wl, wordlist *controls); static void recifeval(struct card *pdeck); static char *upper(register char *string); -static void rem_unused_mos_models(struct card* deck); +//static void rem_unused_mos_models(struct card* deck); extern void com_optran(wordlist * wl); extern void tprint(struct card *deck); @@ -2540,7 +2540,7 @@ struct mlist { bool used; bool checked; }; - +#ifdef NONE /* Finally get rid of unused MOS models */ static void rem_unused_mos_models(struct card* deck) { struct card *tmpc, *tmppc = NULL; @@ -2744,3 +2744,4 @@ static void rem_unused_mos_models(struct card* deck) { modellist = tlist; } } +#endif diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 8e5ffe1d2..0993e1712 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -584,6 +584,7 @@ static void delete_names(struct names *p) } #ifndef _MSC_VER +#ifdef CIDER /* concatenate 2 strings, with space if spa == TRUE, return malloced string (replacement for tprintf, which is not efficient enough when reading PDKs @@ -613,6 +614,7 @@ static char *cat2strings(char *s1, char *s2, bool spa) return strsum; } #endif +#endif /* line1 diff --git a/src/maths/cmaths/cmath2.h b/src/maths/cmaths/cmath2.h index 897518721..31bd4c1a0 100644 --- a/src/maths/cmaths/cmath2.h +++ b/src/maths/cmaths/cmath2.h @@ -23,6 +23,7 @@ void * cx_mean(void *data, short int type, int length, int *newlength, short int void * cx_stddev(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_length(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_vector(void *data, short int type, int length, int *newlength, short int *newtype); +void * cx_cvector(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_unitvec(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_plus(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_minus(void *data1, void *data2, short int datatype1, short int datatype2, int length); diff --git a/src/xspice/cm/cmexport.c b/src/xspice/cm/cmexport.c index 0e65a1f75..a644cb921 100644 --- a/src/xspice/cm/cmexport.c +++ b/src/xspice/cm/cmexport.c @@ -3,8 +3,6 @@ #include "ngspice/cm.h" #include "ngspice/dllitf.h" -extern bool cp_getvar(char *, enum cp_types, void *, size_t); - /*how annoying!, needed for structure below*/ static void *tcalloc(size_t a, size_t b) { return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */ diff --git a/src/xspice/cm/cmutil.c b/src/xspice/cm/cmutil.c index ee69a0f99..88787e8ac 100644 --- a/src/xspice/cm/cmutil.c +++ b/src/xspice/cm/cmutil.c @@ -52,8 +52,6 @@ NON-STANDARD FEATURES #include #include "ngspice/cm.h" -extern void controlled_exit(const int); - /* Corner Smoothing Function ************************************ * * * The following function smooths the transition between two *