Lines Matching defs:mark
45 {NULL, 0}, /* mark string */
76 * Set the menu mark character
79 set_menu_mark(MENU *m, char *mark)
85 /* if there was an old mark string, free it first */
86 if (menu->mark.string != NULL) free(menu->mark.string);
88 if ((menu->mark.string = (char *) malloc(strlen(mark) + 1)) == NULL)
91 strcpy(menu->mark.string, mark);
92 menu->mark.length = strlen(mark);
100 * Return the menu mark string for the menu.
106 return _menui_default_menu.mark.string;
108 return menu->mark.string;
115 set_menu_unmark(MENU *m, char *mark)
121 /* if there was an old mark string, free it first */
124 if ((menu->unmark.string = (char *) malloc(strlen(mark) + 1)) == NULL)
127 strcpy(menu->unmark.string, mark);
128 menu->unmark.length = strlen(mark);
448 char mark[2];
460 /* make a private copy of the mark string */
461 if (_menui_default_menu.mark.string != NULL) {
462 if ((the_menu->mark.string =
463 (char *) malloc((unsigned) _menui_default_menu.mark.length + 1))
469 strlcpy(the_menu->mark.string, _menui_default_menu.mark.string,
470 (unsigned) _menui_default_menu.mark.length + 1);
487 /* default mark needs to be set */
488 mark[0] = '-';
489 mark[1] = '\0';
491 set_menu_mark(the_menu, mark);
496 if (the_menu->mark.string != NULL)
497 free(the_menu->mark.string);
525 if (menu->mark.string != NULL)
526 free(menu->mark.string);
739 maxmark = max(menu->mark.length, menu->unmark.length);