diff options
Diffstat (limited to 'apps/language.c')
-rw-r--r-- | apps/language.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/language.c b/apps/language.c index bba1359616..0c6245f08c 100644 --- a/apps/language.c +++ b/apps/language.c | |||
@@ -34,9 +34,10 @@ | |||
34 | /* These defines must match the initial bytes in the binary lang file */ | 34 | /* These defines must match the initial bytes in the binary lang file */ |
35 | /* See tools/genlang (TODO: Use common include for both) */ | 35 | /* See tools/genlang (TODO: Use common include for both) */ |
36 | #define LANGUAGE_COOKIE 0x1a | 36 | #define LANGUAGE_COOKIE 0x1a |
37 | #define LANGUAGE_VERSION 0x04 | 37 | #define LANGUAGE_VERSION 0x05 |
38 | #define LANGUAGE_FLAG_RTL 0x01 | ||
38 | 39 | ||
39 | #define HEADER_SIZE 3 | 40 | #define HEADER_SIZE 4 |
40 | 41 | ||
41 | static unsigned char language_buffer[MAX_LANGUAGE_SIZE]; | 42 | static unsigned char language_buffer[MAX_LANGUAGE_SIZE]; |
42 | 43 | ||
@@ -51,6 +52,13 @@ void lang_init(void) | |||
51 | } | 52 | } |
52 | } | 53 | } |
53 | 54 | ||
55 | static unsigned char lang_options = 0; | ||
56 | |||
57 | int lang_is_rtl(void) | ||
58 | { | ||
59 | return (lang_options & LANGUAGE_FLAG_RTL) != 0; | ||
60 | } | ||
61 | |||
54 | int lang_load(const char *filename) | 62 | int lang_load(const char *filename) |
55 | { | 63 | { |
56 | int fsize; | 64 | int fsize; |
@@ -98,6 +106,7 @@ int lang_load(const char *filename) | |||
98 | retcode = 3; | 106 | retcode = 3; |
99 | } | 107 | } |
100 | close(fd); | 108 | close(fd); |
109 | lang_options = (retcode ? 0 : lang_header[3]); | ||
101 | return retcode; | 110 | return retcode; |
102 | } | 111 | } |
103 | 112 | ||