2
3
4
5
6
7
8
15#define NCURSES_WIDECHAR 1
26#define MAX_WIDE_LEN 1024
28#define PICK_MAX_ARG_LEN 256
29#define MAX_PICK_OBJS 1024
30#define ACCEPT_PROMPT_CHAR '_'
32#define MENU_HELP_FILE "menu.help"
33#define FORM_HELP_FILE "form.help"
34#define PICK_HELP_FILE "pick.help"
35#define VIEW_HELP_FILE "view.help"
36#define VIEW_PRT_FILE "prtout"
37#define DEFAULTEDITOR "vi"
44#define MINITRC ".minitrc"
46#define MAPP_DIR "~/menuapp"
47#define PRINTCMD "lp -c -s"
56 int main(int argc, char **argv) {
58 capture_shell_tioctl();
59 Init *init = new_init(argc, argv);
61 mapp_initialization(init);
64 capture_curses_tioctl();
67#define destroy_cmenu()
107
108
109
110
111
127
138
140
198extern Form *
new_form(Init *,
int,
char **,
int,
int);
199extern Pick *
new_pick(Init *,
int,
char **,
int,
int);
200extern Menu *
new_menu(Init *,
int,
char **,
int,
int);
201extern int popup_menu(Init *,
int,
char **,
int,
int);
202extern int popup_form(Init *,
int,
char **,
int,
int);
203extern int popup_pick(Init *,
int,
char **,
int,
int);
204extern int popup_view(Init *,
int,
char **,
int,
int,
int,
int);
218extern int init_form(Init *,
int,
char **,
int,
int);
219extern int init_pick(Init *,
int,
char **,
int,
int);
int cmd_processor(Init *)
int popup_ckeys()
Display Curses Keys Responds to curses keys and mouse events, displaying the key code and description...
int process_config_file(char *, Init *)
int popup_form(Init *, int, char **, int, int)
instantiate a form popup window
void destroy_view_win(Init *)
int popup_menu(Init *, int, char **, int, int)
instantiate a menu popup window
int popup_view(Init *, int, char **, int, int, int, int)
instantiate a view popup window
int popup_pick(Init *, int, char **, int, int)
instantiate a pick popup window
void destroy_line_table(View *)
#define min(x, y)
min macro evaluates two expressions, returning least result
#define __atexit
This macro registers the end_pgm function to be called when the program exits.
int cf_accept(WINDOW *win, char *accept_s, int flin, int fcol, int flen)
Accepts input for a field in a C-Menu window.
void view_full_screen_resize(Init *)
Resize the full screen view and its components.
void view_boxwin_resize(Init *)
Resize the current window and its box.
int vgetch(WINDOW *, int)
Wrapper for wgetch that handles signals and mouse events, and accepts a single character answer.
void initialize_local_colors(SIO *)
Initialize local color variables and color pairs based on SIO settings.
int init_form(Init *, int, char **, int, int)
Initialize form data structure and parse description file.
int parse_opt_args(Init *, int, char **)
Parse command-line options and set Init struct values accordingly.
bool derive_file_spec(char *, char *, char *)
Derive full file specification from directory and file name.
int write_config(Init *)
Write the current configuration to a file specified in init->minitrc.
void mapp_initialization(Init *, int, char **)
Main initialization function for MAPP - Menu Application.
void zero_opt_args(Init *)
Initialize optional arguments in the Init struct to default values.
void view_calc_boxwin_dimensions(Init *)
Calculate the dimensions and position of the box window for C-Menu View.
int init_view_full_screen(Init *)
Initialize C-Menu View in full screen mode.
int init_view_boxwin(Init *)
Initialize the C-Menu View in box window mode.
void view_calc_full_screen_dimensions(Init *)
Calculate the dimensions for full screen mode.
int view_init_input(Init *, char *)
Initialize the input for the C-Menu View.
View * destroy_view(Init *init)
Destroy View structure.
Form * new_form(Init *, int, char **, int, int)
Create and initialize Form structure.
bool init_menu_files(Init *, int, char **)
Initialize Menu file specifications.
Init * new_init(int, char **)
Create and initialize Init structure.
Menu * new_menu(Init *, int, char **, int, int)
Create and initialize Menu structure.
Menu * destroy_menu(Init *init)
Destroy Menu structure.
Form * destroy_form(Init *init)
Destroy Form structure.
View * new_view(Init *)
Create and initialize View structure.
Pick * new_pick(Init *, int, char **, int, int)
Create and initialize Pick structure.
Init * destroy_init(Init *init)
Destroy Init structure.
Pick * destroy_pick(Init *init)
Destroy Pick structure.
unsigned int menu_engine(Init *)
The main loop of the menu system.
unsigned int parse_menu_description(Init *)
Parse menu description file and create Menu.
int init_pick(Init *, int, char **, int, int)
Initializes pick structure and opens pick input file or pipe.
int pick_engine(Init *)
Initializes pick interface, calculates window size and position, and enters picker loop.
int open_pick_win(Init *)
Initializes the pick window based on the parameters specified in the Pick structure.
int view_file(Init *)
Start view.
bool view_stack_pop(ViewStack *, View *)
Pop Item from View Stack.
bool view_stack_peek(const ViewStack *, View *)
Peek at Top Item of View Stack.
void view_stack_free(ViewStack *)
Free View Stack.
int view_cmd_processor(Init *)
Main Command Processing Loop for View.
bool view_stack_init(ViewStack *, size_t)
Initialize View Stack.
void build_prompt(View *)
Build Prompt String.
bool view_stack_push(ViewStack *, View)
Push Item onto View Stack.
void initialize_line_table(View *)
Initialize Line Table.
void next_page(View *)
Advance to Next Page.
int pad_refresh(View *)
Refresh Pad and Line Number Window.
int display_prompt(View *, char *)
Display Command Line Prompt.
char receiver_cmd[MAXLEN]
char provider_cmd[MAXLEN]