diff options
author | rillig <rillig@pkgsrc.org> | 2005-09-04 00:26:13 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-09-04 00:26:13 +0000 |
commit | 60107e10a3f8c8651bf50b3b28c4b86d10e97df2 (patch) | |
tree | 533b76f568e8c076b2774c0762edf6947e87a837 /pkgtools | |
parent | f27d96aee2772c3bd288feb9aa7081c1cb83fa6e (diff) | |
download | pkgsrc-60107e10a3f8c8651bf50b3b28c4b86d10e97df2.tar.gz |
Made the code in get_logical_line easier.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index f7043dde2c1..1148ae0c47b 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.275 2005/09/03 22:23:46 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.276 2005/09/04 00:26:13 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -525,13 +525,18 @@ sub get_logical_line($$) { if ($lines->[$lineno]->text =~ qr"^(\s*)(.*?)\s*(\\?)$") { my ($indent, $text, $cont) = ($1, $2, $3); - $value .= $first ? "$indent$text" : $text; + if ($first) { + $value .= $indent; + $first = false; + } + + $value .= $text; + if ($cont eq "\\") { $value .= " "; } else { last; } - $first = false; } } ${$ref_lineno} = $lineno + 1; |