pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Made the code in get_logical_li...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a88ad41e5ba1
branches:  trunk
changeset: 498826:a88ad41e5ba1
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Sep 04 00:26:13 2005 +0000

description:
Made the code in get_logical_line easier.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 6d399cad7e19 -r a88ad41e5ba1 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sun Sep 04 00:04:15 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sun Sep 04 00:26:13 2005 +0000
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index