Lines Matching refs:num_options
28 static int cups_find_option(const char *name, int num_options,
45 int num_options, /* I - Number of options */ in cupsAddIntegerOption() argument
53 return (cupsAddOption(name, strvalue, num_options, options)); in cupsAddIntegerOption()
67 int num_options,/* I - Number of options */ in cupsAddOption() argument
75 …(name=\"%s\", value=\"%s\", num_options=%d, options=%p)", name, value, num_options, (void *)option… in cupsAddOption()
77 if (!name || !name[0] || !value || !options || num_options < 0) in cupsAddOption()
79 DEBUG_printf(("3cupsAddOption: Returning %d", num_options)); in cupsAddOption()
80 return (num_options); in cupsAddOption()
84 num_options = cupsRemoveOption("print-quality", num_options, options); in cupsAddOption()
86 num_options = cupsRemoveOption("cupsPrintQuality", num_options, options); in cupsAddOption()
92 if (num_options == 0) in cupsAddOption()
99 insert = cups_find_option(name, num_options, *options, num_options - 1, in cupsAddOption()
115 if (num_options == 0) in cupsAddOption()
118 temp = (cups_option_t *)realloc(*options, sizeof(cups_option_t) * (size_t)(num_options + 1)); in cupsAddOption()
128 if (insert < num_options) in cupsAddOption()
131 (int)(num_options - insert))); in cupsAddOption()
132 … memmove(temp + insert + 1, temp + insert, (size_t)(num_options - insert) * sizeof(cups_option_t)); in cupsAddOption()
137 num_options ++; in cupsAddOption()
154 DEBUG_printf(("3cupsAddOption: Returning %d", num_options)); in cupsAddOption()
156 return (num_options); in cupsAddOption()
166 int num_options, /* I - Number of options */ in cupsFreeOptions() argument
172 DEBUG_printf(("cupsFreeOptions(num_options=%d, options=%p)", num_options, (void *)options)); in cupsFreeOptions()
174 if (num_options <= 0 || !options) in cupsFreeOptions()
177 for (i = 0; i < num_options; i ++) in cupsFreeOptions()
199 int num_options, /* I - Number of options */ in cupsGetIntegerOption() argument
202 const char *value = cupsGetOption(name, num_options, options); in cupsGetIntegerOption()
225 int num_options,/* I - Number of options */ in cupsGetOption() argument
232 …DEBUG_printf(("2cupsGetOption(name=\"%s\", num_options=%d, options=%p)", name, num_options, (void … in cupsGetOption()
234 if (!name || num_options <= 0 || !options) in cupsGetOption()
240 match = cups_find_option(name, num_options, options, -1, &diff); in cupsGetOption()
266 int num_options, /* I - Number of options */ in cupsParseOptions() argument
277 …DEBUG_printf(("cupsParseOptions(arg=\"%s\", num_options=%d, options=%p)", arg, num_options, (void … in cupsParseOptions()
285 DEBUG_printf(("1cupsParseOptions: Returning %d", num_options)); in cupsParseOptions()
286 return (num_options); in cupsParseOptions()
289 if (!options || num_options < 0) in cupsParseOptions()
302 DEBUG_printf(("1cupsParseOptions: Returning %d", num_options)); in cupsParseOptions()
303 return (num_options); in cupsParseOptions()
370 num_options = cupsAddOption(name + 2, "false", num_options, in cupsParseOptions()
373 num_options = cupsAddOption(name, "true", num_options, options); in cupsParseOptions()
465 num_options = cupsAddOption(name, value, num_options, options); in cupsParseOptions()
475 DEBUG_printf(("1cupsParseOptions: Returning %d", num_options)); in cupsParseOptions()
477 return (num_options); in cupsParseOptions()
490 int num_options, /* I - Current number of options */ in cupsRemoveOption() argument
497 …DEBUG_printf(("2cupsRemoveOption(name=\"%s\", num_options=%d, options=%p)", name, num_options, (vo… in cupsRemoveOption()
503 if (!name || num_options < 1 || !options) in cupsRemoveOption()
505 DEBUG_printf(("3cupsRemoveOption: Returning %d", num_options)); in cupsRemoveOption()
506 return (num_options); in cupsRemoveOption()
513 for (i = num_options, option = *options; i > 0; i --, option ++) in cupsRemoveOption()
525 num_options --; in cupsRemoveOption()
539 DEBUG_printf(("3cupsRemoveOption: Returning %d", num_options)); in cupsRemoveOption()
540 return (num_options); in cupsRemoveOption()
646 int num_options, /* I - Number of options */ in cups_find_option() argument
658 …on(name=\"%s\", num_options=%d, options=%p, prev=%d, rdiff=%p)", name, num_options, (void *)option… in cups_find_option()
661 for (left = 0; left < num_options; left ++) in cups_find_option()
676 (diff > 0 && prev == (num_options - 1))) in cups_find_option()
697 right = num_options - 1; in cups_find_option()
707 right = num_options - 1; in cups_find_option()