Lines Matching defs:longopt
47 char *line, *eptr, *longopt, *ptr, *optstring = NULL, *result = NULL;
95 } else if (strncmp(line, "longopt:", 8) == 0) {
97 errx(1, "longopt: without longopts at line %ld",
100 errx(1, "longopt: too many options at line %ld",
105 longopt = strsep(&ptr, ",");
106 if (longopt == NULL)
107 errx(1, "missing longopt at line %ld",
109 longopts[nlongopts].name = strdup(longopt);
112 longopt = strsep(&ptr, ",");
113 if (*longopt != '\0') {
114 if (strncmp(longopt, "0", 1) == 0 ||
115 strncmp(longopt, "no_argument", 2) == 0)
117 else if (strncmp(longopt, "1", 1) == 0 ||
118 strncmp(longopt, "required_argument", 8) == 0)
120 else if (strncmp(longopt, "2", 1) == 0 ||
121 strncmp(longopt, "optional_argument", 8) == 0)
125 longopt, (unsigned long)lineno);
129 longopt = strsep(&ptr, ",");
130 if (*longopt != '\0' &&
131 strncmp(longopt, "NULL", 4) != 0)
135 longopt = strsep(&ptr, ",");
136 if (*longopt == '\0')
139 if (*longopt != '\'') {
141 (int)strtoul(longopt, &eptr, 10);
146 longopts[nlongopts].val = (int)longopt[1];