summaryrefslogtreecommitdiffstats
path: root/apps/language.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/language.c')
-rw-r--r--apps/language.c13
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 @@
/* These defines must match the initial bytes in the binary lang file */
/* See tools/genlang (TODO: Use common include for both) */
#define LANGUAGE_COOKIE 0x1a
-#define LANGUAGE_VERSION 0x04
+#define LANGUAGE_VERSION 0x05
+#define LANGUAGE_FLAG_RTL 0x01
-#define HEADER_SIZE 3
+#define HEADER_SIZE 4
static unsigned char language_buffer[MAX_LANGUAGE_SIZE];
@@ -51,6 +52,13 @@ void lang_init(void)
}
}
+static unsigned char lang_options = 0;
+
+int lang_is_rtl(void)
+{
+ return (lang_options & LANGUAGE_FLAG_RTL) != 0;
+}
+
int lang_load(const char *filename)
{
int fsize;
@@ -98,6 +106,7 @@ int lang_load(const char *filename)
retcode = 3;
}
close(fd);
+ lang_options = (retcode ? 0 : lang_header[3]);
return retcode;
}