Restored compiling of the non-Tcl/Tk version of magic. This has
traditionally been kept for backwards compatibility. However, the operation of "ext2spice" and "ext2sim" as separate programs has become extremely difficult to maintain, and so it has been dropped in favor of folding both into the program as commands, as was done a long time ago in the Tcl/Tk version.
This commit is contained in:
parent
113f0dfb3f
commit
6ecd077ab4
|
|
@ -1012,7 +1012,9 @@ CmdWhat(w, cmd)
|
||||||
TTMaskSetOnlyType(&maskBits, i);
|
TTMaskSetOnlyType(&maskBits, i);
|
||||||
if (DBIsContact(i)) DBMaskAddStacking(&maskBits);
|
if (DBIsContact(i)) DBMaskAddStacking(&maskBits);
|
||||||
|
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
if (doListAll) paintcellobj = Tcl_NewListObj(0, NULL);
|
if (doListAll) paintcellobj = Tcl_NewListObj(0, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Search selection for tiles of this type, then */
|
/* Search selection for tiles of this type, then */
|
||||||
/* call cmdFindWhatTileFunc() to search the cell */
|
/* call cmdFindWhatTileFunc() to search the cell */
|
||||||
|
|
@ -1035,6 +1037,7 @@ CmdWhat(w, cmd)
|
||||||
TxPrintf(" %s ", lidp->lid_name);
|
TxPrintf(" %s ", lidp->lid_name);
|
||||||
TxPrintf(")\n");
|
TxPrintf(")\n");
|
||||||
}
|
}
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Tcl_ListObjAppendElement(magicinterp, paintcellobj,
|
Tcl_ListObjAppendElement(magicinterp, paintcellobj,
|
||||||
|
|
@ -1048,15 +1051,18 @@ CmdWhat(w, cmd)
|
||||||
Tcl_ListObjAppendElement(magicinterp, paintcellobj,
|
Tcl_ListObjAppendElement(magicinterp, paintcellobj,
|
||||||
celllistobj);
|
celllistobj);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
while (lid != NULL)
|
while (lid != NULL)
|
||||||
{
|
{
|
||||||
freeMagic(lid);
|
freeMagic(lid);
|
||||||
lid = lid->lid_next;
|
lid = lid->lid_next;
|
||||||
}
|
}
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
if (doListAll)
|
if (doListAll)
|
||||||
Tcl_ListObjAppendElement(magicinterp, paintobj,
|
Tcl_ListObjAppendElement(magicinterp, paintobj,
|
||||||
paintcellobj);
|
paintcellobj);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EditCellUse = saveUse;
|
EditCellUse = saveUse;
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,12 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
#include "utils/hash.h"
|
#include "utils/hash.h"
|
||||||
#include "utils/utils.h"
|
#include "utils/utils.h"
|
||||||
#include "tiles/tile.h"
|
#include "tiles/tile.h"
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
#include "database/database.h"
|
#include "database/database.h"
|
||||||
#include "windows/windows.h"
|
#include "windows/windows.h"
|
||||||
#include "textio/textio.h"
|
#include "textio/textio.h"
|
||||||
#include "dbwind/dbwind.h" /* for DBWclientID */
|
#include "dbwind/dbwind.h" /* for DBWclientID */
|
||||||
#include "commands/commands.h" /* for module auto-load */
|
#include "commands/commands.h" /* for module auto-load */
|
||||||
#include "textio/txcommands.h"
|
#include "textio/txcommands.h"
|
||||||
#endif
|
|
||||||
#include "extflat/extflat.h"
|
#include "extflat/extflat.h"
|
||||||
#include "extflat/EFint.h"
|
#include "extflat/EFint.h"
|
||||||
#include "extract/extract.h" /* for extDevTable */
|
#include "extract/extract.h" /* for extDevTable */
|
||||||
|
|
@ -43,12 +41,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
#include "utils/malloc.h"
|
#include "utils/malloc.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
void CmdExtToSim();
|
void CmdExtToSim();
|
||||||
#endif
|
|
||||||
bool simnAP();
|
bool simnAP();
|
||||||
bool simnAPHier();
|
bool simnAPHier();
|
||||||
int simmainArgs();
|
int simParseArgs();
|
||||||
int simdevVisit(), simresistVisit(), simcapVisit(), simnodeVisit();
|
int simdevVisit(), simresistVisit(), simcapVisit(), simnodeVisit();
|
||||||
int simmergeVisit();
|
int simmergeVisit();
|
||||||
|
|
||||||
|
|
@ -182,10 +178,10 @@ extern devMerge *devMergeList;
|
||||||
#define ATTR_HIERAP "*[Ee][Xx][Tt]:[Aa][Pp][Hh]*"
|
#define ATTR_HIERAP "*[Ee][Xx][Tt]:[Aa][Pp][Hh]*"
|
||||||
#define ATTR_SUBSAP "*[Ee][Xx][Tt]:[Aa][Pp][Ss]*"
|
#define ATTR_SUBSAP "*[Ee][Xx][Tt]:[Aa][Pp][Ss]*"
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
|
|
||||||
#define atoCap(s) ((EFCapValue)atof(s))
|
#define atoCap(s) ((EFCapValue)atof(s))
|
||||||
|
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
|
|
||||||
/* Forward declaration */
|
/* Forward declaration */
|
||||||
int _ext2sim_start();
|
int _ext2sim_start();
|
||||||
|
|
||||||
|
|
@ -226,7 +222,7 @@ Exttosim_Init(interp)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EXT2SIM_AUTO */
|
#endif /* EXT2SIM_AUTO */
|
||||||
|
#endif /* MAGIC_WRAPPER */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
|
|
@ -322,7 +318,11 @@ CmdExtToSim(w, cmd)
|
||||||
case EXTTOSIM_EXTRESIST:
|
case EXTTOSIM_EXTRESIST:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoSimExtResis) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoSimExtResis) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Extresist: %s\n", (esDoSimExtResis) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc != 3)
|
else if (cmd->tx_argc != 3)
|
||||||
|
|
@ -335,7 +335,11 @@ CmdExtToSim(w, cmd)
|
||||||
case EXTTOSIM_ALIAS:
|
case EXTTOSIM_ALIAS:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esNoAlias) ? "off" : "on", NULL);
|
Tcl_SetResult(magicinterp, (esNoAlias) ? "off" : "on", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Aliases: %s\n", (esNoAlias) ? "off" : "on");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc != 3)
|
else if (cmd->tx_argc != 3)
|
||||||
|
|
@ -348,7 +352,11 @@ CmdExtToSim(w, cmd)
|
||||||
case EXTTOSIM_LABELS:
|
case EXTTOSIM_LABELS:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esNoLabel) ? "off" : "on", NULL);
|
Tcl_SetResult(magicinterp, (esNoLabel) ? "off" : "on", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Labels: %s\n", (esNoLabel) ? "off" : "on");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc != 3)
|
else if (cmd->tx_argc != 3)
|
||||||
|
|
@ -362,10 +370,18 @@ CmdExtToSim(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if (!IS_FINITE_F(LocCapThreshold))
|
if (!IS_FINITE_F(LocCapThreshold))
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "infinite", NULL);
|
Tcl_SetResult(magicinterp, "infinite", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Capacitance threshold: infinite\n");
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetObjResult(magicinterp,
|
Tcl_SetObjResult(magicinterp,
|
||||||
Tcl_NewDoubleObj((double)LocCapThreshold));
|
Tcl_NewDoubleObj((double)LocCapThreshold));
|
||||||
|
#else
|
||||||
|
TxPrintf("Capacitance threshold: %lf\n", (double)LocCapThreshold);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -380,10 +396,18 @@ CmdExtToSim(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if (LocResistThreshold == INFINITE_THRESHOLD)
|
if (LocResistThreshold == INFINITE_THRESHOLD)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "infinite", NULL);
|
Tcl_SetResult(magicinterp, "infinite", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Resistance threshold: infinite\n");
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetObjResult(magicinterp,
|
Tcl_SetObjResult(magicinterp,
|
||||||
Tcl_NewIntObj(LocResistThreshold));
|
Tcl_NewIntObj(LocResistThreshold));
|
||||||
|
#else
|
||||||
|
TxPrintf("Resistance threshold: %lf\n", (double)LocResistThreshold);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -397,7 +421,11 @@ CmdExtToSim(w, cmd)
|
||||||
case EXTTOSIM_FORMAT:
|
case EXTTOSIM_FORMAT:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, sim_formats[esFormat], TCL_STATIC);
|
Tcl_SetResult(magicinterp, sim_formats[esFormat], TCL_STATIC);
|
||||||
|
#else
|
||||||
|
TxPrintf("Format: %s\n", sim_formats[esFormat]);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -411,11 +439,23 @@ CmdExtToSim(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if (esMergeDevsA)
|
if (esMergeDevsA)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "aggressive", NULL);
|
Tcl_SetResult(magicinterp, "aggressive", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge: aggressive\n");
|
||||||
|
#endif
|
||||||
else if (esMergeDevsC)
|
else if (esMergeDevsC)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "conservative", NULL);
|
Tcl_SetResult(magicinterp, "conservative", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge: conservative\n");
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "none", NULL);
|
Tcl_SetResult(magicinterp, "none", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge: none\n");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -483,7 +523,7 @@ runexttosim:
|
||||||
EFResistThreshold = LocResistThreshold;
|
EFResistThreshold = LocResistThreshold;
|
||||||
|
|
||||||
/* Process command line arguments */
|
/* Process command line arguments */
|
||||||
inName = EFArgs(argc, argv, &err_result, simmainArgs, (ClientData) NULL);
|
inName = EFArgs(argc, argv, &err_result, simParseArgs, (ClientData) NULL);
|
||||||
|
|
||||||
if (err_result == TRUE)
|
if (err_result == TRUE)
|
||||||
{
|
{
|
||||||
|
|
@ -530,28 +570,40 @@ runexttosim:
|
||||||
((esDoSimExtResis) ? ".ext" : ""));
|
((esDoSimExtResis) ? ".ext" : ""));
|
||||||
if ((esSimF = fopen(simesOutName, "w")) == NULL)
|
if ((esSimF = fopen(simesOutName, "w")) == NULL)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
char *tclres = Tcl_Alloc(128);
|
char *tclres = Tcl_Alloc(128);
|
||||||
sprintf(tclres, "exttosim: Unable to open file %s for writing\n",
|
sprintf(tclres, "exttosim: Unable to open file %s for writing\n",
|
||||||
simesOutName);
|
simesOutName);
|
||||||
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
||||||
|
#else
|
||||||
|
TxError("exttosim: Unable to open file %s for writing\n", simesOutName);
|
||||||
|
#endif
|
||||||
EFDone();
|
EFDone();
|
||||||
return /* TCL_ERROR */;
|
return /* TCL_ERROR */;
|
||||||
}
|
}
|
||||||
if (!esNoAlias && (esAliasF = fopen(esAliasName, "w")) == NULL)
|
if (!esNoAlias && (esAliasF = fopen(esAliasName, "w")) == NULL)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
char *tclres = Tcl_Alloc(128);
|
char *tclres = Tcl_Alloc(128);
|
||||||
sprintf(tclres, "exttosim: Unable to open file %s for writing\n",
|
sprintf(tclres, "exttosim: Unable to open file %s for writing\n",
|
||||||
esAliasName);
|
esAliasName);
|
||||||
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
||||||
|
#else
|
||||||
|
TxError("exttosim: Unable to open file %s for writing\n", esAliasName);
|
||||||
|
#endif
|
||||||
EFDone();
|
EFDone();
|
||||||
return /* TCL_ERROR */;
|
return /* TCL_ERROR */;
|
||||||
}
|
}
|
||||||
if (!esNoLabel && (esLabF = fopen(esLabelName, "w")) == NULL)
|
if (!esNoLabel && (esLabF = fopen(esLabelName, "w")) == NULL)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
char *tclres = Tcl_Alloc(128);
|
char *tclres = Tcl_Alloc(128);
|
||||||
sprintf(tclres, "exttosim: Unable to open file %s for writing\n",
|
sprintf(tclres, "exttosim: Unable to open file %s for writing\n",
|
||||||
esLabelName);
|
esLabelName);
|
||||||
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
||||||
|
#else
|
||||||
|
TxError("exttosim: Unable to open file %s for writing\n", esLabelName);
|
||||||
|
#endif
|
||||||
return /* TCL_ERROR */;
|
return /* TCL_ERROR */;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -648,7 +700,7 @@ runexttosim:
|
||||||
TxPrintf("exttosim finished.\n");
|
TxPrintf("exttosim finished.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !MAGIC_WRAPPER */
|
#if 0 /* Independent program "ext2sim" deprecated */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
|
|
@ -699,7 +751,7 @@ main(argc, argv)
|
||||||
fetInfo[i].resClassSub = 6 ;
|
fetInfo[i].resClassSub = 6 ;
|
||||||
fetInfo[i].defSubs = "Vdd!";
|
fetInfo[i].defSubs = "Vdd!";
|
||||||
/* Process command line arguments */
|
/* Process command line arguments */
|
||||||
inName = EFArgs(argc, argv, NULL, simmainArgs, (ClientData) NULL);
|
inName = EFArgs(argc, argv, NULL, simParseArgs, (ClientData) NULL);
|
||||||
if (inName == NULL)
|
if (inName == NULL)
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|
||||||
|
|
@ -777,12 +829,12 @@ main(argc, argv)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MAGIC_WRAPPER */
|
#endif /* Deprecated */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* simmainArgs --
|
* simParseArgs --
|
||||||
*
|
*
|
||||||
* Process those arguments that are specific to ext2sim.
|
* Process those arguments that are specific to ext2sim.
|
||||||
* Assumes that *pargv[0][0] is '-', indicating a flag
|
* Assumes that *pargv[0][0] is '-', indicating a flag
|
||||||
|
|
@ -805,7 +857,7 @@ main(argc, argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
simmainArgs(pargc, pargv)
|
simParseArgs(pargc, pargv)
|
||||||
int *pargc;
|
int *pargc;
|
||||||
char ***pargv;
|
char ***pargv;
|
||||||
{
|
{
|
||||||
|
|
@ -880,34 +932,6 @@ simmainArgs(pargc, pargv)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef MAGIC_WRAPPER
|
|
||||||
case 'j':
|
|
||||||
{
|
|
||||||
char *rp, subsNode[80] ;
|
|
||||||
int ndx, rClass, rClassSub = NO_RESCLASS;
|
|
||||||
|
|
||||||
if ((cp = ArgStr(&argc,&argv,"resistance class")) == NULL)
|
|
||||||
goto usage;
|
|
||||||
if ( (rp = strchr(cp,':')) == NULL )
|
|
||||||
goto usage;
|
|
||||||
else *rp++ = '\0';
|
|
||||||
if ( sscanf(rp, "%d/%d/%s", &rClass, &rClassSub, subsNode) != 3 ) {
|
|
||||||
rClassSub = NO_RESCLASS ;
|
|
||||||
if ( sscanf(rp, "%d/%s", &rClass, subsNode) != 2 ) goto usage;
|
|
||||||
}
|
|
||||||
ndx = efBuildAddStr(EFDevTypes, &EFDevNumTypes, TT_MAXTYPES, cp);
|
|
||||||
fetInfo[ndx].resClassSource = rClass;
|
|
||||||
fetInfo[ndx].resClassDrain = rClass;
|
|
||||||
fetInfo[ndx].resClassSub = rClassSub;
|
|
||||||
fetInfo[ndx].defSubs = (char *) mallocMagic((unsigned) (strlen(subsNode)+1));
|
|
||||||
fetInfo[ndx].devType = TT_SPACE;
|
|
||||||
strcpy(fetInfo[ndx].defSubs,subsNode);
|
|
||||||
TxError("Info: fet %s(%d) sdRclass=%d subRclass=%d dSub=%s\n",
|
|
||||||
cp, ndx, fetInfo[ndx].resClassSD, fetInfo[ndx].resClassSub,
|
|
||||||
fetInfo[ndx].defSubs);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif /* MAGIC_WRAPPER */
|
|
||||||
default:
|
default:
|
||||||
TxError("Unrecognized flag: %s\n", argv[0]);
|
TxError("Unrecognized flag: %s\n", argv[0]);
|
||||||
goto usage;
|
goto usage;
|
||||||
|
|
@ -921,19 +945,10 @@ usage:
|
||||||
TxError("Usage: ext2sim [-a aliasfile] [-A] [-B] [-l labelfile] [-L]\n"
|
TxError("Usage: ext2sim [-a aliasfile] [-A] [-B] [-l labelfile] [-L]\n"
|
||||||
"[-o simfile] [-J flat|hier] [-y cap_digits]\n"
|
"[-o simfile] [-J flat|hier] [-y cap_digits]\n"
|
||||||
"[-f mit|lbl|su] "
|
"[-f mit|lbl|su] "
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
"[file]\n"
|
"[file]\n"
|
||||||
#else
|
|
||||||
"[-j device:sdRclass[/subRclass]/defaultSubstrate]\n"
|
|
||||||
"file\n\n or else see options to extcheck(1)\n"
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
|
||||||
exit (1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
#ifdef MAGIC_WRAPPER
|
||||||
#include "tcltk/tclmagic.h"
|
#include "tcltk/tclmagic.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "utils/magic.h"
|
#include "utils/magic.h"
|
||||||
#include "utils/malloc.h"
|
#include "utils/malloc.h"
|
||||||
#include "utils/geometry.h"
|
#include "utils/geometry.h"
|
||||||
|
|
@ -1992,5 +1994,3 @@ esHierVisit(hc, cdata)
|
||||||
EFFlatDone(esFreeNodeClient);
|
EFFlatDone(esFreeNodeClient);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MAGIC_WRAPPER */
|
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,12 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
#include "utils/dqueue.h"
|
#include "utils/dqueue.h"
|
||||||
#include "utils/utils.h"
|
#include "utils/utils.h"
|
||||||
#include "tiles/tile.h"
|
#include "tiles/tile.h"
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
#include "database/database.h"
|
#include "database/database.h"
|
||||||
#include "windows/windows.h"
|
#include "windows/windows.h"
|
||||||
#include "textio/textio.h"
|
#include "textio/textio.h"
|
||||||
#include "dbwind/dbwind.h" /* for DBWclientID */
|
#include "dbwind/dbwind.h" /* for DBWclientID */
|
||||||
#include "commands/commands.h" /* for module auto-load */
|
#include "commands/commands.h" /* for module auto-load */
|
||||||
#include "textio/txcommands.h"
|
#include "textio/txcommands.h"
|
||||||
#endif
|
|
||||||
#include "extflat/extflat.h"
|
#include "extflat/extflat.h"
|
||||||
#include "extflat/EFint.h"
|
#include "extflat/EFint.h"
|
||||||
#include "extract/extract.h" /* for extDevTable */
|
#include "extract/extract.h" /* for extDevTable */
|
||||||
|
|
@ -113,6 +111,10 @@ int esSpiceDevsMerged;
|
||||||
|
|
||||||
devMerge *devMergeList = NULL ;
|
devMerge *devMergeList = NULL ;
|
||||||
|
|
||||||
|
#define atoCap(s) ((EFCapValue)atof(s))
|
||||||
|
|
||||||
|
extern void ESGenerateHierarchy(); /* forward reference */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -134,7 +136,7 @@ int
|
||||||
esFreeNodeClient(client)
|
esFreeNodeClient(client)
|
||||||
nodeClient *client;
|
nodeClient *client;
|
||||||
{
|
{
|
||||||
if (client != (ClientData)NULL)
|
if (client != (nodeClient *)NULL)
|
||||||
if (client->spiceNodeName != NULL)
|
if (client->spiceNodeName != NULL)
|
||||||
freeMagic((char *)client->spiceNodeName);
|
freeMagic((char *)client->spiceNodeName);
|
||||||
|
|
||||||
|
|
@ -186,7 +188,6 @@ esFormatSubs(outf, suf)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
#ifdef MAGIC_WRAPPER
|
||||||
|
|
||||||
#ifdef EXT2SPICE_AUTO
|
#ifdef EXT2SPICE_AUTO
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
|
|
@ -224,6 +225,8 @@ Exttospice_Init(interp)
|
||||||
}
|
}
|
||||||
#endif /* EXT2SPICE_AUTO */
|
#endif /* EXT2SPICE_AUTO */
|
||||||
|
|
||||||
|
#endif /* MAGIC_WRAPPER */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -377,7 +380,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_EXTRESIST:
|
case EXTTOSPC_EXTRESIST:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoExtResis) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoExtResis) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Extresist: %s\n", (esDoExtResis) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc != 3)
|
else if (cmd->tx_argc != 3)
|
||||||
|
|
@ -391,7 +398,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_RESISTORTEE:
|
case EXTTOSPC_RESISTORTEE:
|
||||||
if (cmd->tx_argc == 3)
|
if (cmd->tx_argc == 3)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoResistorTee) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoResistorTee) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Resistor tee: %s\n", (esDoResistorTee) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc != 4)
|
else if (cmd->tx_argc != 4)
|
||||||
|
|
@ -405,7 +416,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_SCALE:
|
case EXTTOSPC_SCALE:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esScale < 0) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esScale < 0) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Scale: %s\n", (esScale < 0) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc != 3)
|
else if (cmd->tx_argc != 3)
|
||||||
|
|
@ -419,7 +434,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_HIERARCHY:
|
case EXTTOSPC_HIERARCHY:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoHierarchy) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoHierarchy) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Hierarchy: %s\n", (esDoHierarchy) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = Lookup(cmd->tx_argv[2], yesno);
|
idx = Lookup(cmd->tx_argv[2], yesno);
|
||||||
|
|
@ -433,7 +452,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_BLACKBOX:
|
case EXTTOSPC_BLACKBOX:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoBlackBox) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoBlackBox) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Black box: %s\n", (esDoBlackBox) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = Lookup(cmd->tx_argv[2], yesno);
|
idx = Lookup(cmd->tx_argv[2], yesno);
|
||||||
|
|
@ -447,7 +470,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_RENUMBER:
|
case EXTTOSPC_RENUMBER:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoRenumber) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoRenumber) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Renumber: %s\n", (esDoRenumber) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = Lookup(cmd->tx_argv[2], yesno);
|
idx = Lookup(cmd->tx_argv[2], yesno);
|
||||||
|
|
@ -461,7 +488,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_MERGENAMES:
|
case EXTTOSPC_MERGENAMES:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esMergeNames) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esMergeNames) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge names: %s\n", (esMergeNames) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = Lookup(cmd->tx_argv[2], yesno);
|
idx = Lookup(cmd->tx_argv[2], yesno);
|
||||||
|
|
@ -476,11 +507,23 @@ CmdExtToSpice(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_NONE)
|
if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_NONE)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "none", NULL);
|
Tcl_SetResult(magicinterp, "none", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Shorts: none\n");
|
||||||
|
#endif
|
||||||
else if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_R)
|
else if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_R)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "resistor", NULL);
|
Tcl_SetResult(magicinterp, "resistor", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Shorts: resistor\n");
|
||||||
|
#endif
|
||||||
else if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_V)
|
else if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_V)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "voltage source", NULL);
|
Tcl_SetResult(magicinterp, "voltage source", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Shorts: voltage source\n");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = Lookup(cmd->tx_argv[2], cmdShortTypes);
|
idx = Lookup(cmd->tx_argv[2], cmdShortTypes);
|
||||||
|
|
@ -528,7 +571,11 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_SUBCIRCUITS:
|
case EXTTOSPC_SUBCIRCUITS:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoPorts) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoPorts) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Ports: %s\n", (esDoPorts) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = Lookup(cmd->tx_argv[2], subcktopts);
|
idx = Lookup(cmd->tx_argv[2], subcktopts);
|
||||||
|
|
@ -544,16 +591,26 @@ CmdExtToSpice(w, cmd)
|
||||||
case IDX_DESCEND:
|
case IDX_DESCEND:
|
||||||
if (cmd->tx_argc == 3)
|
if (cmd->tx_argc == 3)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, (esDoPorts) ? "on" : "off", NULL);
|
Tcl_SetResult(magicinterp, (esDoPorts) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Ports: %s\n", (esDoPorts) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDX_TOP:
|
case IDX_TOP:
|
||||||
if (cmd->tx_argc == 3)
|
if (cmd->tx_argc == 3)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp,
|
Tcl_SetResult(magicinterp,
|
||||||
(esDoSubckt == 2) ? "auto" :
|
(esDoSubckt == 2) ? "auto" :
|
||||||
(esDoSubckt == 1) ? "on" : "off", NULL);
|
(esDoSubckt == 1) ? "on" : "off", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Top subcircuit: %s\n",
|
||||||
|
(esDoSubckt == 2) ? "auto" :
|
||||||
|
(esDoSubckt == 1) ? "on" : "off");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -588,15 +645,24 @@ CmdExtToSpice(w, cmd)
|
||||||
case EXTTOSPC_FORMAT:
|
case EXTTOSPC_FORMAT:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, cmdExtToSpcFormat[esFormat], NULL);
|
Tcl_SetResult(magicinterp, cmdExtToSpcFormat[esFormat], NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Format: %s\n", cmdExtToSpcFormat[esFormat]);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
idx = Lookup(cmd->tx_argv[2], cmdExtToSpcFormat);
|
idx = Lookup(cmd->tx_argv[2], cmdExtToSpcFormat);
|
||||||
if (idx < 0)
|
if (idx < 0)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "Bad format type. Formats are:"
|
Tcl_SetResult(magicinterp, "Bad format type. Formats are:"
|
||||||
"spice2, spice3, hspice, and ngspice.", NULL);
|
"spice2, spice3, hspice, and ngspice.", NULL);
|
||||||
|
#else
|
||||||
|
TxError("Bad format type. Formats are:"
|
||||||
|
"spice2, spice3, hspice, and ngspice.");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -611,10 +677,19 @@ CmdExtToSpice(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if (!IS_FINITE_F(LocCapThreshold))
|
if (!IS_FINITE_F(LocCapThreshold))
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "infinite", NULL);
|
Tcl_SetResult(magicinterp, "infinite", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Capacitance threshold: infinite\n");
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetObjResult(magicinterp,
|
Tcl_SetObjResult(magicinterp,
|
||||||
Tcl_NewDoubleObj((double)LocCapThreshold));
|
Tcl_NewDoubleObj((double)LocCapThreshold));
|
||||||
|
#else
|
||||||
|
TxPrintf("Capacitance threshold: %lf\n",
|
||||||
|
(double)LocCapThreshold);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -636,10 +711,19 @@ CmdExtToSpice(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if (LocResistThreshold == INFINITE_THRESHOLD)
|
if (LocResistThreshold == INFINITE_THRESHOLD)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "infinite", NULL);
|
Tcl_SetResult(magicinterp, "infinite", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Resistance threshold: infinite\n");
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetObjResult(magicinterp,
|
Tcl_SetObjResult(magicinterp,
|
||||||
Tcl_NewIntObj(LocResistThreshold));
|
Tcl_NewIntObj(LocResistThreshold));
|
||||||
|
#else
|
||||||
|
TxPrintf("Resistance threshold: %lf\n",
|
||||||
|
(double)LocResistThreshold);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -655,11 +739,23 @@ CmdExtToSpice(w, cmd)
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
if (esMergeDevsA)
|
if (esMergeDevsA)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "aggressive", NULL);
|
Tcl_SetResult(magicinterp, "aggressive", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge: aggressive\n");
|
||||||
|
#endif
|
||||||
else if (esMergeDevsC)
|
else if (esMergeDevsC)
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "conservative", NULL);
|
Tcl_SetResult(magicinterp, "conservative", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge: conservative\n");
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetResult(magicinterp, "none", NULL);
|
Tcl_SetResult(magicinterp, "none", NULL);
|
||||||
|
#else
|
||||||
|
TxPrintf("Merge: none\n");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cmd->tx_argc < 3) goto usage;
|
else if (cmd->tx_argc < 3) goto usage;
|
||||||
|
|
@ -740,7 +836,7 @@ runexttospice:
|
||||||
|
|
||||||
/* Process command line arguments */
|
/* Process command line arguments */
|
||||||
|
|
||||||
inName = EFArgs(argc, argv, &err_result, spcmainArgs, (ClientData) NULL);
|
inName = EFArgs(argc, argv, &err_result, spcParseArgs, (ClientData) NULL);
|
||||||
if (err_result == TRUE)
|
if (err_result == TRUE)
|
||||||
{
|
{
|
||||||
EFDone();
|
EFDone();
|
||||||
|
|
@ -788,10 +884,14 @@ runexttospice:
|
||||||
|
|
||||||
if ((esSpiceF = fopen(spcesOutName, "w")) == NULL)
|
if ((esSpiceF = fopen(spcesOutName, "w")) == NULL)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
char *tclres = Tcl_Alloc(128);
|
char *tclres = Tcl_Alloc(128);
|
||||||
sprintf(tclres, "exttospice: Unable to open file %s for writing\n",
|
sprintf(tclres, "exttospice: Unable to open file %s for writing\n",
|
||||||
spcesOutName);
|
spcesOutName);
|
||||||
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
Tcl_SetResult(magicinterp, tclres, TCL_DYNAMIC);
|
||||||
|
#else
|
||||||
|
TxError("exttospice: Unable to open file %s for writing\n", spcesOutName);
|
||||||
|
#endif
|
||||||
EFDone();
|
EFDone();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -836,6 +936,7 @@ runexttospice:
|
||||||
esFetInfo[i].defSubs = subname;
|
esFetInfo[i].defSubs = subname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
if (EFCompat == TRUE)
|
if (EFCompat == TRUE)
|
||||||
{
|
{
|
||||||
/* Tcl variable substitution for substrate node names */
|
/* Tcl variable substitution for substrate node names */
|
||||||
|
|
@ -846,6 +947,7 @@ runexttospice:
|
||||||
if (resstr != NULL) esFetInfo[i].defSubs = resstr;
|
if (resstr != NULL) esFetInfo[i].defSubs = resstr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (esDoHierarchy && (subname != NULL))
|
if (esDoHierarchy && (subname != NULL))
|
||||||
{
|
{
|
||||||
|
|
@ -885,6 +987,7 @@ runexttospice:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
if (EFCompat == TRUE)
|
if (EFCompat == TRUE)
|
||||||
{
|
{
|
||||||
/* Keep a pointer to the "GND" variable, if it exists. */
|
/* Keep a pointer to the "GND" variable, if it exists. */
|
||||||
|
|
@ -892,6 +995,7 @@ runexttospice:
|
||||||
resstr = (char *)Tcl_GetVar(magicinterp, "GND", TCL_GLOBAL_ONLY);
|
resstr = (char *)Tcl_GetVar(magicinterp, "GND", TCL_GLOBAL_ONLY);
|
||||||
if (resstr == NULL) resstr = "GND"; /* default value */
|
if (resstr == NULL) resstr = "GND"; /* default value */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Write the output file */
|
/* Write the output file */
|
||||||
|
|
||||||
|
|
@ -921,6 +1025,7 @@ runexttospice:
|
||||||
fprintf(esSpiceF, ".global ");
|
fprintf(esSpiceF, ".global ");
|
||||||
while (glist != NULL)
|
while (glist != NULL)
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
if (EFCompat == TRUE)
|
if (EFCompat == TRUE)
|
||||||
{
|
{
|
||||||
/* Handle global names that are TCL variables */
|
/* Handle global names that are TCL variables */
|
||||||
|
|
@ -937,6 +1042,7 @@ runexttospice:
|
||||||
esFormatSubs(esSpiceF, glist->gll_name);
|
esFormatSubs(esSpiceF, glist->gll_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
esFormatSubs(esSpiceF, glist->gll_name);
|
esFormatSubs(esSpiceF, glist->gll_name);
|
||||||
|
|
||||||
fprintf(esSpiceF, " ");
|
fprintf(esSpiceF, " ");
|
||||||
|
|
@ -1046,7 +1152,7 @@ runexttospice:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* MAGIC_WRAPPER */
|
#if 0 /* Independent program "ext2spice" has been deprecated */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
|
|
@ -1103,7 +1209,7 @@ main(argc, argv)
|
||||||
esFetInfo[i].defSubs = "Vdd!";
|
esFetInfo[i].defSubs = "Vdd!";
|
||||||
/* Process command line arguments */
|
/* Process command line arguments */
|
||||||
|
|
||||||
inName = EFArgs(argc, argv, NULL, spcmainArgs, (ClientData) NULL);
|
inName = EFArgs(argc, argv, NULL, spcParseArgs, (ClientData) NULL);
|
||||||
if (inName == NULL)
|
if (inName == NULL)
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|
||||||
|
|
@ -1210,13 +1316,13 @@ main(argc, argv)
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MAGIC_WRAPPER */
|
#endif /* Deprecated */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* spcmainArgs --
|
* spcParseArgs --
|
||||||
*
|
*
|
||||||
* Process those arguments that are specific to ext2spice.
|
* Process those arguments that are specific to ext2spice.
|
||||||
* Assumes that *pargv[0][0] is '-', indicating a flag
|
* Assumes that *pargv[0][0] is '-', indicating a flag
|
||||||
|
|
@ -1238,7 +1344,7 @@ main(argc, argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
spcmainArgs(pargc, pargv)
|
spcParseArgs(pargc, pargv)
|
||||||
int *pargc;
|
int *pargc;
|
||||||
char ***pargv;
|
char ***pargv;
|
||||||
{
|
{
|
||||||
|
|
@ -1249,12 +1355,7 @@ spcmainArgs(pargc, pargv)
|
||||||
"[-B] [-o spicefile] [-M|-m] [-y cap_digits] "
|
"[-B] [-o spicefile] [-M|-m] [-y cap_digits] "
|
||||||
"[-J flat|hier]\n"
|
"[-J flat|hier]\n"
|
||||||
"[-f spice2|spice3|hspice|ngspice] [-M] [-m] "
|
"[-f spice2|spice3|hspice|ngspice] [-M] [-m] "
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
"[file]\n";
|
"[file]\n";
|
||||||
#else
|
|
||||||
"[-j device:sdRclass[/subRclass]/defaultSubstrate]\n"
|
|
||||||
"file\n\n or else see options to extcheck(1)\n";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (argv[0][1])
|
switch (argv[0][1])
|
||||||
{
|
{
|
||||||
|
|
@ -1318,32 +1419,6 @@ spcmainArgs(pargc, pargv)
|
||||||
esCapAccuracy = atoi(t);
|
esCapAccuracy = atoi(t);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef MAGIC_WRAPPER
|
|
||||||
case 'j':
|
|
||||||
{
|
|
||||||
char *rp, subsNode[80] ;
|
|
||||||
int ndx, rClass, rClassSub = -1;
|
|
||||||
|
|
||||||
if ((cp = ArgStr(&argc,&argv,"resistance class")) == NULL)
|
|
||||||
goto usage;
|
|
||||||
if ( (rp = (char *) strchr(cp,':')) == NULL )
|
|
||||||
goto usage;
|
|
||||||
else *rp++ = '\0';
|
|
||||||
if ( sscanf(rp, "%d/%d/%s", &rClass, &rClassSub, subsNode) != 3 ) {
|
|
||||||
rClassSub = -1 ;
|
|
||||||
if ( sscanf(rp, "%d/%s", &rClass, subsNode) != 2 ) goto usage;
|
|
||||||
}
|
|
||||||
ndx = efBuildAddStr(EFDevTypes, &EFDevNumTypes, TT_MAXTYPES, cp);
|
|
||||||
esFetInfo[ndx].resClassSource = esFetInfo[ndx].resClassDrain = rClass;
|
|
||||||
esFetInfo[ndx].resClassSub = rClassSub;
|
|
||||||
esFetInfo[ndx].defSubs = (char *)mallocMagic((unsigned)(strlen(subsNode)+1));
|
|
||||||
strcpy(esFetInfo[ndx].defSubs,subsNode);
|
|
||||||
TxError("info: dev %s(%d) srcRclass=%d drnRclass=%d subRclass=%d dSub=%s\n",
|
|
||||||
cp, ndx, esFetInfo[ndx].resClassSource, esFetInfo[ndx].resClassDrain,
|
|
||||||
esFetInfo[ndx].resClassSub, esFetInfo[ndx].defSubs);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif /* MAGIC_WRAPPER */
|
|
||||||
case 'h': /* -h or -help, as suggested by "ext2spice help" */
|
case 'h': /* -h or -help, as suggested by "ext2spice help" */
|
||||||
TxPrintf(usage_text);
|
TxPrintf(usage_text);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1358,12 +1433,7 @@ spcmainArgs(pargc, pargv)
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
TxError(usage_text);
|
TxError(usage_text);
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
|
||||||
exit (1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2935,7 +3005,7 @@ FILE *outf;
|
||||||
NULL));
|
NULL));
|
||||||
|
|
||||||
/* Create node client if it doesn't exist */
|
/* Create node client if it doesn't exist */
|
||||||
if ((nodeClient *)nn->efnn_node->efnode_client == (ClientData)NULL)
|
if ((nodeClient *)nn->efnn_node->efnode_client == (nodeClient *)NULL)
|
||||||
initNodeClientHier(nn->efnn_node);
|
initNodeClientHier(nn->efnn_node);
|
||||||
|
|
||||||
/* Mark node as visited (set bit one higher than number of resist classes) */
|
/* Mark node as visited (set bit one higher than number of resist classes) */
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,8 @@ typedef struct _devMerge {
|
||||||
} devMerge;
|
} devMerge;
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
void CmdExtToSpice();
|
void CmdExtToSpice();
|
||||||
#endif
|
extern int spcParseArgs();
|
||||||
extern int spcmainArgs();
|
|
||||||
extern int spccapVisit(), spcdevVisit(), spcnodeVisit(), subcktVisit();
|
extern int spccapVisit(), spcdevVisit(), spcnodeVisit(), subcktVisit();
|
||||||
extern int spcresistVisit(), devMergeVisit(), devDistJunctVisit();
|
extern int spcresistVisit(), devMergeVisit(), devDistJunctVisit();
|
||||||
extern int spcsubVisit();
|
extern int spcsubVisit();
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$";
|
||||||
#include "extflat/extflat.h"
|
#include "extflat/extflat.h"
|
||||||
#include "extflat/EFint.h"
|
#include "extflat/EFint.h"
|
||||||
#include "extract/extract.h" /* for device class list */
|
#include "extract/extract.h" /* for device class list */
|
||||||
|
#include "extract/extractInt.h" /* for extGetDevType() */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To avoid allocating ridiculously large amounts of memory to hold
|
* To avoid allocating ridiculously large amounts of memory to hold
|
||||||
|
|
|
||||||
|
|
@ -824,6 +824,7 @@ extSubsName(node)
|
||||||
{
|
{
|
||||||
if (node->lreg_ll.p_x <= (MINFINITY + 3))
|
if (node->lreg_ll.p_x <= (MINFINITY + 3))
|
||||||
{
|
{
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
if (ExtCurStyle->exts_globSubstrateName[0] == '$' &&
|
if (ExtCurStyle->exts_globSubstrateName[0] == '$' &&
|
||||||
ExtCurStyle->exts_globSubstrateName[1] != '$')
|
ExtCurStyle->exts_globSubstrateName[1] != '$')
|
||||||
{
|
{
|
||||||
|
|
@ -840,6 +841,7 @@ extSubsName(node)
|
||||||
+ 1;
|
+ 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
return ExtCurStyle->exts_globSubstrateName;
|
return ExtCurStyle->exts_globSubstrateName;
|
||||||
}
|
}
|
||||||
else return NULL;
|
else return NULL;
|
||||||
|
|
@ -2543,7 +2545,7 @@ extDevFindMatch(deventry, t)
|
||||||
|
|
||||||
j = MATCH_TERM;
|
j = MATCH_TERM;
|
||||||
i = 0;
|
i = 0;
|
||||||
match = True;
|
match = TRUE;
|
||||||
for (k = 0; k < devptr->exts_deviceSDCount; k++)
|
for (k = 0; k < devptr->exts_deviceSDCount; k++)
|
||||||
{
|
{
|
||||||
if (extTransRec.tr_termnode[k] == NULL) break;
|
if (extTransRec.tr_termnode[k] == NULL) break;
|
||||||
|
|
@ -2551,13 +2553,13 @@ extDevFindMatch(deventry, t)
|
||||||
{
|
{
|
||||||
if (TTMaskIsZero(&devptr->exts_deviceSDTypes[i]))
|
if (TTMaskIsZero(&devptr->exts_deviceSDTypes[i]))
|
||||||
{
|
{
|
||||||
match = False;
|
match = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!TTMaskEqual(&devptr->exts_deviceSDTypes[i],
|
if (!TTMaskEqual(&devptr->exts_deviceSDTypes[i],
|
||||||
&deventry->exts_deviceSDTypes[i]))
|
&deventry->exts_deviceSDTypes[i]))
|
||||||
{
|
{
|
||||||
match = False;
|
match = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3710,9 +3712,9 @@ extFindNodes(def, clipArea, subonly)
|
||||||
|
|
||||||
|
|
||||||
if (TTMaskHasType(&ExtCurStyle->exts_globSubstrateTypes, TT_SPACE))
|
if (TTMaskHasType(&ExtCurStyle->exts_globSubstrateTypes, TT_SPACE))
|
||||||
space_is_substrate = True;
|
space_is_substrate = TRUE;
|
||||||
else
|
else
|
||||||
space_is_substrate = False;
|
space_is_substrate = FALSE;
|
||||||
|
|
||||||
TTMaskZero(&subsTypesNonSpace);
|
TTMaskZero(&subsTypesNonSpace);
|
||||||
TTMaskSetMask(&subsTypesNonSpace, &ExtCurStyle->exts_globSubstrateTypes);
|
TTMaskSetMask(&subsTypesNonSpace, &ExtCurStyle->exts_globSubstrateTypes);
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,8 @@ ExtCompareStyle(stylename)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* MAGIC_WRAPPER */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -429,8 +431,6 @@ ExtGetDevInfo(idx, devnameptr, devtypeptr, s_rclassptr, d_rclassptr,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MAGIC_WRAPPER */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
POSTSCRIPT=0,
|
POSTSCRIPT=0,
|
||||||
PLOTPNM,
|
PLOTPNM,
|
||||||
#ifdef HAVE_LIBCAIRO
|
#if defined(HAVE_LIBCAIRO) && defined(MAGIC_WRAPPER)
|
||||||
PLOTSVG,
|
PLOTSVG,
|
||||||
#endif
|
#endif
|
||||||
#ifdef GREMLIN
|
#ifdef GREMLIN
|
||||||
|
|
@ -97,7 +97,7 @@ CmdPlot(w, cmd)
|
||||||
float width;
|
float width;
|
||||||
int iwidth, scale;
|
int iwidth, scale;
|
||||||
|
|
||||||
#ifdef HAVE_LIBCAIRO
|
#if defined(HAVE_LIBCAIRO) && defined(MAGIC_WRAPPER)
|
||||||
int flags;
|
int flags;
|
||||||
extern void GrTCairoPlotSVG();
|
extern void GrTCairoPlotSVG();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -108,7 +108,7 @@ CmdPlot(w, cmd)
|
||||||
underneath the box",
|
underneath the box",
|
||||||
"pnm file [width [layers]] generate PNM file for what's\n\
|
"pnm file [width [layers]] generate PNM file for what's\n\
|
||||||
underneath the box",
|
underneath the box",
|
||||||
#ifdef HAVE_LIBCAIRO
|
#if defined(HAVE_LIBCAIRO) && defined(MAGIC_WRAPPER)
|
||||||
"svg file generate SVG file for the whole window",
|
"svg file generate SVG file for the whole window",
|
||||||
#endif
|
#endif
|
||||||
#ifdef GREMLIN
|
#ifdef GREMLIN
|
||||||
|
|
@ -149,7 +149,7 @@ CmdPlot(w, cmd)
|
||||||
#ifdef GREMLIN
|
#ifdef GREMLIN
|
||||||
|| (option == STYLE_GREMLIN)
|
|| (option == STYLE_GREMLIN)
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBCAIRO
|
#if defined(HAVE_LIBCAIRO) && defined(MAGIC_WRAPPER)
|
||||||
|| (option == PLOTSVG)
|
|| (option == PLOTSVG)
|
||||||
#endif
|
#endif
|
||||||
#ifdef VERSATEC
|
#ifdef VERSATEC
|
||||||
|
|
@ -264,7 +264,7 @@ CmdPlot(w, cmd)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBCAIRO
|
#if defined(HAVE_LIBCAIRO) && defined(MAGIC_WRAPPER)
|
||||||
case PLOTSVG:
|
case PLOTSVG:
|
||||||
if (cmd->tx_argc > 3)
|
if (cmd->tx_argc > 3)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6816,24 +6816,15 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test $usingTcl ; then
|
if test "x$enable_modular" = "xyes" ; then
|
||||||
if test "x$enable_modular" = "xyes" ; then
|
|
||||||
programs="$programs ext2sim ext2spice"
|
|
||||||
$as_echo "#define EXT2SPICE_AUTO 1" >>confdefs.h
|
$as_echo "#define EXT2SPICE_AUTO 1" >>confdefs.h
|
||||||
|
|
||||||
$as_echo "#define EXT2SIM_AUTO 1" >>confdefs.h
|
$as_echo "#define EXT2SIM_AUTO 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
modules="$modules ext2sim ext2spice"
|
modules="$modules ext2sim ext2spice"
|
||||||
extra_libs="$extra_libs \${MAGICDIR}/ext2sim/libext2sim.o"
|
extra_libs="$extra_libs \${MAGICDIR}/ext2sim/libext2sim.o"
|
||||||
extra_libs="$extra_libs \${MAGICDIR}/ext2spice/libext2spice.o"
|
extra_libs="$extra_libs \${MAGICDIR}/ext2spice/libext2spice.o"
|
||||||
fi
|
|
||||||
else
|
|
||||||
programs="$programs ext2sim ext2spice"
|
|
||||||
$as_echo "#define EXT2SPICE_AUTO 1" >>confdefs.h
|
|
||||||
|
|
||||||
$as_echo "#define EXT2SIM_AUTO 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check whether --enable-locking was given.
|
# Check whether --enable-locking was given.
|
||||||
|
|
@ -7637,12 +7628,12 @@ elif test $usingScheme ; then
|
||||||
unused="$unused tcltk"
|
unused="$unused tcltk"
|
||||||
cadinstall="$cadinstall lisp"
|
cadinstall="$cadinstall lisp"
|
||||||
extra_libs="$extra_libs \${MAGICDIR}/lisp/liblisp.o"
|
extra_libs="$extra_libs \${MAGICDIR}/lisp/liblisp.o"
|
||||||
programs="$programs extcheck graphics"
|
programs="$programs graphics"
|
||||||
$as_echo "#define SCHEME_INTERPRETER 1" >>confdefs.h
|
$as_echo "#define SCHEME_INTERPRETER 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
unused="$unused lisp tcltk"
|
unused="$unused lisp tcltk"
|
||||||
programs="$programs extcheck graphics"
|
programs="$programs graphics"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -914,20 +914,13 @@ AC_ARG_ENABLE(modular,
|
||||||
[],
|
[],
|
||||||
[enable_modular=no])
|
[enable_modular=no])
|
||||||
|
|
||||||
if test $usingTcl ; then
|
if test "x$enable_modular" = "xyes" ; then
|
||||||
if test "x$enable_modular" = "xyes" ; then
|
|
||||||
programs="$programs ext2sim ext2spice"
|
|
||||||
AC_DEFINE(EXT2SPICE_AUTO)
|
AC_DEFINE(EXT2SPICE_AUTO)
|
||||||
AC_DEFINE(EXT2SIM_AUTO)
|
AC_DEFINE(EXT2SIM_AUTO)
|
||||||
else
|
else
|
||||||
modules="$modules ext2sim ext2spice"
|
modules="$modules ext2sim ext2spice"
|
||||||
extra_libs="$extra_libs \${MAGICDIR}/ext2sim/libext2sim.o"
|
extra_libs="$extra_libs \${MAGICDIR}/ext2sim/libext2sim.o"
|
||||||
extra_libs="$extra_libs \${MAGICDIR}/ext2spice/libext2spice.o"
|
extra_libs="$extra_libs \${MAGICDIR}/ext2spice/libext2spice.o"
|
||||||
fi
|
|
||||||
else
|
|
||||||
programs="$programs ext2sim ext2spice"
|
|
||||||
AC_DEFINE(EXT2SPICE_AUTO)
|
|
||||||
AC_DEFINE(EXT2SIM_AUTO)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(locking,
|
AC_ARG_ENABLE(locking,
|
||||||
|
|
@ -1268,11 +1261,11 @@ elif test $usingScheme ; then
|
||||||
unused="$unused tcltk"
|
unused="$unused tcltk"
|
||||||
cadinstall="$cadinstall lisp"
|
cadinstall="$cadinstall lisp"
|
||||||
extra_libs="$extra_libs \${MAGICDIR}/lisp/liblisp.o"
|
extra_libs="$extra_libs \${MAGICDIR}/lisp/liblisp.o"
|
||||||
programs="$programs extcheck graphics"
|
programs="$programs graphics"
|
||||||
AC_DEFINE(SCHEME_INTERPRETER)
|
AC_DEFINE(SCHEME_INTERPRETER)
|
||||||
else
|
else
|
||||||
unused="$unused lisp tcltk"
|
unused="$unused lisp tcltk"
|
||||||
programs="$programs extcheck graphics"
|
programs="$programs graphics"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -809,11 +809,10 @@ mainInitFinal()
|
||||||
char *rname;
|
char *rname;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
/* Reset terminal if exit is called inside a TCL script */
|
/* Reset terminal if exit is called inside a TCL script */
|
||||||
Tcl_SetExitProc(tcl_exit_hook);
|
Tcl_SetExitProc(tcl_exit_hook);
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
|
||||||
|
|
||||||
/* Read in system pre-startup file, if it exists. */
|
/* Read in system pre-startup file, if it exists. */
|
||||||
|
|
||||||
/* Use PaOpen first to perform variable substitutions, and */
|
/* Use PaOpen first to perform variable substitutions, and */
|
||||||
|
|
@ -1205,7 +1204,9 @@ mainInitFinal()
|
||||||
UndoFlush();
|
UndoFlush();
|
||||||
TxClearPoint();
|
TxClearPoint();
|
||||||
|
|
||||||
|
#ifdef MAGIC_WRAPPER
|
||||||
Tcl_SetExitProc(NULL);
|
Tcl_SetExitProc(NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue