Lines Matching defs:chp

234 	struct _choice_ *chp;
261 chp = menup->choice;
262 for (i = 1; chp; i++) {
268 choice[nchoice++] = chp->token;
270 chp = chp->next;
276 chp = menup->choice;
277 for (i = 0; chp; i++) {
279 if (strncmp(chp->token, strval, (size_t)len) == 0) {
280 if (chp->token[len] == '\0') {
281 found = chp->token;
287 found = chp->token;
289 chp = chp->next;
298 if (chp->token[len] == '\0') {
325 struct _choice_ *chp;
331 chp = menup->choice;
332 while (chp) {
333 struct _choice_ *_chp = chp;
335 chp = chp->next;
344 if ((chp = calloc(1, sizeof (struct _choice_))) == NULL)
348 free(chp);
352 free(chp);
356 chp->token = strtoki(pt, " \t\n");
357 chp->text = strtoki(NULL, "");
359 if (chp->text) {
360 while (isspace((unsigned char)*chp->text))
361 chp->text++;
363 n = (int)strlen(chp->token);
367 if (insert(chp, menup))
370 free(chp); /* duplicate entry */
405 insert(struct _choice_ *chp, CKMENU *menup)
415 if (strcmp(base->token, chp->token) == 0)
421 last->next = chp;
423 menup->choice = chp;
428 if ((n = strcmp(base->token, chp->token)) == 0)
438 chp->next = last->next;
439 last->next = chp;
441 chp->next = menup->choice;
442 menup->choice = chp;
451 struct _choice_ *chp;
464 chp = ((menup->attr & CKALPHA) ? next(menup->choice) : menup->choice);
465 for (i = 1; chp; ++i) {
469 (void) fprintf(stderr, format, chp->token);
470 if (chp->text) {
472 pt = chp->text;
487 chp = ((menup->attr & CKALPHA) ?
488 next(menup->choice) : chp->next);
489 if (chp && ((i % 10) == 0)) {
551 next(struct _choice_ *chp)
557 if (!chp) {
563 for (first = NULL; chp; chp = chp->next) {
564 if (last && strcmp(last, chp->token) >= 0)
567 if (!first || strcmp(first, chp->token) > 0) {
568 first = chp->token;
569 found = chp;