diff --git a/ChangeLog b/ChangeLog
index f7ec1474e..fb5e6b6b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2005-03-17 Paolo Nenzi
+
+ * src/main.c: Applied patch sent by Steven Borley
+ that removed the duplicate
+ declaration application_name and gnu_history_file, removed the
+ "static" keyword in shutdown() and set NULL as return value in
+ function prompt() when non prompt is passed to readline().
+
+ * src/ngspice.txt: Applied patch sent by Steven Borley
+ that fixed a few arrors that
+ corrputed text output.
+
+ * configure.in: Applied patch sent by Steven Borley
+ that fixes compiler warnings
+ on MAC OSX (related to the linking order of X libraries). The
+ remaining changes fix errors in spelling.
+
+ * tests/bin/check.sh: Applied patch sent by Steven Borley
+ that added support for Mac OSX
+ and a default case for not (yet) supported architectures.
+
+ * src/frontend/aspice.c: Applied patch sent by Steven Borley
+ that fixedscompiler warning on
+ Mac OSX in definition of "status".
+
+ * src/spicelib/devices/bsim3/b3set.c: Applied patch sent by Steven
+ Borley that remove the compiler
+ warnings about ambiguos "else".
+
2005-03-13 Paolo Nenzi
* tests/bin/check.sh: Changed the previous check script with the one
diff --git a/configure.in b/configure.in
index c6dc2d0b4..48126544c 100644
--- a/configure.in
+++ b/configure.in
@@ -109,7 +109,7 @@ dnl --enable-experimental : define EXPERIMENTAL_CODE for the code
AC_ARG_ENABLE(experimental,
[ --enable-experimental Enable some experimental code])
-dnl --enable-expdevices : Enable the compilation of experimental deviced
+dnl --enable-expdevices : Enable the compilation of experimental devices
AC_ARG_ENABLE(expdevices,
[ --enable-expdevices Enable experimental devices (they do not compile)])
@@ -119,11 +119,11 @@ AC_ARG_ENABLE(ekv,
dnl --enable-xspice: define XSPICE in the code. This is for xspice support
AC_ARG_ENABLE(xspice,
- [ --enable-xspice Enable XSpice enchancements, (experimental) ])
+ [ --enable-xspice Enable XSpice enhancements, (experimental) ])
dnl --enable-cider: define CIDER in the code. This is for CIDER support
AC_ARG_ENABLE(cider,
- [ --enable-cider Enable CIDER enchancements, (experimental) ])
+ [ --enable-cider Enable CIDER enhancements, (experimental) ])
dnl --enable-cluster: define CLUSTER in the code. This is for cluster support
AC_ARG_ENABLE(cluster,
@@ -199,7 +199,7 @@ dnl CFLAGS="$CFLAGS -Werror"
fi
-dnl Chech system we're on , and tune accordingly
+dnl Check system we're on , and tune accordingly
AC_CANONICAL_HOST
@@ -239,13 +239,21 @@ dnl tests and compile without X11 support - otherwise, check if the following
dnl libraries are present (error if they are not)
dnl In CYGWIN library ordering has to be changed. Is this compatible to LINUX?
dnl XShmAttach is a struct in CYGWIN, not a function
+dnl SJB: 13th march 2005
+dnl Library order is giving linker warnings on MacOSX
+dnl It's not clear to me which order is required for Cygwin (see comment above)
+dnl and neither can I find any authoritative answer for the correct link order
+dnl for MacOSX or Linux, but
+dnl -lXaw -lXmu -lXt -lXext -lX11
+dnl seems to be the popular choice.
+dnl (The previous order was -lX11 -lXt -lXext -lXmu -lXaw)
if test ! "$no_x" = "yes" ; then
- X_LIBS="$X_LIBS -lX11 -lXt"
- AC_CHECK_LIB(Xext, XShmAttach,X_LIBS="$X_LIBS -lXext",AC_MSG_ERROR(Couldn't find Xext librairies), $X_LIBS $X_EXTRA_LIBS)
- AC_CHECK_LIB(Xmu,main,X_LIBS="$X_LIBS -lXmu",AC_MSG_ERROR(Couldn't find Xmu librairies), $X_LIBS $X_EXTRA_LIBS)
- AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS -lXaw",AC_MSG_ERROR(Couldn't find Xaw librairies),$X_LIBS $X_EXTRA_LIBS)
-
+ AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS -lXaw",AC_MSG_ERROR(Couldn't find Xaw library),$X_LIBS $X_EXTRA_LIBS)
+ AC_CHECK_LIB(Xmu,main,X_LIBS="$X_LIBS -lXmu",AC_MSG_ERROR(Couldn't find Xmu library), $X_LIBS $X_EXTRA_LIBS)
+ X_LIBS="$X_LIBS -lXt"
+ AC_CHECK_LIB(Xext, XShmAttach,X_LIBS="$X_LIBS -lXext",AC_MSG_ERROR(Couldn't find Xext library), $X_LIBS $X_EXTRA_LIBS)
+ X_LIBS="$X_LIBS -lX11"
fi ;;
@@ -267,7 +275,7 @@ AC_CHECK_HEADERS(ctype.h unistd.h pwd.h fcntl.h string.h)
AC_HEADER_SYS_WAIT
AC_HEADER_STAT
-dnl Check time and ressources headers and functions:
+dnl Check time and resources headers and functions:
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
@@ -499,7 +507,7 @@ AC_SUBST(XSPICELIB2)
AC_SUBST(XSPICETESTS)
AC_SUBST(XSPICEINIT)
-dnl Add CIDER enhacements to ngspice.
+dnl Add CIDER enhancements to ngspice.
if test "$enable_cider" = "yes"; then
AC_MSG_RESULT(CIDER features enabled)
AC_DEFINE(CIDER)
diff --git a/src/frontend/aspice.c b/src/frontend/aspice.c
index 8a4d269dc..1a8083321 100644
--- a/src/frontend/aspice.c
+++ b/src/frontend/aspice.c
@@ -178,7 +178,7 @@ sigchild(void)
#if defined(__NetBSD__) || defined(SOLARIS)
pid_t status;
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__APPLE__)
int status;
#else
union wait status;
diff --git a/src/main.c b/src/main.c
index 129e20ca8..0e9ee9489 100644
--- a/src/main.c
+++ b/src/main.c
@@ -75,11 +75,6 @@ bool ft_intrpt = FALSE; /* Set by the (void) signal handlers. TRUE = we've b
bool ft_setflag = FALSE; /* TRUE = Don't abort simulation after an interrupt. */
char *ft_rawfile = "rawspice.raw";
-#ifdef HAVE_GNUREADLINE
-char gnu_history_file[512];
-static char *application_name;
-#endif
-
bool oflag = FALSE; /* Output über redefinierte Funktionen */
FILE *flogp; // hvogt 15.12.2001
@@ -323,7 +318,7 @@ int SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator)
/* -------------------------------------------------------------------------- */
/* Shutdown gracefully. */
-int
+static int
shutdown(int exitval)
{
cleanvars();
@@ -348,7 +343,7 @@ prompt()
char *p = pbuf, *s;
if (cp_interactive == FALSE)
- return;
+ return NULL; /* NULL means no prompt */
if (cp_promptstring == NULL)
s = "-> ";
else
diff --git a/src/ngspice.idx b/src/ngspice.idx
index 6cda8a5f9..0d02a610d 100644
Binary files a/src/ngspice.idx and b/src/ngspice.idx differ
diff --git a/src/ngspice.txt b/src/ngspice.txt
index 83cdc5395..9b928922c 100644
--- a/src/ngspice.txt
+++ b/src/ngspice.txt
@@ -4908,6 +4908,7 @@ TEXT: H any input file is considered a title line and not parsed
TEXT: H but kept as the name of the circuit. The exception to
TEXT: H this rule is the file ._s_p_i_c_e_i_n_i_t. Thus, a Spice3 com-
TEXT: H mand script must begin with a blank line and then with a
+TEXT: H .control line. Also, any line beginning with the char-
TEXT: H acters *# is considered a control line. This makes it
TEXT: H possible to imbed commands in Spice3 input files that
TEXT: H are ignored by earlier versions of Spice2
@@ -5604,26 +5605,28 @@ TEXT: H
TEXT: H There are several set variables that Spice3 uses but
TEXT: H Nutmeg does not. They are:
TEXT: H
-TEXT: H editor The editor to use for the edit command.
-TEXT: H modelcard The name of the model card (normally
-TEXT: H May.in -432u
-TEXT: H noaskquit Do not check to make sure that there are
-TEXT: H no circuits suspended and no plots un-
-TEXT: H saved. Normally Spice3 warns the user
-TEXT: H when he tries to quit if this is the
-TEXT: H case.
-TEXT: H nobjthack Assume that BJTs have 4 nodes.
-TEXT: H noparse Don't attempt to parse input files when
-TEXT: H they are read in (useful for debugging).
-TEXT: H Of course, they cannot be run if they
-TEXT: H are not parsed.
-TEXT: H nosubckt Don't expand subcircuits.
-TEXT: H renumber Renumber input lines when an input file
-TEXT: H has .include's.
-TEXT: H subend The card to end subcircuits (normally
-TEXT: H subinvoke The prefix to invoke subcircuits (nor-
-TEXT: H mally x).
-TEXT: H substart The card to begin subcircuits (normally
+TEXT: H editor The editor to use for the edit command.
+TEXT: H modelcard The name of the model card (normally
+TEXT: H .model).
+TEXT: H noaskquit Do not check to make sure that there are
+TEXT: H no circuits suspended and no plots un-
+TEXT: H saved. Normally Spice3 warns the user
+TEXT: H when he tries to quit if this is the
+TEXT: H case.
+TEXT: H nobjthack Assume that BJTs have 4 nodes.
+TEXT: H noparse Don't attempt to parse input files when
+TEXT: H they are read in (useful for debugging).
+TEXT: H Of course, they cannot be run if they
+TEXT: H are not parsed.
+TEXT: H nosubckt Don't expand subcircuits.
+TEXT: H renumber Renumber input lines when an input file
+TEXT: H has .include's.
+TEXT: H subend The card to end subcircuits (normally
+TEXT: H .ends).
+TEXT: H subinvoke The prefix to invoke subcircuits (nor-
+TEXT: H mally x).
+TEXT: H substart The card to begin subcircuits (normally
+TEXT: H .subckt).
TEXT: H
TEXT: H
diff --git a/src/spicelib/devices/bsim3/b3set.c b/src/spicelib/devices/bsim3/b3set.c
index c70b7040a..be2ad4b72 100644
--- a/src/spicelib/devices/bsim3/b3set.c
+++ b/src/spicelib/devices/bsim3/b3set.c
@@ -910,10 +910,12 @@ IFuid tmpName;
if (!here->BSIM3drainPerimeterGiven)
here->BSIM3drainPerimeter = 0.0;
if (!here->BSIM3drainSquaresGiven)
+ {
if (model->BSIM3acmMod == 0)
here->BSIM3drainSquares = 1.0;
else
here->BSIM3drainSquares = 0.0;
+ }
if (!here->BSIM3icVBSGiven)
here->BSIM3icVBS = 0.0;
if (!here->BSIM3icVDSGiven)
@@ -927,10 +929,12 @@ IFuid tmpName;
if (!here->BSIM3sourcePerimeterGiven)
here->BSIM3sourcePerimeter = 0.0;
if (!here->BSIM3sourceSquaresGiven)
+ {
if (model->BSIM3acmMod == 0)
here->BSIM3sourceSquares = 1.0;
else
here->BSIM3sourceSquares = 0.0;
+ }
if (!here->BSIM3wGiven)
here->BSIM3w = 5.0e-6;
if (!here->BSIM3nqsModGiven)
diff --git a/tests/bin/check.sh b/tests/bin/check.sh
index 060a34fc9..f1617d0ef 100644
--- a/tests/bin/check.sh
+++ b/tests/bin/check.sh
@@ -8,7 +8,7 @@ FILTER="Note|Circuit|Trying|Reference|Date|Doing|---|v-sweep|time|Error|Warning|
testname=`basename $TEST .cir`
testdir=`dirname $TEST`
-HOST_TYPE=`/bin/uname -srvm`
+HOST_TYPE=`uname -srvm`
case $HOST_TYPE in
MINGW32*)
@@ -23,7 +23,7 @@ case $HOST_TYPE in
sed -e 's/e-000/e+000/g' $testname.test | sed 's/e-0/e-/g' | sed 's/e+0/e+/g' > $testname.test_tmp
mv $testname.test_tmp $testname.test
;;
- Linux*)
+ Linux*|Darwin*)
$SPICE --batch $testdir/$testname.cir >$testname.test &&\
egrep -v $FILTER $testname.test > $testname.test_tmp &&\
egrep -v $FILTER $testdir/$testname.out > $testname.out_tmp
@@ -43,6 +43,11 @@ case $HOST_TYPE in
fi
rm -f $testname.test_tmp $testname.out_tmp
;;
+ *)
+ echo Unknown system type!
+ echo $HOST_TYPE
+ echo ./tests/bin/checks.sh may need updating for your system
+ ;;
esac
exit 1