Correction to prior commit to remove collision between defined

flag bits for name trimming and short handling method in the
ext2spice options.
This commit is contained in:
Tim Edwards 2021-07-10 21:27:19 -04:00
parent 1d24d2869d
commit d4a09bbc45
2 changed files with 10 additions and 6 deletions

View File

@ -661,7 +661,9 @@ CmdExtToSpice(w, cmd)
case EXTTOSPC_DEFAULT:
LocCapThreshold = 2;
LocResistThreshold = INFINITE_THRESHOLD;
EFOutputFlags = EF_CONVERTCOMMA | EF_CONVERTEQUAL;
/* Clear EFOutputFlags but preserve "short" behavior */
EFOutputFlags &= ~EF_TRIM_MASK;
EFOutputFlags |= EF_CONVERTCOMMA | EF_CONVERTEQUAL;
EFScale = 0.0;
if (EFArgTech)
{
@ -1440,7 +1442,8 @@ subcktVisit(use, hierName, is_top)
else
{
int savflags = EFOutputFlags;
EFOutputFlags = EF_CONVERTCOMMA; // Only substitute commas on subcircuit names
EFOutputFlags &= ~EF_TRIM_MASK;
EFOutputFlags |= EF_CONVERTCOMMA; // Only substitute commas on subcircuit names
/* Use full hierarchical decomposition for name */
/* (not just use->use_id. hierName already has use->use_id at end) */
@ -3499,7 +3502,7 @@ EFHNSprintf(str, hierName)
s = str;
if (hierName->hn_parent) str = efHNSprintfPrefix(hierName->hn_parent, str);
if (EFOutputFlags)
if (EFOutputFlags & EF_TRIM_MASK)
{
cp = hierName->hn_name;
trimGlob = (EFOutputFlags & EF_TRIMGLOB);

View File

@ -38,16 +38,17 @@ typedef unsigned char U_char;
/* with the same name. */
/* Flags to control output of node names. Stored in EFOutputFlags */
#define EF_TRIM_MASK 0x1f /* Mask for handling name trimming */
#define EF_TRIMGLOB 0x01 /* Delete trailing '!' from names */
#define EF_TRIMLOCAL 0x02 /* Delete trailing '#' from names */
#define EF_CONVERTCOMMA 0x04 /* Change ',' to '|' in names, else remove */
#define EF_CONVERTEQUAL 0x08 /* Change '=' to ':' in names, else remove */
#define EF_CONVERTBRACKETS 0x10 /* Change '[' and ']' to '_' in names */
#define EF_SHORT_MASK 0x30 /* Mask for handling port shorts */
#define EF_SHORT_MASK 0x60 /* Mask for handling port shorts */
#define EF_SHORT_NONE 0x00 /* Shorted ports are merged */
#define EF_SHORT_R 0x10 /* Shorted ports separated with 0 ohm resistor */
#define EF_SHORT_V 0x20 /* Shorted ports separated with 0 volt source */
#define EF_SHORT_R 0x20 /* Shorted ports separated with 0 ohm resistor */
#define EF_SHORT_V 0x40 /* Shorted ports separated with 0 volt source */
/*
* capacitance type now set to float