mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
command 'print': preserve case for filenames after redirection '>'
This commit is contained in:
+11
-1
@@ -926,6 +926,7 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
|
|||||||
!ciprefix("source", buffer) &&
|
!ciprefix("source", buffer) &&
|
||||||
!ciprefix("load", buffer) &&
|
!ciprefix("load", buffer) &&
|
||||||
!ciprefix("plot", buffer) &&
|
!ciprefix("plot", buffer) &&
|
||||||
|
!ciprefix("print", buffer) &&
|
||||||
!ciprefix("hardcopy", buffer) &&
|
!ciprefix("hardcopy", buffer) &&
|
||||||
!(ciprefix("set", buffer) && strstr(buffer, "sourcepath"))
|
!(ciprefix("set", buffer) && strstr(buffer, "sourcepath"))
|
||||||
)
|
)
|
||||||
@@ -994,7 +995,16 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
|
|||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else if (ciprefix("print", buffer)) {
|
||||||
|
/* lower case excluded for tokens following output redirection '>' */
|
||||||
|
for (s = buffer; *s && (*s != '\n'); s++) {
|
||||||
|
if (*s == '>')
|
||||||
|
break;
|
||||||
|
*s = tolower_c(*s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
/* add Inp_Path to sourcepath variable */
|
/* add Inp_Path to sourcepath variable */
|
||||||
char *p;
|
char *p;
|
||||||
if ((p = strstr(buffer, "sourcepath"))) {
|
if ((p = strstr(buffer, "sourcepath"))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user