Commit 9c329b29 authored by Peter Samuelson's avatar Peter Samuelson Committed by Linus Torvalds

[PATCH] cross-compile scripts/lxdialog/ on AIX

AIX curses.h defines macros 'clear_screen' and 'color_names' but does not
define 'scroll()'.
Signed-Off-By: default avatarPeter Samuelson <peter@p12n.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6a9dafd1
...@@ -269,7 +269,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, ...@@ -269,7 +269,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
status[scroll + max_choice - 1], status[scroll + max_choice - 1],
max_choice - 1, FALSE); max_choice - 1, FALSE);
scrollok (list, TRUE); scrollok (list, TRUE);
scroll (list); wscrl (list, 1);
scrollok (list, FALSE); scrollok (list, FALSE);
} }
scroll++; scroll++;
......
...@@ -152,10 +152,4 @@ ...@@ -152,10 +152,4 @@
* Global variables * Global variables
*/ */
typedef struct {
char name[COLOR_NAME_LEN];
int value;
} color_names_st;
extern color_names_st color_names[];
extern int color_table[][3]; extern int color_table[][3];
...@@ -56,7 +56,7 @@ static struct Mode *modePtr; ...@@ -56,7 +56,7 @@ static struct Mode *modePtr;
int int
main (int argc, const char * const * argv) main (int argc, const char * const * argv)
{ {
int offset = 0, clear_screen = 0, end_common_opts = 0, retval; int offset = 0, opt_clear = 0, end_common_opts = 0, retval;
const char *title = NULL; const char *title = NULL;
#ifdef LOCALE #ifdef LOCALE
...@@ -89,7 +89,7 @@ main (int argc, const char * const * argv) ...@@ -89,7 +89,7 @@ main (int argc, const char * const * argv)
offset += 2; offset += 2;
} }
} else if (!strcmp (argv[offset + 1], "--clear")) { } else if (!strcmp (argv[offset + 1], "--clear")) {
if (clear_screen) { /* Hey, "--clear" can't appear twice! */ if (opt_clear) { /* Hey, "--clear" can't appear twice! */
Usage (argv[0]); Usage (argv[0]);
exit (-1); exit (-1);
} else if (argc == 2) { /* we only want to clear the screen */ } else if (argc == 2) { /* we only want to clear the screen */
...@@ -98,7 +98,7 @@ main (int argc, const char * const * argv) ...@@ -98,7 +98,7 @@ main (int argc, const char * const * argv)
end_dialog (); end_dialog ();
return 0; return 0;
} else { } else {
clear_screen = 1; opt_clear = 1;
offset++; offset++;
} }
} else /* no more common options */ } else /* no more common options */
...@@ -127,7 +127,7 @@ main (int argc, const char * const * argv) ...@@ -127,7 +127,7 @@ main (int argc, const char * const * argv)
init_dialog (); init_dialog ();
retval = (*(modePtr->jumper)) (title, argc - offset, argv + offset); retval = (*(modePtr->jumper)) (title, argc - offset, argv + offset);
if (clear_screen) { /* clear screen before exit */ if (opt_clear) { /* clear screen before exit */
attr_clear (stdscr, LINES, COLS, screen_attr); attr_clear (stdscr, LINES, COLS, screen_attr);
refresh (); refresh ();
} }
......
...@@ -327,7 +327,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, ...@@ -327,7 +327,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
) { ) {
/* Scroll menu up */ /* Scroll menu up */
scrollok (menu, TRUE); scrollok (menu, TRUE);
scroll (menu); wscrl (menu, 1);
scrollok (menu, FALSE); scrollok (menu, FALSE);
scroll++; scroll++;
...@@ -357,7 +357,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, ...@@ -357,7 +357,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
for (i=0; (i < max_choice); i++) { for (i=0; (i < max_choice); i++) {
if (scroll+max_choice < item_no) { if (scroll+max_choice < item_no) {
scrollok (menu, TRUE); scrollok (menu, TRUE);
scroll(menu); wscrl (menu, 1);
scrollok (menu, FALSE); scrollok (menu, FALSE);
scroll++; scroll++;
print_item (menu, items[(scroll+max_choice-1)*2+1], print_item (menu, items[(scroll+max_choice-1)*2+1],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment