Author: oxygene
Date: 2008-09-11 19:44:45 +0200 (Thu, 11 Sep 2008)
New Revision: 3576

Modified:
   trunk/payloads/libpayload/drivers/video/video.c
Log:
makes cursorx and cursory signed, as there
are several "if (cursorx < 0)" tests.

I also added another one, to make backspace
wrap backwards into the previous line, if necessary.

Signed-off-by: Patrick Georgi <[EMAIL PROTECTED]>
Acked-by: Jordan Crouse <[EMAIL PROTECTED]>




Modified: trunk/payloads/libpayload/drivers/video/video.c
===================================================================
--- trunk/payloads/libpayload/drivers/video/video.c     2008-09-11 17:29:00 UTC 
(rev 3575)
+++ trunk/payloads/libpayload/drivers/video/video.c     2008-09-11 17:44:45 UTC 
(rev 3576)
@@ -51,8 +51,8 @@
 
 static struct video_console *console;
 
-static unsigned int cursorx;
-static unsigned int cursory;
+static int cursorx;
+static int cursory;
 static unsigned int cursor_enabled = 1;
 
 static void video_console_fixup_cursor(void)
@@ -122,6 +122,10 @@
 
        case '\b':
                cursorx--;
+               if (cursorx < 0) {
+                       cursory--;
+                       cursorx = VIDEO_COLS;
+               }
                break;
 
        case '\t':
@@ -172,7 +176,7 @@
                        console = console_list[i];
 
                        if (console->get_cursor)
-                               console->get_cursor(&cursorx, &cursory, 
&cursor_enabled);
+                               console->get_cursor((unsigned int*)&cursorx, 
(unsigned int*)&cursory, &cursor_enabled);
 
                        if (cursorx) {
                                cursorx = 0;


--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to