diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-04 22:25:52 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-04 22:25:52 +0000 |
commit | 2a91a9a19eabbd38894bd08ac18250c97cb1f2cf (patch) | |
tree | 937261883bf713e42bb8a6ebe71dadf44c77e29e /tools/genlang | |
parent | 32d261e3f9b986f29356f63c1b4857eb6890a1b9 (diff) | |
download | rockbox-2a91a9a19eabbd38894bd08ac18250c97cb1f2cf.tar.gz rockbox-2a91a9a19eabbd38894bd08ac18250c97cb1f2cf.zip |
Use similiar constants in genlang and language.c.
- In the future, they should be united.
- Fix bug in max size calculation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22930 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/genlang')
-rwxr-xr-x | tools/genlang | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/genlang b/tools/genlang index 45171290d6..cedd052839 100755 --- a/tools/genlang +++ b/tools/genlang @@ -10,8 +10,10 @@ # Copyright (C) 2006 - 2008 by Daniel Stenberg # -# binary version for the binary lang file -my $langversion = 4; # 3 was the latest one used in the v1 format +# See apps/language.c (TODO: Use common include for both) +# Cookie and binary version for the binary lang file +my $LANGUAGE_COOKIE = 0x1a; +my $LANGUAGE_VERSION = 0x04; # A note for future users and readers: The original v1 language system allowed # the build to create and use a different language than english built-in. We @@ -26,7 +28,7 @@ my %user2num = if(!$ARGV[0]) { print <<MOO -Usage: genlang [options] <langv2 file> +Usage: genlang [options] <langv4 file> -p=<prefix> Make the tool create a [prefix].c and [prefix].h file. @@ -659,7 +661,7 @@ elsif($binary) { open(OUTF, ">$binary") or die "Error: Can't create $binary"; binmode OUTF; - printf OUTF ("\x1a%c%c", $langversion, $target_id); # magic lang file header + printf OUTF ("%c%c%c", $LANGUAGE_COOKIE, $LANGUAGE_VERSION, $target_id); # magic lang file header # loop over the target phrases for $i (1 .. $idcount) { |