C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
cm.h
Go to the documentation of this file.
1/** @file cm.h
2 * @brief Headder for C-Menu API library, libcm.so
3 * @author Bill Waller
4 * Copyright (c) 2025
5 * MIT License
6 * billxwaller@gmail.com
7 * @date 2026-02-09
8 */
9#ifndef _CM_H
10#define _CM_H 1
11
12#define _GNU_SOURCE
13#define _XOPEN_SOURCE_EXTENDED 1 /**< Enable wide character support */
14#define NCURSES_WIDECHAR 1 /**< Enable wide character support */
15#include "version.h"
16#include <argp.h>
17#ifdef UAL_UI
18#include "../ui/ui_ncurses_internal.h"
19#include "ui_backend.h"
20#include <ncursesw/ncurses.h>
21#include <ncursesw/panel.h>
22#endif
23#ifdef NOTCURSES_UI
24#include "ui_backend.h"
25#include "ui_notcurses_internal.h"
26#include <notcurses/notcurses.h>
27#endif
28#include <signal.h>
29#include <stdbool.h>
30#include <stddef.h>
31#include <stdlib.h>
32#include <time.h>
33#include <wait.h>
34#include <wchar.h>
35
36extern int cmenu_log_fd;
37
38#if __STDC_VERSION__ < 202311L
39#define nullptr NULL
40#endif
41
42#define MAXWIN 30 /**< maximum number of windows that can be created */
43
44#ifdef UI_NCURSES
45extern SCREEN *screen;
46#endif
47extern FILE *tty_fp;
48#define MAX_ARGS 64 /**< maximum number of arguments for external commands */
49#define MAXLEN 256 /**< maximum length for strings and buffers */
50#define MAXARGS 64 /**< maximum number of arguments */
51#define SCR_COLS 1024 /**< maximum number of columns in the terminal screen */
52#define MAX_DEPTH 3 /**< default depth for recursive file searching */
53#define SCREEN_MAX_LINES 100
54#define Ctrl(c) ((c) & 0x1f)
55#include <stdio.h>
56
57typedef struct {
58 uint yyyy;
59 uint mm;
60 uint dd;
61} Date;
62
63typedef struct {
64 uint hh;
65 uint mm;
66 uint ss;
67} Time;
68
69#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
70
71/** @brief max macro evaluates two expressions, returning greatest result.
72 @details These macros use compound statements to create local scopes for the
73 temporary variables _x and _y, which store the values of x and y,
74 respectively. This ensures that if x or y have side effects (such as being
75 incremented), they will only be evaluated once when the macro is expanded.
76 The use of typeof allows the macro to work with any data type.
77 The line (void)(&_x == &_y) is a compile-time check to ensure that the
78 types of the arguments are compatible.
79 This implementation of the min and max macros provides a safer and
80 more robust way to determine the minimum and maximum values between two
81 expressions without risking unintended consequences from multiple
82 evaluations.
83 */
84#define max(a, b)
85 ({
86 __typeof__(a) _a = (a);
87 __typeof__(a) _b = (b);
88 _a > _b ? _a : _b;
89 })
90/** @brief min macro evaluates two expressions, returning least result */
91#define min(x, y)
92 ({
93 typeof(x) _x = (x);
94 typeof(x) _y = (y);
95 (void)(&_x == &_y);
96 _x < _y ? _x : _y;
97 })
98/**
99 */
100/** @brief MIN macro for compatibility with code that uses the same name,
101 while avoiding multiple evaluations of the arguments.
102 @details /usr/include/sys/param.h contains implementations of the MIN and MAX
103 macros, which are simple but can lead to issues with multiple evaluations of
104 the arguments if they have side effects. These macros provides a safer
105 alternative to param.h Here are the macros from /usr/include/sys/param.h. You
106 may comment out the macros defined herein and use the macros in param.h if
107 you prefer.
108 @code
109 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
110 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
111 @endcode
112 @note The following macro provides a safer alternative to param.h
113 */
114#define MAX(a, b)
115 ({
116 typeof(a) _a = (a);
117 typeof(y) _b = (b);
118 _a > _b ? _a : _b;
119 })
120/** @brief MAX macro for compatibility with code that uses the same name,
121 while avoiding multiple evaluations of the arguments.
122 @note The following macro provides a safer alternative to param.h
123 */
124#define MIN(x, y)
125 ({
126 typeof(x) _x = (x);
127 typeof(y) _y = (y);
128 (void)(&_x == &_y);
129 _x < _y ? _x : _y;
130 })
131/** @brief ABS macro for absolute value, which evaluates the expression once and
132 returns the absolute value.
133 @details This macro uses a compound statement to create a local scope for
134 the temporary variable _a, which stores the value of x. This ensures that if
135 x has side effects (such as being incremented), it will only be evaluated
136 once when the macro is expanded. The use of typeof allows the macro to work
137 with any data type that supports comparison with zero and negation.
138 */
139#define ABS(x)
140 ({
141 __typeof__(x) _a = (x);
142 _a < 0 ? -_a : _a;
143 })
144#define S_TOLOWER(c)
145 ({
146 int __c = (c);
147 (__c >= 'A' && __c <= 'Z') ? (__c + ('a' - 'A')) : __c;
148 })
149#define S_TOUPPER(c)
150 ({
151 int __c = (c);
152 (__c >= 'a' && __c <= 'z') ? (__c - ('a' - 'A')) : __c;
153 })
154
155/** to_uppercase(c) - convert a lowercase letter to uppercase */
156#define to_uppercase(c)
157 if (c >= 'a' && c <= 'z')
158 c -= ' '
159/** to_lowercase(c) - convert an uppercase letter to lowercase */
160#define to_lowercase(c)
161 if (c >= 'A' && c <= 'Z')
162 c += ' '
163/**
164 @brief Used for xterm256 color conversions
165 */
166typedef enum {
209} ColorsEnum;
210
211extern UiCell cell_default;
213extern UiCell cell_brktl;
214extern UiCell cell_brktr;
215extern UiCell cell_nt;
216extern UiCell cell_nt_rev;
217extern UiCell cell_nt_hl;
219extern UiCell cell_box;
220extern UiCell cell_ind;
221extern UiCell cell_cmdln;
222extern UiCell cell_title;
223extern UiCell cell_ln;
224extern UiCell cell_ran;
225extern UiCell cell_chk;
226extern UiCell cell_ls;
227extern UiCell cell_rs;
228extern UiCell cell_ts;
229extern UiCell cell_bs;
230extern UiCell cell_tl;
231extern UiCell cell_tr;
232extern UiCell cell_ho;
233extern UiCell cell_ve;
234extern UiCell cell_bl;
235extern UiCell cell_br;
236extern UiCell cell_lt;
237extern UiCell cell_rt;
238extern UiCell cell_tt;
239extern UiCell cell_bt;
240extern UiCell cell_cr;
241extern UiCell cell_sp;
242
243typedef enum {
244 /** byte 0 - bits 0-7 Selection Flags*/
245 LF_HIDE = 0b00000001, /**< 1 Don't list hidden files */
246 LF_ICASE = 0b00000010, /**< 2 Ignore case in search */
247 LF_EXC_REGEX = 0b00000100, /**< 4 Exclude files matching regex */
248 LF_REGEX = 0b00001000, /**< 8 Include files matching regex */
249 LF_EXEC = 0b00010000, /**< 16 Execute command each file */
250 LF_USER = 0b00100000, /**< 32 Select User Name */
251 /** << 16 */
252 /** byte 1 - bits 8-15 */
253 LF_IXUSR = 0b00000001, /**< 1 Select Files with Execute Permission */
254 LF_IWUSR = 0b00000010, /**< 2 Select Files with Write Permission */
255 LF_IRUSR = 0b00000100, /**< 4 Select Files with Read Permission */
256 LF_ISGID = 0b00010000, /**< 16 Select Setgid Files */
257 LF_ISUID = 0b00100000, /**< 32 Select Setuid Files */
258} LFFlags;
259
260/** byte 2 - bits 16-23 File types*/
261typedef enum {
262 LF_FIFO = 0b00000001, /**< 1 named pipe */
263 LF_CHR = 0b00000010, /**< 2 character device */
264 LF_DIR = 0b00000100, /**< 4 directory */
265 LF_BLK = 0b00001000, /**< 8 block */
266 LF_REG = 0b00010000, /**< 16 regular file */
267 LF_LNK = 0b00100000, /**< 32 link */
268 LF_SOCK = 0b01000000, /**< 64 socket */
269 LF_UNKNOWN = 0b10000000 /**< 128 unknown */
270} LFTypes;
271
272typedef enum {
273 F_F0, // 0
274 F_FIFO, // 1
275 F_CHR, // 2
276 F_F1, // 3
277 F_DIR, // 4
278 F_F2, // 5
279 F_BLK, // 6
280 F_F3, // 7
281 F_REG, // 8
282 F_F4, // 9
283 F_LNK, // 10
284 F_F5, // 11
285 F_SOCK, // 12
286 F_F6, // 13
288} F_Type;
289
290// int const lf_type[][15] = {
291// {0, 0b00000001, 0b00000010, 0, 0b00000100, 0, 0b00001000, 0, 0b00010000, 0,
292// 0b00100000, 0,0b01000000, 0, 0b10000000}};
293
294/*
295 * dirent d_type to lf_type for reference
296------------------------ --------------------
297d_type binary dec lf_type binary dec ordinal
298--------- -------- --- ----------- -------- --- -------
299DT_FIFO: 00000001 1 LF_FIFO: 00000001 1 1
300DT_CHR: 00000010 2 LF_CHR: 00000010 2 2
301DT_DIR: 00000100 4 LF_DIR: 00000100 4 3
302DT_BLK: 00000110 6 LF_BLK: 00001000 8 4
303DT_REG: 00001000 8 LF_REG: 00010000 16 5
304DT_LNK: 00001010 10 LF_LNK: 00100000 32 6
305DT_SOCK: 00001100 12 LF_SOCK: 01000000 64 7
306DT_UNKNOWN: 00001110 14 LF_UNKNOWN: 10000000 128 8
307
308 */
309
310#define F_NO_STDERR 1
311
312/**
313 Include Exclude
314 ---------- ----------
315 LF_FIFO 1 0 00000001 7 11111110 named pipe
316 LF_CHR 2 1 00000010 6 11111101 character device
317 LF_DIR 4 2 00000100 5 11111011 directory
318 LF_BLK 8 3 00001000 4 11110111 block device
319 LF_REG 16 4 00010000 3 11101111 regular file
320 LF_LNK 32 5 00100000 2 11011111 link
321 LF_SOCK 64 6 01000000 1 10111111 socket
322 LF_UNKNOWN 128 7 10000000 0 01111111 unknown
323*/
324
325#define COLOR_LEN 8 /**< length of color code strings */
326#define DEFAULTSHELL "/bin/bash"
327#define S_WCOK 0x1000 /**< write or create permitted */
328#define S_QUIET 0x2000 /**< quiet mode flag for file validation */
329
330/** @brief This macro registers the end_pgm function to be called when the
331 program exits.
332 @details It checks the return value of atexit() to ensure that the
333 registration was successful, and if not, it prints an error message and
334 exits with a failure status. Programs using libcm should call __atexit in
335 their main function to ensure that the end_pgm function is registered to be
336 called on program exit. This will help ensure that the terminal is properly
337 restored to its original state, even if the program encounters an error or
338 is terminated unexpectedly. */
339#define __atexit
340 {
341 int rc;
342 rc = atexit(end_pgm);
343 if (rc != 0) {
344 fprintf(stderr, "\nCannot set exit function\n");
345 exit(EXIT_FAILURE);
346 }
347 }
348
349/** @struct Chyron
350 @details The Chyron structure represents a key binding for a command in the
351 chyron, which is a status line or message area in the terminal interface.
352 The ChyronKey structure includes fields for displayable text,
353 the key code, and the end position of the command text in the chyron.
354 This structure allows xwgetch to map mouse clicks to key codes
355 as defined by NCursesw and the C-Menu program.
356 The text field holds the displayable text associated with the command.
357 xwgetch() translates a mouse click on the chyron with a particular key code
358 stored in this table.
359 The use case is when the developer wants a dynamic chyron that can be
360 easily changed depending on the context of the program without having to
361 worry about translating mouse click positions to key codes.
362 While many key codes are defined by NCursesw, the developer is free to
363 define their own key codes for custom commands in the chyron. However,
364 xwgetch() will translate mouse clicks to the key codes defined in this table,
365 even if they interfere with standard NCurses key codes, Unicode code points,
366 or ASCII characters. Just use common sense.
367 In addition to returning the key code associated with mouse clicks on
368 the chyron, xwgetch() also returns the key codes for standard keyboard input,
369 and sets the global variables cliek_y and click_x to the coordinates of the
370 mouse click.
371 */
372#define CHYRON_KEY_MAXLEN
373 64 /**< maximum length of the command text for a key \
374 binding in the chyron */
375#define CHYRON_KEYS 20 /**< maximum number of key bindings for the chyron */
376
377typedef struct {
378 bool active; /**< whether the key binding is active */
379 char text[CHYRON_KEY_MAXLEN]; /**< command text associated with the key code
380 */
381 uint keycode; /**< key code associated with the command */
382 uint end_pos; /**< end position of the command text in the chyron */
383 UiCell cell_base; /**< cell base for colors/attributes */
384} ChyronKey;
385
386typedef struct {
387 ChyronKey *key[CHYRON_KEYS]; /**< array of key bindings for the chyron */
388 char s[MAXLEN]; /**< the chyron string, for displaying messages in */
389 UiCell cmplx_buf[MAXLEN]; /**< the chyron wide character string */
390 // wchar_t wstr[MAXLEN]; /**< the chyron wide character string */
391 uint l; /**< length of the chyron string, for display */
392 UiSurface *sfc; /** pointer to surface for the chyron */
393 uint win; /** index to window of surface */
394 uint y; /** y coordinante of the chyron in the window */
395} Chyron;
396
397extern void activate_chyron_key(Chyron *, uint);
398extern void activate_all_chyron_keys(Chyron *);
399extern void deactivate_chyron_key(Chyron *, uint);
400extern void deactivate_all_chyron_keys(Chyron *);
401extern int click_y; /**< the y coordinate of a mouse click */
402extern int click_x; /**< the x coordinate of a mouse click */
403
404extern Chyron *wait_mk_chyron();
405extern bool wait_destroy(Chyron *);
406extern bool waitpid_with_timeout(pid_t, uint);
407extern int wait_timeout;
408extern bool action_disposition(char *eitle, char *action_str);
409extern int fork_detach_execvp(char **);
410extern bool is_hex_str(char *, uint);
411extern bool unstr_hex_clr(char *, char *);
412
413extern bool f_debug; /**< a flag to indicate whether debug
414output should be printed, for debugging purposes */
415
416#define FG_COLOR 2 /**< default foreground color */
417#define BG_COLOR 0 /**< default background color */
418#define BO_COLOR 1 /**< default bold foreground color */
419#define LN_COLOR 4 /**< default line number color */
420#define LN_BG_COLOR 7 /**< default line number background */
421
422extern ushort cp_default; /**< default color pair index */
423extern ushort cp_box; /**< box color pair index */
424extern ushort cp_ind; /**< indicator color pair index */
425extern ushort cp_bold; /**< bold color pair index */
426extern ushort cp_title; /**< title color pair index */
427extern ushort cp_highlight; /**< highlight color pair index */
428extern ushort cp_fill_char; /**< fill character color pair index */
429extern ushort cp_brackets; /**< color pair index for field brackets */
430extern ushort cp_nt; /**< normal color pair index */
431extern ushort cp_nt_rev; /**< reverse color pair index */
432extern ushort cp_nt_hl; /**< highlight color pair index */
433extern ushort cp_nt_hl_rev; /**< highlight reverse color pair index */
434extern ushort cp_ln_fg; /**< line number color pair index */
435extern ushort cp_ln_bg; /**< line number background color pair index */
436extern ushort cp_cmdln_fg; /**< command line number color pair index */
437extern ushort cp_cmdln_bg; /**< command line number background color pair index */
438extern ushort cp_red; /**< red background color pair index */
439extern ushort cp_green; /**< green background color pair index */
440extern ushort cp_yellow; /**< yellow background color pair index */
441extern ushort cp_blue; /**< blue background color pair index */
442extern uint clr_idx; /**< current color index */
443extern uint clr_cnt; /**< number of colors used */
444extern uint clr_pair_idx; /**< current color pair index */
445extern uint clr_pair_cnt; /**< number of color pairs supported by the terminal */
446extern char const colors_text[][10]; /**< color codes for the 16 basic colors */
447
448/** @struct ColorPair
449 @details The ColorPair structure is a simple structure that holds information
450 about a color pair, including the foreground color index, background color
451 index, and the color pair index. This structure can be used to manage and
452 apply color pairs in the ncurses library, allowing for easy customization of
453 the terminal's appearance. By using this structure, you can easily keep track
454 of the different color pairs you have defined and apply them to various
455 elements in your terminal interface. */
456typedef struct {
457 uint fg; /**< foreground color index */
458 uint bg; /**< background color index */
459 uint pair_id; /**< color pair index */
460} ColorPair;
461
462/**< see termios.h */
463extern struct termios shell_tioctl, curses_tioctl;
464extern struct termios shell_in_tioctl, curses_in_tioctl;
465extern struct termios shell_out_tioctl, curses_out_tioctl;
466extern struct termios shell_err_tioctl, curses_err_tioctl;
467
468extern bool f_have_shell_tioctl; /**< shell tioctl captured */
469extern bool f_have_curses_tioctl; /**< curses tioctl captured */
470extern bool f_curses_open; /**< curses mode is active */
471extern bool f_restore_screen; /**< whether to restore the screen */
472
473extern void dump_opts(); /**< dump options to stdout */
474
475extern void dump_opts_by_use(char *, char *); /**< dump options to stdout */
476extern bool capture_shell_tioctl();
477extern bool restore_shell_tioctl();
478extern bool capture_curses_tioctl();
479extern bool restore_curses_tioctl();
480extern bool mk_raw_tioctl(struct termios *);
481extern bool set_sane_tioctl(struct termios *);
482
483extern int surface_box_win_new(uint, uint, uint, uint, char *);
484extern int surface_split_box_win_new(uint, uint, uint, uint, uint, uint, char *);
485
486extern void win_resize(uint, uint, char *);
487extern void signal_handler(int);
488extern bool handle_signal(sig_atomic_t);
489extern volatile sig_atomic_t sig_received;
490extern void sig_prog_mode();
491extern void sig_dfl_mode();
492extern bool mk_dir(char *dir);
493extern int segmentation_fault();
494extern char *iso8601_time(char *, uint, time_t *, bool);
495extern bool parse_local_timestamp(const char *, time_t *);
496extern char *format_local_timestamp(time_t, char *, size_t);
497extern char *get_local_timestamp();
498extern char *get_user_str(char *, size_t);
499extern char *get_ip_addresses(char *, uint);
500extern bool is_newer(char *, char *);
501
502#define KEY_ALTF0 0x138
503#define KEY_ALTF(n) (KEY_ALTF0 + (n)) /**< define alt function keys */
504#define XTERM_256COLOR /**< use xterm-256color terminfo for altkey bindings */
505/**
506 EXTENDED NCURSES KEYS
507
508 Key code bindings are customarily defined in terminfo.
509 xterm-256color tends to be the most complete, and indeed, it seems to
510 work with Ghostty, Kitty, and Alacritty. If you want to use the
511 altkey bindings, you may need to set your terminal's TERM environment
512 variable to xterm-256color. Here's why:
513
514 Ghostty, Kitty, and Alacritty all come with their own terminfo files:
515
516 Ghostty with xterm-ghostty,
517 Kitty with xterm-kitty, and
518 Alacritty with alacritty
519
520 None of the three produced the correct extended altkey bindings when
521 paired with the terminfo provided in their distribution, yet all
522 three worked with xterm-256color.
523
524 The extended altkeys were not defined in any of the terminfo files, not
525 even xterm-256color. Yet, xterm-256color produced consistent keycode
526 bindings with all three emulators. The standard key bindings, ins, delete,
527 up, down arrows, etc., were the same for all three terminfos, and all
528 three emulators produced the correct key bindings for those keys.
529
530 The fact that xterm-256color produced consistent keycode bindings for the
531 altkeys, while the other three terminfos did not, is likely due to the fact
532 that xterm-256color is more widely used and has better support for extended
533 key bindings, even if they are not explicitly defined in the terminfo file.
534 It's possible that xterm-256color has some default behavior or fallback
535 mechanism that allows it to recognize and produce key codes for the altkeys,
536 while the other terminfos do not have such a mechanism in place. This could
537 explain why xterm-256color produced consistent keycode bindings for the
538 altkeys across all three emulators, while the other terminfos did not.
539 @code
540 mapped altkey ncurses
541 2nd fld - 1 name binding keycode
542 ------------- --------- -------- -------
543 kIC=\E[2;2~, key_ins \E[2;3~, 223
544 kHOM=\E[1;2H, key_home \E[1;3H, 21e
545 kPRV=\E[5;2~, key_pgup \E[5;3~, 232
546 kDC=\E[3;2~, key_del \E[3;3~, 20e
547 kEND=\E[1;2F, key_end \E[1;3F, 219
548 kNXT=\E[6;2~, key_pgdn \E[6;3~, 22d
549 kri=\E[1;2A, key_up \E[1;3A, 23d
550 kind=\E[1;2B, key_down \E[1;3B, 214
551 kRIT=\E[1;2C, key_right \E[1;3C, 237
552 kLFT=\E[1;2D, key_left \E[1;3D, 228
553 @endcode
554 */
555#if defined(XTERM_256COLOR)
556#define KEY_ALTINS 0x223
557#define KEY_ALTHOME 0x21e
558#define KEY_ALTPGUP 0x232
559#define KEY_ALTDEL 0x20e
560#define KEY_ALTEND 0x219
561#define KEY_ALTPGDN 0x22d
562#define KEY_ALTUP 0x23d
563#define KEY_ALTLEFT 0x228
564#define KEY_ALTDOWN 0x214
565#define KEY_ALTRIGHT 0x237
566#elif defined(XTERM_GHOSTTY)
567#define KEY_ALTINS 0x228
568#define KEY_ALTHOME 0x223
569#define KEY_ALTPGUP 0x237
570#define KEY_ALTDEL 0x213
571#define KEY_ALTEND 0x21e
572#define KEY_ALTPGDN 0x232
573#define KEY_ALTUP 0x242
574#define KEY_ALTLEFT 0x22d
575#define KEY_ALTDOWN 0x219
576#define KEY_ALTRIGHT 0x23c
577#endif
578
579extern void write_cmenu_log(char *);
580extern void write_cmenu_log_ts(char *);
581extern void open_cmenu_log();
582extern FILE *cmenu_log_fp;
583extern uint n_lines; /**< number of lines in the terminal */
584extern uint n_cols; /**< number of columns in the terminal */
585// extern uint lines; current number of lines (may be less than n_lines if
586// the terminal is resized)
587// extern uint cols; current number of columns (may be less than n_cols
588// if the
589// terminal is resized) extern int begx;
590// beginning x coordinate of the terminal */
591// extern uint begy; beginning y coordinate of the terminal
592//
593#define MAXWIN 30 /**< maximum number of windows that can be created */
594typedef unsigned char uchar;
595
596extern void sig_prog_mode();
597extern void sig_shell_mode();
598extern char di_getch();
599extern uint enter_option();
600
601extern uint16_t win_attr; /**< Ncurses attributes for the current window, such as
602 color pair, bold, etc. */
603// extern bool win_pair; /**< Flag to indicate whether the current window is
604// part of a window pair */
605extern uint
606 mlines; /**< number of lines in the current window, which may be less than
607 the total number of lines in the terminal if the window is
608 resized or if multiple windows are being used. */
609extern uint
610 mcols; /**< number of columns in the current window, which may be less than
611 the total number of columns in the terminal if the window is
612 resized or if multiple windows are being used. */
613extern uint
614 mbegy; /**< beginning y coordinate of the current window, which can be used
615 to determine the position of the window on the terminal screen. */
616extern uint
617 mbegx; /**< beginning x coordinate of the current window, which can be used
618 to determine the position of the window on the terminal screen. */
619extern uint mg_action; /**< action in progress, which can be used to keep track
620 of the current state of the program and determine how
621 to respond to user input or other events. */
622extern uint mg_col; /**< window column, which can be used to determine the
623 current column position in the window for displaying text
624 or other content. */
625extern uint mg_line; /**< window line, which can be used to determine the current line
626 position in the window for displaying text or other content. */
627extern int stdin_fd; /**< the file descriptor for the terminal, for error messages */
628extern int stdout_fd; /**< the file descriptor for the terminal, for error messages */
629extern int stderr_fd; /**< the file descriptor for the terminal, for error messages
630 and other output */
631extern uint
632 dbgfd; /**< the file descriptor for debug output, for debugging purposes */
633extern uint src_line; /**< the line number of the source file being processed,
634 for error messages */
635extern char *src_name; /**< the name of the source file being processed, for
636 error messages */
637extern char fn[MAXLEN]; /**< function name for error messages */
638extern char em0[MAXLEN]; /**< error message string for error messages */
639extern char em1[MAXLEN]; /**< error message string for error messages */
640extern char em2[MAXLEN]; /**< error message string for error messages */
641extern char em3[MAXLEN]; /**< error message string for error messages */
642
643extern int exit_code; /**< the exit code for the program, for error messages and
644 other output */
645
646extern void win_del();
647extern void restore_wins();
648extern void win_init_attrs();
649extern void win_Toggle_Attrs();
651extern void init_stdscr();
652extern bool get_argp_doc_by_name(char *comment, const struct argp_option *, const char *);
653
654typedef struct {
655 char *s;
656 size_t l;
657} Arg;
658typedef struct {
659 Arg **v;
660 size_t n;
661} Argv;
662typedef struct {
663 char *s;
664 size_t l;
665} String;
666typedef struct {
667 wchar_t *s;
668 size_t l;
669} WCStr;
670/** simple macro to convert a character to uppercase */
671#define to_uppercase(c)
672 if (c >= 'a' && c <= 'z')
673 c -= ' '
674/** @struct SIO
675 @brief The SIO structure encapsulates various aspects of the terminal's
676 state and configuration, including color management, file pointers, and
677 terminal device information.
678 @details The SIO structure serves as a central repository for all relevant
679 information needed to manage the terminal's appearance and behavior
680 effectively, allowing for a highly customizable and visually appealing
681 terminal experience. The SIO structure includes fields for managing colors,
682 gamma correction values, color codes for different colors, file pointers and
683 descriptors for standard input/output/error and the terminal device, as well
684 as counters and indices for color management. Additionally, it contains a
685 field for storing the name of the terminal device. This comprehensive
686 structure allows for efficient management of the terminal's state and
687 configuration in a structured way. */
688typedef struct {
689 double red_gamma; /**< red gamma correction value */
690 double green_gamma; /**< green gamma correction value */
691 double blue_gamma; /**< blue gamma correction value */
692 double gray_gamma; /**< gray gamma correction value */
693 uint32_t black; /**< black */
694 uint32_t red; /**< red */
695 uint32_t green; /**< green */
696 uint32_t yellow; /**< yellow */
697 uint32_t blue; /**< blue */
698 uint32_t magenta; /**< magenta */
699 uint32_t cyan; /**< cyan */
700 uint32_t white; /**< white */
701 uint32_t orange; /**< orange */
702 uint32_t bblack; /**< bold black */
703 uint32_t bred; /**< bold red */
704 uint32_t bgreen; /**< bold green */
705 uint32_t byellow; /**< bold yellow */
706 uint32_t bblue; /**< bold blue */
707 uint32_t bmagenta; /**< bold magenta */
708 uint32_t bcyan; /**< bold cyan */
709 uint32_t bwhite; /**< bold white */
710 uint32_t borange; /**< bold orange */
711 uint32_t abg; /**< background with alpha */
712 uint32_t fg; /**< foreground color */
713 uint32_t bg; /**< background color */
714 uint32_t box_fg; /**< box foreground */
715 uint32_t box_bg; /**< box background */
716 uint32_t ind_fg; /**< indicator foreground */
717 uint32_t ind_bg; /**< indicator background */
718 uint32_t brackets_fg; /**< brackets foreground */
719 uint32_t brackets_bg; /**< brackets background */
720 uint32_t fill_char_fg; /**< fill character foreground */
721 uint32_t fill_char_bg; /**< fill character background */
722 uint32_t ln_fg; /**< line number color index */
723 uint32_t ln_bg; /**< line number background index */
724 uint32_t cmdln_fg; /**< line number color index */
725 uint32_t cmdln_bg; /**< line number background index */
726 uint32_t nt_fg; /**< color code for normal text foreground */
727 uint32_t nt_bg; /**< color code for normal text background */
728 uint32_t nt_rev_fg; /**< normal text reverse foreground */
729 uint32_t nt_rev_bg; /**< normal text reverse background */
730 uint32_t nt_hl_fg; /**< normal text highlight foreground */
731 uint32_t nt_hl_bg; /**< normal text highlight background */
732 uint32_t nt_hl_rev_fg; /**< normal text highlight reverse foreground */
733 uint32_t nt_hl_rev_bg; /**< normal text highlight reverse background */
734 uint32_t title_fg; /**< title foreground */
735 uint32_t title_bg; /**< title background */
736 uint32_t ran_fg; /**< right angle foreground */
737 uint32_t ran_bg; /**< right angle background */
738 FILE *stdin_fp; /**< stdin stream pointer */
739 FILE *stdout_fp; /**< stdout stream pointer */
740 FILE *stderr_fp; /**< stderr stream pointer */
741 FILE *tty_fp; /**< terminal device stream pointer */
742 int stdin_fd; /**< stdin file descriptor */
743 int stdout_fd; /**< stdout file descriptor */
744 int stderr_fd; /**< stderr file descriptor */
745 int tty_fd; /**< terminal device file descriptor */
746 uint clr_cnt; /**< number of colors currently in use */
747 uint clr_pair_cnt; /**< number of color pairs currently in use */
748 uint clr_idx; /**< current color index */
749 uint clr_pair_idx; /**< current color pair index */
750 char brackets[3];
751 char fill_char[2];
752 char border; /**< Rounded, Single, Double, None */
753 char tty_name[MAXLEN]; /**< name of the terminal device */
754 ushort cp_default; /**< default color pair index */
755 ushort cp_fill_char; /**< fill character color pair index */
756 ushort cp_brackets; /**< brackets color pair index */
757 ushort cp_nt; /**< normal text color pair index */
758 ushort cp_nt_rev; /**< reverse color pair index */
759 ushort cp_nt_hl; /**< highlight color pair index */
760 ushort cp_nt_hl_rev; /**< reverse highlight color pair index */
761 ushort cp_box; /**< box color pair index */
762 ushort cp_ind; /**< indicator color pair index */
763 ushort cp_cmdln; /**< command line color pair index */
764 ushort cp_title; /**< title color pair index */
765 ushort cp_ln; /**< line number color pair index */
766 ushort cp_ran; /**< right angle color pair index */
767 ushort cp_chk; /**< checkmark color pair index */
768 ushort cp_bold; /**< bold color pair index */
769} SIO;
770typedef struct {
771 uint flin;
772 uint fcol;
773 uint flen;
774 uint ff;
777} CmField;
778extern void destroy_curses();
779extern int a_toi(char *, bool *);
780extern bool chrep(char *, char, char);
781extern char *rep_substring(const char *, const char *, const char *);
782extern size_t strip_ansi(char *, char *);
783extern bool strip_quotes(char *);
784extern bool stripz_quotes(char *);
785extern int str_to_args(char **, char *, uint);
786extern int destroy_argv(uint argc, char **argv);
787extern bool str_to_bool(const char *);
788extern bool str_to_lower(char *);
789extern bool str_to_upper(char *);
790extern bool strnfill(char *, char, uint);
791extern bool str_subc(char *, char *, char, char *, uint);
792extern size_t strnz(char *, size_t);
793extern size_t strnlf(char *, size_t);
794extern char *strnz_dup(char *, size_t);
795extern size_t ssnprintf(char *, size_t, const char *, ...);
796extern size_t strnz__cpy(char *, const char *, size_t);
797extern size_t strnz__cat(char *, const char *, size_t);
798extern double str_to_double(char *);
799extern size_t string_cpy(String *, const String *);
800extern size_t string_cat(String *, const String *);
801extern size_t string_ncat(String *, const String *, size_t);
802extern size_t string_ncpy(String *, const String *, size_t);
803extern size_t trim(char *);
804extern size_t rtrim(char *);
805extern String to_string(const char *);
806extern String mk_string(size_t);
807extern String free_string(String);
808extern void apply_gamma(RGB *);
809extern uint rgb_to_xterm256_idx(RGB *);
810extern bool init_clr_palette(SIO *);
811extern bool open_curses(SIO *);
812extern uint rgb_clr_to_cube(uint);
813extern uint rgb_to_curses_clr(RGB *);
814extern RGB xterm256_idx_to_rgb(uint);
815extern int fork_exec(char **);
816extern int full_screen_fork_exec(char **);
817extern int full_screen_shell(char *);
818extern int shell(char *);
819extern char errmsg[];
820extern void get_rfc3339_s(char *, size_t);
821extern int open_log(char *);
822extern void write_log(char *);
823extern void compile_chyron(Chyron *);
824extern void display_chyron(UiSurface *, uint n, Chyron *, uint, uint);
825extern int get_chyron_key(Chyron *, uint);
826extern bool is_set_chyron_key(Chyron *, uint);
827extern void set_chyron_key(Chyron *, uint, char *, uint);
828extern void set_chyron_key_cb(Chyron *, uint, char *, uint, UiCell);
829extern void unset_chyron_key(Chyron *, uint);
830extern Chyron *new_chyron();
831extern Chyron *destroy_chyron(Chyron *chyron);
832extern void abend(int, char *);
833extern void display_argv_error_msg(char *, char **);
834extern int display_error(char *, char *, char *, char *);
835extern int answer_yn(char *, char *, char *, char *);
836extern int display_ok_message(char *);
837extern int Perror(char *);
838extern void user_end();
839extern unsigned long a_to_ul(const char *);
840extern size_t canonicalize_file_spec(char *);
841extern bool construct_file_spec(char *, char *, char *, char *, char *, uint);
842extern bool file_spec_path(char *, char *);
843extern bool file_spec_name(char *, char *);
844extern bool is_directory(const char *);
845extern bool is_symlink_to_dir(const char *);
846extern bool is_valid_regex(const char *);
847extern bool dir_name(char *, char *);
848extern bool base_name(char *, char *);
849extern bool expand_tilde(char *, uint);
850extern bool locate_file_in_path(char *, char *);
851extern bool normalize_file_spec(char *);
852extern bool trim_ext(char *, char *);
853extern bool trim_path(char *);
854extern bool verify_file(char *, uint);
855extern bool verify_file_q(char *, uint);
856extern bool verify_dir(char *, uint);
857extern bool verify_dir_q(char *, uint);
858extern bool verify_spec_arg(char *, char *, char *, char *, uint);
859extern int wccp_to_str(wchar_t, uint8_t *);
860extern char *fdname(int, char *);
861extern char *stdio_names(char *, char *);
862extern char *stdio_fdnames(char *, char *);
863extern char stdio_names_str[4096];
864extern void check_panels(uint);
865extern int bare_box_new(uint, uint, uint, uint, char *);
866extern int win2_box_new(uint, uint, uint, uint, char *);
867extern void left_justify(char *s);
868extern void right_justify(char *, uint);
869
870extern bool is_valid_date(uint yyyy, uint mm, uint dd);
871extern bool is_valid_time(uint hh, uint mm, uint ss);
872extern void numeric(char *d, char *s);
873extern int cf_accept(UiSurface *, uint w, char *, uint, uint, uint);
874extern char *fill_field(char *, char *, char, uint);
875extern int cm_surface_destroy(UiSurface *sfc);
876extern wchar_t *mbstr_to_wcstr(const char *mb_str);
877
878extern int border_draw(UiSurface *sfc);
879extern int border_title(UiSurface *sfc, char *title);
880extern int border_ysplit(UiSurface *, uint);
881extern int border_ysplit_text(UiSurface *, char *, uint);
882extern void mbc_to_wc(wchar_t wc[2], const char mbc);
883extern void initialize_styles(SIO *);
884extern int assign_chyron_win(Chyron *chyron, UiSurface *s, uint w, char *);
885extern void initialize_cells(SIO *sio);
886extern size_t codepoint_to_utf8(uint32_t codepoint, uint8_t *utf8);
887
888#endif
int cmd_processor(Init *)
bool view_stack_peek(const ViewStack *, View *)
@ OT_INT
Definition common.h:85
@ OT_BOOL
Definition common.h:86
@ OT_HEX
Definition common.h:87
@ OT_STRING
Definition common.h:84
int popup_form(Init *, int, char **, uint, uint)
instantiate a form popup window
Definition popups.c:113
bool view_stack_push(ViewStack *, View)
int popup_menu(Init *, int, char **, uint, uint)
instantiate a menu popup window
Definition popups.c:53
void view_stack_free(ViewStack *)
@ FORM
Definition common.h:77
@ MENU
Definition common.h:79
@ VIEW
Definition common.h:76
@ PICK
Definition common.h:78
@ OG_FILES
Definition common.h:92
@ OG_DIRS
Definition common.h:93
@ OG_SPECS
Definition common.h:94
@ OG_MISC
Definition common.h:95
@ OG_FLAGS
Definition common.h:97
@ OG_PARMS
Definition common.h:96
@ OG_COL
Definition common.h:98
bool view_stack_pop(ViewStack *, View *)
int popup_pick(Init *, int, char **, uint, uint)
instantiate a pick popup window
Definition popups.c:83
bool view_stack_init(ViewStack *, size_t)
void destroy_view_win(Init *)
int popup_view(Init *, int, char **, uint, uint, uint, uint)
instantiate a view popup window
Definition popups.c:145
char minitrc[MAXLEN]
volatile sig_atomic_t sig_received
Definition sig.c:31
size_t rtrim(char *)
Trims trailing spaces from string s in place.
Definition futil.c:331
bool handle_signal(sig_atomic_t)
void win_Toggle_Attrs()
uint rgb_to_curses_clr(RGB *)
uint mlines
uint mbegx
bool strnfill(char *, char, uint)
void sig_shell_mode()
int cmenu_log_fd
Definition futil.c:47
void get_rfc3339_s(char *, size_t)
bool f_have_shell_tioctl
Definition scriou.c:24
bool waitpid_with_timeout(pid_t, uint)
void init_stdscr()
bool wait_destroy(Chyron *)
ushort cp_ln_fg
int bare_box_new(uint, uint, uint, uint, char *)
char stdio_names_str[4096]
Definition futil.c:127
int display_ok_message(char *)
bool verify_dir_q(char *, uint)
uint dbgfd
@ F_REG
Definition cm.h:281
@ F_BLK
Definition cm.h:279
@ F_FIFO
Definition cm.h:274
@ F_F0
Definition cm.h:273
@ F_F3
Definition cm.h:280
@ F_SOCK
Definition cm.h:285
@ F_CHR
Definition cm.h:275
@ F_F5
Definition cm.h:284
@ F_F1
Definition cm.h:276
@ F_DIR
Definition cm.h:277
@ F_UNKNOWN
Definition cm.h:287
@ F_F2
Definition cm.h:278
@ F_F4
Definition cm.h:282
@ F_LNK
Definition cm.h:283
@ F_F6
Definition cm.h:286
#define KEY_ALTF0
Definition cm.h:502
uint clr_pair_cnt
uint n_lines
void restore_wins()
ushort cp_bold
bool f_curses_open
Definition sig.c:33
uint clr_cnt
#define CHYRON_KEYS
Definition cm.h:375
struct termios shell_tioctl curses_tioctl
Definition scriou.c:34
ushort cp_cmdln_bg
ushort cp_highlight
void dump_opts()
uint clr_idx
void win_del()
void win_resize(uint, uint, char *)
bool construct_file_spec(char *, char *, char *, char *, char *, uint)
char * stdio_names(char *, char *)
Definition futil.c:1057
void write_log(char *)
unsigned char uchar
Definition cm.h:594
ushort cp_cmdln_fg
void check_panels(uint)
String mk_string(size_t)
Create a String struct with a dynamically allocated string.
Definition futil.c:1526
uint clr_pair_idx
uint mg_col
uint n_cols
FILE * cmenu_log_fp
bool verify_file_q(char *, uint)
#define XTERM_256COLOR
Definition cm.h:504
#define CHYRON_KEY_MAXLEN
Definition cm.h:372
void win_init_attrs()
bool f_debug
uint mg_line
void dump_opts_by_use(char *, char *)
char errmsg[]
Definition futil.c:131
int open_log(char *)
int wait_timeout
Definition futil.c:145
Chyron * wait_mk_chyron()
@ LF_EXC_REGEX
Definition cm.h:247
@ LF_HIDE
Definition cm.h:245
@ LF_ISUID
Definition cm.h:257
@ LF_IRUSR
Definition cm.h:255
@ LF_ICASE
Definition cm.h:246
@ LF_ISGID
Definition cm.h:256
@ LF_EXEC
Definition cm.h:249
@ LF_REGEX
Definition cm.h:248
@ LF_USER
Definition cm.h:250
@ LF_IXUSR
Definition cm.h:253
@ LF_IWUSR
Definition cm.h:254
@ CLR_CMDLN_BG
Definition cm.h:197
@ CLR_FILL_CHAR_BG
Definition cm.h:193
@ CLR_BOX_BG
Definition cm.h:187
@ CLR_FILL_CHAR_FG
Definition cm.h:192
@ CLR_FG
Definition cm.h:184
@ CLR_RED
Definition cm.h:168
@ CLR_NT_FG
Definition cm.h:198
@ CLR_BRACKETS_FG
Definition cm.h:190
@ CLR_YELLOW
Definition cm.h:170
@ CLR_IND_FG
Definition cm.h:188
@ CLR_BCYAN
Definition cm.h:181
@ CLR_TITLE_FG
Definition cm.h:206
@ CLR_WHITE
Definition cm.h:174
@ CLR_MAGENTA
Definition cm.h:172
@ CLR_BRACKETS_BG
Definition cm.h:191
@ CLR_NT_REV_BG
Definition cm.h:201
@ CLR_BLACK
Definition cm.h:167
@ CLR_BWHITE
Definition cm.h:182
@ CLR_LN_BG
Definition cm.h:195
@ CLR_NT_HL_REV_BG
Definition cm.h:205
@ CLR_BBLACK
Definition cm.h:175
@ CLR_LN_FG
Definition cm.h:194
@ CLR_NT_HL_FG
Definition cm.h:202
@ CLR_BBLUE
Definition cm.h:179
@ CLR_BGREEN
Definition cm.h:177
@ CLR_BYELLOW
Definition cm.h:178
@ CLR_BMAGENTA
Definition cm.h:180
@ CLR_BORANGE
Definition cm.h:183
@ CLR_NT_HL_BG
Definition cm.h:203
@ CLR_NT_HL_REV_FG
Definition cm.h:204
@ CLR_BG
Definition cm.h:185
@ CLR_BOX_FG
Definition cm.h:186
@ CLR_NT_BG
Definition cm.h:199
@ CLR_TITLE_BG
Definition cm.h:207
@ CLR_BRED
Definition cm.h:176
@ CLR_NCOLORS
Definition cm.h:208
@ CLR_BLUE
Definition cm.h:171
@ CLR_IND_BG
Definition cm.h:189
@ CLR_GREEN
Definition cm.h:169
@ CLR_CMDLN_FG
Definition cm.h:196
@ CLR_NT_REV_FG
Definition cm.h:200
@ CLR_CYAN
Definition cm.h:173
bool f_restore_screen
@ LF_FIFO
Definition cm.h:262
@ LF_DIR
Definition cm.h:264
@ LF_UNKNOWN
Definition cm.h:269
@ LF_SOCK
Definition cm.h:268
@ LF_BLK
Definition cm.h:265
@ LF_LNK
Definition cm.h:267
@ LF_REG
Definition cm.h:266
@ LF_CHR
Definition cm.h:263
FILE * tty_fp
uint rgb_clr_to_cube(uint)
#define min(x, y)
min macro evaluates two expressions, returning least result
Definition cm.h:91
uint mbegy
bool f_have_curses_tioctl
Definition scriou.c:25
ushort cp_ln_bg
int wccp_to_str(wchar_t, uint8_t *)
bool str_to_bool(const char *)
Converts String to boolean true or false.
Definition futil.c:934
int win2_box_new(uint, uint, uint, uint, char *)
uint mcols
#define __atexit
This macro registers the end_pgm function to be called when the program exits.
Definition cm.h:339
char * fill_field(char *, char *, char, uint)
Definition futil.c:1731
struct termios shell_out_tioctl curses_out_tioctl
Definition scriou.c:36
uint mg_action
size_t codepoint_to_utf8(uint32_t codepoint, uint8_t *utf8)
char * stdio_fdnames(char *, char *)
Definition futil.c:1082
void user_end()
int display_curses_keys()
void initialize_styles(SIO *)
uint enter_option()
bool open_curses(SIO *)
#define Ctrl(c)
Definition cm.h:54
void display_argv_error_msg(char *, char **)
struct termios shell_in_tioctl curses_in_tioctl
Definition scriou.c:35
struct termios shell_err_tioctl curses_err_tioctl
Definition scriou.c:37
void ui_render()
Definition ui_ncurses.c:800
int ui_cursor_move(UiSurface *s, uint w, uint y, uint x)
Definition ui_ncurses.c:727
int ui_mvwaddstr(UiSurface *s, uint w, uint y, uint x, const char *text)
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_wclrtoeol(UiSurface *s, uint w)
int ui_curs_set(int visibility)
Definition ui_ncurses.c:737
struct nccell UiCell
Definition ui_backend.h:250
#define KEY_F09
#define KEY_RIGHT
#define KEY_DC
#define KEY_BACKSPACE
#define KEY_END
#define KEY_ENTER
#define KEY_MOUSE
#define KEY_IC
#define KEY_LEFT
#define KEY_HOME
int init_cnt
Definition mem.c:28
ViewStack view_stack
Definition init_view.c:32
#define TRUE
Definition iloan.c:19
int popup_ckeys()
Definition curskeys.c:31
#define MAXLEN
Definition curskeys.c:15
int cf_accept(UiSurface *sfc, uint w, char *accept_s, uint flin, uint fcol, uint flen)
Accepts input for a field in a C-Menu window.
Definition cm_fields.c:41
bool f_erase_remainder
Structure to hold field information for C-Menu.
Definition cm_fields.c:30
int process_config_file(char *, Init *)
Definition init.c:663
uint rgb_to_xterm256_idx(RGB *rgb)
Convert RGB color to XTerm 256 color index.
Definition dwin.c:252
UiCell cell_sp
Definition dwin.c:120
UiCell cell_ve
Definition dwin.c:112
ushort cp_nt
Definition dwin.c:151
UiCell cell_tr
Definition dwin.c:110
int surface_box_win_new(uint wlines, uint wcols, uint wbegy, uint wbegx, char *wtitle)
Definition dwin.c:521
UiCell cell_nt
Definition dwin.c:94
char const colors_text[][10]
Color names for .minitrc overrides.
Definition dwin.c:51
UiCell cell_ls
Definition dwin.c:105
UiCell cell_nt_hl_rev
Definition dwin.c:97
char em1[MAXLEN]
Definition dwin.c:143
UiCell cell_bt
Definition dwin.c:118
UiCell cell_br
Definition dwin.c:114
ushort cp_green
Definition dwin.c:160
UiCell cell_tl
Definition dwin.c:109
ushort cp_red
Definition dwin.c:159
ushort cp_box
Definition dwin.c:147
char em2[MAXLEN]
Definition dwin.c:144
wchar_t * mbstr_to_wcstr(const char *mb_str)
Definition dwin.c:404
ushort cp_blue
Definition dwin.c:162
UiCell cell_ln
Definition dwin.c:102
int stdout_fd
Definition dwin.c:138
void initialize_cells(SIO *sio)
Initialize local color variables and color pairs based on SIO settings.
Definition dwin.c:177
UiCell cell_ts
Definition dwin.c:107
ushort cp_nt_hl
Definition dwin.c:153
int border_draw(UiSurface *sfc)
Definition dwin.c:581
ushort cp_fill_char
Definition dwin.c:157
UiCell cell_tt
Definition dwin.c:117
UiCell cell_bs
Definition dwin.c:108
ushort cp_brackets
Definition dwin.c:158
ushort cp_yellow
Definition dwin.c:161
UiCell cell_ho
Definition dwin.c:111
UiCell cell_rs
Definition dwin.c:106
bool init_clr_palette(SIO *sio)
Initialize color palette based on SIO settings.
Definition dwin.c:333
UiCell cell_default
Definition dwin.c:90
int click_x
Definition dwin.c:45
char fn[MAXLEN]
Definition dwin.c:141
int surface_split_box_win_new(uint wlines, uint wcols, uint split_y, uint split_x, uint wbegy, uint wbegx, char *wtitle)
Definition dwin.c:539
void mbc_to_wc(wchar_t wc[2], const char mbc)
Definition dwin.c:393
ushort cp_nt_hl_rev
Definition dwin.c:154
ushort cp_default
Definition dwin.c:156
UiCell cell_nt_hl
Definition dwin.c:96
ushort cp_nt_rev
Definition dwin.c:152
char em3[MAXLEN]
Definition dwin.c:145
ushort cp_title
Definition dwin.c:150
uint src_line
Definition dwin.c:139
void apply_gamma(RGB *rgb)
Apply gamma correction to RGB color.
Definition dwin.c:307
RGB xterm256_idx_to_rgb(uint idx)
Convert XTerm 256 color index to RGB.
Definition dwin.c:274
UiCell cell_lt
Definition dwin.c:115
int exit_code
Definition dwin.c:127
UiCell cell_brktl
Definition dwin.c:92
UiCell cell_cr
Definition dwin.c:119
UiCell cell_title
Definition dwin.c:101
int click_y
Definition dwin.c:44
uint16_t win_attr
Definition dwin.c:130
int stdin_fd
Definition dwin.c:137
char em0[MAXLEN]
Definition dwin.c:142
UiCell cell_ind
Definition dwin.c:99
UiCell cell_ran
Definition dwin.c:103
int assign_chyron_win(Chyron *chyron, UiSurface *sfc, uint win, char *y)
Definition dwin.c:962
char * src_name
Definition dwin.c:140
UiCell cell_cmdln
Definition dwin.c:100
UiCell cell_brktr
Definition dwin.c:93
ushort cp_ind
Definition dwin.c:148
UiCell cell_fill_char
Definition dwin.c:91
UiCell cell_box
Definition dwin.c:98
UiCell cell_rt
Definition dwin.c:116
UiCell cell_bl
Definition dwin.c:113
UiCell cell_chk
Definition dwin.c:104
UiCell cell_nt_rev
Definition dwin.c:95
int stderr_fd
Definition dwin.c:164
struct termios shell_tioctl
Definition scriou.c:22
int border_ysplit(UiSurface *sfc, uint y)
Draw a box with a separator line around the specified window.
Definition dwin.c:617
int border_ysplit_text(UiSurface *sfc, char *text, uint separator_line)
Draw a box with a separator line and text around the specified window.
Definition dwin.c:637
void view_full_screen_resize(Init *)
Resize the full screen view and its components.
Definition init_view.c:97
void view_boxwin_resize(Init *)
Resize the current window and its box.
Definition init_view.c:178
int cm_surface_destroy(UiSurface *sfc)
Destroy the most recently created surface.
Definition dwin.c:576
int border_title(UiSurface *sfc, char *title)
Draw a box with a title around the specified window.
Definition dwin.c:676
void destroy_curses()
Gracefully shut down NCurses and restore terminal settings.
Definition dwin.c:384
bool action_disposition(char *title, char *action_str)
Display a simple action disposition message window or print to stderr.
Definition dwin.c:895
int answer_yn(char *msg0, char *msg1, char *msg2, char *msg3)
Accept a single letter answer.
Definition dwin.c:715
int Perror(char *emsg_str)
Display a simple error message window or print to stderr.
Definition dwin.c:841
void abend(int ec, char *s)
Abnormal program termination.
Definition dwin.c:1204
int display_error(char *msg0, char *msg1, char *msg2, char *msg3)
Display an error message window or print to stderr.
Definition dwin.c:778
void set_chyron_key_cb(Chyron *chyron, uint k, char *s, uint kc, UiCell cell_base)
Set chyron key with color pair (cp).
Definition dwin.c:1021
Chyron * destroy_chyron(Chyron *chyron)
Destroy Chyron structure.
Definition dwin.c:984
void compile_chyron(Chyron *chyron)
construct the chyron string from the chyron structure
Definition dwin.c:1110
int get_chyron_key(Chyron *chyron, uint x)
Get keycode from chyron.
Definition dwin.c:1186
void activate_all_chyron_keys(Chyron *chyron)
Deactivate chyron key.
Definition dwin.c:1078
void unset_chyron_key(Chyron *chyron, uint k)
Unset chyron key.
Definition dwin.c:1060
void activate_chyron_key(Chyron *chyron, uint k)
Activate chyron key.
Definition dwin.c:1069
void deactivate_all_chyron_keys(Chyron *chyron)
Deactivate all chyron keys.
Definition dwin.c:1096
Chyron * new_chyron()
Create and initialize Chyron structure.
Definition dwin.c:947
bool is_set_chyron_key(Chyron *chyron, uint k)
Check if function key label is set.
Definition dwin.c:1005
void display_chyron(UiSurface *sfc, uint w, Chyron *chyron, uint line, uint col)
Display chyron on the specified line and column of the surface.
Definition dwin.c:1163
void deactivate_chyron_key(Chyron *chyron, uint k)
Deactivate chyron key.
Definition dwin.c:1088
void set_chyron_key(Chyron *chyron, uint k, char *s, uint kc)
Set chyron key with default color pair (cp_nt_rev).
Definition dwin.c:1045
int fork_exec(char **)
Fork and exec a command.
Definition exec.c:122
int shell(char *)
Execute a shell command.
Definition exec.c:74
int full_screen_fork_exec(char **)
Execute a command in full screen mode.
Definition exec.c:45
int full_screen_shell(char *)
Execute a shell command in full screen mode.
Definition exec.c:58
int fork_detach_execvp(char **eargv)
Fork, set new session ID, close files, and execute detached command.
Definition detach.c:29
bool is_valid_date(uint yyyy, uint mm, uint dd)
Check if a given date is valid, including leap years.
Definition fields.c:611
void numeric(char *d, char *s)
Extract numeric characters from source string to destination string.
Definition fields.c:648
bool is_valid_time(uint hh, uint mm, uint ss)
Check if a given time is valid.
Definition fields.c:632
void right_justify(char *, uint)
Right justify string by removing trailing spaces and adding leadingspaces.
Definition fields.c:585
void left_justify(char *s)
Left justify string by removing leading spaces.
Definition fields.c:572
int init_form(Init *, int, char **, uint, uint)
Initialize form data structure and parse description file.
Definition form_engine.c:61
bool locate_file_in_path(char *, char *)
Locates a file in the system PATH.
Definition futil.c:1270
size_t canonicalize_file_spec(char *)
Removes quotes and trims at first space.
Definition futil.c:1324
size_t strnz__cpy(char *, const char *, size_t)
safer alternative to strncpy
Definition futil.c:537
char * iso8601_time(char *, uint, time_t *, bool)
Formats a struct tm as an ISO 8601 string.
Definition futil.c:257
bool parse_local_timestamp(const char *, time_t *)
Parses an ISO 8601 timestamp string in local time and converts it to time_t.
Definition futil.c:273
bool trim_ext(char *, char *)
trims the file extension from "filename" and copies the result to "buf"
Definition futil.c:1009
bool stripz_quotes(char *)
removes leading and trailing double quotes if present
Definition futil.c:726
void write_cmenu_log(char *)
Write message to C-Menu log file without timestamp.
Definition futil.c:1684
size_t trim(char *)
Trims leading and trailing spaces from string s in place.
Definition futil.c:384
char * get_local_timestamp()
Returns the current local time as an ISO 8601 formatted string.
Definition futil.c:307
bool is_directory(const char *)
Checks if the given path is a directory.
Definition futil.c:1355
bool file_spec_path(char *, char *)
extracts the path component of a file specification
Definition futil.c:863
bool str_to_upper(char *)
Converts a string to uppercase.
Definition futil.c:515
bool dir_name(char *, char *)
Returns the directory name of a file specification.
Definition futil.c:1132
bool is_hex_str(char *, uint)
Validates that a string consists of exactly len hexadecimal digits.
Definition futil.c:202
double str_to_double(char *)
converts string to double
Definition futil.c:922
bool str_to_lower(char *)
Converts a string to lowercase.
Definition futil.c:501
size_t strnz(char *, size_t)
terminates string at New Line, Carriage Return, or max_len
Definition futil.c:608
size_t ssnprintf(char *, size_t, const char *,...)
ssnprintf was designed to be a safer alternative to snprintf.
Definition futil.c:413
bool strip_quotes(char *)
removes leading and trailing double quotes if present
Definition futil.c:711
int str_to_args(char **, char *, uint)
Converts a string into an array of argument strings.
Definition futil.c:433
bool is_valid_regex(const char *)
Checks if the given regular expression pattern is valid.
Definition futil.c:1383
void open_cmenu_log()
Open new C-Menu log file.
Definition futil.c:1650
bool expand_tilde(char *, uint)
Replaces "~/" in string with the user's home directory.
Definition futil.c:963
char * strnz_dup(char *, size_t)
Allocates memory for and duplicates string s up to length l or until line feed or carriage return.
Definition futil.c:647
bool file_spec_name(char *, char *)
extracts the file name component of a file specification
Definition futil.c:890
size_t strip_ansi(char *, char *)
Strips ANSI SGR escape sequences (ending in 'm') from string s to d.
Definition futil.c:822
bool mk_dir(char *dir)
If directory doesn't exist, make it.
Definition futil.c:1303
size_t strnz__cat(char *, const char *, size_t)
safer alternative to strncat
Definition futil.c:566
bool get_argp_doc_by_name(char *comment, const struct argp_option *, const char *)
Retrieves the documentation string for a given key name from an argp options array.
Definition futil.c:169
char * get_ip_addresses(char *, uint)
Retrieves the IP addresses of the local machine and formats them into a string.
Definition futil.c:347
char * rep_substring(const char *, const char *, const char *)
Replace all occurrences of "tgt_s" in "org_s" with "rep_s".
Definition futil.c:1423
bool is_symlink_to_dir(const char *)
Checks if the given path is a symbolic link to a directory.
Definition futil.c:1368
bool verify_file(char *, uint)
Verifies that the file specified by "in_spec" exists and is accessible with the permissions specified...
Definition futil.c:1223
size_t strnlf(char *, size_t)
terminates string with line feed
Definition futil.c:626
void write_cmenu_log_ts(char *)
Write message to C-Menu log file with timestamp.
Definition futil.c:1668
int a_toi(char *, bool *)
a safer alternative to atoi() for converting ASCII strings to integers.
Definition futil.c:762
bool str_subc(char *, char *, char, char *, uint)
Replaces "ReplaceChr" in "s" with "Withstr" in "d" won't copy more than "l" bytes to "d" Replaces all...
Definition futil.c:683
int destroy_argv(uint argc, char **argv)
Deallocates memory allocated for argument strings in argv.
Definition futil.c:487
bool chrep(char *, char, char)
Replaces all occurrences of old_chr in s with new_chr in place.
Definition futil.c:743
bool base_name(char *, char *)
Returns the base name of a file specification.
Definition futil.c:1106
bool normalize_file_spec(char *)
replace backslashes with forward lashes
Definition futil.c:846
char * format_local_timestamp(time_t, char *, size_t)
Formats a time_t as an ISO 8601 string in local time.
Definition futil.c:296
bool is_newer(char *, char *)
Checks if the file specified by "fut" is newer than the file specified by "control".
Definition futil.c:153
char * fdname(int, char *)
Retrieves the file path associated with a given file descriptor.
Definition futil.c:1047
bool verify_dir(char *, uint)
Verifies that the directory specified by "spec" exists and is accessible with the permissions specifi...
Definition futil.c:1172
char * get_user_str(char *, size_t)
Retrieves the current user's name and UID, and formats it into a string.
Definition futil.c:320
bool trim_path(char *)
Trims trailing spaces and slashes from directory path in place.
Definition futil.c:981
unsigned long a_to_ul(const char *)
Converts a string to an unsigned long long integer, with support for suffixes K, M,...
Definition futil.c:786
bool unstr_hex_clr(char *, char *)
Validates that a string is a hex color code in the format "#RRGGBB".
Definition futil.c:225
size_t string_cpy(String *, const String *)
Copy src String to dest String, allocating additional memory for dest String if necessary.
Definition futil.c:1560
String to_string(const char *)
String functions provide a simple string library to facilitate string manipulation in C,...
Definition futil.c:1506
size_t string_ncpy(String *, const String *, size_t)
copies up to n characters from src String to dest String, allocating additional memory for dest Strin...
Definition futil.c:1617
size_t string_cat(String *, const String *)
Concatenates src String to dest String, allocating additional memory for dest String if necessary.
Definition futil.c:1577
String free_string(String)
Free the dynamically allocated String.
Definition futil.c:1545
size_t string_ncat(String *, const String *, size_t)
Concatenates up to n characters from src String to dest String, allocating additional memory for dest...
Definition futil.c:1596
int segmentation_fault()
Function to intentionally cause a segmentation fault for testing purposes.
Definition futil.c:1642
int parse_opt_args(Init *, int, char **)
Parse command-line options and set Init struct values accordingly.
Definition init.c:591
bool derive_file_spec(char *, char *, char *)
Derive full file specification from directory and file name.
Definition init.c:1367
int write_config(Init *init)
Write the current configuration to a file specified in init->minitrc.
Definition init.c:1103
void mapp_initialization(Init *, int, char **)
Main initialization function for MAPP - Menu Application.
Definition init.c:474
void zero_opt_args(Init *)
Initialize optional arguments in the Init struct to default values.
Definition init.c:606
void view_calc_boxwin_dimensions(Init *)
Calculate the dimensions and position of the box window for C-Menu View.
Definition init_view.c:195
int init_view_full_screen(Init *init)
Initialize C-Menu View in full screen mode.
Definition init_view.c:47
int init_view_boxwin(Init *init)
Initialize the C-Menu View in box window mode.
Definition init_view.c:147
void view_calc_full_screen_dimensions(Init *)
Calculate the dimensions for full screen mode.
Definition init_view.c:113
int view_init_input(Init *init, char *file_name)
Initialize the input for the C-Menu View.
Definition init_view.c:279
bool verify_spec_arg(char *, char *, char *, char *, uint)
Verify file specification argument.
Definition mem.c:369
Pick * new_pick(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Pick structure.
Definition mem.c:186
View * destroy_view(Init *init)
Destroy View structure.
Definition mem.c:345
Menu * new_menu(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Menu structure.
Definition mem.c:134
Init * new_init(int argc, char **argv)
Create and initialize Init structure.
Definition mem.c:60
Menu * destroy_menu(Init *init)
Destroy Menu structure.
Definition mem.c:155
Form * destroy_form(Init *init)
Destroy Form structure.
Definition mem.c:275
View * new_view(Init *init)
Create and initialize View structure.
Definition mem.c:299
Init * destroy_init(Init *init)
Destroy Init structure.
Definition mem.c:95
Form * new_form(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Form structure.
Definition mem.c:252
Pick * destroy_pick(Init *init)
Destroy Pick structure.
Definition mem.c:225
unsigned int menu_engine(Init *)
The main loop of the menu system.
Definition menu_engine.c:36
unsigned int parse_menu_description(Init *)
Parse menu description file and create Menu.
int init_pick(Init *, int, char **, uint, uint)
Initializes pick structure and opens pick input file or pipe.
Definition pick_engine.c:66
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.
bool capture_shell_tioctl()
capture_shell_tioctl() - capture shell terminal settings
Definition scriou.c:43
char di_getch()
get single character from terminal in raw mode
Definition scriou.c:158
bool restore_curses_tioctl()
restore_curses_tioctl() - restore curses terminal settings
Definition scriou.c:84
bool capture_curses_tioctl()
capture_curses_tioctl() - capture curses terminal settings
Definition scriou.c:70
bool mk_raw_tioctl(struct termios *)
mk_raw_tioctl() - set terminal to raw mode
Definition scriou.c:132
bool set_sane_tioctl(struct termios *)
set_sane_tioctl() - set terminal to sane settings for C-MENU
Definition scriou.c:99
bool restore_shell_tioctl()
restore_shell_tioctl() - restore shell terminal settings
Definition scriou.c:57
void sig_dfl_mode()
Set signal handlers to default behavior.
Definition sig.c:42
void signal_handler(int)
Signal handler for interrupt signals.
Definition sig.c:95
void sig_prog_mode()
Set up signal handlers for interrupt signals.
Definition sig.c:62
int view_file(Init *)
Start view.
int view_cmd_processor(Init *)
Main Command Processing Loop for View.
void build_prompt(View *)
Build Prompt String.
void initialize_line_table(View *)
Initialize Line Table.
void destroy_line_table(View *)
Destroy 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.
uint mm
Definition cm.h:59
uint dd
Definition cm.h:60
uint yyyy
Definition cm.h:58
uint hh
Definition cm.h:64
uint mm
Definition cm.h:65
uint ss
Definition cm.h:66
char text[CHYRON_KEY_MAXLEN]
Definition cm.h:379
uint keycode
Definition cm.h:381
bool active
Definition cm.h:378
UiCell cell_base
Definition cm.h:383
uint end_pos
Definition cm.h:382
uint y
Definition cm.h:394
UiSurface * sfc
Definition cm.h:392
UiCell cmplx_buf[MAXLEN]
Definition cm.h:389
uint win
Definition cm.h:393
char s[MAXLEN]
Definition cm.h:388
ChyronKey * key[CHYRON_KEYS]
Definition cm.h:387
uint l
Definition cm.h:391
uint bg
Definition cm.h:458
uint pair_id
Definition cm.h:459
uint fg
Definition cm.h:457
char * s
Definition cm.h:655
size_t l
Definition cm.h:656
Arg ** v
Definition cm.h:659
size_t n
Definition cm.h:660
size_t l
Definition cm.h:664
char * s
Definition cm.h:663
size_t l
Definition cm.h:668
wchar_t * s
Definition cm.h:667
uint32_t ran_bg
Definition cm.h:737
double green_gamma
Definition cm.h:690
uint32_t ln_bg
Definition cm.h:723
ushort cp_ran
Definition cm.h:766
FILE * stdout_fp
Definition cm.h:739
ushort cp_ind
Definition cm.h:762
double blue_gamma
Definition cm.h:691
ushort cp_nt_hl
Definition cm.h:759
uint32_t abg
Definition cm.h:711
char brackets[3]
Definition cm.h:750
uint32_t magenta
Definition cm.h:698
uint32_t cmdln_bg
Definition cm.h:725
ushort cp_title
Definition cm.h:764
int stdout_fd
Definition cm.h:743
uint32_t cmdln_fg
Definition cm.h:724
ushort cp_default
Definition cm.h:754
int stderr_fd
Definition cm.h:744
uint32_t nt_hl_rev_fg
Definition cm.h:732
uint clr_cnt
Definition cm.h:746
uint32_t ran_fg
Definition cm.h:736
ushort cp_brackets
Definition cm.h:756
ushort cp_cmdln
Definition cm.h:763
FILE * stdin_fp
Definition cm.h:738
uint32_t bgreen
Definition cm.h:704
ushort cp_ln
Definition cm.h:765
double red_gamma
Definition cm.h:689
ushort cp_box
Definition cm.h:761
uint32_t green
Definition cm.h:695
char fill_char[2]
Definition cm.h:751
ushort cp_nt
Definition cm.h:757
FILE * tty_fp
Definition cm.h:741
uint32_t nt_fg
Definition cm.h:726
uint32_t yellow
Definition cm.h:696
uint32_t fill_char_fg
Definition cm.h:720
uint32_t box_fg
Definition cm.h:714
ushort cp_nt_hl_rev
Definition cm.h:760
uint clr_pair_cnt
Definition cm.h:747
uint32_t orange
Definition cm.h:701
ushort cp_bold
Definition cm.h:768
uint32_t ln_fg
Definition cm.h:722
uint32_t ind_bg
Definition cm.h:717
FILE * stderr_fp
Definition cm.h:740
uint32_t bmagenta
Definition cm.h:707
uint32_t ind_fg
Definition cm.h:716
uint32_t byellow
Definition cm.h:705
uint clr_pair_idx
Definition cm.h:749
char tty_name[MAXLEN]
Definition cm.h:753
uint32_t bblue
Definition cm.h:706
uint32_t borange
Definition cm.h:710
uint32_t title_bg
Definition cm.h:735
uint32_t fg
Definition cm.h:712
uint32_t cyan
Definition cm.h:699
uint32_t bblack
Definition cm.h:702
uint32_t red
Definition cm.h:694
ushort cp_fill_char
Definition cm.h:755
uint32_t nt_hl_rev_bg
Definition cm.h:733
uint32_t title_fg
Definition cm.h:734
uint32_t bred
Definition cm.h:703
uint32_t fill_char_bg
Definition cm.h:721
uint32_t black
Definition cm.h:693
ushort cp_chk
Definition cm.h:767
uint32_t nt_rev_bg
Definition cm.h:729
uint32_t brackets_bg
Definition cm.h:719
uint32_t bcyan
Definition cm.h:708
uint clr_idx
Definition cm.h:748
uint32_t nt_bg
Definition cm.h:727
uint32_t blue
Definition cm.h:697
int tty_fd
Definition cm.h:745
uint32_t brackets_fg
Definition cm.h:718
uint32_t white
Definition cm.h:700
uint32_t box_bg
Definition cm.h:715
ushort cp_nt_rev
Definition cm.h:758
uint32_t nt_hl_fg
Definition cm.h:730
int stdin_fd
Definition cm.h:742
uint32_t bwhite
Definition cm.h:709
char border
Definition cm.h:752
uint32_t nt_rev_fg
Definition cm.h:728
double gray_gamma
Definition cm.h:692
uint32_t nt_hl_bg
Definition cm.h:731
uint32_t bg
Definition cm.h:713
char fill_char
Definition cm.h:775
uint ff
Definition cm.h:774
uint flen
Definition cm.h:773
uint fcol
Definition cm.h:772
uint flin
Definition cm.h:771
bool cf_erase_remainder
Definition cm.h:776
char title[MAXLEN]
Definition common.h:129
char mapp_data[MAXLEN]
Definition common.h:148
char minitrc[MAXLEN]
Definition common.h:174
bool f_out_spec
Definition common.h:171
char mapp_help[MAXLEN]
Definition common.h:149
int begx
Definition common.h:118
bool f_title
Definition common.h:166
char chyron_s[MAXLEN]
Definition common.h:128
SIO * sio
Definition common.h:114
int pick_cnt
Definition common.h:188
bool f_cmd_all
Definition common.h:165
Form * form
Definition common.h:185
char in_spec[MAXLEN]
Definition common.h:168
char cmd_all[MAXLEN]
Definition common.h:123
bool f_mapp_help
Definition common.h:157
bool f_mapp_msrc
Definition common.h:158
int argc
Definition common.h:130
char fill_char[2]
Definition common.h:146
bool f_cmd
Definition common.h:164
int prompt_type
Definition common.h:126
char about_fn[MAXLEN]
Definition common.h:175
char mapp_msrc[MAXLEN]
Definition common.h:150
int cols
Definition common.h:116
int menu_cnt
Definition common.h:184
int tab_stop
Definition common.h:181
bool f_mapp_home
Definition common.h:154
bool f_erase_remainder
Definition common.h:141
bool f_mapp_data
Definition common.h:155
bool f_read_theme
Definition common.h:142
bool f_mapp_desc
Definition common.h:161
char mapp_home[MAXLEN]
Definition common.h:147
bool f_mapp_user
Definition common.h:159
char prompt_str[MAXLEN]
Definition common.h:125
bool f_squeeze
Definition common.h:137
int begy
Definition common.h:117
char parent_cmd[MAXLEN]
Definition common.h:124
char mapp_spec[MAXLEN]
Definition common.h:176
char receiver_cmd[MAXLEN]
Definition common.h:121
int h_shift
Definition common.h:182
bool wrap
Definition common.h:144
bool f_multiple_cmd_args
Definition common.h:139
int select_max
Definition common.h:179
bool f_ln
Definition common.h:143
bool f_mapp_spec
Definition common.h:156
char provider_cmd[MAXLEN]
Definition common.h:120
char out_spec[MAXLEN]
Definition common.h:169
bool f_strip_ansi
Definition common.h:136
View * view
Definition common.h:189
bool p_view_files
Definition common.h:134
Menu * menu
Definition common.h:183
bool f_at_end_remove
Definition common.h:135
int view_cnt
Definition common.h:190
char brackets[3]
Definition common.h:145
bool f_ignore_case
Definition common.h:133
char ** argv
Definition common.h:131
int lines
Definition common.h:115
char mapp_user[MAXLEN]
Definition common.h:151
char cmd[MAXLEN]
Definition common.h:122
char mapp_theme[MAXLEN]
Definition common.h:152
int optind
Definition common.h:132
bool f_help_spec
Definition common.h:167
bool f_receiver_cmd
Definition common.h:163
bool f_provider_cmd
Definition common.h:162
int form_cnt
Definition common.h:186
char help_spec[MAXLEN]
Definition common.h:177
char editor[MAXLEN]
Definition common.h:172
Pick * pick
Definition common.h:187
bool f_in_spec
Definition common.h:170
char menuapp[MAXLEN]
Definition common.h:173