|
From: Steven B. <sj...@sa...> - 2003-07-16 20:18:35
|
I would like to report that I have been able to compile and run the=20 ng-spice part of tclspice 0.2.11 under MacOSX with only some very small=20= changes. I have not yet tried 0.2.12, or tried the tcl parts at all=20 (yet). tclspice/src/frontend/parser/complete.c Modified conditional compilation macros for MacOSX tclspice/src/spicelib/devices/txl/txlsetup.c Fixed duplicate declaration of pool_vi_txl Just three observations 1. need to run from an X11 terminal shell (I'm using X11 beta 3 freely=20= available from www.apple.com) 2. I need to sun set the SPICE_NO_DATASEG_CHECK environment variable=20= before running ngspice or it crashes with a Bus error at startup. This can be done with a shell script. For example #!/bin/csh # #=A0script to configure and run ngspice # setenv SPICE_NO_DATASEG_CHECK "1" ngspice $1 $2 $3 3. ngspice.idx didn't get installed. It needs to be in /usr/local/share/ng-spice-rework/helpdir. = What I=20 found here was ngspice.txt. To fix I manually copied ngspice.idx from the top-level tclspice=20= directory to this location. The diffs for the changes I made follow. Regards, Steven Borley diff -ruN tclspice-0.2.11/src/frontend/parser/complete.c=20 tclspice-0.2.11-sjb/src/frontend/parser/complete.c --- tclspice-0.2.11/src/frontend/parser/complete.c Tue Nov 26 = 11:39:31=20 2002 +++ tclspice-0.2.11-sjb/src/frontend/parser/complete.c Tue Jul 15=20 02:39:18 2003 @@ -5,6 +5,12 @@ **********/ /* + * SJB June 2003 + * Some changes to the conditional compilation macros to allow=20 compilation under MacOSX. + * I have used __APPLE_CC__ to indicate compiling under MacOSX - ther=20= may be a better way to do this but it works. + */ + +/* * Command completion code. We keep a data structure with information=20= on each * command, to make lookups fast. We also keep NCLASSES (which is=20 sort of * hardwired as 32) sets of keywords. Each command has an array of=20 NARGS @@ -412,7 +418,8 @@ # else # ifdef HAVE_TERMIOS_H -# ifdef __NetBSD__ +/*# ifdef __NetBSD__ SJB - replaced with the following line */ +# if defined(__NetBSD__) || defined(__APPLE_CC__) # define TCGETS # define TCSETS # endif @@ -425,7 +432,8 @@ # endif # endif -# if defined(TERM_GET) || defined(__NetBSD__) +/*# if defined(TERM_GET) || defined(__NetBSD__) SJB - replaced=20 with the following line */ +# if defined(TERM_GET) || defined(__NetBSD__) || defined(__APPLE_CC__) static bool ison =3D FALSE; if (cp_nocc || !cp_interactive || (ison =3D=3D on)) @@ -433,7 +441,8 @@ ison =3D on; if (ison =3D=3D TRUE) { -#ifdef __NetBSD__ +/*#ifdef __NetBSD__ SJB - replaced with the following line */ +#if defined(__NetBSD__) || defined(__APPLE_CC__) tcgetattr(fileno(cp_in),&OS_Buf); #else (void) ioctl(fileno(cp_in), TERM_GET, (char *) &OS_Buf); @@ -442,13 +451,15 @@ sbuf.c_cc[VEOF] =3D 0; sbuf.c_cc[VEOL] =3D ESCAPE; sbuf.c_cc[VEOL2] =3D CNTRL_D; -#ifdef __NetBSD__ +/*#ifdef __NetBSD__ SJB - replaced with the following line */ +#if defined(__NetBSD__) || defined(__APPLE_CC__) tcsetattr(fileno(cp_in),TCSANOW,&sbuf); #else (void) ioctl(fileno(cp_in), TERM_SET, (char *) &sbuf); #endif } else { -#ifdef __NetBSD__ +/*#ifdef __NetBSD__ SJB - replaced with the following line */ +#if defined(__NetBSD__) || defined(__APPLE_CC__) tcsetattr(fileno(cp_in),TCSANOW,&OS_Buf); #else (void) ioctl(fileno(cp_in), TERM_SET, (char *) &OS_Buf); diff -ruN tclspice-0.2.11/src/spicelib/devices/txl/txlsetup.c=20 tclspice-0.2.11-sjb/src/spicelib/devices/txl/txlsetup.c --- tclspice-0.2.11/src/spicelib/devices/txl/txlsetup.c Tue Nov 26=20 11:38:45 2002 +++ tclspice-0.2.11-sjb/src/spicelib/devices/txl/txlsetup.c Tue Jul = 15=20 02:38:51 2003 @@ -4,6 +4,11 @@ Author: 1992 Charles Hough **********/ +/* + * SJB June 2003 + * Fixed duplicate declaration of pool_vi_txl + */ + #include "ngspice.h" #include <stdio.h> @@ -48,7 +53,7 @@ NODE *node_tab =3D NULL; NDnamePt ndn =3D NULL; -VI_list_txl *pool_vi_txl =3D NULL; +/* VI_list_txl *pool_vi_txl =3D NULL; sjb - removed because it = is also=20 in txlload.c (and not used in this file) */ /* pade.c */ /** |