Navigation


Changeset 1433:3338f135989d in freeDiameter


Ignore:
Timestamp:
Feb 19, 2020, 3:04:53 PM (4 years ago)
Author:
Luke Mewburn <luke@mewburn.net>
Branch:
default
Phase:
public
committer:
Luke Mewburn <luke@mewburn.net> 1582097521 -39600
Message:

org_to_fd.pl: prevent spaces in AVP names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/tools/org_to_fd.pl

    r1324 r1433  
    7171
    7272while (<>) {
    73     my ($dummy, $name, $code, $section, $type, $must, $may, $shouldnot, $mustnot, $encr) = split /\|/;
     73    my ($dummy, $name, $code, $section, $type, $must, $may, $shouldnot, $mustnot, $encr) = split /\s*\|\s*/;
    7474
    7575    next if ($name =~ m/Attribute Name/);
    76     if ($name =~ m/ # (.*)/) {
    77         print "\t/* $1 */\n";
     76    if ($name =~ m/# (.*)/) {
     77        printf "\t/* %-60s */\n", $1;
    7878        next;
    7979    }
    80        
    8180
    82     $name =~ s/ *//g;
    83     $code =~ s/ *//g;
    84     $type =~ s/ *//g;
     81    if ($name =~ m/\s/) {
     82        die(sprintf("name '%s' contains space", $name));
     83    }
    8584
    8685    print "\t/* $name */\n\t{\n\t\tstruct dict_avp_data data = {\n";
Note: See TracChangeset for help on using the changeset viewer.