From 0b35f47cf65d7b406876b7c09ef716f0de3fc5ee Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Wed, 19 May 2004 13:05:17 +0000 Subject: Add word boundary markers, so that the fast scanners get exactly what they are supposed to. --- usr.sbin/pkg_add/OpenBSD/PackingList.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 1fd3740d751..e523a6cc60c 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,4 +1,4 @@ -# $OpenBSD: PackingList.pm,v 1.7 2004/04/28 06:50:21 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.8 2004/05/19 13:05:16 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -73,7 +73,7 @@ sub DirrmOnly my ($fh, $cont) = @_; local $_; while (<$fh>) { - next unless m/^\@cwd/ || m/^\@dirrm/ || m/^\@name/; + next unless m/^\@cwd\b/ || m/^\@dirrm\b/ || m/^\@name\b/; &$cont($_); } } @@ -83,7 +83,7 @@ sub FilesOnly my ($fh, $cont) = @_; local $_; while (<$fh>) { - next unless m/^\@cwd/ || m/^\@name/ || !m/^\@/; + next unless m/^\@cwd\b/ || m/^\@name\b/ || !m/^\@/; &$cont($_); } } @@ -93,7 +93,7 @@ sub ConflictOnly my ($fh, $cont) = @_; local $_; while (<$fh>) { - next unless m/^\@pkgcfl/ || m/^\@option/ || m/^\@name/; + next unless m/^\@pkgcfl\b/ || m/^\@option\b/ || m/^\@name\b/; &$cont($_); } } @@ -104,14 +104,14 @@ sub SharedStuffOnly local $_; MAINLOOP: while (<$fh>) { - if (m/^\@shared/) { + if (m/^\@shared\b/) { &$cont($_); while(<$fh>) { - redo MAINLOOP unless m/^\@md5/ || m/^\@size/; + redo MAINLOOP unless m/^\@md5\b/ || m/^\@size\b/; &$cont($_); } } else { - next unless m/^\@cwd/ || m/^\@dirrm/ || m/^\@name/; + next unless m/^\@cwd\b/ || m/^\@dirrm\b/ || m/^\@name\b/; } &$cont($_); } -- cgit v1.2.3