command 'print': preserve case for filenames after redirection '>'

This commit is contained in:
Holger Vogt 2018-08-24 15:41:53 +02:00
parent eb68799f18
commit 2b50ca7271
1 changed files with 11 additions and 1 deletions

View File

@ -926,6 +926,7 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
!ciprefix("source", buffer) &&
!ciprefix("load", buffer) &&
!ciprefix("plot", buffer) &&
!ciprefix("print", buffer) &&
!ciprefix("hardcopy", buffer) &&
!(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++;
}
}
} 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 */
char *p;
if ((p = strstr(buffer, "sourcepath"))) {