Lines Matching refs:ans
87 int ans; in find_shortcut() local
93 ans = index + 1; in find_shortcut()
95 while (ans < menu->numitems) { in find_shortcut()
96 mi = menu->items[ans]; in find_shortcut()
99 ans++; in find_shortcut()
101 return ans; in find_shortcut()
104 ans = 0; in find_shortcut()
105 while (ans < index) { in find_shortcut()
106 mi = menu->items[ans]; in find_shortcut()
109 ans++; in find_shortcut()
111 return ans; in find_shortcut()
899 int ans; in next_visible() local
901 ans = 0; in next_visible()
903 ans = menu->numitems - 1; in next_visible()
905 ans = index; in next_visible()
906 while ((ans < menu->numitems - 1) && in next_visible()
907 ((menu->items[ans]->action == OPT_INVISIBLE) || in next_visible()
908 (menu->items[ans]->action == OPT_SEP))) in next_visible()
909 ans++; in next_visible()
910 return ans; in next_visible()
915 int ans; in prev_visible() local
917 ans = 0; in prev_visible()
919 ans = menu->numitems - 1; in prev_visible()
921 ans = index; in prev_visible()
922 while ((ans > 0) && in prev_visible()
923 ((menu->items[ans]->action == OPT_INVISIBLE) || in prev_visible()
924 (menu->items[ans]->action == OPT_SEP))) in prev_visible()
925 ans--; in prev_visible()
926 return ans; in prev_visible()
931 int ans; in next_visible_sep() local
933 ans = 0; in next_visible_sep()
935 ans = menu->numitems - 1; in next_visible_sep()
937 ans = index; in next_visible_sep()
938 while ((ans < menu->numitems - 1) && in next_visible_sep()
939 (menu->items[ans]->action == OPT_INVISIBLE)) in next_visible_sep()
940 ans++; in next_visible_sep()
941 return ans; in next_visible_sep()
946 int ans; in prev_visible_sep() local
948 ans = 0; in prev_visible_sep()
950 ans = menu->numitems - 1; in prev_visible_sep()
952 ans = index; in prev_visible_sep()
953 while ((ans > 0) && (menu->items[ans]->action == OPT_INVISIBLE)) in prev_visible_sep()
954 ans--; in prev_visible_sep()
955 return ans; in prev_visible_sep()
960 int ans, i; in calc_visible() local
964 ans = 0; in calc_visible()
967 ans++; in calc_visible()
968 return ans; in calc_visible()
984 int ans, i, nv; in calc_first_late() local
990 ans = curr + 1; in calc_first_late()
992 ans = prev_visible_sep(menu, ans - 1); in calc_first_late()
993 return ans; in calc_first_late()
1000 int ans, i, nv; in calc_first_early() local
1008 ans = curr; in calc_first_early()
1010 ans = prev_visible_sep(menu, ans - 1); in calc_first_early()
1011 return ans; in calc_first_early()