• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/samba-3.0.13/source/popt/

Lines Matching defs:opt

29     const struct poptOption * opt = table;
32 while (opt->longName || opt->shortName || opt->arg) {
33 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
34 invokeCallbacks(con, opt->arg, post);
35 } else if (((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) &&
36 ((!post && (opt->argInfo & POPT_CBFLAG_PRE)) ||
37 ( post && (opt->argInfo & POPT_CBFLAG_POST)))) {
38 cb = (poptCallbackType)opt->arg;
40 NULL, NULL, opt->descrip);
42 opt++;
279 const struct poptOption * opt = table;
287 while (opt->longName || opt->shortName || opt->arg) {
288 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
289 opt2 = findOption(opt->arg, longName, shortName, callback,
293 *callbackData = opt->descrip;
296 } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) {
297 cb = opt;
298 } else if (longName && opt->longName &&
299 (!singleDash || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) &&
300 !strcmp(longName, opt->longName)) {
302 } else if (shortName && shortName == opt->shortName) {
305 opt++;
308 if (!opt->longName && !opt->shortName) return NULL;
317 return opt;
398 const struct poptOption * opt = NULL;
481 opt = findOption(con->options, optString, '\0', &cb, &cbData,
483 if (!opt && !singleDash)
487 if (!opt) {
491 opt->argInfo & POPT_ARGFLAG_STRIP) {
512 opt = findOption(con->options, NULL, *origOptString, &cb,
514 if (!opt)
522 if (opt->arg && (opt->argInfo & POPT_ARG_MASK) == POPT_ARG_NONE) {
523 *((int *)opt->arg) = 1;
524 } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_VAL) {
525 if (opt->arg)
526 *((int *) opt->arg) = opt->val;
527 } else if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) {
548 opt->argInfo & POPT_ARGFLAG_STRIP &&
556 if (opt->arg) {
560 switch (opt->argInfo & POPT_ARG_MASK) {
563 *((const char **) opt->arg) = xstrdup(con->os->nextArg);
574 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_LONG) {
575 *((long *) opt->arg) = aLong;
579 *((int *) opt->arg) = aLong;
585 opt->argInfo & POPT_ARG_MASK);
592 cb(con, POPT_CALLBACK_REASON_OPTION, opt, con->os->nextArg, cbData);
593 else if (opt->val && ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL))
602 { char *s = malloc((opt->longName ? strlen(opt->longName) : 0) + 3);
603 if (opt->longName)
604 sprintf(s, "--%s", opt->longName);
606 sprintf(s, "-%c", opt->shortName);
610 if (opt->arg && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE
611 && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL) {
616 return opt->val;