All of lore.kernel.org
 help / color / mirror / Atom feed
* [uPATCH] cross-compile scripts/lxdialog/ on AIX
@ 2005-02-27  7:54 Peter Samuelson
  2005-02-27  8:20 ` Peter Samuelson
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Samuelson @ 2005-02-27  7:54 UTC (permalink / raw)
  To: zippel; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3289 bytes --]


AIX curses.h defines macros 'clear_screen' and 'color_names' but does
not define 'scroll()'.

Signed-Off-By: Peter Samuelson <peter@p12n.org>

diff -urN 2.6.11-rc5/scripts/lxdialog/checklist.c.old 2.6.11-rc5/scripts/lxdialog/checklist.c
--- 2.6.11-rc5/scripts/lxdialog/checklist.c.old	2005-02-27 00:49:00.000000000 -0600
+++ 2.6.11-rc5/scripts/lxdialog/checklist.c	2005-02-27 01:01:17.000000000 -0600
@@ -269,7 +269,7 @@
 				    status[scroll + max_choice - 1],
 				    max_choice - 1, FALSE);
 			scrollok (list, TRUE);
-			scroll (list);
+			wscrl (list, 1);
 			scrollok (list, FALSE);
 		    }
 		    scroll++;
diff -urN 2.6.11-rc5/scripts/lxdialog/colors.h.old 2.6.11-rc5/scripts/lxdialog/colors.h
--- 2.6.11-rc5/scripts/lxdialog/colors.h.old	2004-02-03 21:43:07.000000000 -0600
+++ 2.6.11-rc5/scripts/lxdialog/colors.h	2005-02-27 01:45:28.000000000 -0600
@@ -152,10 +152,4 @@
  * 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];
diff -urN 2.6.11-rc5/scripts/lxdialog/lxdialog.c.old 2.6.11-rc5/scripts/lxdialog/lxdialog.c
--- 2.6.11-rc5/scripts/lxdialog/lxdialog.c.old	2004-02-03 21:43:57.000000000 -0600
+++ 2.6.11-rc5/scripts/lxdialog/lxdialog.c	2005-02-27 01:31:11.000000000 -0600
@@ -56,7 +56,7 @@
 int
 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;
 
 #ifdef LOCALE
@@ -89,7 +89,7 @@
                 offset += 2;
             }
 	} 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]);
 		exit (-1);
 	    } else if (argc == 2) {	/* we only want to clear the screen */
@@ -98,7 +98,7 @@
 		end_dialog ();
 		return 0;
 	    } else {
-		clear_screen = 1;
+		opt_clear = 1;
 		offset++;
 	    }
 	} else			/* no more common options */
@@ -127,7 +127,7 @@
     init_dialog ();
     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);
 	refresh ();
     }
diff -urN 2.6.11-rc5/scripts/lxdialog/menubox.c.old 2.6.11-rc5/scripts/lxdialog/menubox.c
--- 2.6.11-rc5/scripts/lxdialog/menubox.c.old	2005-02-27 00:23:54.000000000 -0600
+++ 2.6.11-rc5/scripts/lxdialog/menubox.c	2005-02-27 01:32:08.000000000 -0600
@@ -327,7 +327,7 @@
                    ) {
 		    /* Scroll menu up */
 		    scrollok (menu, TRUE);
-                    scroll (menu);
+		    wscrl (menu, 1);
                     scrollok (menu, FALSE);
 
                     scroll++;
@@ -357,7 +357,7 @@
                 for (i=0; (i < max_choice); i++) {
                     if (scroll+max_choice < item_no) {
 			scrollok (menu, TRUE);
-			scroll(menu);
+			wscrl (menu, 1);
 			scrollok (menu, FALSE);
                 	scroll++;
                 	print_item (menu, items[(scroll+max_choice-1)*2+1],

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [uPATCH] cross-compile scripts/lxdialog/ on AIX
  2005-02-27  7:54 [uPATCH] cross-compile scripts/lxdialog/ on AIX Peter Samuelson
@ 2005-02-27  8:20 ` Peter Samuelson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Samuelson @ 2005-02-27  8:20 UTC (permalink / raw)
  To: zippel; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]


[Peter Samuelson]
> AIX curses.h defines macros 'clear_screen' and 'color_names' but does
> not define 'scroll()'.

I should mention that 'make menuconfig' on AIX 4.3 also required 'ln -s
libxcurses.a /usr/lib/libncurses.a' but a patch to detect *that* seemed
too intrusive to be worthwhile.  Also, color escapes are all messed up
and I don't know why, but I blame AIX's funky terminfo.

Peter

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-27  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-27  7:54 [uPATCH] cross-compile scripts/lxdialog/ on AIX Peter Samuelson
2005-02-27  8:20 ` Peter Samuelson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.