From e24b41d37e8c1a14a2b4c34593032f8649bca4f8 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Sat, 13 Apr 2002 23:02:10 +0000 Subject: [PATCH] Allow multiple consecutive empty lines --- ChangeLog | 4 ++++ scripts/controllib.pl | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a1f6855..b8575937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Apr 14 00:49:09 CEST 2002 Wichert Akkerman + + * scripts/controlllib.pl: accept multilpe consectucive empty lines + Sat Apr 13 22:59:25 CEST 2002 Wichert Akkerman * man/en/deb-control.5.sgml: DocBook version of deb-control manpage diff --git a/scripts/controllib.pl b/scripts/controllib.pl index b737d740..69e2ecf5 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -177,10 +177,12 @@ sub parsecdata { # many=0: ordinary control data like output from dpkg-parsechangelog # many=1: many paragraphs like in source control file # many=-1: single paragraph of control data optionally signed - local ($index,$cf); - $index=''; $cf=''; + local ($index,$cf,$paraborder); + $index=''; $cf=''; $paraborder=1; while () { s/\s*\n$//; + if (m/^$/) and $paraborder) next; + $paraborder=0; if (m/^(\S+)\s*:\s*(.*)$/) { $cf=$1; $v=$2; $cf= &capit($cf); @@ -194,6 +196,7 @@ sub parsecdata { while () { last if m/^$/; } $many= -2; } elsif (m/^$/) { + $paraborder = 1; if ($many>0) { $index++; $cf=''; } elsif ($many == -2) { -- 2.39.5