Lines Matching refs:o

162 char *opt_init(int ac, char **av, const OPTIONS *o)  in opt_init()  argument
168 opts = o; in opt_init()
174 for (; o->name != NULL && o->name != OPT_PARAM_STR; ++o) { in opt_init()
180 if (o->name == OPT_HELP_STR in opt_init()
181 || o->name == OPT_MORE_STR in opt_init()
182 || o->name == OPT_SECTION_STR) in opt_init()
185 i = o->valtype; in opt_init()
188 OPENSSL_assert(o->name[0] != '-'); in opt_init()
189 if (o->valtype == '.') in opt_init()
190 OPENSSL_assert(o->retval == OPT_PARAM); in opt_init()
192 OPENSSL_assert(o->retval == OPT_DUP || o->retval > OPT_PARAM); in opt_init()
204 for (next = o + 1; next->name; ++next) { in opt_init()
209 && strcmp(o->name, next->name) == 0; in opt_init()
212 prog, o->name); in opt_init()
217 if (o->name[0] == '\0') { in opt_init()
220 unknown = o; in opt_init()
881 const OPTIONS *o; in opt_next() local
911 for (o = opts; o->name; ++o) { in opt_next()
913 if (!(strcmp(p, "h") == 0 && strcmp(o->name, "help") == 0) in opt_next()
914 && strcmp(p, o->name) != 0) in opt_next()
918 if (o->valtype == 0 || o->valtype == '-') { in opt_next()
924 return o->retval; in opt_next()
931 prog, o->name); in opt_next()
938 switch (o->valtype) { in opt_next()
963 if (o->valtype == 'p' && ival <= 0) { in opt_next()
965 prog, arg, o->name); in opt_next()
968 if (o->valtype == 'N' && ival < 0) { in opt_next()
970 prog, arg, o->name); in opt_next()
997 o->valtype == 'c' ? OPT_FMT_PDS : in opt_next()
998 o->valtype == 'E' ? OPT_FMT_PDE : in opt_next()
999 o->valtype == 'F' ? OPT_FMT_PEMDER : in opt_next()
1000 o->valtype == 'A' ? OPT_FMT_ASN1 : in opt_next()
1004 prog, arg, o->name); in opt_next()
1009 return o->retval; in opt_next()
1091 static const char *valtype2param(const OPTIONS *o) in valtype2param() argument
1093 switch (o->valtype) { in valtype2param()
1131 static void opt_print(const OPTIONS *o, int doingparams, int width) in opt_print() argument
1141 help = o->helpstr ? o->helpstr : "(No additional info)"; in opt_print()
1142 if (o->name == OPT_HELP_STR) { in opt_print()
1145 } else if (o->name == OPT_SECTION_STR) { in opt_print()
1149 } else if (o->name == OPT_PARAM_STR) { in opt_print()
1158 if (o->name == OPT_MORE_STR) { in opt_print()
1171 printlen = opt_printf_stderr("%s" , o->name[0] ? o->name : "*"); in opt_print()
1174 if (o->valtype != '-') { in opt_print()
1175 printlen = opt_printf_stderr(" %s" , valtype2param(o)); in opt_print()
1193 const OPTIONS *o; in opt_help() local
1201 for (o = list; o->name; o++) { in opt_help()
1202 if (o->name == OPT_MORE_STR) in opt_help()
1205 i = 2 + (int)strlen(o->name); in opt_help()
1206 if (o->valtype != '-') in opt_help()
1207 i += 1 + strlen(valtype2param(o)); in opt_help()
1223 for (o = list; o->name; o++) { in opt_help()
1224 if (o->name == OPT_PARAM_STR) in opt_help()
1226 opt_print(o, sawparams, width); in opt_help()