Lines Matching refs:max_choice
188 int first_item = 0, max_choice; in dialog_menu() local
201 max_choice = MIN(menu_height, item_count()); in dialog_menu()
251 if ((scroll <= choice) && (scroll + max_choice > choice) && in dialog_menu()
252 (scroll >= 0) && (scroll + max_choice <= item_count())) { in dialog_menu()
258 if ((choice >= max_choice)) { in dialog_menu()
259 if (choice >= item_count() - max_choice / 2) in dialog_menu()
260 scroll = first_item = item_count() - max_choice; in dialog_menu()
262 scroll = first_item = choice - max_choice / 2; in dialog_menu()
267 for (i = 0; i < max_choice; i++) { in dialog_menu()
287 i = max_choice; in dialog_menu()
289 for (i = choice + 1; i < max_choice; i++) { in dialog_menu()
295 if (i == max_choice) in dialog_menu()
296 for (i = 0; i < max_choice; i++) { in dialog_menu()
304 if (i < max_choice || in dialog_menu()
323 if ((choice > max_choice - 3) && in dialog_menu()
324 (scroll + max_choice < item_count())) { in dialog_menu()
328 print_item(scroll+max_choice - 1, in dialog_menu()
329 max_choice - 1, FALSE); in dialog_menu()
331 choice = MIN(choice + 1, max_choice - 1); in dialog_menu()
335 for (i = 0; (i < max_choice); i++) { in dialog_menu()
346 for (i = 0; (i < max_choice); i++) { in dialog_menu()
347 if (scroll + max_choice < item_count()) { in dialog_menu()
349 print_item(scroll+max_choice-1, in dialog_menu()
350 max_choice - 1, FALSE); in dialog_menu()
352 if (choice + 1 < max_choice) in dialog_menu()