summaryrefslogtreecommitdiff
path: root/firmware/bidi.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2007-07-30 22:33:31 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2007-07-30 22:33:31 +0000
commit35274ce1196b8055e189d18d8295edf2e5b0b65c (patch)
tree85e2640cf240a7fbd506106f384c9c2bbb39fb82 /firmware/bidi.c
parent4f28129fe47f3a0c81d2bd112def9b6b7959e706 (diff)
code police, no functional changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14085 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/bidi.c')
-rw-r--r--firmware/bidi.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/firmware/bidi.c b/firmware/bidi.c
index 336291f68d..539c64a127 100644
--- a/firmware/bidi.c
+++ b/firmware/bidi.c
@@ -28,13 +28,14 @@
#include "arabjoin.h"
#include "scroll_engine.h"
-//#define _HEB_BUFFER_LENGTH (MAX_PATH + LCD_WIDTH/2 + 3 + 2 + 2) * 2
+/* #define _HEB_BUFFER_LENGTH (MAX_PATH + LCD_WIDTH/2 + 3 + 2 + 2) * 2 */
#define _HEB_BLOCK_TYPE_ENG 1
#define _HEB_BLOCK_TYPE_HEB 0
#define _HEB_ORIENTATION_LTR 1
#define _HEB_ORIENTATION_RTL 0
-#define ischar(c) ((c > 0x0589 && c < 0x0700) || (c >= 0xfb50 && c <= 0xfefc) ? 1 : 0)
+#define ischar(c) ((c > 0x0589 && c < 0x0700) || \
+ (c >= 0xfb50 && c <= 0xfefc) ? 1 : 0)
#define _isblank(c) ((c==' ' || c=='\t') ? 1 : 0)
#define _isnewline(c) ((c=='\n' || c=='\r') ? 1 : 0)
#define XOR(a,b) ((a||b) && !(a&&b))
@@ -134,12 +135,14 @@ unsigned short *bidi_l2v(const unsigned char *str, int orientation)
int length = utf8length(str);
static unsigned short utf16_buf[SCROLL_LINE_SIZE];
static unsigned short bidi_buf[SCROLL_LINE_SIZE];
- unsigned short *heb_str, *target, *tmp; // *broken_str
+ unsigned short *heb_str, *target, *tmp; /* *broken_str */
int block_start, block_end, block_type, block_length, i;
- //long max_chars=0;
- //int begin, end, char_count, orig_begin;
+ /*
+ long max_chars=0;
+ int begin, end, char_count, orig_begin;
- //tmp = str;
+ tmp = str;
+ */
target = tmp = utf16_buf;
while (*str)
str = utf8decode(str, target++);
@@ -186,7 +189,8 @@ unsigned short *bidi_l2v(const unsigned char *str, int orientation)
}
for (i=block_start; i<=block_end; i++) {
- *target = (block_type == orientation) ? *(utf16_buf+i) : *(utf16_buf+block_end-i+block_start);
+ *target = (block_type == orientation) ?
+ *(utf16_buf+i) : *(utf16_buf+block_end-i+block_start);
if (block_type!=orientation) {
switch (*target) {
case '(':