load_ppds("/opt/share/ppd", "lsb/opt", 1);
#endif // __APPLE__
- /*
- * Cull PPD files that are no longer present...
- */
-
- for (ppd = (ppd_info_t *)cupsArrayFirst(PPDsByName);
- ppd;
- ppd = (ppd_info_t *)cupsArrayNext(PPDsByName))
- if (!ppd->found)
- {
- /*
- * Remove this PPD file from the list...
- */
-
- cupsArrayRemove(PPDsByName, ppd);
- cupsArrayRemove(PPDsByMakeModel, ppd);
- free(ppd);
-
- ChangedPPD = 1;
- }
-
/*
* Write the new ppds.dat file...
*/
cupsFileWrite(fp, (char *)&ppdsync, sizeof(ppdsync));
- for (ppd = (ppd_info_t *)cupsArrayFirst(PPDsByName);
- ppd;
- ppd = (ppd_info_t *)cupsArrayNext(PPDsByName))
- cupsFileWrite(fp, (char *)&(ppd->record), sizeof(ppd_rec_t));
+ for (ppd = (ppd_info_t *)cupsArrayFirst(PPDsByName); ppd; ppd = (ppd_info_t *)cupsArrayNext(PPDsByName))
+ {
+ if (ppd->found)
+ cupsFileWrite(fp, (char *)&(ppd->record), sizeof(ppd_rec_t));
+ }
cupsFileClose(fp);
*/
if (ppd->record.type < PPD_TYPE_POSTSCRIPT ||
- ppd->record.type >= PPD_TYPE_DRV)
+ ppd->record.type >= PPD_TYPE_DRV ||
+ !ppd->found)
continue;
if (cupsArrayFind(exclude, ppd->record.scheme) ||
*/
if (ppd->record.type < PPD_TYPE_POSTSCRIPT ||
- ppd->record.type >= PPD_TYPE_DRV)
+ ppd->record.type >= PPD_TYPE_DRV ||
+ !ppd->found)
continue;
if (cupsArrayFind(exclude, ppd->record.scheme) ||
*/
if (ppd->record.type < PPD_TYPE_POSTSCRIPT ||
- ppd->record.type >= PPD_TYPE_DRV)
+ ppd->record.type >= PPD_TYPE_DRV ||
+ !ppd->found)
continue;
/*