From bd430b955e3ba65af6a6985a5f28452ef35321d1 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Thu, 22 Apr 1999 05:37:46 +0000 Subject: [PATCH] remove the first comment lines in a section properly. --- devel/portlint/src/portlint.pl | 4 +++- ports-mgmt/portlint/src/portlint.pl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/devel/portlint/src/portlint.pl b/devel/portlint/src/portlint.pl index c257e4235d9e..fdeede98aa58 100644 --- a/devel/portlint/src/portlint.pl +++ b/devel/portlint/src/portlint.pl @@ -13,7 +13,7 @@ # bsd.port.mk. There are significant differences in those so you'll have # hard time upgrading this... # -# $Id: portlint.pl,v 1.4 1999/04/02 03:24:13 steve Exp $ +# $Id: portlint.pl,v 1.5 1999/04/04 21:35:10 steve Exp $ # $err = $warn = 0; @@ -654,9 +654,11 @@ EOF # for the rest of the checks, comment lines are not important. # for ($i = 0; $i < scalar(@sections); $i++) { + $sections[$i] = "\n" . $sections[$i]; $sections[$i] =~ s/\n#[^\n]*//g; $sections[$i] =~ s/\n\n+/\n/g; $sections[$i] =~ s/\\\n/ /g; + $sections[$i] =~ s/^\n//; } # diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index c257e4235d9e..fdeede98aa58 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -13,7 +13,7 @@ # bsd.port.mk. There are significant differences in those so you'll have # hard time upgrading this... # -# $Id: portlint.pl,v 1.4 1999/04/02 03:24:13 steve Exp $ +# $Id: portlint.pl,v 1.5 1999/04/04 21:35:10 steve Exp $ # $err = $warn = 0; @@ -654,9 +654,11 @@ EOF # for the rest of the checks, comment lines are not important. # for ($i = 0; $i < scalar(@sections); $i++) { + $sections[$i] = "\n" . $sections[$i]; $sections[$i] =~ s/\n#[^\n]*//g; $sections[$i] =~ s/\n\n+/\n/g; $sections[$i] =~ s/\\\n/ /g; + $sections[$i] =~ s/^\n//; } #