C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
init.c File Reference

Initialization for Menu Application Programs. More...

#include <argp.h>
#include <common.h>
#include <locale.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <wchar.h>
Include dependency graph for init.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE

Enumerations

enum  InitVariables {
  BG = 257 , FG , BOX_FG , BOX_BG ,
  IND_FG , IND_BG , BRACKETS_FG , BRACKETS_BG ,
  FILL_CHAR_FG , FILL_CHAR_BG , NT_FG , NT_BG ,
  NT_REV_FG , NT_REV_BG , NT_HL_FG , NT_HL_BG ,
  NT_HL_REV_FG , NT_HL_REV_BG , TITLE_FG , TITLE_BG ,
  LN_FG , LN_BG , CMDLN_FG , CMDLN_BG ,
  XBBLACK , XBBLUE , XBCYAN , XBGREEN ,
  XBLACK , XBLUE , XBMAGENTA , XBRED ,
  XBWHITE , XBYELLOW , XCYAN , CM_EDITOR ,
  XGREEN , XMAGENTA , XRED , XWHITE ,
  XYELLOW , GM_BLUE , GM_GRAY , GM_GREEN ,
  GM_RED , MAPP_DATA , MAPP_HELP , MAPP_HOME ,
  MAPP_MSRC , MAPP_USER , MAPP_SPEC , HELP_SPEC ,
  MAPP_THEME , END_INIT_VARS
}

Functions

bool derive_file_spec (char *file_spec, char *dir, char *file_name)
 Derive full file specification from directory and file name.
void display_version ()
 Display the version information of the application.
void mapp_initialization (Init *init, int argc, char **argv)
 Main initialization function for MAPP - Menu Application.
void opt_prt_bool (const char *o, const char *name, bool value)
 Print an option and its value in a formatted manner for boolean values.
void opt_prt_char (const char *o, const char *name, const char *value)
 Print an option and its value in a formatted manner.
void opt_prt_double (const char *o, const char *name, double value)
 Print an option and its value in a formatted manner for double values.
void opt_prt_int (const char *o, const char *name, int value)
 Print an option and its value in a formatted manner for integer values.
void opt_prt_str (const char *o, const char *name, const char *value)
 Print an option and its value in a formatted manner for integer values.
int parse_opt_args (Init *init, int argc, char **argv)
 Parse command-line options and set Init struct values accordingly.
void print_argp_doc (FILE *, char *, char *)
int process_config_file (char *, Init *)
int process_config_files (Init *init)
 parse the configuration file specified in init->minitrc and set Init struct values accordingly
int write_config (Init *init)
 Write the current configuration to a file specified in init->minitrc.
void zero_opt_args (Init *init)
 Initialize optional arguments in the Init struct to default values.

Variables

const char * argp_program_bug_address = "billxwaller@gmail.com"
const char * argp_program_version = CM_VERSION
int executor = 0
bool f_write_config = false

Detailed Description

Initialization for Menu Application Programs.

Author
Bill Waller Copyright (c) 2025 MIT License billx.nosp@m.wall.nosp@m.er@gm.nosp@m.ail..nosp@m.com
Date
2026-02-09

Definition in file init.c.

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 20 of file init.c.

Enumeration Type Documentation

◆ InitVariables

Enumerator
BG 
FG 
BOX_FG 
BOX_BG 
IND_FG 
IND_BG 
BRACKETS_FG 
BRACKETS_BG 
FILL_CHAR_FG 
FILL_CHAR_BG 
NT_FG 
NT_BG 
NT_REV_FG 
NT_REV_BG 
NT_HL_FG 
NT_HL_BG 
NT_HL_REV_FG 
NT_HL_REV_BG 
TITLE_FG 
TITLE_BG 
LN_FG 
LN_BG 
CMDLN_FG 
CMDLN_BG 
XBBLACK 
XBBLUE 
XBCYAN 
XBGREEN 
XBLACK 
XBLUE 
XBMAGENTA 
XBRED 
XBWHITE 
XBYELLOW 
XCYAN 
CM_EDITOR 
XGREEN 
XMAGENTA 
XRED 
XWHITE 
XYELLOW 
GM_BLUE 
GM_GRAY 
GM_GREEN 
GM_RED 
MAPP_DATA 
MAPP_HELP 
MAPP_HOME 
MAPP_MSRC 
MAPP_USER 
MAPP_SPEC 
HELP_SPEC 
MAPP_THEME 
END_INIT_VARS 

