| 356 | */ |
| 357 | |
| 358 | ppd_choice_t * /* O - Choice pointer or @code NULL@ */ |
| 359 | ppdFindChoice(ppd_option_t *o, /* I - Pointer to option */ |
| 360 | const char *choice) /* I - Name of choice */ |
| 361 | { |
| 362 | int i; /* Looping var */ |
| 363 | ppd_choice_t *c; /* Current choice */ |
| 364 | |
| 365 | |
| 366 | if (!o || !choice) |
| 367 | return (NULL); |
| 368 | |
| 369 | if (choice[0] == '{' || !_cups_strncasecmp(choice, "Custom.", 7)) |
| 370 | choice = "Custom"; |
| 371 | |
| 372 | for (i = o->num_choices, c = o->choices; i > 0; i --, c ++) |
| 373 | if (!_cups_strcasecmp(c->choice, choice)) |
| 374 | return (c); |
| 375 | |
| 376 | return (NULL); |
| 377 | } |
| 378 | |
| 379 | |
| 380 | /* |