2
3
4
5
6
7
8
11
12
13
14
15
16
28
29
30
31
32
33
34
35
41 if (menu ==
nullptr) {
42 Perror("menu_engine: menu is nullptr");
62 memset(&mbstate, 0,
sizeof(mbstate));
111
112
113
114
115
116
117
118
119
120
132 memset(&mbstate, 0,
sizeof(mbstate));
137 ui_mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION);
155 event
.y = event
.x = -1;
195
210 eargv[eargc++] = strdup(
"view");
211 eargv[eargc++] = strdup(
"-Nf");
212 eargv[eargc++] = strdup(tmp_str);
213 eargv[eargc] =
nullptr;
224
230 d = getenv(
"PRTCMD");
231 if (d ==
nullptr || *d ==
'\0')
236 d = getenv(
"PRTFILE");
237 if (d ==
nullptr || *d ==
'\0') {
239 if (d ==
nullptr || *d ==
'\0')
265
287
288
316 eargv[eargc++] = strdup(
"view");
317 eargv[eargc++] = strdup(
"-N");
318 eargv[eargc++] = strdup(
"f");
319 eargv[eargc++] = strdup(tmp_str);
320 eargv[eargc] =
nullptr;
331
342
351
360
int popup_form(Init *, int, char **, uint, uint)
instantiate a form popup window
int popup_menu(Init *, int, char **, uint, uint)
instantiate a menu popup window
int popup_pick(Init *, int, char **, uint, uint)
instantiate a pick popup window
int popup_view(Init *, int, char **, uint, uint, uint, uint)
instantiate a view popup window
char stdio_names_str[4096]
char * stdio_names(char *, char *)
int ui_draw_ch_yx(UiSurface *s, uint w, uint y, uint x, const char c)
int ui_bkgdset(UiSurface *s, uint w, const UiCell *cell)
int ui_mice_enable(int mask)
int ui_scrollok(UiSurface *s, uint w, bool enable)
int ui_mvwaddch(UiSurface *s, uint w, uint y, uint x, const char c)
int ui_get_event(UiSurface *s, uint w, UiEvent *ev, int timeout_ms)
Wait for an input event on target (or stdscr if NULL).
int ui_wmove(UiSurface *s, uint w, uint y, uint x)
UiSurface * ui_surface[UI_SFC_MAX]
int ui_draw_text_fill(UiSurface *s, uint w, uint y, uint x, const char *text, int m)
int ui_keypad(UiSurface *s, uint w, bool enable)
int surface_box_win_new(uint wlines, uint wcols, uint wbegy, uint wbegx, char *wtitle)
int cm_surface_destroy(UiSurface *sfc)
Destroy the most recently created surface.
int Perror(char *emsg_str)
Display a simple error message window or print to stderr.
int full_screen_fork_exec(char **)
Execute a command in full screen mode.
int full_screen_shell(char *)
Execute a shell command in full screen mode.
int fork_detach_execvp(char **eargv)
Fork, set new session ID, close files, and execute detached command.
size_t strnz__cpy(char *, const char *, size_t)
safer alternative to strncpy
size_t trim(char *)
Trims leading and trailing spaces from string s in place.
size_t ssnprintf(char *, size_t, const char *,...)
ssnprintf was designed to be a safer alternative to snprintf.
int str_to_args(char **, char *, uint)
Converts a string into an array of argument strings.
size_t strnz__cat(char *, const char *, size_t)
safer alternative to strncat
int destroy_argv(uint argc, char **argv)
Deallocates memory allocated for argument strings in argv.
int write_config(Init *init)
Write the current configuration to a file specified in init->minitrc.
Menu * destroy_menu(Init *init)
Destroy Menu structure.
unsigned int menu_engine(Init *)
The main loop of the menu system.
unsigned int menu_cmd_processor(Init *)
Processes user input for the menu system.
unsigned int parse_menu_description(Init *)
Parse menu description file and create Menu.
Line * line[MAX_MENU_LINES]