diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 59f631cee..1c778e123 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -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'; diff --git a/src/frontend/rawfile.c b/src/frontend/rawfile.c index a07b23a6e..81826ba13 100644 --- a/src/frontend/rawfile.c +++ b/src/frontend/rawfile.c @@ -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) {