Definition at line 31 of file init.c.

31 {
32 BG = 257,
33 FG,
34 BOX_FG,
35 BOX_BG,
36 IND_FG,
37 IND_BG,
42 NT_FG,
43 NT_BG,
52 LN_FG,
53 LN_BG,
56 XBBLACK,
57 XBBLUE,
58 XBCYAN,
59 XBGREEN,
60 XBLACK,
61 XBLUE,
63 XBRED,
64 XBWHITE,
66 XCYAN,
68 XGREEN,
70 XRED,
71 XWHITE,
72 XYELLOW,
73 GM_BLUE,
74 GM_GRAY,
76 GM_RED,
InitVariables
Definition init.c:31
@ NT_BG
Definition init.c:43
@ XBRED
Definition init.c:63
@ IND_FG
Definition init.c:36
@ MAPP_HOME
Definition init.c:79
@ XGREEN
Definition init.c:68
@ XRED
Definition init.c:70
@ TITLE_FG
Definition init.c:50
@ MAPP_DATA
Definition init.c:77
@ BG
Definition init.c:32
@ NT_REV_BG
Definition init.c:45
@ XBCYAN
Definition init.c:58
@ XYELLOW
Definition init.c:72
@ CMDLN_FG
Definition init.c:54
@ NT_HL_FG
Definition init.c:46
@ MAPP_SPEC
Definition init.c:82
@ XBYELLOW
Definition init.c:65
@ FILL_CHAR_FG
Definition init.c:40
@ LN_FG
Definition init.c:52
@ GM_BLUE
Definition init.c:73
@ XCYAN
Definition init.c:66
@ XBBLACK
Definition init.c:56
@ XBLUE
Definition init.c:61
@ XWHITE
Definition init.c:71
@ BRACKETS_FG
Definition init.c:38
@ BRACKETS_BG
Definition init.c:39
@ GM_GRAY
Definition init.c:74
@ GM_GREEN
Definition init.c:75
@ BOX_FG
Definition init.c:34
@ HELP_SPEC
Definition init.c:83
@ IND_BG
Definition init.c:37
@ NT_REV_FG
Definition init.c:44
@ XBWHITE
Definition init.c:64
@ NT_FG
Definition init.c:42
@ MAPP_THEME
Definition init.c:84
@ MAPP_USER
Definition init.c:81
@ XBGREEN
Definition init.c:59
@ TITLE_BG
Definition init.c:51
@ NT_HL_REV_BG
Definition init.c:49
@ MAPP_MSRC
Definition init.c:80
@ XBLACK
Definition init.c:60
@ NT_HL_BG
Definition init.c:47
@ BOX_BG
Definition init.c:35
@ END_INIT_VARS
Definition init.c:85
@ XBMAGENTA
Definition init.c:62
@ FG
Definition init.c:33
@ XBBLUE
Definition init.c:57
@ FILL_CHAR_BG
Definition init.c:41
@ LN_BG
Definition init.c:53
@ CMDLN_BG
Definition init.c:55
@ GM_RED
Definition init.c:76
@ CM_EDITOR
Definition init.c:67
@ XMAGENTA
Definition init.c:69
@ NT_HL_REV_FG
Definition init.c:48
@ MAPP_HELP
Definition init.c:78

Function Documentation

◆ print_argp_doc()

void print_argp_doc ( FILE * minitrc_fp,
char * config_s,
char * key )

Definition at line 1287 of file init.c.

1287 {
1288 char comment[MAXLEN];
1289 comment[0] = '\0';
1290 if (get_argp_doc_by_name(comment, options, key))
1291 (void)fprintf(minitrc_fp, "%-34s # %s\n", config_s, comment);
1292 else
1293 (void)fprintf(minitrc_fp, "%-34s #\n", config_s);
1294}
#define MAXLEN
Definition curskeys.c:15
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:176

References get_argp_doc_by_name().

Referenced by write_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_config_file()

int process_config_file ( char * config_file_name,
Init * init )

Definition at line 631 of file init.c.

631 {
632 char include_file_name[MAXLEN];
633 char tmp_str[MAXLEN];
634 char *src_p, *dp;
635 SIO *sio = init->sio;
636 char hex_clr_str[8];
637 char key[MAXLEN];
638 char value[MAXLEN];
639 FILE *config_fp = fopen(config_file_name, "r");
640 char quote_char = '\0';
641 if (!config_fp) {
642 fprintf(stderr, "failed to read file: %s %s\n", config_file_name, strerror(errno));
643 return (-1);
644 }
645 while (fgets(tmp_str, sizeof(tmp_str), config_fp)) {
646 bool inquotes = false;
647 if (tmp_str[0] == '#')
648 continue;
649 src_p = tmp_str;
650 key[0] = '\0';
651 dp = key;
652 // copy delimited by "=" into value
653 while (*src_p != '\0') {
654 if (*src_p == '\n')
655 *dp = *src_p = '\0';
656 if (*src_p == '=') {
657 *dp = '\0';
658 src_p++;
659 break;
660 }
661 if (*src_p == '"' && *src_p == ' ') {
662 src_p++;
663 continue;
664 }
665 *dp++ = *src_p++;
666 }
667 value[0] = '\0';
668 dp = value;
669 // copy delimited by newline or unquoted "#" into value, removing quotes, spaces, semicolons, and newlines, but respecting quotes
670 while (*src_p != '\0') {
671 if ((*src_p == '"' || *src_p == '\'') && (*(src_p + 1) != '\\')) {
672 if (!inquotes) {
673 inquotes = true;
674 quote_char = *src_p++;
675 } else if (*src_p == quote_char) {
676 inquotes = false;
677 quote_char = '\0';
678 }
679 }
680 if (!inquotes) {
681 if (*src_p == '#') {
682 if (unstr_hex_clr(hex_clr_str, src_p)) {
683 strnz__cpy(value, hex_clr_str, MAXLEN - 1);
684 dp = value + strlen(value);
685 }
686 break;
687 }
688 }
689 if (*src_p == ' ' || *src_p == ';') {
690 src_p++;
691 continue;
692 }
693 if (*src_p == '\n') {
694 *src_p = '\0';
695 break;
696 }
697 *dp++ = *src_p++;
698 }
699 *dp = '\0';
700 if (key[0] == '\0')
701 continue;
702 if (value[0] == '\0')
703 continue;
704 if (!strcmp(key, "include")) {
705 strnz__cpy(include_file_name, value, MAXLEN - 1);
706 expand_tilde(include_file_name, MAXLEN - 1);
707 process_config_file(include_file_name, init);
708 continue;
709 }
710 if (!strcmp(key, "minitrc")) {
711 strnz__cpy(init->minitrc, value, MAXLEN - 1);
712 continue;
713 }
714 if (!strcmp(key, "lines")) {
715 init->lines = atoi(value);
716 continue;
717 }
718 if (!strcmp(key, "cols")) {
719 init->cols = atoi(value);
720 continue;
721 }
722 if (!strcmp(key, "begy")) {
723 init->begy = atoi(value);
724 continue;
725 }
726 if (!strcmp(key, "begx")) {
727 init->begx = atoi(value);
728 continue;
729 }
730 if (!strcmp(key, "f_ln")) {
731 init->f_ln = str_to_bool(value);
732 continue;
733 }
734 if (!strcmp(key, "f_at_end_remove")) {
735 init->f_at_end_remove = str_to_bool(value);
736 continue;
737 }
738 if (!strcmp(key, "f_erase_remainder")) {
739 init->f_erase_remainder = str_to_bool(value);
740 continue;
741 }
742 if (!strcmp(key, "brackets")) {
743 strnz__cpy(init->brackets, value, 2);
744 continue;
745 }
746 if (!strcmp(key, "fill_char")) {
747 if (strlen(value) > 1)
748 value[1] = '\0';
749 if (wcwidth((int)value[0]) > 1)
750 value[0] = '?';
751 strnz__cpy(init->fill_char, value, 4);
752 continue;
753 }
754 if (!strcmp(key, "f_ignore_case")) {
755 init->f_ignore_case = str_to_bool(value);
756 continue;
757 }
758 if (!strcmp(key, "p_view_files")) {
759 init->p_view_files = str_to_bool(value);
760 continue;
761 }
762 if (!strcmp(key, "f_read_theme")) {
763 init->f_read_theme = str_to_bool(value);
764 continue;
765 }
766 if (!strcmp(key, "f_squeeze")) {
767 init->f_squeeze = str_to_bool(value);
768 continue;
769 }
770 if (!strcmp(key, "f_strip_ansi")) {
771 init->f_strip_ansi = str_to_bool(value);
772 continue;
773 }
774 if (!strcmp(key, "f_multiple_cmd_args")) {
775 init->f_multiple_cmd_args = str_to_bool(value);
776 continue;
777 }
778 if (!strcmp(key, "select_max")) {
779 init->select_max = atoi(value);
780 continue;
781 }
782 if (!strcmp(key, "tab_stop")) {
783 init->tab_stop = atoi(value);
784 continue;
785 }
786 if (!strcmp(key, "h_shift")) {
787 init->h_shift = atoi(value);
788 continue;
789 }
790 if (!strcmp(key, "wait_timeout")) {
791 wait_timeout = atoi(value);
792 continue;
793 }
794 if (!strcmp(key, "title")) {
795 strnz__cpy(init->title, value, MAXLEN - 1);
796 continue;
797 }
798 if (!strcmp(key, "cmd")) {
799 strnz__cpy(init->cmd, value, MAXLEN - 1);
800 continue;
801 }
802 if (!strcmp(key, "cmd_all")) {
803 strnz__cpy(init->cmd_all, value, MAXLEN - 1);
804 continue;
805 }
806 if (!strcmp(key, "parent_cmd")) {
807 strnz__cpy(init->parent_cmd, value, MAXLEN - 1);
808 continue;
809 }
810 if (!strcmp(key, "provider_cmd")) {
811 strnz__cpy(init->provider_cmd, value, MAXLEN - 1);
812 continue;
813 }
814 if (!strcmp(key, "receiver_cmd")) {
815 strnz__cpy(init->receiver_cmd, value, MAXLEN - 1);
816 continue;
817 }
818 if (!strcmp(key, "editor")) {
819 strnz__cpy(init->editor, value, MAXLEN - 1);
820 continue;
821 }
822 if (!strcmp(key, "fg")) {
823 strnz__cpy(sio->fg, value, COLOR_LEN - 1);
824 continue;
825 }
826 if (!strcmp(key, "bg")) {
827 strnz__cpy(sio->bg, value, COLOR_LEN - 1);
828 continue;
829 }
830 if (!strcmp(key, "box_fg")) {
831 strnz__cpy(sio->box_fg, value, COLOR_LEN - 1);
832 continue;
833 }
834 if (!strcmp(key, "box_bg")) {
835 strnz__cpy(sio->box_bg, value, COLOR_LEN - 1);
836 continue;
837 }
838 if (!strcmp(key, "ind_fg")) {
839 strnz__cpy(sio->ind_fg, value, COLOR_LEN - 1);
840 continue;
841 }
842 if (!strcmp(key, "ind_bg")) {
843 strnz__cpy(sio->ind_bg, value, COLOR_LEN - 1);
844 continue;
845 }
846 if (!strcmp(key, "brackets_fg")) {
847 strnz__cpy(sio->brackets_fg, value, COLOR_LEN - 1);
848 continue;
849 }
850 if (!strcmp(key, "brackets_bg")) {
851 strnz__cpy(sio->brackets_bg, value, COLOR_LEN - 1);
852 continue;
853 }
854 if (!strcmp(key, "fill_char_fg")) {
855 strnz__cpy(sio->fill_char_fg, value, COLOR_LEN - 1);
856 continue;
857 }
858 if (!strcmp(key, "fill_char_bg")) {
859 strnz__cpy(sio->fill_char_bg, value, COLOR_LEN - 1);
860 continue;
861 }
862 if (!strcmp(key, "ln_fg")) {
863 strnz__cpy(sio->ln_fg, value, COLOR_LEN - 1);
864 continue;
865 }
866 if (!strcmp(key, "ln_bg")) {
867 strnz__cpy(sio->ln_bg, value, COLOR_LEN - 1);
868 continue;
869 }
870 if (!strcmp(key, "cmdln_fg")) {
871 strnz__cpy(sio->ln_fg, value, COLOR_LEN - 1);
872 continue;
873 }
874 if (!strcmp(key, "cmdln_bg")) {
875 strnz__cpy(sio->ln_bg, value, COLOR_LEN - 1);
876 continue;
877 }
878 if (!strcmp(key, "nt_fg")) {
879 strnz__cpy(sio->nt_fg, value, COLOR_LEN - 1);
880 continue;
881 }
882 if (!strcmp(key, "nt_bg")) {
883 strnz__cpy(sio->nt_bg, value, COLOR_LEN - 1);
884 continue;
885 }
886 if (!strcmp(key, "nt_rev_fg")) {
887 strnz__cpy(sio->nt_rev_fg, value, COLOR_LEN - 1);
888 continue;
889 }
890 if (!strcmp(key, "nt_rev_bg")) {
891 strnz__cpy(sio->nt_rev_bg, value, COLOR_LEN - 1);
892 continue;
893 }
894 if (!strcmp(key, "nt_hl_fg")) {
895 strnz__cpy(sio->nt_hl_fg, value, COLOR_LEN - 1);
896 continue;
897 }
898 if (!strcmp(key, "nt_hl_bg")) {
899 strnz__cpy(sio->nt_hl_bg, value, COLOR_LEN - 1);
900 continue;
901 }
902 if (!strcmp(key, "nt_hl_rev_fg")) {
903 strnz__cpy(sio->nt_hl_rev_fg, value, COLOR_LEN - 1);
904 continue;
905 }
906 if (!strcmp(key, "nt_hl_rev_bg")) {
907 strnz__cpy(sio->nt_hl_rev_bg, value, COLOR_LEN - 1);
908 continue;
909 }
910 if (!strcmp(key, "title_fg")) {
911 strnz__cpy(sio->title_fg, value, COLOR_LEN - 1);
912 continue;
913 }
914 if (!strcmp(key, "title_bg")) {
915 strnz__cpy(sio->title_bg, value, COLOR_LEN - 1);
916 continue;
917 }
918 if (!strcmp(key, "red_gamma")) {
919 sio->red_gamma = str_to_double(value);
920 continue;
921 }
922 if (!strcmp(key, "green_gamma")) {
923 sio->green_gamma = str_to_double(value);
924 continue;
925 }
926 if (!strcmp(key, "blue_gamma")) {
927 sio->blue_gamma = str_to_double(value);
928 continue;
929 }
930 if (!strcmp(key, "gray_gamma")) {
931 sio->gray_gamma = str_to_double(value);
932 continue;
933 }
934 if (!strcmp(key, "black")) {
935 strnz__cpy(sio->black, value, COLOR_LEN - 1);
936 continue;
937 }
938 if (!strcmp(key, "red")) {
939 strnz__cpy(sio->red, value, COLOR_LEN - 1);
940 continue;
941 }
942 if (!strcmp(key, "green")) {
943 strnz__cpy(sio->green, value, COLOR_LEN - 1);
944 continue;
945 }
946 if (!strcmp(key, "yellow")) {
947 strnz__cpy(sio->yellow, value, COLOR_LEN - 1);
948 continue;
949 }
950 if (!strcmp(key, "blue")) {
951 strnz__cpy(sio->blue, value, COLOR_LEN - 1);
952 continue;
953 }
954 if (!strcmp(key, "magenta")) {
955 strnz__cpy(sio->magenta, value, COLOR_LEN - 1);
956 continue;
957 }
958 if (!strcmp(key, "cyan")) {
959 strnz__cpy(sio->cyan, value, COLOR_LEN - 1);
960 continue;
961 }
962 if (!strcmp(key, "white")) {
963 strnz__cpy(sio->white, value, COLOR_LEN - 1);
964 continue;
965 }
966 if (!strcmp(key, "orange")) {
967 strnz__cpy(sio->orange, value, COLOR_LEN - 1);
968 continue;
969 }
970 if (!strcmp(key, "bblack")) {
971 strnz__cpy(sio->bblack, value, COLOR_LEN - 1);
972 continue;
973 }
974 if (!strcmp(key, "bred")) {
975 strnz__cpy(sio->bred, value, COLOR_LEN - 1);
976 continue;
977 }
978 if (!strcmp(key, "bgreen")) {
979 strnz__cpy(sio->bgreen, value, COLOR_LEN - 1);
980 continue;
981 }
982 if (!strcmp(key, "byellow")) {
983 strnz__cpy(sio->byellow, value, COLOR_LEN - 1);
984 continue;
985 }
986 if (!strcmp(key, "bblue")) {
987 strnz__cpy(sio->bblue, value, COLOR_LEN - 1);
988 continue;
989 }
990 if (!strcmp(key, "bmagenta")) {
991 strnz__cpy(sio->bmagenta, value, COLOR_LEN - 1);
992 continue;
993 }
994 if (!strcmp(key, "bcyan")) {
995 strnz__cpy(sio->bcyan, value, COLOR_LEN - 1);
996 continue;
997 }
998 if (!strcmp(key, "bwhite")) {
999 strnz__cpy(sio->bwhite, value, COLOR_LEN - 1);
1000 continue;
1001 }
1002 if (!strcmp(key, "borange")) {
1003 strnz__cpy(sio->borange, value, COLOR_LEN - 1);
1004 continue;
1005 }
1006 if (!strcmp(key, "mapp_spec")) {
1007 strnz__cpy(init->mapp_spec, value, MAXLEN - 1);
1008 continue;
1009 }
1010 if (!strcmp(key, "mapp_data")) {
1011 strnz__cpy(init->mapp_data, value, MAXLEN - 1);
1012 continue;
1013 }
1014 if (!strcmp(key, "mapp_help")) {
1015 strnz__cpy(init->mapp_help, value, MAXLEN - 1);
1016 continue;
1017 }
1018 if (!strcmp(key, "mapp_home")) {
1019 strnz__cpy(init->mapp_home, value, MAXLEN - 1);
1020 continue;
1021 }
1022 if (!strcmp(key, "mapp_msrc")) {
1023 strnz__cpy(init->mapp_msrc, value, MAXLEN - 1);
1024 continue;
1025 }
1026 if (!strcmp(key, "mapp_user")) {
1027 strnz__cpy(init->mapp_user, value, MAXLEN - 1);
1028 continue;
1029 }
1030 if (!strcmp(key, "mapp_theme")) {
1031 strnz__cpy(init->mapp_theme, value, MAXLEN - 1);
1032 continue;
1033 }
1034 }
1035 (void)fclose(config_fp);
1036 return 0;
1037}
int wait_timeout
Definition futil.c:152
#define COLOR_LEN
Definition cm.h:283
bool str_to_bool(const char *)
Converts String to boolean true or false.
Definition futil.c:941
int process_config_file(char *, Init *)
Definition init.c:631
size_t strnz__cpy(char *, const char *, size_t)
safer alternative to strncpy
Definition futil.c:544
double str_to_double(char *)
converts string to double
Definition futil.c:929
bool expand_tilde(char *, int)
Replaces "~/" in string with the user's home directory.
Definition futil.c:970
bool unstr_hex_clr(char *, char *)
Validates that a string is a hex color code in the format "#RRGGBB".
Definition futil.c:232
char title[MAXLEN]
Definition common.h:129
char mapp_data[MAXLEN]
Definition common.h:147
char minitrc[MAXLEN]
Definition common.h:173
char mapp_help[MAXLEN]
Definition common.h:148
int begx
Definition common.h:118
SIO * sio
Definition common.h:114
char cmd_all[MAXLEN]
Definition common.h:123
char mapp_msrc[MAXLEN]
Definition common.h:149
int cols
Definition common.h:116
int tab_stop
Definition common.h:180
bool f_erase_remainder
Definition common.h:141
bool f_read_theme
Definition common.h:142
char mapp_home[MAXLEN]
Definition common.h:146
char fill_char[4]
Definition common.h:145
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:175
char receiver_cmd[MAXLEN]
Definition common.h:121
int h_shift
Definition common.h:181
bool f_multiple_cmd_args
Definition common.h:139
int select_max
Definition common.h:178
bool f_ln
Definition common.h:143
char provider_cmd[MAXLEN]
Definition common.h:120
bool f_strip_ansi
Definition common.h:136
bool p_view_files
Definition common.h:134
bool f_at_end_remove
Definition common.h:135
char brackets[3]
Definition common.h:144
bool f_ignore_case
Definition common.h:133
int lines
Definition common.h:115
char mapp_user[MAXLEN]
Definition common.h:150
char cmd[MAXLEN]
Definition common.h:122
char mapp_theme[MAXLEN]
Definition common.h:151
char editor[MAXLEN]
Definition common.h:171
The SIO structure encapsulates various aspects of the terminal's state and configuration,...
Definition cm.h:805
char nt_hl_rev_bg[COLOR_LEN]
Definition cm.h:852
double green_gamma
Definition cm.h:807
char nt_rev_bg[COLOR_LEN]
Definition cm.h:846
char ln_fg[COLOR_LEN]
Definition cm.h:839
char black[COLOR_LEN]
Definition cm.h:810
char title_bg[COLOR_LEN]
Definition cm.h:854
double blue_gamma
Definition cm.h:808
char bred[COLOR_LEN]
Definition cm.h:820
char yellow[COLOR_LEN]
Definition cm.h:813
char nt_hl_bg[COLOR_LEN]
Definition cm.h:848
char nt_hl_fg[COLOR_LEN]
Definition cm.h:847
char ind_fg[COLOR_LEN]
Definition cm.h:833
char bcyan[COLOR_LEN]
Definition cm.h:825
char borange[COLOR_LEN]
Definition cm.h:827
double red_gamma
Definition cm.h:806
char red[COLOR_LEN]
Definition cm.h:811
char nt_fg[COLOR_LEN]
Definition cm.h:843
char magenta[COLOR_LEN]
Definition cm.h:815
char ln_bg[COLOR_LEN]
Definition cm.h:840
char bgreen[COLOR_LEN]
Definition cm.h:821
char nt_rev_fg[COLOR_LEN]
Definition cm.h:845
char brackets_fg[COLOR_LEN]
Definition cm.h:835
char fill_char_fg[COLOR_LEN]
Definition cm.h:837
char byellow[COLOR_LEN]
Definition cm.h:822
char bwhite[COLOR_LEN]
Definition cm.h:826
char box_bg[COLOR_LEN]
Definition cm.h:832
char fg[COLOR_LEN]
Definition cm.h:829
char cyan[COLOR_LEN]
Definition cm.h:816
char brackets_bg[COLOR_LEN]
Definition cm.h:836
char box_fg[COLOR_LEN]
Definition cm.h:831
char orange[COLOR_LEN]
Definition cm.h:818
char fill_char_bg[COLOR_LEN]
Definition cm.h:838
char green[COLOR_LEN]
Definition cm.h:812
char white[COLOR_LEN]
Definition cm.h:817
char bg[COLOR_LEN]
Definition cm.h:830
char bblue[COLOR_LEN]
Definition cm.h:823
char title_fg[COLOR_LEN]
Definition cm.h:853
char bmagenta[COLOR_LEN]
Definition cm.h:824
char blue[COLOR_LEN]
Definition cm.h:814
char nt_hl_rev_fg[COLOR_LEN]
Definition cm.h:850
double gray_gamma
Definition cm.h:809
char bblack[COLOR_LEN]
Definition cm.h:819
char ind_bg[COLOR_LEN]
Definition cm.h:834
char nt_bg[COLOR_LEN]
Definition cm.h:844

References SIO::bblack, SIO::bblue, SIO::bcyan, Init::begx, Init::begy, SIO::bg, SIO::bgreen, SIO::black, SIO::blue, SIO::blue_gamma, SIO::bmagenta, SIO::borange, SIO::box_bg, SIO::box_fg, Init::brackets, SIO::brackets_bg, SIO::brackets_fg, SIO::bred, SIO::bwhite, SIO::byellow, Init::cmd, Init::cmd_all, Init::cols, SIO::cyan, Init::editor, expand_tilde(), Init::f_at_end_remove, Init::f_erase_remainder, Init::f_ignore_case, Init::f_ln, Init::f_multiple_cmd_args, Init::f_read_theme, Init::f_squeeze, Init::f_strip_ansi, SIO::fg, Init::fill_char, SIO::fill_char_bg, SIO::fill_char_fg, SIO::gray_gamma, SIO::green, SIO::green_gamma, Init::h_shift, SIO::ind_bg, SIO::ind_fg, Init::lines, SIO::ln_bg, SIO::ln_fg, SIO::magenta, Init::mapp_data, Init::mapp_help, Init::mapp_home, Init::mapp_msrc, Init::mapp_spec, Init::mapp_theme, Init::mapp_user, Init::minitrc, SIO::nt_bg, SIO::nt_fg, SIO::nt_hl_bg, SIO::nt_hl_fg, SIO::nt_hl_rev_bg, SIO::nt_hl_rev_fg, SIO::nt_rev_bg, SIO::nt_rev_fg, SIO::orange, Init::p_view_files, Init::parent_cmd, process_config_file(), Init::provider_cmd, Init::receiver_cmd, SIO::red, SIO::red_gamma, Init::select_max, Init::sio, str_to_bool(), str_to_double(), strnz__cpy(), Init::tab_stop, Init::title, SIO::title_bg, SIO::title_fg, unstr_hex_clr(), wait_timeout, SIO::white, and SIO::yellow.

Referenced by process_config_file(), process_config_files(), and read_theme().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ argp_program_bug_address

const char* argp_program_bug_address = "billxwaller@gmail.com"

Definition at line 109 of file init.c.

◆ argp_program_version

const char* argp_program_version = CM_VERSION

Definition at line 108 of file init.c.

◆ executor

int executor = 0

Definition at line 106 of file init.c.

◆ f_write_config

bool f_write_config = false

Definition at line 88 of file init.c.

Referenced by mapp_initialization().