summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-04-29 12:38:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-04-29 12:38:32 +0000
commit56a6d59237450bada8b92e5dfb87d07e005db3c4 (patch)
tree3fcedc3017a8576ca9949f5c6aee7e86c7f75afc /tools
parent0e712a4b260233b1ff5f9a54266d941053d01686 (diff)
downloadrockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.tar.gz
rockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.tar.bz2
rockbox-56a6d59237450bada8b92e5dfb87d07e005db3c4.zip
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-xtools/binlang6
-rwxr-xr-xtools/uplang8
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/binlang b/tools/binlang
index 2f3753a7cd..bb47238db7 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 d0897ba46c..41730fb3d3 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;