* Count the number of elements in a simple comma-separated list. */
| 1032 | * Count the number of elements in a simple comma-separated list. |
| 1033 | */ |
| 1034 | static int |
| 1035 | count_comma_separated_elems(const char *input) |
| 1036 | { |
| 1037 | int n; |
| 1038 | |
| 1039 | n = 1; |
| 1040 | for (; *input != '\0'; input++) |
| 1041 | { |
| 1042 | if (*input == ',') |
| 1043 | n++; |
| 1044 | } |
| 1045 | |
| 1046 | return n; |
| 1047 | } |
| 1048 | |
| 1049 | /* |
| 1050 | * Parse a simple comma-separated list. |