42 {
43 int rc;
44 rc = atexit(end_pgm);
45 if (rc != 0) {
46 fprintf(stderr, "\nCannot set exit function\n");
47 exit(EXIT_FAILURE);
48 }
58
60
61 if (!strcmp(pgm_name, "menu")) {
65 } else if (!strcmp(pgm_name, "form")) {
67 } else if (!strcmp(pgm_name, "pick")) {
69 } else if (!strcmp(pgm_name, "view")) {
71 if (
init->lines > 0 ||
init->cols > 0)
75 } else if (!strcmp(pgm_name, "ckeys")) {
77 }
78 curs_set(1);
80
81
85 exit(EXIT_SUCCESS);
86}
int popup_ckeys()
Display Curses Keys Responds to curses keys and mouse events, displaying the key code and description...
bool open_curses(SIO *)
Initialize NCurses and color settings.
void win_init_attrs()
Initialize window attributes.
WINDOW * win_del()
Delete the current window and its associated box window.
void destroy_curses()
Gracefully shut down NCurses and restore terminal settings.
int init_form(Init *, int, char **, int, int)
Initialize form data structure and parse description file.
bool base_name(char *, char *)
Returns the base name of a file specification.
void mapp_initialization(Init *, int, char **)
Main initialization function for MAPP - Menu Application.
int init_view_full_screen(Init *)
Initialize C-Menu View in full screen mode.
Init * new_init(int, char **)
Create and initialize Init structure.
Menu * new_menu(Init *, int, char **, int, int)
Create and initialize Menu structure.
View * new_view(Init *)
Create and initialize View structure.
unsigned int menu_engine(Init *)
The main loop of the menu system.
int init_pick(Init *, int, char **, int, int)
Initializes pick structure and opens pick input file or pipe.
bool capture_shell_tioctl()
capture_shell_tioctl() - capture shell terminal settings
bool capture_curses_tioctl()
capture_curses_tioctl() - capture curses terminal settings
bool restore_shell_tioctl()
restore_shell_tioctl() - restore shell terminal settings
void sig_dfl_mode()
Set signal handlers to default behavior.
void sig_prog_mode()
Set up signal handlers for interrupt signals.
int view_file(Init *)
Start view.
Gathers runtime information for C-Menu Menu, Form, Pick, and View components, used for passing common...
The SIO structure encapsulates various aspects of the terminal's state and configuration,...