summaryrefslogtreecommitdiffstats
path: root/scripts/lxdialog
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /scripts/lxdialog
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'scripts/lxdialog')
-rw-r--r--scripts/lxdialog/checklist.c11
-rw-r--r--scripts/lxdialog/lxdialog.c2
2 files changed, 10 insertions, 3 deletions
diff --git a/scripts/lxdialog/checklist.c b/scripts/lxdialog/checklist.c
index b986b3a2e..ad6102070 100644
--- a/scripts/lxdialog/checklist.c
+++ b/scripts/lxdialog/checklist.c
@@ -188,9 +188,16 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
check_x = (list_width - check_x) / 2;
item_x = check_x + 4;
+ if (choice >= list_height) {
+ scroll = choice - list_height + 1;
+ choice -= scroll;
+ }
+
/* Print the list */
- for (i = 0; i < max_choice; i++)
- print_item (list, items[i * 3 + 1], status[i], i, i == choice);
+ for (i = 0; i < max_choice; i++) {
+ print_item (list, items[(scroll+i) * 3 + 1],
+ status[i+scroll], i, i == choice);
+ }
wnoutrefresh (list);
diff --git a/scripts/lxdialog/lxdialog.c b/scripts/lxdialog/lxdialog.c
index 94d75ded6..33f99fb09 100644
--- a/scripts/lxdialog/lxdialog.c
+++ b/scripts/lxdialog/lxdialog.c
@@ -158,7 +158,7 @@ Usage (const char *name)
\n --textbox <file> <height> <width>\
\n --inputbox <text> <height> <width> [<init>]\
\n --yesno <text> <height> <width>\
-", name, name);
+\n", name, name);
exit (-1);
}