choice
} *choice, choices[] = {
for (choice = choices; choice->str != NULL; choice++) {
if (len == 1 && choice->ch == answer[0])
if (strncasecmp(answer, choice->str, len) == 0)
if (choice->perm)
perm_answer = choice->res;
return (choice->res);
i2r_ASIdentifierChoice(BIO *out, ASIdentifierChoice *choice, int indent,
if (choice == NULL)
switch (choice->type) {
for (i = 0; i < sk_ASIdOrRange_num(choice->u.asIdsOrRanges);
sk_ASIdOrRange_value(choice->u.asIdsOrRanges, i);
ASIdentifierChoice **choice;
choice = &asid->asnum;
choice = &asid->rdi;
if (*choice == NULL) {
if ((*choice = ASIdentifierChoice_new()) == NULL)
if (((*choice)->u.inherit = ASN1_NULL_new()) == NULL)
(*choice)->type = ASIdentifierChoice_inherit;
return (*choice)->type == ASIdentifierChoice_inherit;
ASIdentifierChoice **choice;
choice = &asid->asnum;
choice = &asid->rdi;
if (*choice != NULL && (*choice)->type == ASIdentifierChoice_inherit)
if (*choice == NULL) {
if ((*choice = ASIdentifierChoice_new()) == NULL)
(*choice)->u.asIdsOrRanges = sk_ASIdOrRange_new(ASIdOrRange_cmp);
if ((*choice)->u.asIdsOrRanges == NULL)
(*choice)->type = ASIdentifierChoice_asIdsOrRanges;
if (!(sk_ASIdOrRange_push((*choice)->u.asIdsOrRanges, aor)))
ASIdentifierChoice_is_canonical(ASIdentifierChoice *choice)
if (choice == NULL || choice->type == ASIdentifierChoice_inherit)
if (choice->type != ASIdentifierChoice_asIdsOrRanges ||
sk_ASIdOrRange_num(choice->u.asIdsOrRanges) == 0)
for (i = 0; i < sk_ASIdOrRange_num(choice->u.asIdsOrRanges) - 1; i++) {
ASIdOrRange *a = sk_ASIdOrRange_value(choice->u.asIdsOrRanges,
ASIdOrRange *b = sk_ASIdOrRange_value(choice->u.asIdsOrRanges,
i = sk_ASIdOrRange_num(choice->u.asIdsOrRanges) - 1;
ASIdOrRange *a = sk_ASIdOrRange_value(choice->u.asIdsOrRanges,
ASIdentifierChoice_canonize(ASIdentifierChoice *choice)
if (choice == NULL || choice->type == ASIdentifierChoice_inherit)
if (choice->type != ASIdentifierChoice_asIdsOrRanges ||
sk_ASIdOrRange_num(choice->u.asIdsOrRanges) == 0) {
sk_ASIdOrRange_sort(choice->u.asIdsOrRanges);
for (i = 0; i < sk_ASIdOrRange_num(choice->u.asIdsOrRanges) - 1; i++) {
ASIdOrRange *a = sk_ASIdOrRange_value(choice->u.asIdsOrRanges,
ASIdOrRange *b = sk_ASIdOrRange_value(choice->u.asIdsOrRanges,
(void)sk_ASIdOrRange_delete(choice->u.asIdsOrRanges,
i = sk_ASIdOrRange_num(choice->u.asIdsOrRanges) - 1;
ASIdOrRange *a = sk_ASIdOrRange_value(choice->u.asIdsOrRanges,
if (!ASIdentifierChoice_is_canonical(choice))
int choice;
choice = arc4random_uniform(parent->num_children);
choice, parent->num_children));
for (fp = parent->child; choice--; fp = fp->next)
choice = arc4random_uniform(parent->tbl.str_numstr);
choice, parent->tbl.str_numstr));
for (fp = parent->child; (unsigned int)choice >= fp->tbl.str_numstr;
choice -= fp->tbl.str_numstr;
fp->name, fp->tbl.str_numstr, choice));
int choice;
choice = arc4random_uniform(100);
DPRINTF(1, (stderr, "choice = %d\n", choice));
if (choice < fp->percent)
choice -= fp->percent;
fp->name, fp->percent, choice));
fp->name, fp->percent, choice));
choice = arc4random_uniform(Noprob_tbl.str_numstr);
DPRINTF(1, (stderr, "choice = %d (of %u) \n", choice,
while ((unsigned int)choice >= fp->tbl.str_numstr) {
choice -= fp->tbl.str_numstr;
choice));
char choice[64];
if (fgets(choice, sizeof(choice), fp) != NULL) {
if (!strcmp(choice, km_sorted[i]->desc)) {
struct datalink *dl, *choice, *otherlinkup;
choice = otherlinkup = NULL;
if (choice)
otherlinkup = choice;
choice = dl;
choice = dl;
choice = NULL;
if (choice) {
percent, choice->name);
datalink_Up(choice, 1, 1);
percent, choice->name);
datalink_Close(choice, CLOSE_STAYDOWN);
int i, result, choice = 0;
dialog_vars.default_item = listitems[choice].name;
menu_height, item_no, listitems, &choice, NULL);
if (ditems[choice].fire != NULL) {
status = ditems[choice].fire(ditems + choice);