diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2003-04-29 12:38:32 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2003-04-29 12:38:32 +0000 |
| commit | 56a6d59237450bada8b92e5dfb87d07e005db3c4 (patch) | |
| tree | 3fcedc3017a8576ca9949f5c6aee7e86c7f75afc /tools | |
| parent | 0e712a4b260233b1ff5f9a54266d941053d01686 (diff) | |
| download | rockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.zip rockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.tar.gz rockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.tar.bz2 rockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.tar.xz | |
Anchor the regexes better, some of them caused problems with perl 5.8.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3629 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/binlang | 6 | ||||
| -rwxr-xr-x | tools/uplang | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/binlang b/tools/binlang index 2f3753a..bb47238 100755 --- a/tools/binlang +++ b/tools/binlang @@ -60,7 +60,7 @@ while(<ENG>) { } # get rid of DOS newlines $_ =~ s/\r//g; - if($_ =~ / *([a-z]+): *(.*)/) { + if($_ =~ /^ *([a-z]+): *(.*)/) { ($var, $value) = ($1, $2); $set{$var} = $value; @@ -75,13 +75,13 @@ while(<ENG>) { close(ENG); while(<LANG>) { - if($_ =~ / *\#/) { + if($_ =~ /^ *\#/) { # comment next; } # get rid of DOS newlines $_ =~ s/\r//g; - if($_ =~ / *([a-z]+): *(.*)/) { + if($_ =~ /^ *([a-z]+): *(.*)/) { ($var, $value) = ($1, $2); # print "$var => $value\n"; diff --git a/tools/uplang b/tools/uplang index d0897ba..41730fb 100755 --- a/tools/uplang +++ b/tools/uplang @@ -11,12 +11,12 @@ MOO my %ids; open(ENG, "<$ARGV[0]"); while(<ENG>) { - if($_ =~ / *\#/) { + if($_ =~ /^ *\#/) { # comment next; } $_ =~ s/\r//g; - if($_ =~ / *([a-z]+): *(.*)/) { + if($_ =~ /^ *([a-z]+): *(.*)/) { ($var, $value) = ($1, $2); # print "$var => $value\n"; @@ -37,13 +37,13 @@ close(ENG); undef %set; open(NEW, "<$ARGV[1]"); while(<NEW>) { - if($_ =~ / *\#/) { + if($_ =~ /^ *\#/) { # comment next; } $_ =~ s/\r//g; - if($_ =~ / *([a-z]+): *(.*)/) { + if($_ =~ /^ *([a-z]+): *(.*)/) { ($var, $value) = ($1, $2); $set{$var} = $value; |