+ case OPT_WIDTHS:
+ {
+ int last = -1;
+ char *w;
+
+ params->n_widths = 0;
+ for (w = strtok (optarg, ", "); w != NULL; w = strtok (NULL, ", "))
+ {
+ int value = atoi (w);
+
+ if (params->n_widths >= MAX_WIDTHS)
+ error (1, 0, "Too many widths on --widths (only %d are allowed)",
+ MAX_WIDTHS);
+ if (!isdigit (w[0]) || value < 0 || value > 31)
+ error (1, 0, "--widths argument must be a list of 1 to %d "
+ "integers between 0 and 31 in increasing order",
+ MAX_WIDTHS);
+
+ /* This is an artificial requirement merely to ensure
+ that there are no duplicates. Duplicates aren't a
+ real problem but they would waste time. */
+ if (value <= last)
+ error (1, 0, "--widths arguments must be in increasing order");
+
+ params->widths[params->n_widths++] = value;
+ }
+ if (params->n_widths == 0)
+ error (1, 0, "at least one value must be specified on --widths");
+ }
+ break;
+