Index: cups/mark.c =================================================================== --- cups/mark.c (revision 8900) +++ cups/mark.c (working copy) @@ -842,6 +842,8 @@ if (!strcasecmp(option, "AP_D_InputSlot")) { + cupsArraySave(ppd->options); + if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) { key.option = o; @@ -851,13 +853,21 @@ cupsArrayRemove(ppd->marked, oldc); } } + + cupsArrayRestore(ppd->options); } /* * Check for custom options... */ - if ((o = ppdFindOption(ppd, option)) == NULL) + cupsArraySave(ppd->options); + + o = ppdFindOption(ppd, option); + + cupsArrayRestore(ppd->options); + + if (!o) return; loc = localeconv(); @@ -912,15 +922,15 @@ if (units) { if (!strcasecmp(units, "cm")) - cparam->current.custom_points *= 72.0f / 2.54f; + cparam->current.custom_points *= 72.0f / 2.54f; else if (!strcasecmp(units, "mm")) - cparam->current.custom_points *= 72.0f / 25.4f; + cparam->current.custom_points *= 72.0f / 25.4f; else if (!strcasecmp(units, "m")) - cparam->current.custom_points *= 72.0f / 0.0254f; + cparam->current.custom_points *= 72.0f / 0.0254f; else if (!strcasecmp(units, "in")) - cparam->current.custom_points *= 72.0f; + cparam->current.custom_points *= 72.0f; else if (!strcasecmp(units, "ft")) - cparam->current.custom_points *= 12.0f * 72.0f; + cparam->current.custom_points *= 12.0f * 72.0f; } break; @@ -1060,6 +1070,8 @@ * appropriate... */ + cupsArraySave(ppd->options); + if (!strcasecmp(option, "PageSize")) { if ((o = ppdFindOption(ppd, "PageRegion")) != NULL) @@ -1084,6 +1096,8 @@ } } } + + cupsArrayRestore(ppd->options); } else if (!strcasecmp(option, "InputSlot")) { @@ -1091,6 +1105,8 @@ * Unmark ManualFeed option... */ + cupsArraySave(ppd->options); + if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL) { key.option = o; @@ -1100,6 +1116,8 @@ cupsArrayRemove(ppd->marked, oldc); } } + + cupsArrayRestore(ppd->options); } else if (!strcasecmp(option, "ManualFeed") && !strcasecmp(choice, "True")) @@ -1108,6 +1126,8 @@ * Unmark InputSlot option... */ + cupsArraySave(ppd->options); + if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) { key.option = o; @@ -1117,6 +1137,8 @@ cupsArrayRemove(ppd->marked, oldc); } } + + cupsArrayRestore(ppd->options); } } @@ -1197,7 +1219,7 @@ return; } else - return; + return; /* * Search the PPD file for a matching size... Index: cups/conflicts.c =================================================================== --- cups/conflicts.c (revision 8900) +++ cups/conflicts.c (working copy) @@ -583,9 +583,13 @@ * Clear all conflicts... */ + cupsArraySave(ppd->options); + for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd)) o->conflicted = 0; + cupsArrayRestore(ppd->options); + /* * Test for conflicts... */ @@ -641,7 +645,7 @@ DEBUG_printf(("2ppdInstallableConflict(ppd=%p, option=\"%s\", choice=\"%s\")", ppd, option, choice)); - /* + /* * Range check input... */ Index: cgi-bin/admin.c =================================================================== --- cgi-bin/admin.c (revision 8900) +++ cgi-bin/admin.c (working copy) @@ -3297,11 +3297,16 @@ for (option = ppdFirstOption(ppd); option; option = ppdNextOption(ppd)) + { if ((var = cgiGetVariable(option->keyword)) != NULL) { have_options = 1; ppdMarkOption(ppd, option->keyword, var); + fprintf(stderr, "DEBUG: Set %s to %s...\n", option->keyword, var); } + else + fprintf(stderr, "DEBUG: Didn't find %s...\n", option->keyword); + } } if (!have_options || ppdConflicts(ppd))