Write out the current in the old fashion
1 v1#branch current when keep#branch is set in .spiceinit. To make the raw file compatible with ICCAP.
This commit is contained in:
parent
7d2ea36fdf
commit
33ec8dfc25
|
|
@ -972,6 +972,7 @@ static void
|
|||
fileInit_pass2(runDesc *run)
|
||||
{
|
||||
int i, type;
|
||||
bool keepbranch = cp_getvar("keep#branch", CP_BOOL, NULL, 0);
|
||||
|
||||
for (i = 0; i < run->numData; i++) {
|
||||
|
||||
|
|
@ -979,7 +980,7 @@ fileInit_pass2(runDesc *run)
|
|||
|
||||
type = guess_type(name);
|
||||
|
||||
if (type == SV_CURRENT) {
|
||||
if (type == SV_CURRENT && !keepbranch) {
|
||||
char *branch = strstr(name, "#branch");
|
||||
if (branch)
|
||||
*branch = '\0';
|
||||
|
|
|
|||
|
|
@ -51,8 +51,10 @@ void raw_write(char *name, struct plot *pl, bool app, bool binary)
|
|||
double dd;
|
||||
char buf[BSIZE_SP];
|
||||
char *branch;
|
||||
bool keepbranch = FALSE;
|
||||
|
||||
raw_padding = !cp_getvar("nopadding", CP_BOOL, NULL, 0);
|
||||
keepbranch = cp_getvar("keep#branch", CP_BOOL, NULL, 0);
|
||||
|
||||
/* Why bother printing out an empty plot? */
|
||||
if (!pl->pl_dvecs) {
|
||||
|
|
@ -157,7 +159,7 @@ void raw_write(char *name, struct plot *pl, bool app, bool binary)
|
|||
fprintf(fp, "Variables:\n");
|
||||
for (i = 0, v = pl->pl_dvecs; v; v = v->v_next) {
|
||||
/* write i(name) instaed of name#branch */
|
||||
if (v->v_type == SV_CURRENT) {
|
||||
if (v->v_type == SV_CURRENT && !keepbranch) {
|
||||
branch = NULL;
|
||||
/* get name only*/
|
||||
if ((branch = strstr(v->v_name, "#branch")) != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue