summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /scripts
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Configure11
-rw-r--r--scripts/lxdialog/dialog.h18
-rw-r--r--scripts/lxdialog/lxdialog.c3
-rw-r--r--scripts/lxdialog/menubox.c14
-rw-r--r--scripts/lxdialog/textbox.c17
-rw-r--r--scripts/mkdep.c9
6 files changed, 59 insertions, 13 deletions
diff --git a/scripts/Configure b/scripts/Configure
index d01564bee..004ae5349 100644
--- a/scripts/Configure
+++ b/scripts/Configure
@@ -53,6 +53,9 @@
#
# 090398 Axel Boldt (boldt@math.ucsb.edu) - allow for empty lines in help
# texts.
+#
+# 102598 Michael Chastain (mec@shout.net) - put temporary files in
+# current directory, not in /tmp.
#
# Make sure we're really running bash.
@@ -239,7 +242,7 @@ function tristate () {
# are nested, and one module requires the presence of something
# else in the kernel.
#
-# tristate question define default ...
+# dep_tristate question define default ...
#
function dep_tristate () {
old=$(eval echo "\${$2}")
@@ -506,9 +509,9 @@ if [ -f $DEFAULTS ]; then
echo "# Using defaults found in" $DEFAULTS
echo "#"
. $DEFAULTS
- sed -e 's/# \(.*\) is not.*/\1=n/' < $DEFAULTS > /tmp/conf.$$
- . /tmp/conf.$$
- rm /tmp/conf.$$
+ sed -e 's/# \(.*\) is not.*/\1=n/' < $DEFAULTS > .config-is-not.$$
+ . .config-is-not.$$
+ rm .config-is-not.$$
else
echo "#"
echo "# No defaults found"
diff --git a/scripts/lxdialog/dialog.h b/scripts/lxdialog/dialog.h
index 3be5feb21..0e30d00d0 100644
--- a/scripts/lxdialog/dialog.h
+++ b/scripts/lxdialog/dialog.h
@@ -28,6 +28,24 @@
#include CURSES_LOC
+/*
+ * Colors in ncurses 1.9.9e do not work properly since foreground and
+ * background colors are OR'd rather than separately masked. This version
+ * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
+ * with standard curses. The simplest fix (to make this work with standard
+ * curses) uses the wbkgdset() function, not used in the original hack.
+ * Turn it off if we're building with 1.9.9e, since it just confuses things.
+ */
+#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
+#define OLD_NCURSES 1
+#undef wbkgdset
+#define wbkgdset(w,p) /*nothing*/
+#else
+#define OLD_NCURSES 0
+#endif
+
+#define TR(params) _tracef params
+
#define ESC 27
#define TAB 9
#define MAX_LEN 2048
diff --git a/scripts/lxdialog/lxdialog.c b/scripts/lxdialog/lxdialog.c
index 33f99fb09..6f4c1fd4e 100644
--- a/scripts/lxdialog/lxdialog.c
+++ b/scripts/lxdialog/lxdialog.c
@@ -63,6 +63,9 @@ main (int argc, const char * const * argv)
(void) setlocale (LC_ALL, "");
#endif
+#ifdef TRACE
+ trace(TRACE_CALLS|TRACE_UPDATE);
+#endif
if (argc < 2) {
Usage (argv[0]);
exit (-1);
diff --git a/scripts/lxdialog/menubox.c b/scripts/lxdialog/menubox.c
index 5d5a6b46f..d6170ec46 100644
--- a/scripts/lxdialog/menubox.c
+++ b/scripts/lxdialog/menubox.c
@@ -60,7 +60,7 @@ static int menu_width, item_x;
static void
print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey)
{
- int i, j;
+ int j;
char menu_item[menu_width+1];
strncpy(menu_item, item, menu_width);
@@ -70,8 +70,15 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey
/* Clear 'residue' of last item */
wattrset (win, menubox_attr);
wmove (win, choice, 0);
- for (i = 0; i < menu_width; i++)
- waddch (win, ' ');
+#if OLD_NCURSES
+ {
+ int i;
+ for (i = 0; i < menu_width; i++)
+ waddch (win, ' ');
+ }
+#else
+ wclrtoeol(win);
+#endif
wattrset (win, selected ? item_selected_attr : item_attr);
mvwaddstr (win, choice, item_x, menu_item);
if (hotkey) {
@@ -173,6 +180,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
for (i = 0; i < width - 2; i++)
waddch (dialog, ACS_HLINE);
wattrset (dialog, dialog_attr);
+ wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
if (title != NULL) {
diff --git a/scripts/lxdialog/textbox.c b/scripts/lxdialog/textbox.c
index df50f2c54..415a42f87 100644
--- a/scripts/lxdialog/textbox.c
+++ b/scripts/lxdialog/textbox.c
@@ -90,6 +90,8 @@ dialog_textbox (const char *title, const char *file, int height, int width)
/* Create window for text region, used for scrolling text */
text = subwin (dialog, height - 4, width - 2, y + 1, x + 1);
+ wattrset (text, dialog_attr);
+ wbkgdset (text, dialog_attr & A_COLOR);
keypad (text, TRUE);
@@ -101,6 +103,7 @@ dialog_textbox (const char *title, const char *file, int height, int width)
for (i = 0; i < width - 2; i++)
waddch (dialog, ACS_HLINE);
wattrset (dialog, dialog_attr);
+ wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
if (title != NULL) {
@@ -448,7 +451,7 @@ print_page (WINDOW * win, int height, int width)
static void
print_line (WINDOW * win, int row, int width)
{
- int i, y, x;
+ int y, x;
char *line;
line = get_line ();
@@ -459,8 +462,15 @@ print_line (WINDOW * win, int row, int width)
getyx (win, y, x);
/* Clear 'residue' of previous line */
- for (i = 0; i < width - x; i++)
- waddch (win, ' ');
+#if OLD_NCURSES
+ {
+ int i;
+ for (i = 0; i < width - x; i++)
+ waddch (win, ' ');
+ }
+#else
+ wclrtoeol(win);
+#endif
}
/*
@@ -530,6 +540,7 @@ print_position (WINDOW * win, int height, int width)
exit (-1);
}
wattrset (win, position_indicator_attr);
+ wbkgdset (win, position_indicator_attr & A_COLOR);
percent = !file_size ?
100 : ((fpos - bytes_read + page - buf) * 100) / file_size;
wmove (win, height - 3, width - 9);
diff --git a/scripts/mkdep.c b/scripts/mkdep.c
index d6e9a7262..a05d2faac 100644
--- a/scripts/mkdep.c
+++ b/scripts/mkdep.c
@@ -33,7 +33,7 @@ struct path_struct {
int len;
char buffer[256-sizeof(int)];
} path_array[2] = {
- { 23, "/usr/src/linux/include/" },
+ { 0, "" },
{ 0, "" }
};
@@ -464,8 +464,11 @@ int main(int argc, char **argv)
char *hpath;
hpath = getenv("HPATH");
- if (!hpath)
- hpath = "/usr/src/linux/include";
+ if (!hpath) {
+ fputs("mkdep: HPATH not set in environment. "
+ "Don't bypass the top level Makefile.\n", stderr);
+ return 1;
+ }
len = strlen(hpath);
memcpy(path_array[0].buffer, hpath, len);
if (len && hpath[len-1] != '/')