Browse Source

cleanup, rename PTlog --> PTlog10, PTF_LOG --> PTF_LOG10 (`B' language)

pre-master-46
rlar 12 years ago
parent
commit
93a212ca3c
  1. 2
      src/include/ngspice/inpptree.h
  2. 4
      src/spicelib/parser/inpptree.c
  3. 2
      src/spicelib/parser/inpxx.h
  4. 2
      src/spicelib/parser/ptfuncs.c

2
src/include/ngspice/inpptree.h

@ -101,7 +101,7 @@ void INPptPrint(char *str, IFparseTree * ptree);
#define PTF_COSH 7 #define PTF_COSH 7
#define PTF_EXP 8 #define PTF_EXP 8
#define PTF_LN 9 #define PTF_LN 9
#define PTF_LOG 10
#define PTF_LOG10 10
#define PTF_SIN 11 #define PTF_SIN 11
#define PTF_SINH 12 #define PTF_SINH 12
#define PTF_SQRT 13 #define PTF_SQRT 13

4
src/spicelib/parser/inpptree.c

@ -144,7 +144,7 @@ static struct func {
{ "cosh", PTF_COSH, (void(*)(void)) PTcosh } , { "cosh", PTF_COSH, (void(*)(void)) PTcosh } ,
{ "exp", PTF_EXP, (void(*)(void)) PTexp } , { "exp", PTF_EXP, (void(*)(void)) PTexp } ,
{ "ln", PTF_LN, (void(*)(void)) PTln } , { "ln", PTF_LN, (void(*)(void)) PTln } ,
{ "log", PTF_LOG, (void(*)(void)) PTlog } ,
{ "log", PTF_LOG10, (void(*)(void)) PTlog10 } ,
{ "sgn", PTF_SGN, (void(*)(void)) PTsgn } , { "sgn", PTF_SGN, (void(*)(void)) PTsgn } ,
{ "sin", PTF_SIN, (void(*)(void)) PTsin } , { "sin", PTF_SIN, (void(*)(void)) PTsin } ,
{ "sinh", PTF_SINH, (void(*)(void)) PTsinh } , { "sinh", PTF_SINH, (void(*)(void)) PTsinh } ,
@ -435,7 +435,7 @@ static INPparseNode *PTdifferentiate(INPparseNode * p, int varnum)
arg1 = mkb(PT_DIVIDE, mkcon(1.0), p->left); arg1 = mkb(PT_DIVIDE, mkcon(1.0), p->left);
break; break;
case PTF_LOG: /* log(e) / u */
case PTF_LOG10: /* log(e) / u */
arg1 = mkb(PT_DIVIDE, mkcon(M_LOG10E), p->left); arg1 = mkb(PT_DIVIDE, mkcon(M_LOG10E), p->left);
break; break;

2
src/spicelib/parser/inpxx.h

@ -56,7 +56,7 @@ double PTcos(double arg);
double PTcosh(double arg); double PTcosh(double arg);
double PTexp(double arg); double PTexp(double arg);
double PTln(double arg); double PTln(double arg);
double PTlog(double arg);
double PTlog10(double arg);
double PTsin(double arg); double PTsin(double arg);
double PTsinh(double arg); double PTsinh(double arg);
double PTsqrt(double arg); double PTsqrt(double arg);

2
src/spicelib/parser/ptfuncs.c

@ -232,7 +232,7 @@ PTln(double arg)
} }
double double
PTlog(double arg)
PTlog10(double arg)
{ {
if (arg < 0.0) if (arg < 0.0)
return (HUGE); return (HUGE);

Loading…
Cancel
Save