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

Function parse_options

tools/ippeveprinter.c:5722–5747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5720 */
5721
5722static int /* O - Number of options */
5723parse_options(ippeve_client_t *client, /* I - Client */
5724 cups_option_t **options)/* O - Options */
5725{
5726 char *name, /* Name */
5727 *value, /* Value */
5728 *next; /* Next name=value pair */
5729 int num_options = 0; /* Number of options */
5730
5731
5732 *options = NULL;
5733
5734 for (name = client->options; name && *name; name = next)
5735 {
5736 if ((value = strchr(name, '=')) == NULL)
5737 break;
5738
5739 *value++ = '\0';
5740 if ((next = strchr(value, '&')) != NULL)
5741 *next++ = '\0';
5742
5743 num_options = cupsAddOption(name, value, num_options, options);
5744 }
5745
5746 return (num_options);
5747}
5748
5749
5750/*

Callers 2

show_mediaFunction · 0.70
show_suppliesFunction · 0.70

Calls 1

cupsAddOptionFunction · 0.85

Tested by

no test coverage detected