From bd8d7a5f5e1cf754a22f08fb14e79a8367144ca3 Mon Sep 17 00:00:00 2001 From: Jonas Häggqvist Date: Sun, 17 Feb 2008 23:34:52 +0000 Subject: Make genlang shut up about the non-error of not putting quotes around "none" in the voice. Also make it print slightly nicer errors/warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16340 a1c6a512-1295-4272-9138-f99709370657 --- tools/genlang | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/genlang b/tools/genlang index 9be77a6030..99b28b81fe 100755 --- a/tools/genlang +++ b/tools/genlang @@ -196,7 +196,7 @@ if($english) { my $idnum=0; # start with a true number my $vidnum=0x8000; # first voice id - open(ENG, "<$english") || die "can't open $english"; + open(ENG, "<$english") || die "Error: can't open $english"; my @phrase; my $id; my $maybeid; @@ -357,7 +357,7 @@ my $voiceid=0x8000; # counter for voice-only ID numbers # Now start the scanning of the selected language string # -open(LANG, "<$input") || die "couldn't read language file named $input\n"; +open(LANG, "<$input") || die "Error: couldn't read language file named $input\n"; my @phrase; while() { @@ -419,7 +419,7 @@ while() { print STDERR "Warning: source before $input line $line lacks quotes ($src)!\n"; $src='""'; } - if($voice !~ /^\"/) { + if($voice !~ /^\"/ and $voice !~ /^none\z/i) { print STDERR "Warning: voice before $input line $line lacks quotes ($voice)!\n"; $voice='""'; } @@ -510,9 +510,9 @@ if($prefix) { # We create a .c and .h file open(HFILE, ">$prefix.h") || - die "couldn't create file $prefix.h\n"; + die "Error: couldn't create file $prefix.h\n"; open(CFILE, ">$prefix.c") || - die "couldn't create file $prefix.c\n"; + die "Error: couldn't create file $prefix.c\n"; print HFILE <$binary") or die "Can't create $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 -- cgit