snprintf(srcfile, sizeof(srcfile), "%s/ppd/%s.ppd", ServerRoot,
printer->name);
- if ((ppd = ppdOpenFile(srcfile)) != NULL)
+ if ((ppd = _ppdOpenFile(srcfile, _PPD_LOCALIZATION_NONE)) != NULL)
{
for (ppdattr = ppdFindAttr(ppd, "cupsPortMonitor", NULL);
ppdattr;
*/
snprintf(ppdfile, sizeof(ppdfile), "%s/ppd/%s.ppd", ServerRoot, p->name);
- if ((ppd = ppdOpenFile(ppdfile)) == NULL)
+ if ((ppd = _ppdOpenFile(ppdfile, _PPD_LOCALIZATION_ICC_PROFILES)) == NULL)
return;
/*
return (-1);
}
+ /*
+ * Open the source file for a copy...
+ */
+
+ if ((src = cupsFileOpen(tempfile, "rb")) == NULL)
+ {
+ unlink(tempfile);
+ return (-1);
+ }
+
/*
* Read the source file and see what page sizes are supported...
*/
- if ((ppd = ppdOpenFile(tempfile)) == NULL)
+ if ((ppd = _ppdOpen(src, _PPD_LOCALIZATION_NONE)) == NULL)
{
+ cupsFileClose(src);
unlink(tempfile);
return (-1);
}
ppdClose(ppd);
- /*
- * Open the source file for a copy...
- */
-
- if ((src = cupsFileOpen(tempfile, "rb")) == NULL)
- {
- cupsFreeOptions(num_defaults, defaults);
- unlink(tempfile);
- return (-1);
- }
-
/*
* Open the destination file for a copy...
*/
* Copy the source file to the destination...
*/
+ cupsFileRewind(src);
+
while (cupsFileGets(src, buffer, sizeof(buffer)))
{
if (!strncmp(buffer, "*Default", 8))