summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-09-23 18:46:27 +0000
committerJens Arnold <amiconn@rockbox.org>2008-09-23 18:46:27 +0000
commit15d996a0236bd0c54567805e2647741a7dd61dd9 (patch)
treebdb0cab9df2c903b50aa12f27dc5fcef70ab9f5c
parent17a798400b69e0b64f635d953aeaac7e82c9263a (diff)
downloadrockbox-15d996a0236bd0c54567805e2647741a7dd61dd9.tar.gz
rockbox-15d996a0236bd0c54567805e2647741a7dd61dd9.zip
Disable bidirectional text handling and arabic joining in the bootloaders in order to save space. * Disable greyblitting in archos bootloaders for the same reason.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18584 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/bidi.c15
-rw-r--r--firmware/target/sh/archos/lcd-as-archos-bitmap.S9
2 files changed, 19 insertions, 5 deletions
diff --git a/firmware/bidi.c b/firmware/bidi.c
index a7a3211c39..e6a4341f79 100644
--- a/firmware/bidi.c
+++ b/firmware/bidi.c
@@ -43,6 +43,7 @@
43#define _isnewline(c) ((c=='\n' || c=='\r') ? 1 : 0) 43#define _isnewline(c) ((c=='\n' || c=='\r') ? 1 : 0)
44#define XOR(a,b) ((a||b) && !(a&&b)) 44#define XOR(a,b) ((a||b) && !(a&&b))
45 45
46#ifndef BOOTLOADER
46static const arab_t * arab_lookup(unsigned short uchar) 47static const arab_t * arab_lookup(unsigned short uchar)
47{ 48{
48 if (uchar >= 0x621 && uchar <= 0x63a) 49 if (uchar >= 0x621 && uchar <= 0x63a)
@@ -132,14 +133,18 @@ static void arabjoin(unsigned short * stringprt, int length)
132 } 133 }
133 } 134 }
134} 135}
136#endif /* !BOOTLOADER */
135 137
136unsigned short *bidi_l2v(const unsigned char *str, int orientation) 138unsigned short *bidi_l2v(const unsigned char *str, int orientation)
137{ 139{
138 int length = utf8length(str);
139 static unsigned short utf16_buf[SCROLL_LINE_SIZE]; 140 static unsigned short utf16_buf[SCROLL_LINE_SIZE];
141 unsigned short *target, *tmp;
142#ifndef BOOTLOADER
140 static unsigned short bidi_buf[SCROLL_LINE_SIZE]; 143 static unsigned short bidi_buf[SCROLL_LINE_SIZE];
141 unsigned short *heb_str, *target, *tmp; /* *broken_str */ 144 unsigned short *heb_str; /* *broken_str */
142 int block_start, block_end, block_type, block_length, i; 145 int block_start, block_end, block_type, block_length, i;
146 int length = utf8length(str);
147#endif
143 /* 148 /*
144 long max_chars=0; 149 long max_chars=0;
145 int begin, end, char_count, orig_begin; 150 int begin, end, char_count, orig_begin;
@@ -151,6 +156,11 @@ unsigned short *bidi_l2v(const unsigned char *str, int orientation)
151 str = utf8decode(str, target++); 156 str = utf8decode(str, target++);
152 *target = 0; 157 *target = 0;
153 158
159#ifdef BOOTLOADER
160 (void)orientation;
161 return utf16_buf;
162
163#else /* !BOOTLOADER */
154 if (target == utf16_buf) /* empty string */ 164 if (target == utf16_buf) /* empty string */
155 return target; 165 return target;
156 166
@@ -282,5 +292,6 @@ unsigned short *bidi_l2v(const unsigned char *str, int orientation)
282 return broken_str; 292 return broken_str;
283#endif 293#endif
284 return heb_str; 294 return heb_str;
295#endif /* !BOOTLOADER */
285} 296}
286 297
diff --git a/firmware/target/sh/archos/lcd-as-archos-bitmap.S b/firmware/target/sh/archos/lcd-as-archos-bitmap.S
index 31b83f4a2f..0396483737 100644
--- a/firmware/target/sh/archos/lcd-as-archos-bitmap.S
+++ b/firmware/target/sh/archos/lcd-as-archos-bitmap.S
@@ -203,7 +203,7 @@ _lcd_write_data:
203 /* This is the place to reenable the interrupts, if we have disabled 203 /* This is the place to reenable the interrupts, if we have disabled
204 * them. See above. */ 204 * them. See above. */
205 205
206 206#ifndef BOOTLOADER
207 .align 2 207 .align 2
208 .global _lcd_grey_data 208 .global _lcd_grey_data
209 .type _lcd_grey_data,@function 209 .type _lcd_grey_data,@function
@@ -345,7 +345,10 @@ _lcd_grey_data:
345 .short 0x0080 345 .short 0x0080
346 346
347 .align 2 347 .align 2
348.lcdr:
349 .long LCDR
350.pmask: 348.pmask:
351 .long 0x80808080 349 .long 0x80808080
350#endif
351
352 .align 2
353.lcdr:
354 .long LCDR