#include #include #include #include #include "helpnmenu.h" #include "nxhelpmenu.h" #include "userface.h" #include "fort.h" static int linecount = 0; static int currentmenu = 0; /* * Returns 0 for ok, * -1 for cancel. */ static int scroll(char *text) { printf("%s", text); linecount++; if (linecount > 20) { linecount = 0; return bpause(); } return 0; } void menu_x(int_f *OPT_p, int_f *KOPT_p, int_f *MOPT_p, int_f *MAXOPT_p, int_f *MINMEN_p, int_f *KBIN_p, int_f *KBOUT_p, int_f *IHELPS_p, int_f *IHELPE_p, char *HELPF_p, int_f *IDEVH_p, int_fl HELPF_l) /* * Display the menu dialogue and get the number of a function. * OPT number of function selected * KOPT=0 => OK * KOPT=1 => dialogue wanted */ { int m, i, mnum; menuarr menu[MAXOPTS]; memset((void *)menu, 0, MAXOPTS*sizeof(menuarr)); /* should we ignore this arg totally!? */ /* mnum = *MOPT_p; */ mnum = currentmenu; do { m = create_menu(mnum, menu, MAXOPTS); do { puts(""); if (mnum == 0) puts(" Menus and their numbers are"); else printf(" %s menu\n", (helpindex - mnum)->name); for (i=0; i