Lines Matching refs:max_choice
177 int first_item = 0, max_choice; in dialog_menu() local
190 max_choice = MIN(menu_height, item_count()); in dialog_menu()
240 if ((scroll <= choice) && (scroll + max_choice > choice) && in dialog_menu()
241 (scroll >= 0) && (scroll + max_choice <= item_count())) { in dialog_menu()
247 if ((choice >= max_choice)) { in dialog_menu()
248 if (choice >= item_count() - max_choice / 2) in dialog_menu()
249 scroll = first_item = item_count() - max_choice; in dialog_menu()
251 scroll = first_item = choice - max_choice / 2; in dialog_menu()
256 for (i = 0; i < max_choice; i++) { in dialog_menu()
276 i = max_choice; in dialog_menu()
278 for (i = choice + 1; i < max_choice; i++) { in dialog_menu()
284 if (i == max_choice) in dialog_menu()
285 for (i = 0; i < max_choice; i++) { in dialog_menu()
294 (i < max_choice || in dialog_menu()
313 if ((choice > max_choice - 3) && in dialog_menu()
314 (scroll + max_choice < item_count())) { in dialog_menu()
318 print_item(scroll+max_choice - 1, in dialog_menu()
319 max_choice - 1, FALSE); in dialog_menu()
321 choice = MIN(choice + 1, max_choice - 1); in dialog_menu()
325 for (i = 0; (i < max_choice); i++) { in dialog_menu()
336 for (i = 0; (i < max_choice); i++) { in dialog_menu()
337 if (scroll + max_choice < item_count()) { in dialog_menu()
339 print_item(scroll+max_choice-1, in dialog_menu()
340 max_choice - 1, FALSE); in dialog_menu()
342 if (choice + 1 < max_choice) in dialog_menu()