diff options
Diffstat (limited to 'include/asm-arm/arch-rpc/uncompress.h')
-rw-r--r-- | include/asm-arm/arch-rpc/uncompress.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h index 43035fec64d2..06231ede54e5 100644 --- a/include/asm-arm/arch-rpc/uncompress.h +++ b/include/asm-arm/arch-rpc/uncompress.h | |||
@@ -67,31 +67,28 @@ extern __attribute__((pure)) struct param_struct *params(void); | |||
67 | /* | 67 | /* |
68 | * This does not append a newline | 68 | * This does not append a newline |
69 | */ | 69 | */ |
70 | static void putstr(const char *s) | 70 | static void putc(int c) |
71 | { | 71 | { |
72 | extern void ll_write_char(char *, char c, char white); | 72 | extern void ll_write_char(char *, char c, char white); |
73 | int x,y; | 73 | int x,y; |
74 | unsigned char c; | ||
75 | char *ptr; | 74 | char *ptr; |
76 | 75 | ||
77 | x = params->video_x; | 76 | x = params->video_x; |
78 | y = params->video_y; | 77 | y = params->video_y; |
79 | 78 | ||
80 | while ( ( c = *(unsigned char *)s++ ) != '\0' ) { | 79 | if (c == '\n') { |
81 | if ( c == '\n' ) { | 80 | if (++y >= video_num_lines) |
81 | y--; | ||
82 | } else if (c == '\r') { | ||
83 | x = 0; | ||
84 | } else { | ||
85 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
86 | ll_write_char(ptr, c, white); | ||
87 | if (++x >= video_num_columns) { | ||
82 | x = 0; | 88 | x = 0; |
83 | if ( ++y >= video_num_lines ) { | 89 | if ( ++y >= video_num_lines ) { |
84 | y--; | 90 | y--; |
85 | } | 91 | } |
86 | } else { | ||
87 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
88 | ll_write_char(ptr, c, white); | ||
89 | if ( ++x >= video_num_columns ) { | ||
90 | x = 0; | ||
91 | if ( ++y >= video_num_lines ) { | ||
92 | y--; | ||
93 | } | ||
94 | } | ||
95 | } | 92 | } |
96 | } | 93 | } |
97 | 94 | ||
@@ -99,6 +96,10 @@ static void putstr(const char *s) | |||
99 | params->video_y = y; | 96 | params->video_y = y; |
100 | } | 97 | } |
101 | 98 | ||
99 | static inline void flush(void) | ||
100 | { | ||
101 | } | ||
102 | |||
102 | static void error(char *x); | 103 | static void error(char *x); |
103 | 104 | ||
104 | /* | 105 | /* |