bugfix no. 2859013, comments
This commit is contained in:
parent
881908ec47
commit
2eba12d518
|
|
@ -1,3 +1,8 @@
|
||||||
|
2009-09-20 Holger Vogt
|
||||||
|
* inpmkmod.c: fix bug no. 2859013
|
||||||
|
* INSTALL corrected
|
||||||
|
* xspice/mif/mifgetmod.c: comments
|
||||||
|
|
||||||
2009-09-19 Holger Vogt
|
2009-09-19 Holger Vogt
|
||||||
* fteext.h, inpcom.c, inp.c, options.c, winmain.c:
|
* fteext.h, inpcom.c, inp.c, options.c, winmain.c:
|
||||||
variable ngdebug added, sets ft_ngdebug,
|
variable ngdebug added, sets ft_ngdebug,
|
||||||
|
|
|
||||||
186
INSTALL
186
INSTALL
|
|
@ -268,8 +268,8 @@ This file describes the procedures to install ngspice from sources.
|
||||||
So if you intend to create a separate object file tree like
|
So if you intend to create a separate object file tree like
|
||||||
ng-spice-rework/ngbuild/release, you may do the following, starting
|
ng-spice-rework/ngbuild/release, you may do the following, starting
|
||||||
from the default directory ng-spice-rework:
|
from the default directory ng-spice-rework:
|
||||||
|
|
||||||
mkdir -p ngbuild/release
|
mkdir -p ngbuild/release
|
||||||
cd ngbuild/release
|
cd ngbuild/release
|
||||||
../../configure <some options>
|
../../configure <some options>
|
||||||
make install
|
make install
|
||||||
|
|
@ -470,112 +470,104 @@ This file describes the procedures to install ngspice from sources.
|
||||||
the code models *.cm for XSpice requires installation of BISON and FLEX to
|
the code models *.cm for XSpice requires installation of BISON and FLEX to
|
||||||
MSYS. A typical installation was tested with:
|
MSYS. A typical installation was tested with:
|
||||||
|
|
||||||
bison-2.0-MSYS.tar.gz
|
bison-2.0-MSYS.tar.gz
|
||||||
flex-2.5.4a-1-bin.zip
|
flex-2.5.4a-1-bin.zip
|
||||||
libiconv-1.9.2-1-bin.zip
|
libiconv-1.9.2-1-bin.zip
|
||||||
libintl-0.14.4-bin.zip
|
libintl-0.14.4-bin.zip
|
||||||
|
|
||||||
Bison 2.0 is now superseeded by newer releases (Bison 2.3, see
|
Bison 2.0 is now superseeded by newer releases (Bison 2.3, see
|
||||||
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879)
|
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879)
|
||||||
|
|
||||||
The last three are from
|
The last three are from
|
||||||
http://sourceforge.net/project/showfiles.php?group_id=23617.
|
http://sourceforge.net/project/showfiles.php?group_id=23617.
|
||||||
|
|
||||||
You may also look at
|
You may also look at
|
||||||
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
|
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
|
||||||
http://www.mingw.org/wiki/MSYS
|
http://www.mingw.org/wiki/MSYS
|
||||||
http://www.mingw.org/wiki/HOWTO_Create_an_MSYS_Build_Environment.
|
http://www.mingw.org/wiki/HOWTO_Create_an_MSYS_Build_Environment.
|
||||||
|
|
||||||
|
|
||||||
9.2 make ngspice with MS Visual Studio 2008
|
9.2 make ngspice with MS Visual Studio 2008
|
||||||
|
|
||||||
ngspice may now be compiled with MS Visual Studio 2008.
|
ngspice may now be compiled with MS Visual Studio 2008.
|
||||||
|
|
||||||
CIDER and XSPICE are included, but the code models for XSPICE
|
CIDER and XSPICE are included, but the code models for XSPICE
|
||||||
(*.cm) are not (yet) made. You may however use the code models
|
(*.cm) are not (yet) made. You may however use the code models
|
||||||
created with MINGW (which in fact are dlls), as e.g. found in
|
created with MINGW (which in fact are dlls), as e.g. found in
|
||||||
the ngspice binary distribution.
|
the ngspice binary distribution.
|
||||||
|
|
||||||
There is currently no installation procedure provided, you may
|
There is currently no installation procedure provided, you may
|
||||||
however install the executable manually as described below:
|
however install the executable manually as described in the
|
||||||
|
installation tree below.
|
||||||
|
|
||||||
|
The directory (visualc) with its files
|
||||||
|
vngspice.sln (project starter) and
|
||||||
|
vngspice.vcproj (project contents)
|
||||||
|
allows to compile and link ngspice with MS Visual Studio 2008.
|
||||||
|
The project is probably not compatible with Visual Studio 2005.
|
||||||
|
|
||||||
|
/visualc/include contains a dedicated config.h file. It contains the
|
||||||
|
preprocessor definitions required to properly compile the code.
|
||||||
|
strings.h has been necessary during setting up the project.
|
||||||
|
|
||||||
The directory (visualc) with its files
|
|
||||||
vngspice.sln (project starter) and
|
|
||||||
vngspice.vcproj (project contents)
|
|
||||||
allows to compile and link ngspice with MS Visual Studio 2008.
|
|
||||||
The project is probably not compatible with Visual Studio 2005.
|
|
||||||
|
|
||||||
CIDER and XSPICE are included, but the code models for XSPICE
|
|
||||||
(*.cm) are not (yet) made. You may however use the code models
|
|
||||||
created with MINGW (which in fact are dlls), as e.g. found in
|
|
||||||
the ngspice binary distribution.
|
|
||||||
|
|
||||||
There is currently no installation procedure provided, you may
|
|
||||||
however install the executable manually as described in the
|
|
||||||
installation tree below.
|
|
||||||
|
|
||||||
/visualc/include contains a dedicated config.h file. It contains the
|
|
||||||
preprocessor definitions required to properly compile the code.
|
|
||||||
strings.h has been necessary during setting up the project.
|
|
||||||
|
|
||||||
Install Microsoft Visual Studio 2008 C++ . The
|
Install Microsoft Visual Studio 2008 C++ . The
|
||||||
MS VS 2008 C++ Express Edition (which is available at no cost from
|
MS VS 2008 C++ Express Edition (which is available at no cost from
|
||||||
http://www.microsoft.com/express/product/default.aspx) is adequate.
|
http://www.microsoft.com/express/product/default.aspx) is adequate.
|
||||||
|
|
||||||
Goto /ng-spice-rework/visualc.
|
Goto /ng-spice-rework/visualc.
|
||||||
|
|
||||||
Start MS Visual Studio 2008 by double click onto vngspice.sln.
|
Start MS Visual Studio 2008 by double click onto vngspice.sln.
|
||||||
|
|
||||||
After MS Visual Studio has opened up, select debug or release version
|
After MS Visual Studio has opened up, select debug or release version
|
||||||
by checking 'Erstellen' , 'Konfigurations-Manager' 'Debug' or 'Release'.
|
by checking 'Erstellen' , 'Konfigurations-Manager' 'Debug' or 'Release'.
|
||||||
|
|
||||||
Start making ngspice (called vngspice.exe) by selecting 'Erstellen' and
|
Start making ngspice (called vngspice.exe) by selecting 'Erstellen' and
|
||||||
'vngspice neu erstellen'.
|
'vngspice neu erstellen'.
|
||||||
|
|
||||||
Object files will be created and stored in visualc/debug or visualc/release.
|
Object files will be created and stored in visualc/debug or visualc/release.
|
||||||
The executable will be stored to visualc/debug/bin or visualc/release/bin.
|
The executable will be stored to visualc/debug/bin or visualc/release/bin.
|
||||||
|
|
||||||
An installation tree (as provided with MINGW make install) and also used by
|
An installation tree (as provided with MINGW make install) and also used by
|
||||||
vngspice is (maybe created manually):
|
vngspice is (maybe created manually):
|
||||||
|
|
||||||
C:\Spice\
|
C:\Spice\
|
||||||
bin\
|
bin\
|
||||||
ngspice.exe
|
ngspice.exe
|
||||||
nghelp.exe
|
nghelp.exe
|
||||||
ngmakeidx.exe
|
ngmakeidx.exe
|
||||||
ngnutmeg.exe
|
ngnutmeg.exe
|
||||||
cmpp.exe
|
cmpp.exe
|
||||||
lib\
|
lib\
|
||||||
spice\
|
spice\
|
||||||
analog.cm
|
analog.cm
|
||||||
digital.cm
|
digital.cm
|
||||||
spice2poly.cm
|
spice2poly.cm
|
||||||
extradev.cm
|
extradev.cm
|
||||||
extravt.cm
|
extravt.cm
|
||||||
share\
|
share\
|
||||||
info\
|
info\
|
||||||
dir
|
dir
|
||||||
ngspice.info
|
ngspice.info
|
||||||
ngspice.info-1
|
ngspice.info-1
|
||||||
..
|
..
|
||||||
ngspice.info-10
|
ngspice.info-10
|
||||||
man\
|
man\
|
||||||
man1\
|
man1\
|
||||||
ngmultidec.1
|
ngmultidec.1
|
||||||
ngnutmeg.1
|
ngnutmeg.1
|
||||||
ngsconvert.1
|
ngsconvert.1
|
||||||
ngspice.1
|
ngspice.1
|
||||||
ng-spice-rework\
|
ng-spice-rework\
|
||||||
helpdir\
|
helpdir\
|
||||||
ngspice.idx
|
ngspice.idx
|
||||||
ngspice.txt
|
ngspice.txt
|
||||||
scripts\
|
scripts\
|
||||||
ciderinit
|
ciderinit
|
||||||
devaxis
|
devaxis
|
||||||
devload
|
devload
|
||||||
setplot
|
setplot
|
||||||
spectrum
|
spectrum
|
||||||
spinit
|
spinit
|
||||||
|
|
||||||
If you intend to install vngspice into another directory, e.g. D:\MySpice,
|
If you intend to install vngspice into another directory, e.g. D:\MySpice,
|
||||||
you have to edit /visualc/include/config.h and alter the entries:
|
you have to edit /visualc/include/config.h and alter the entries:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Author: 1985 Thomas L. Quarles
|
||||||
#include "inp.h"
|
#include "inp.h"
|
||||||
|
|
||||||
/* global input model table. */
|
/* global input model table. */
|
||||||
INPmodel *modtab;
|
INPmodel *modtab = NULL;
|
||||||
|
|
||||||
/*--------------------------------------------------------------
|
/*--------------------------------------------------------------
|
||||||
* This fcn takes the model name and looks to see if it is already
|
* This fcn takes the model name and looks to see if it is already
|
||||||
|
|
@ -21,35 +21,35 @@ INPmodel *modtab;
|
||||||
|
|
||||||
int INPmakeMod(char *token, int type, card * line)
|
int INPmakeMod(char *token, int type, card * line)
|
||||||
{
|
{
|
||||||
register INPmodel **i;
|
register INPmodel **i;
|
||||||
|
|
||||||
/* First cycle through model table and see if model name
|
/* First cycle through model table and see if model name
|
||||||
already exists in there. If it does, just return. */
|
already exists in there. If it does, just return. */
|
||||||
for (i = &modtab; *i != (INPmodel *) NULL; i = &((*i)->INPnextModel)) {
|
for (i = &modtab; *i != (INPmodel *) NULL; i = &((*i)->INPnextModel)) {
|
||||||
if (strcmp((*i)->INPmodName, token) == 0) {
|
if (strcmp((*i)->INPmodName, token) == 0) {
|
||||||
return (OK);
|
return (OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Model name was not already in model table. Therefore stick
|
/* Model name was not already in model table. Therefore stick
|
||||||
it in the model table. Then reutrn. */
|
it in the model table. Then return. */
|
||||||
|
|
||||||
#ifdef TRACE
|
#ifdef TRACE
|
||||||
/* debug statement */
|
/* debug statement */
|
||||||
printf("In INPmakeMod, about to insert new model name = %s . . .\n", token);
|
printf("In INPmakeMod, about to insert new model name = %s . . .\n", token);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*i = (INPmodel *) MALLOC(sizeof(INPmodel));
|
*i = (INPmodel *) MALLOC(sizeof(INPmodel));
|
||||||
if (*i == NULL)
|
if (*i == NULL)
|
||||||
return (E_NOMEM);
|
return (E_NOMEM);
|
||||||
|
|
||||||
(*i)->INPmodName = token; /* model name */
|
(*i)->INPmodName = token; /* model name */
|
||||||
(*i)->INPmodType = type; /* model type */
|
(*i)->INPmodType = type; /* model type */
|
||||||
(*i)->INPnextModel = (INPmodel *) NULL; /* pointer to next model (end of list) */
|
(*i)->INPnextModel = (INPmodel *) NULL; /* pointer to next model (end of list) */
|
||||||
(*i)->INPmodUsed = 0; /* model is unused */
|
(*i)->INPmodUsed = 0; /* model is unused */
|
||||||
(*i)->INPmodLine = line; /* model line */
|
(*i)->INPmodLine = line; /* model line */
|
||||||
(*i)->INPmodfast = NULL;
|
(*i)->INPmodfast = NULL;
|
||||||
return (OK);
|
return (OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,18 +45,14 @@ NON-STANDARD FEATURES
|
||||||
|
|
||||||
============================================================================*/
|
============================================================================*/
|
||||||
|
|
||||||
/* #include "prefix.h" */
|
|
||||||
|
|
||||||
#include "ngspice.h"
|
#include "ngspice.h"
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "inpdefs.h" /* maschmann : kleinbuchstaben */
|
#include "inpdefs.h"
|
||||||
#include "devdefs.h" /* maschmann : kleinbuchstaben */
|
#include "devdefs.h"
|
||||||
//#include "util.h"
|
#include "ifsim.h"
|
||||||
#include "ifsim.h" /* maschmann : kleinbuchstaben */
|
#include "cpstd.h"
|
||||||
#include "cpstd.h" /* maschmann : kleinbuchstaben */
|
#include "fteext.h"
|
||||||
#include "fteext.h" /* maschmann : kleinbuchstaben */
|
|
||||||
|
|
||||||
#include "mifproto.h"
|
#include "mifproto.h"
|
||||||
#include "mifdefs.h"
|
#include "mifdefs.h"
|
||||||
|
|
@ -64,8 +60,8 @@ NON-STANDARD FEATURES
|
||||||
|
|
||||||
#include "suffix.h"
|
#include "suffix.h"
|
||||||
|
|
||||||
/* This is the table of all models known to the program. */
|
/* This is the table of all models known to the program.
|
||||||
/* It is now defined in inpdefs.h 6.19.2003 -- SDB. */
|
It is now defined in inpmkmod.c. */
|
||||||
extern INPmodel *modtab;
|
extern INPmodel *modtab;
|
||||||
|
|
||||||
extern SPICEdev **DEVices; /* info about all device types */
|
extern SPICEdev **DEVices; /* info about all device types */
|
||||||
|
|
@ -86,13 +82,11 @@ defaulted later by MIFsetup(). The function returns NULL when
|
||||||
successful, and an error string on failure.
|
successful, and an error string on failure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* char *MIFgetMod(ckt,name,model,tab) */ /* former buggy calling method */
|
|
||||||
|
|
||||||
char *MIFgetMod(
|
char *MIFgetMod(
|
||||||
void *ckt, /* The circuit structure */
|
void *ckt, /* The circuit structure */
|
||||||
char *name, /* The name of the model to look for */
|
char *name, /* The name of the model to look for */
|
||||||
INPmodel **model, /* The model found/created */
|
INPmodel **model, /* The model found/created */
|
||||||
INPtables *tab /* Table of model info from first pass */
|
INPtables *tab /* Table of model info from first pass */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
INPmodel *modtmp;
|
INPmodel *modtmp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue