From: Alan T. DeKok Date: Fri, 10 May 2019 13:18:38 +0000 (-0400) Subject: format the PROTOCOL line, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d444a60f0580e6f9d8545822e151ecf64fb20c2;p=thirdparty%2Ffreeradius-server.git format the PROTOCOL line, too --- diff --git a/scripts/dict/format.pl b/scripts/dict/format.pl index a4f0f8e9795..9b3c083ed6e 100755 --- a/scripts/dict/format.pl +++ b/scripts/dict/format.pl @@ -101,6 +101,29 @@ while (@ARGV) { $previous = ""; } + # + # Remember the protocol + # + if (/^PROTOCOL\s+([-\w]+)\s+(\w+)\s+(.*)/) { + $name=$1; + $format = $3; + $len = length $name; + if ($len < 16) { + $lenx = 16 - $len; + $lenx += 7; # round up + $lenx /= 8; + $lenx = int $lenx; + $tabs = "\t" x $lenx; + } else { + $tabs = " "; + } + + $format = "\t$format" if ($format); + + push @output, "PROTOCOL\t$name$tabs$2$format\n"; + next; + } + # # Remember the vendor #