| 5720 | */ |
| 5721 | |
| 5722 | static int /* O - Number of options */ |
| 5723 | parse_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 | /* |
no test coverage detected