42 {
43 int rc;
56 rc = atexit(end_pgm);
57 if (rc != 0) {
58 fprintf(stderr, "\nCannot set exit function\n");
59 exit(EXIT_FAILURE);
60 }
64 if (!strcmp(pgm_name, "menu")) {
67 } else if (!strcmp(pgm_name, "form")) {
69 } else if (!strcmp(pgm_name, "pick")) {
71 } else if (!strcmp(pgm_name, "view")) {
78 }
81 }
82 } else if (!strcmp(pgm_name, "ckeys"))
87 exit(EXIT_SUCCESS);
88}
UiRuntime * ui_init(const UiConfig *config)
void initialize_cells(SIO *sio)
Initialize local color variables and color pairs based on SIO settings.
void destroy_curses()
Gracefully shut down NCurses and restore terminal settings.
int init_form(Init *, int, char **, uint, uint)
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 *init)
Initialize C-Menu View in full screen mode.
int init_view_boxwin(Init *init)
Initialize the C-Menu View in box window mode.
View * destroy_view(Init *init)
Destroy View structure.
Menu * new_menu(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Menu structure.
Init * new_init(int argc, char **argv)
Create and initialize Init structure.
View * new_view(Init *init)
Create and initialize View structure.
Init * destroy_init(Init *init)
Destroy Init structure.
unsigned int menu_engine(Init *)
The main loop of the menu system.
int init_pick(Init *, int, char **, uint, uint)
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
void sig_prog_mode()
Set up signal handlers for interrupt signals.
int view_file(Init *)
Start view.
Structure representing the configuration options for the UI runtime.
The SIO structure encapsulates various aspects of the terminal's state and configuration,...
Gathers runtime information for C-Menu Menu, Form, Pick, and View components, used for passing common...