From ae8c1b8e7dc55935ff0b6cbcf4048371de978e81 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 14 May 2017 10:28:42 +0200 Subject: [PATCH] ngspiceMODULEdefs.h.xml, add min max for the sake of XXXguesstopology.c --- src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml index 5586d4d1e..2e0955b1b 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml @@ -104,6 +104,9 @@ if(isinf((double) var)) \\ exit(1); /*__asm__ __volatile__ ("int \$03");*/ \\ } +static inline double max(double x,double y) { return ((x)>(y))?(x):(y); } +static inline double min(double x,double y) { return ((x)<(y))?(x):(y); } + /* ngspice \$simparam variables gdev (1/Ohms): Additional conductance to be added to nonlinear branches for conductance homotopy convergence algorithm. gmin (1/Ohms): Minimum conductance placed in parallel with nonlinear branches.