From: Alan T. DeKok Date: Tue, 13 Aug 2019 14:15:15 +0000 (-0400) Subject: format STRUCT, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=423b0cb85e8bede6458cbe0e191c183e6050cd71;p=thirdparty%2Ffreeradius-server.git format STRUCT, too --- diff --git a/scripts/dict/format.pl b/scripts/dict/format.pl index 86ef17d3eb5..807a46bf912 100755 --- a/scripts/dict/format.pl +++ b/scripts/dict/format.pl @@ -239,8 +239,9 @@ while (@ARGV) { # # Values. # - if (/^VALUE\s+([-\w]+)\s+([-\w\/,.]+)\s+(\w+)(.*)/) { - $attr=$1; + if (/^(VALUE|STRUCT)\s+([-\w]+)\s+([-\w\/,.]+)\s+(\w+)(.*)/) { + $cmd=$1; + $attr=$2; $len = length $attr; @@ -271,7 +272,7 @@ while (@ARGV) { $lena = $len - 32; } - $name = $2; + $name = $3; $len = length $name; if ($len < 24) { $lenx = 24 - $lena - $len; @@ -286,7 +287,7 @@ while (@ARGV) { $tabsn = " "; } - push @output, "VALUE\t$attr$tabsa$name$tabsn$3$4\n"; + push @output, "$cmd\t$attr$tabsa$name$tabsn$4$5\n"; next; }