-rw-r--r-- | scripts/kconfig/mconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index b9cf25f..0967471 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -27,129 +27,129 @@ static const char menu_instructions[] = | |||
27 | "Arrow keys navigate the menu. " | 27 | "Arrow keys navigate the menu. " |
28 | "<Enter> selects submenus --->. " | 28 | "<Enter> selects submenus --->. " |
29 | "Highlighted letters are hotkeys. " | 29 | "Highlighted letters are hotkeys. " |
30 | "Pressing <Y> includes, <N> excludes, <M> modularizes features. " | 30 | "Pressing <Y> includes, <N> excludes, <M> modularizes features. " |
31 | "Press <Esc><Esc> to exit, <?> for Help. " | 31 | "Press <Esc><Esc> to exit, <?> for Help. " |
32 | "Legend: [*] built-in [ ] excluded <M> module < > module capable", | 32 | "Legend: [*] built-in [ ] excluded <M> module < > module capable", |
33 | radiolist_instructions[] = | 33 | radiolist_instructions[] = |
34 | "Use the arrow keys to navigate this window or " | 34 | "Use the arrow keys to navigate this window or " |
35 | "press the hotkey of the item you wish to select " | 35 | "press the hotkey of the item you wish to select " |
36 | "followed by the <SPACE BAR>. " | 36 | "followed by the <SPACE BAR>. " |
37 | "Press <?> for additional information about this option.", | 37 | "Press <?> for additional information about this option.", |
38 | inputbox_instructions_int[] = | 38 | inputbox_instructions_int[] = |
39 | "Please enter a decimal value. " | 39 | "Please enter a decimal value. " |
40 | "Fractions will not be accepted. " | 40 | "Fractions will not be accepted. " |
41 | "Use the <TAB> key to move from the input field to the buttons below it.", | 41 | "Use the <TAB> key to move from the input field to the buttons below it.", |
42 | inputbox_instructions_hex[] = | 42 | inputbox_instructions_hex[] = |
43 | "Please enter a hexadecimal value. " | 43 | "Please enter a hexadecimal value. " |
44 | "Use the <TAB> key to move from the input field to the buttons below it.", | 44 | "Use the <TAB> key to move from the input field to the buttons below it.", |
45 | inputbox_instructions_string[] = | 45 | inputbox_instructions_string[] = |
46 | "Please enter a string value. " | 46 | "Please enter a string value. " |
47 | "Use the <TAB> key to move from the input field to the buttons below it.", | 47 | "Use the <TAB> key to move from the input field to the buttons below it.", |
48 | setmod_text[] = | 48 | setmod_text[] = |
49 | "This feature depends on another which has been configured as a module.\n" | 49 | "This feature depends on another which has been configured as a module.\n" |
50 | "As a result, this feature will be built as a module.", | 50 | "As a result, this feature will be built as a module.", |
51 | nohelp_text[] = | 51 | nohelp_text[] = |
52 | "There is no help available for this option.\n", | 52 | "There is no help available for this option.\n", |
53 | load_config_text[] = | 53 | load_config_text[] = |
54 | "Enter the name of the configuration file you wish to load. " | 54 | "Enter the name of the configuration file you wish to load. " |
55 | "Accept the name shown to restore the configuration you " | 55 | "Accept the name shown to restore the configuration you " |
56 | "last retrieved. Leave blank to abort.", | 56 | "last retrieved. Leave blank to abort.", |
57 | load_config_help[] = | 57 | load_config_help[] = |
58 | "\n" | 58 | "\n" |
59 | "For various reasons, one may wish to keep several different \n" | 59 | "For various reasons, one may wish to keep several different \n" |
60 | "configurations available on a single machine.\n" | 60 | "configurations available on a single machine.\n" |
61 | "\n" | 61 | "\n" |
62 | "If you have saved a previous configuration in a file other than the\n" | 62 | "If you have saved a previous configuration in a file other than the\n" |
63 | "default, entering the name of the file here will allow you\n" | 63 | "default, entering the name of the file here will allow you\n" |
64 | "to modify that configuration.\n" | 64 | "to modify that configuration.\n" |
65 | "\n" | 65 | "\n" |
66 | "If you are uncertain, then you have probably never used alternate\n" | 66 | "If you are uncertain, then you have probably never used alternate\n" |
67 | "configuration files. You should therefor leave this blank to abort.\n", | 67 | "configuration files. You should therefor leave this blank to abort.\n", |
68 | save_config_text[] = | 68 | save_config_text[] = |
69 | "Enter a filename to which this configuration should be saved " | 69 | "Enter a filename to which this configuration should be saved " |
70 | "as an alternate. Leave blank to abort.", | 70 | "as an alternate. Leave blank to abort.", |
71 | save_config_help[] = | 71 | save_config_help[] = |
72 | "\n" | 72 | "\n" |
73 | "For various reasons, one may wish to keep different\n" | 73 | "For various reasons, one may wish to keep different\n" |
74 | "configurations available on a single machine.\n" | 74 | "configurations available on a single machine.\n" |
75 | "\n" | 75 | "\n" |
76 | "Entering a file name here will allow you to later retrieve, modify\n" | 76 | "Entering a file name here will allow you to later retrieve, modify\n" |
77 | "and use the current configuration as an alternate to whatever\n" | 77 | "and use the current configuration as an alternate to whatever\n" |
78 | "configuration options you have selected at that time.\n" | 78 | "configuration options you have selected at that time.\n" |
79 | "\n" | 79 | "\n" |
80 | "If you are uncertain what all this means then you should probably\n" | 80 | "If you are uncertain what all this means then you should probably\n" |
81 | "leave this blank.\n" | 81 | "leave this blank.\n" |
82 | ; | 82 | ; |
83 | 83 | ||
84 | static char buf[4096], *bufptr = buf; | 84 | static char buf[4096], *bufptr = buf; |
85 | static char input_buf[4096]; | 85 | static char input_buf[4096]; |
86 | static char filename[PATH_MAX+1] = ".config"; | 86 | static char filename[PATH_MAX+1] = ".config"; |
87 | static char *args[1024], **argptr = args; | 87 | static char *args[1024], **argptr = args; |
88 | static int indent = 0; | 88 | static int indent = 0; |
89 | static struct termios ios_org; | 89 | static struct termios ios_org; |
90 | static int rows, cols; | 90 | static int rows, cols; |
91 | static struct menu *current_menu; | 91 | struct menu *current_menu; |
92 | static int child_count; | 92 | static int child_count; |
93 | static int do_resize; | 93 | static int do_resize; |
94 | static int single_menu_mode; | 94 | static int single_menu_mode; |
95 | 95 | ||
96 | static void conf(struct menu *menu); | 96 | static void conf(struct menu *menu); |
97 | static void conf_choice(struct menu *menu); | 97 | static void conf_choice(struct menu *menu); |
98 | static void conf_string(struct menu *menu); | 98 | static void conf_string(struct menu *menu); |
99 | static void conf_load(void); | 99 | static void conf_load(void); |
100 | static void conf_save(void); | 100 | static void conf_save(void); |
101 | static void show_textbox(const char *title, const char *text, int r, int c); | 101 | static void show_textbox(const char *title, const char *text, int r, int c); |
102 | static void show_helptext(const char *title, const char *text); | 102 | static void show_helptext(const char *title, const char *text); |
103 | static void show_help(struct menu *menu); | 103 | static void show_help(struct menu *menu); |
104 | static void show_readme(void); | 104 | static void show_readme(void); |
105 | 105 | ||
106 | static void cprint_init(void); | 106 | static void cprint_init(void); |
107 | static int cprint1(const char *fmt, ...); | 107 | static int cprint1(const char *fmt, ...); |
108 | static void cprint_done(void); | 108 | static void cprint_done(void); |
109 | static int cprint(const char *fmt, ...); | 109 | static int cprint(const char *fmt, ...); |
110 | 110 | ||
111 | static void init_wsize(void) | 111 | static void init_wsize(void) |
112 | { | 112 | { |
113 | struct winsize ws; | 113 | struct winsize ws; |
114 | char *env; | 114 | char *env; |
115 | 115 | ||
116 | if (ioctl(1, TIOCGWINSZ, &ws) == -1) { | 116 | if (ioctl(1, TIOCGWINSZ, &ws) == -1) { |
117 | rows = 24; | 117 | rows = 24; |
118 | cols = 80; | 118 | cols = 80; |
119 | } else { | 119 | } else { |
120 | rows = ws.ws_row; | 120 | rows = ws.ws_row; |
121 | cols = ws.ws_col; | 121 | cols = ws.ws_col; |
122 | if (!rows) { | 122 | if (!rows) { |
123 | env = getenv("LINES"); | 123 | env = getenv("LINES"); |
124 | if (env) | 124 | if (env) |
125 | rows = atoi(env); | 125 | rows = atoi(env); |
126 | if (!rows) | 126 | if (!rows) |
127 | rows = 24; | 127 | rows = 24; |
128 | } | 128 | } |
129 | if (!cols) { | 129 | if (!cols) { |
130 | env = getenv("COLUMNS"); | 130 | env = getenv("COLUMNS"); |
131 | if (env) | 131 | if (env) |
132 | cols = atoi(env); | 132 | cols = atoi(env); |
133 | if (!cols) | 133 | if (!cols) |
134 | cols = 80; | 134 | cols = 80; |
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
138 | if (rows < 19 || cols < 80) { | 138 | if (rows < 19 || cols < 80) { |
139 | fprintf(stderr, "Your display is too small to run Menuconfig!\n"); | 139 | fprintf(stderr, "Your display is too small to run Menuconfig!\n"); |
140 | fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); | 140 | fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); |
141 | exit(1); | 141 | exit(1); |
142 | } | 142 | } |
143 | 143 | ||
144 | rows -= 4; | 144 | rows -= 4; |
145 | cols -= 5; | 145 | cols -= 5; |
146 | } | 146 | } |
147 | 147 | ||
148 | static void cprint_init(void) | 148 | static void cprint_init(void) |
149 | { | 149 | { |
150 | char *env = getenv("LXDIALOG"); | 150 | char *env = getenv("LXDIALOG"); |
151 | bufptr = buf; | 151 | bufptr = buf; |
152 | argptr = args; | 152 | argptr = args; |
153 | memset(args, 0, sizeof(args)); | 153 | memset(args, 0, sizeof(args)); |
154 | indent = 0; | 154 | indent = 0; |
155 | child_count = 0; | 155 | child_count = 0; |