Lines Matching defs:opt
326 static Optstate_t opt;
334 if (!(op = (Option_t*)hashget(opt.table, name)) && (strchr(name, '-') || strchr(name, '_')))
339 op = (Option_t*)hashget(opt.table, sfstruse(internal.tmp));
351 hashput(opt.table, op->name, (char*)op);
358 hashput(opt.table, strdup(sfstruse(internal.tmp)), (char*)op);
368 hashput(opt.table, strdup(buf), (char*)op);
372 hashput(opt.table, strdup(buf), (char*)op);
385 opt.table = hashalloc(NiL, HASH_name, "options", 0);
396 if (opt.tail)
397 opt.tail->next = &options[i];
399 opt.head = &options[i];
400 opt.tail = &options[i];
530 sfputc(opt.usage, '[');
533 sfputc(opt.usage, OPT(op->flags));
535 sfputc(opt.usage, '!');
536 sfputc(opt.usage, '=');
538 sfprintf(opt.usage, "%d:%s?%s]", index + OPT_OFFSET, op->name, op->description);
542 sfputc(opt.usage, '#');
544 sfputc(opt.usage, ':');
546 sfputc(opt.usage, '?');
548 sfputc(opt.usage, '[');
549 sfputr(opt.usage, op->arg, -1);
551 sfputc(opt.usage, ']');
553 sfputc(opt.usage, '\n');
555 pos = sfstrtell(opt.usage);
557 sfprintf(opt.usage, usage2, version);
559 sfputc(opt.usage, 0);
560 sfstrseek(opt.usage, pos, SEEK_SET);
786 if (opt.lasthidden)
787 opt.lasthidden = opt.lasthidden->next = x;
789 opt.hidden = opt.lasthidden = x;
1186 putoption(nop, opt.usageindex);
1187 genusage(nop, opt.usageindex++, 1);
1198 if (opt.tail)
1199 opt.tail->next = nop;
1201 opt.head = nop;
1202 opt.tail = nop;
1628 while (x = opt.delayed)
1630 opt.delayed = x->next;
1639 for (x = opt.delayed; x; x = x->next)
1695 for (op = opt.head; op; op = op->next)
1708 while (x = opt.hidden)
1710 opt.hidden = x->next;
1725 for (op = opt.head; op; op = op->next)
1790 if (opt.lastdelayed)
1791 opt.lastdelayed = opt.lastdelayed->next = x;
1793 opt.delayed = opt.lastdelayed = x;
1832 while (i = optstr(s, sfstrbase(opt.usage)))
1875 if (!(opt.usage = sfstropen()))
1877 sfprintf(opt.usage, usage1, version);
1881 opt.usageindex = i;
1885 while (i = optget(argv, sfstrbase(opt.usage)))
2032 for (x = opt.delayed; x; x = x->next)