Lines Matching refs:max_choice
187 int first_item = 0, max_choice; in dialog_menu() local
191 max_choice = MIN(menu_height, item_no); in dialog_menu()
239 (scroll + max_choice > choice) && (scroll >= 0) && in dialog_menu()
240 (scroll + max_choice <= item_no)) { in dialog_menu()
251 if ((choice >= max_choice) || (f == NULL && choice >= max_choice / 2)) { in dialog_menu()
252 if (choice >= item_no - max_choice / 2) in dialog_menu()
253 scroll = first_item = item_no - max_choice; in dialog_menu()
255 scroll = first_item = choice - max_choice / 2; in dialog_menu()
260 for (i = 0; i < max_choice; i++) { in dialog_menu()
280 i = max_choice; in dialog_menu()
282 for (i = choice + 1; i < max_choice; i++) { in dialog_menu()
287 if (i == max_choice) in dialog_menu()
288 for (i = 0; i < max_choice; i++) { in dialog_menu()
295 if (i < max_choice || in dialog_menu()
314 if ((choice > max_choice - 3) && in dialog_menu()
315 (scroll + max_choice < item_no)) { in dialog_menu()
319 print_item(scroll+max_choice - 1, in dialog_menu()
320 max_choice - 1, FALSE); in dialog_menu()
322 choice = MIN(choice + 1, max_choice - 1); in dialog_menu()
326 for (i = 0; (i < max_choice); i++) { in dialog_menu()
337 for (i = 0; (i < max_choice); i++) { in dialog_menu()
338 if (scroll + max_choice < item_no) { in dialog_menu()
340 print_item(scroll+max_choice-1, in dialog_menu()
341 max_choice - 1, FALSE); in dialog_menu()
343 if (choice + 1 < max_choice) in dialog_menu()