MCPcopy Create free account
hub / github.com/OpenPrinting/cups / cupsGetOption

Function cupsGetOption

cups/options.c:219–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217 */
218
219const char * /* O - Option value or @code NULL@ */
220cupsGetOption(const char *name, /* I - Name of option */
221 int num_options,/* I - Number of options */
222 cups_option_t *options) /* I - Options */
223{
224 int diff, /* Result of comparison */
225 match; /* Matching index */
226
227
228 DEBUG_printf(("2cupsGetOption(name=\"%s\", num_options=%d, options=%p)", name, num_options, (void *)options));
229
230 if (!name || num_options <= 0 || !options)
231 {
232 DEBUG_puts("3cupsGetOption: Returning NULL");
233 return (NULL);
234 }
235
236 match = cups_find_option(name, num_options, options, -1, &diff);
237
238 if (!diff)
239 {
240 DEBUG_printf(("3cupsGetOption: Returning \"%s\"", options[match].value));
241 return (options[match].value);
242 }
243
244 DEBUG_puts("3cupsGetOption: Returning NULL");
245 return (NULL);
246}
247
248
249/*

Callers 15

get_optionsFunction · 0.85
pdf_to_psFunction · 0.85
eval_exprFunction · 0.85
exec_programFunction · 0.85
set_service_uriFunction · 0.85
show_mediaFunction · 0.85
show_suppliesFunction · 0.85
list_ppdsFunction · 0.85
exec_filtersFunction · 0.85
add_jobFunction · 0.85
copy_modelFunction · 0.85
print_jobFunction · 0.85

Calls 1

cups_find_optionFunction · 0.85

Tested by 5

mainFunction · 0.68
dests_equalFunction · 0.68
show_diffsFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68