From c926f469863b28eaebc806c66e7a5eea44ee8aaa Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 12 Sep 2014 19:06:13 +0200 Subject: [PATCH] cleanup, rename rename cx_log --> cx_log10 (.control language) --- src/frontend/parse.c | 4 ++-- src/include/ngspice/fteext.h | 2 +- src/maths/cmaths/cmath1.c | 6 +++--- src/maths/cmaths/cmath1.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontend/parse.c b/src/frontend/parse.c index 300447779..717133dc5 100644 --- a/src/frontend/parse.c +++ b/src/frontend/parse.c @@ -149,8 +149,8 @@ struct func ft_funcs[] = { { "imag", cx_imag }, { "im", cx_imag }, { "db", cx_db }, - { "log", cx_log }, - { "log10", cx_log }, + { "log", cx_log10 }, + { "log10", cx_log10 }, { "ln", cx_ln }, { "exp", cx_exp }, { "abs", cx_mag }, diff --git a/src/include/ngspice/fteext.h b/src/include/ngspice/fteext.h index a9bd62a2d..30b9ad0f2 100644 --- a/src/include/ngspice/fteext.h +++ b/src/include/ngspice/fteext.h @@ -61,7 +61,7 @@ extern void *cx_real(void *, short int , int , int *, short int *); extern void *cx_imag(void *, short int , int , int *, short int *); extern void *cx_pos(void *, short int , int , int *, short int *); extern void *cx_db(void *, short int , int , int *, short int *); -extern void *cx_log(void *, short int , int , int *, short int *); +extern void *cx_log10(void *, short int , int , int *, short int *); extern void *cx_ln(void *, short int , int , int *, short int *); extern void *cx_exp(void *, short int , int , int *, short int *); extern void *cx_sqrt(void *, short int , int , int *, short int *); diff --git a/src/maths/cmaths/cmath1.c b/src/maths/cmaths/cmath1.c index d96e16cb0..e79a53f89 100644 --- a/src/maths/cmaths/cmath1.c +++ b/src/maths/cmaths/cmath1.c @@ -236,7 +236,7 @@ cx_db(void *data, short int type, int length, int *newlength, short int *newtype } void * -cx_log(void *data, short int type, int length, int *newlength, short int *newtype) +cx_log10(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { @@ -253,7 +253,7 @@ cx_log(void *data, short int type, int length, int *newlength, short int *newtyp /* Perhaps we should trap when td = 0.0, but Ken wants * this to be possible... */ - rcheck(td >= 0, "log"); + rcheck(td >= 0, "log10"); if (td == 0.0) { realpart(c[i]) = - log10(HUGE); imagpart(c[i]) = 0.0; @@ -272,7 +272,7 @@ cx_log(void *data, short int type, int length, int *newlength, short int *newtyp d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { - rcheck(dd[i] >= 0, "log"); + rcheck(dd[i] >= 0, "log10"); if (dd[i] == 0.0) d[i] = - log10(HUGE); else diff --git a/src/maths/cmaths/cmath1.h b/src/maths/cmaths/cmath1.h index b6456f3d7..a4e39690d 100644 --- a/src/maths/cmaths/cmath1.h +++ b/src/maths/cmaths/cmath1.h @@ -16,7 +16,7 @@ void * cx_real(void *data, short int type, int length, int *newlength, short int void * cx_imag(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_pos(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_db(void *data, short int type, int length, int *newlength, short int *newtype); -void * cx_log(void *data, short int type, int length, int *newlength, short int *newtype); +void * cx_log10(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_ln(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_exp(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sqrt(void *data, short int type, int length, int *newlength, short int *newtype);