Changeset 3576 for trunk

Show
Ignore:
Timestamp:
09/11/08 19:44:45 (2 months ago)
Author:
oxygene
Message:

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 <patrick.georgi@…>
Acked-by: Jordan Crouse <jordan.crouse@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/payloads/libpayload/drivers/video/video.c

    r3520 r3576  
    5252static struct video_console *console; 
    5353 
    54 static unsigned int cursorx; 
    55 static unsigned int cursory; 
     54static int cursorx; 
     55static int cursory; 
    5656static unsigned int cursor_enabled = 1; 
    5757 
     
    123123        case '\b': 
    124124                cursorx--; 
     125                if (cursorx < 0) { 
     126                        cursory--; 
     127                        cursorx = VIDEO_COLS; 
     128                } 
    125129                break; 
    126130 
     
    173177 
    174178                        if (console->get_cursor) 
    175                                 console->get_cursor(&cursorx, &cursory, &cursor_enabled); 
     179                                console->get_cursor((unsigned int*)&cursorx, (unsigned int*)&cursory, &cursor_enabled); 
    176180 
    177181                        if (cursorx) {