cups/cups-includeifexists.patch

21 lines
776 B
Diff
Raw Normal View History

--- cups-1.2rc3/pdftops/GlobalParams.cxx.includeifexists 2006-04-25 13:19:09.000000000 +0100
+++ cups-1.2rc3/pdftops/GlobalParams.cxx 2006-04-25 13:19:12.000000000 +0100
@@ -536,6 +536,17 @@
error(-1, "Bad 'include' config file command (%s:%d)",
fileName->getCString(), line);
}
+ } else if (!cmd->cmp("includeifexists")) {
+ if (tokens->getLength() == 2) {
+ incFile = (GString *)tokens->get(1);
+ if ((f2 = fopen(incFile->getCString(), "r"))) {
+ parseFile(incFile, f2);
+ fclose(f2);
+ }
+ } else {
+ error(-1, "Bad 'includeifexists' config file command (%s:%d)",
+ fileName->getCString(), line);
+ }
} else if (!cmd->cmp("nameToUnicode")) {
parseNameToUnicode(tokens, fileName, line);
} else if (!cmd->cmp("cidToUnicode")) {