summaryrefslogtreecommitdiff
path: root/scripts/kconfig/mconf.c
Unidiff
Diffstat (limited to 'scripts/kconfig/mconf.c') (more/less context) (show whitespace changes)
-rw-r--r--scripts/kconfig/mconf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 84699be..dec8603 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -1,116 +1,116 @@
1/* 1/*
2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
3 * Released under the terms of the GNU GPL v2.0. 3 * Released under the terms of the GNU GPL v2.0.
4 */ 4 */
5 5
6#include <sys/ioctl.h> 6#include <sys/ioctl.h>
7#include <sys/wait.h> 7#include <sys/wait.h>
8#include <ctype.h> 8#include <ctype.h>
9#include <errno.h> 9#include <errno.h>
10#include <fcntl.h> 10#include <fcntl.h>
11#include <signal.h> 11#include <signal.h>
12#include <stdarg.h> 12#include <stdarg.h>
13#include <stdlib.h> 13#include <stdlib.h>
14#include <string.h> 14#include <string.h>
15#include <unistd.h> 15#include <unistd.h>
16 16
17#define LKC_DIRECT_LINK 17#define LKC_DIRECT_LINK
18#include "lkc.h" 18#include "lkc.h"
19 19
20static char menu_backtitle[128]; 20static char menu_backtitle[128];
21static const char menu_instructions[] = 21static const char menu_instructions[] =
22 "Arrow keys navigate the menu. " 22 "Arrow keys navigate the menu. "
23 "<Enter> selects submenus --->. " 23 "<Enter> selects submenus --->. "
24 "Highlighted letters are hotkeys. " 24 "Highlighted letters are hotkeys. "
25 "Pressing <Y> includes, <N> excludes, <M> modularizes features. " 25 "Pressing <Y> includes, <N> excludes, <M> modularizes features. "
26 "Press <Esc><Esc> to exit, <?> for Help. " 26 "Press <Esc><Esc> to exit, <?> for Help. "
27 "Legend: [*] built-in [ ] excluded <M> module < > module capable", 27 "Legend: [*] built-in [ ] excluded <M> module < > module capable",
28radiolist_instructions[] = 28radiolist_instructions[] =
29 "Use the arrow keys to navigate this window or " 29 "Use the arrow keys to navigate this window or "
30 "press the hotkey of the item you wish to select " 30 "press the hotkey of the item you wish to select "
31 "followed by the <SPACE BAR>. " 31 "followed by the <SPACE BAR>. "
32 "Press <?> for additional information about this option.", 32 "Press <?> for additional information about this option.",
33inputbox_instructions_int[] = 33inputbox_instructions_int[] =
34 "Please enter a decimal value. " 34 "Please enter a decimal value. "
35 "Fractions will not be accepted. " 35 "Fractions will not be accepted. "
36 "Use the <TAB> key to move from the input field to the buttons below it.", 36 "Use the <TAB> key to move from the input field to the buttons below it.",
37inputbox_instructions_hex[] = 37inputbox_instructions_hex[] =
38 "Please enter a hexadecimal value. " 38 "Please enter a hexadecimal value. "
39 "Use the <TAB> key to move from the input field to the buttons below it.", 39 "Use the <TAB> key to move from the input field to the buttons below it.",
40inputbox_instructions_string[] = 40inputbox_instructions_string[] =
41 "Please enter a string value. " 41 "Please enter a string value. "
42 "Use the <TAB> key to move from the input field to the buttons below it.", 42 "Use the <TAB> key to move from the input field to the buttons below it.",
43setmod_text[] = 43setmod_text[] =
44 "This feature depends on another which has been configured as a module.\n" 44 "This feature depends on another which has been configured as a module.\n"
45 "As a result, this feature will be built as a module.", 45 "As a result, this feature will be built as a module.",
46nohelp_text[] = 46nohelp_text[] =
47 "There is no help available for this kernel option.\n", 47 "There is no help available for this option.\n",
48load_config_text[] = 48load_config_text[] =
49 "Enter the name of the configuration file you wish to load. " 49 "Enter the name of the configuration file you wish to load. "
50 "Accept the name shown to restore the configuration you " 50 "Accept the name shown to restore the configuration you "
51 "last retrieved. Leave blank to abort.", 51 "last retrieved. Leave blank to abort.",
52load_config_help[] = 52load_config_help[] =
53 "\n" 53 "\n"
54 "For various reasons, one may wish to keep several different kernel\n" 54 "For various reasons, one may wish to keep several different\n"
55 "configurations available on a single machine.\n" 55 "configurations available on a single machine.\n"
56 "\n" 56 "\n"
57 "If you have saved a previous configuration in a file other than the\n" 57 "If you have saved a previous configuration in a file other than the\n"
58 "kernel's default, entering the name of the file here will allow you\n" 58 "default, entering the name of the file here will allow you\n"
59 "to modify that configuration.\n" 59 "to modify that configuration.\n"
60 "\n" 60 "\n"
61 "If you are uncertain, then you have probably never used alternate\n" 61 "If you are uncertain, then you have probably never used alternate\n"
62 "configuration files. You should therefor leave this blank to abort.\n", 62 "configuration files. You should therefor leave this blank to abort.\n",
63save_config_text[] = 63save_config_text[] =
64 "Enter a filename to which this configuration should be saved " 64 "Enter a filename to which this configuration should be saved "
65 "as an alternate. Leave blank to abort.", 65 "as an alternate. Leave blank to abort.",
66save_config_help[] = 66save_config_help[] =
67 "\n" 67 "\n"
68 "For various reasons, one may wish to keep different kernel\n" 68 "For various reasons, one may wish to keep different\n"
69 "configurations available on a single machine.\n" 69 "configurations available on a single machine.\n"
70 "\n" 70 "\n"
71 "Entering a file name here will allow you to later retrieve, modify\n" 71 "Entering a file name here will allow you to later retrieve, modify\n"
72 "and use the current configuration as an alternate to whatever\n" 72 "and use the current configuration as an alternate to whatever\n"
73 "configuration options you have selected at that time.\n" 73 "configuration options you have selected at that time.\n"
74 "\n" 74 "\n"
75 "If you are uncertain what all this means then you should probably\n" 75 "If you are uncertain what all this means then you should probably\n"
76 "leave this blank.\n" 76 "leave this blank.\n"
77; 77;
78 78
79static char buf[4096], *bufptr = buf; 79static char buf[4096], *bufptr = buf;
80static char input_buf[4096]; 80static char input_buf[4096];
81static char *args[1024], **argptr = args; 81static char *args[1024], **argptr = args;
82static int indent = 0; 82static int indent = 0;
83static int rows, cols; 83static int rows, cols;
84static struct menu *current_menu; 84static struct menu *current_menu;
85static int child_count; 85static int child_count;
86static int do_resize; 86static int do_resize;
87 87
88static void conf(struct menu *menu); 88static void conf(struct menu *menu);
89static void conf_choice(struct menu *menu); 89static void conf_choice(struct menu *menu);
90static void conf_string(struct menu *menu); 90static void conf_string(struct menu *menu);
91static void conf_load(void); 91static void conf_load(void);
92static void conf_save(void); 92static void conf_save(void);
93static void show_textbox(const char *title, const char *text, int r, int c); 93static void show_textbox(const char *title, const char *text, int r, int c);
94static void show_helptext(const char *title, const char *text); 94static void show_helptext(const char *title, const char *text);
95static void show_help(struct menu *menu); 95static void show_help(struct menu *menu);
96static void show_readme(void); 96static void show_readme(void);
97 97
98static void cprint_init(void); 98static void cprint_init(void);
99static int cprint1(const char *fmt, ...); 99static int cprint1(const char *fmt, ...);
100static void cprint_done(void); 100static void cprint_done(void);
101static int cprint(const char *fmt, ...); 101static int cprint(const char *fmt, ...);
102 102
103static void init_wsize(void) 103static void init_wsize(void)
104{ 104{
105 struct winsize ws; 105 struct winsize ws;
106 106
107 if (ioctl(1, TIOCGWINSZ, &ws) == -1) { 107 if (ioctl(1, TIOCGWINSZ, &ws) == -1) {
108 rows = 24; 108 rows = 24;
109 cols = 80; 109 cols = 80;
110 } else { 110 } else {
111 rows = ws.ws_row; 111 rows = ws.ws_row;
112 cols = ws.ws_col; 112 cols = ws.ws_col;
113 } 113 }
114 114
115 if (rows < 19 || cols < 80) { 115 if (rows < 19 || cols < 80) {
116 fprintf(stderr, "Your display is too small to run Menuconfig!\n"); 116 fprintf(stderr, "Your display is too small to run Menuconfig!\n");