int c, MBM_tmp_count, MBM_allow;
int c, d, MBM_tmp_count, MBM_allow;
PUBLIC int select_menu_multi_bookmarks NOARGS{    int c, MBM_tmp_count, MBM_allow;    int MBM_screens, MBM_from, MBM_to, MBM_current;    /*     *	If not enabled, pick the "default" (0).     */    if (LYMultiBookmarks == FALSE)	return(0);    /*     *	Filip M. Gieszczykiewicz (filipg@paranoia.com) & FM     *	---------------------------------------------------     *	LYMultiBookmarks - TRUE when multi_support enabled.     *     *	MBM_A_subbookmark[n] - Hold values of the respective     *	"multi_bookmarkn" in the lynxrc file.     *     *	MBM_A_subdescript[n] - Hold description entries in the     *	lynxrc file.     *     *	Note: MBM_A_subbookmark[0] is defined to be same value as     *	      "bookmark_file" in the lynxrc file and/or the startup     *	      "bookmark_page".     *     *	We make the display of bookmarks depend on rows we have     *	available.     *     *	We load BookmarkPage with the valid MBM_A_subbookmark[n]     *	via get_bookmark_filename().  Otherwise, that function     *	returns a zero-length string to indicate a cancel, a     *	single space to indicate an invalid choice, or NULL to     *	indicate an inaccessible file.     */    MBM_allow=(LYlines-7);	/* We need 7 for header and footer */    /*     *	Screen big enough?     */    if (MBM_allow <= 0) {	/*	 *  Too small.	 */	HTAlert(MULTIBOOKMARKS_SMALL);	return (-2);    }    MBM_screens = (MBM_V_MAXFILES/MBM_allow)+1; /* int rounds off low. */    MBM_current = 1; /* Gotta start somewhere :-) */draw_bookmark_choices:    MBM_from = MBM_allow * MBM_current - MBM_allow;    if (MBM_from < 0)	MBM_from = 0; /* 0 is default bookmark... */    if (MBM_current != 1)	MBM_from++;    MBM_to = (MBM_allow * MBM_current);    if (MBM_to > MBM_V_MAXFILES)	MBM_to = MBM_V_MAXFILES;    /*     *	Display menu of bookmarks.  NOTE that we avoid printw()'s     *	to increase the chances that any non-ASCII or multibyte/CJK     *	characters will be handled properly. - FM     */    clear();    move(1, 5);    lynx_start_h1_color ();    if (MBM_screens > 1) {	char *shead_buffer = 0;	HTSprintf0(&shead_buffer,		MULTIBOOKMARKS_SHEAD_MASK, MBM_current, MBM_screens);	addstr(shead_buffer);	FREE(shead_buffer);    } else {	addstr(MULTIBOOKMARKS_SHEAD);    }    lynx_stop_h1_color ();    MBM_tmp_count = 0;    for (c = MBM_from; c <= MBM_to; c++) {	move(3+MBM_tmp_count, 5);	addch((unsigned char)(c + 'A'));	addstr(" : ");	if (MBM_A_subdescript[c])	    addstr(MBM_A_subdescript[c]);	move(3+MBM_tmp_count,36);	addch('(');	if (MBM_A_subbookmark[c])	    addstr(MBM_A_subbookmark[c]);	addch(')');	MBM_tmp_count++;    }    /*     *	Don't need to show it if it all fits on one screen!     */    if (MBM_screens > 1) {	move(LYlines-2, 0);	addstr("'");	standout();	addstr("[");	standend();	addstr("' ");	addstr(PREVIOUS);	addstr(", '");	standout();	addstr("]");	standend();	addstr("' ");	addstr(NEXT_SCREEN);    }    LYMBM_statusline(MULTIBOOKMARKS_SAVE);get_bookmark_choice:    c = LYgetch();#ifdef VMS    if (HadVMSInterrupt) {	HadVMSInterrupt = FALSE;	c = 7;    }#endif /* VMS */    if (LYisNonAlnumKeyname(c, LYK_PREV_DOC) ||	c == 7 || c == 3) {	/*	 *  Treat left-arrow, ^G, or ^C as cancel.	 */	return(-2);    }    if (LYisNonAlnumKeyname(c, LYK_REFRESH)) {	/*	 *  Refresh the screen.	 */	lynx_force_repaint();	refresh();	goto get_bookmark_choice;    }    if (LYisNonAlnumKeyname(c, LYK_ACTIVATE)) {	/*	 *  Assume default bookmark file on ENTER or right-arrow.	 */	return(MBM_A_subbookmark[0] ? 0 : -1);    }    /*     *	Next range, if available.     */    if ((c == ']' ||  LYisNonAlnumKeyname(c, LYK_NEXT_PAGE)) &&	MBM_screens > 1) {	if (++MBM_current > MBM_screens)	    MBM_current = 1;	goto draw_bookmark_choices;    }    /*     *	Previous range, if available.     */    if ((c == '[' ||  LYisNonAlnumKeyname(c, LYK_PREV_PAGE)) &&	MBM_screens > 1) {	if (--MBM_current <= 0)	    MBM_current = MBM_screens;	goto draw_bookmark_choices;    }    c = TOUPPER(c) - 'A';    /*     *	See if we have a bookmark like that.     */    if (c < 0 || c > MBM_V_MAXFILES) {	goto get_bookmark_choice;    } else if (!MBM_A_subbookmark[c]) {	show_bookmark_not_defined();	LYMBM_statusline(MULTIBOOKMARKS_SAVE);	goto get_bookmark_choice;    } else {	return(c);    }}