diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2010-02-24 12:28:04 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2010-02-24 12:28:04 +0000 |
commit | 2bb18bac8b2aeb15dc4f31fa29bed1505e349e2b (patch) | |
tree | 0d5ff695b1c3ddba443b1e14a6e569aedf589cf8 /tools/make-sminmpec.pl | |
parent | 7f27653f4b5c79235f6af70ce8fae213b09721ea (diff) |
Point to the correct perl script in the autogenerated file + correct tabs
svn path=/trunk/; revision=31984
Diffstat (limited to 'tools/make-sminmpec.pl')
-rwxr-xr-x | tools/make-sminmpec.pl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/make-sminmpec.pl b/tools/make-sminmpec.pl index bfa19b2c59..ba9ce1e0b7 100755 --- a/tools/make-sminmpec.pl +++ b/tools/make-sminmpec.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# create the sminmpec.c file from +# create the sminmpec.c file from # http://www.iana.org/assignments/enterprise-numbers # # $Id$ @@ -32,32 +32,32 @@ my @in_lines; if($in =~ m/^http:/i) { eval "require LWP::UserAgent;"; die "LWP isn't installed. It is part of the standard Perl module libwww." if $@; - + my $agent = LWP::UserAgent->new; warn "starting to fetch $in ...\n"; my $request = HTTP::Request->new(GET => $in); - + if (-f "enterprise-numbers") { my $mtime; (undef,undef,undef,undef,undef,undef,undef,undef,undef,$mtime,undef,undef,undef) = stat("enterprise-numbers"); $request->if_modified_since( $mtime ); } - + my $result = $agent->request($request); if ($result->code eq 200) { warn "done fetching $in\n"; @in_lines = split /\n/, $result->content; open ENFILE, "> enterprise-numbers"; - + for (@in_lines) { chomp; print ENFILE "$_\n"; } - + close ENFILE; } elsif ($result->code eq 304) { warn "enterprise-numbers was up-to-date\n"; @@ -90,12 +90,12 @@ for(@in_lines) { s/\\/\\\\/g; s/"/\\"/g; s/([\x80-\xFF])/escape_non_ascii($1)/ge; - + if (/^(\d+)/) { $code = sprintf("%5d", $1); } if (/^ (\S.*)/ ) { my $name = $1; - $body .= "\t{ $code, \"$name\" },\n"; + $body .= " { $code, \"$name\" },\n"; } } @@ -105,7 +105,7 @@ print OUT <<"_SMINMPEC"; * * THIS FILE IS AUTOGENERATED, DO NOT EDIT * generated from http://www.iana.org/assignments/enterprise-numbers - * run "epan/make-sminmspec <infile> <outfile>" to regenerate + * run "tools/make-sminmspec <infile> <outfile>" to regenerate */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -117,7 +117,7 @@ print OUT <<"_SMINMPEC"; #include <epan/sminmpec.h> const value_string sminmpec_values[] = { -$body\t{0, NULL} +$body { 0, NULL} }; _SMINMPEC |