]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
format STRUCT, too
authorAlan T. DeKok <aland@freeradius.org>
Tue, 13 Aug 2019 14:15:15 +0000 (10:15 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 13 Aug 2019 14:15:15 +0000 (10:15 -0400)
scripts/dict/format.pl

index 86ef17d3eb5664940fe2a6d4fc3f90a4166c5b17..807a46bf9128bc3484c904e9c71c069fdd0d40be 100755 (executable)
@@ -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;
        }