diff options
Diffstat (limited to 'tools')
-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 @@ | |||
10 | # Copyright (C) 2006 - 2008 by Daniel Stenberg | 10 | # Copyright (C) 2006 - 2008 by Daniel Stenberg |
11 | # | 11 | # |
12 | 12 | ||
13 | # binary version for the binary lang file | 13 | # See apps/language.c (TODO: Use common include for both) |
14 | my $langversion = 4; # 3 was the latest one used in the v1 format | 14 | # Cookie and binary version for the binary lang file |
15 | my $LANGUAGE_COOKIE = 0x1a; | ||
16 | my $LANGUAGE_VERSION = 0x04; | ||
15 | 17 | ||
16 | # A note for future users and readers: The original v1 language system allowed | 18 | # A note for future users and readers: The original v1 language system allowed |
17 | # the build to create and use a different language than english built-in. We | 19 | # the build to create and use a different language than english built-in. We |
@@ -26,7 +28,7 @@ my %user2num = | |||
26 | 28 | ||
27 | if(!$ARGV[0]) { | 29 | if(!$ARGV[0]) { |
28 | print <<MOO | 30 | print <<MOO |
29 | Usage: genlang [options] <langv2 file> | 31 | Usage: genlang [options] <langv4 file> |
30 | 32 | ||
31 | -p=<prefix> | 33 | -p=<prefix> |
32 | Make the tool create a [prefix].c and [prefix].h file. | 34 | Make the tool create a [prefix].c and [prefix].h file. |
@@ -659,7 +661,7 @@ elsif($binary) { | |||
659 | 661 | ||
660 | open(OUTF, ">$binary") or die "Error: Can't create $binary"; | 662 | open(OUTF, ">$binary") or die "Error: Can't create $binary"; |
661 | binmode OUTF; | 663 | binmode OUTF; |
662 | printf OUTF ("\x1a%c%c", $langversion, $target_id); # magic lang file header | 664 | printf OUTF ("%c%c%c", $LANGUAGE_COOKIE, $LANGUAGE_VERSION, $target_id); # magic lang file header |
663 | 665 | ||
664 | # loop over the target phrases | 666 | # loop over the target phrases |
665 | for $i (1 .. $idcount) { | 667 | for $i (1 .. $idcount) { |