From 493e65a0d8fc478861e76e6dbb4e56a4f6356f77 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 29 Jun 2022 13:56:56 -0700 Subject: Tools: Remove fixhf.pl. Remove fixhf.pl. It doesn't appear to have been used since 2010, and it's in our commit history if we ever need to restore it. Ping #18152. --- tools/fixhf.pl | 72 ---------------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100755 tools/fixhf.pl (limited to 'tools') diff --git a/tools/fixhf.pl b/tools/fixhf.pl deleted file mode 100755 index 6c2a3f0efb..0000000000 --- a/tools/fixhf.pl +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env perl - -# Copyright 2010, Jeff Morriss -# -# A simple tool to remove bogus blurbs from hf entries. -# This has already been run so it may not be necessary any more, but -# may as well check it in in case it can serve as a base for other, future, -# global hf changes. -# -# Usage: -# fixhf.pl file1 [file2 file3 ...] -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# Copyright 1998 Gerald Combs -# -# SPDX-License-Identifier: GPL-2.0-or-later -# - -use strict; - -# Read through the files -while ($_ = $ARGV[0]) -{ - shift; - my $filename = $_; - my $fileContents = ''; - my @foundAPIs = (); - - die "No such file: \"$filename\"" if (! -e $filename); - - # delete leading './' - $filename =~ s{ ^ \. / } {}xo; - - # Read in the file (ouch, but it's easier that way) - open(FC, $filename) || die("Couldn't open $filename"); - while () { $fileContents .= $_; } - close(FC); - - if ($fileContents =~ s{ - (\{ - \s* - &\s*[A-Z0-9_\[\]-]+ # &hf - \s*,\s* - \{\s* - ("[A-Z0-9 '\./\(\)_:-]+") # name - \s*,\s* - "[A-Z0-9_\.-]+" # abbrev - \s*,\s* - FT_[A-Z0-9_]+ # field type - \s*,\s* - [A-Z0-9x|_]+ # display - \s*,\s* - [A-Z0-9&_\(\)' -]+ # convert - \s*,\s* - [A-Z0-9x_]+ # bitmask - \s*,\s*) - \2 # blurb - } [$1NULL]xgios) - # \s*HFILL) - { - print STDERR "Warning: field with name==blurb found in " .$filename. " FIXING IT!\n"; - - # Trim trailing white space while we're here - $fileContents =~ s{[ \t]+$} []gom; - - open(FC, ">".$filename) || die("Couldn't open $filename"); - print FC $fileContents; - close(FC); - } - -} -- cgit v1.2.3