diff options
author | Jörg Mayer <jmayer@loplof.de> | 2003-01-21 20:20:09 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2003-01-21 20:20:09 +0000 |
commit | e6fafce9c4811e85b17714a5c91caf519e81838f (patch) | |
tree | d3c89ca29751bbad8ad090e78c9739a357229465 /make-manuf | |
parent | 3ffd6a1365bbd5fa0c1590aa3e6714a91003c6cd (diff) | |
download | wireshark-e6fafce9c4811e85b17714a5c91caf519e81838f.tar.gz wireshark-e6fafce9c4811e85b17714a5c91caf519e81838f.tar.bz2 wireshark-e6fafce9c4811e85b17714a5c91caf519e81838f.zip |
Don't replace spaces by '_', remove them.
svn path=/trunk/; revision=6958
Diffstat (limited to 'make-manuf')
-rwxr-xr-x | make-manuf | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/make-manuf b/make-manuf index dd987417b3..63ed9e8fa3 100755 --- a/make-manuf +++ b/make-manuf @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: make-manuf,v 1.9 2002/11/19 09:47:37 jmayer Exp $ +# $Id: make-manuf,v 1.10 2003/01/21 20:20:09 jmayer Exp $ # # Make-manuf - Creates a file containing ethernet OUIs and their # company IDs. It merges the databases at @@ -50,17 +50,12 @@ sub shorten $manuf =~ s/ \& / /g; # Remove any "the", "inc", "plc" ... $manuf =~ s/\s(the|inc|incorporated|plc||systems|corp|corporation|a\/s|ab|ag|kg|gmbh|co|company|limited|ltd)(?= )//gi; - # Cleanup multiple spaces - $manuf =~ s/^\s+//g; - $manuf =~ s/\s+/ /g; - # Truncate all names to a reasonable length, say 10 characters. - $manuf = substr($manuf, 0, 10); - # Remove trailing whitespaces - $manuf =~ s/\s+$//g; # Convert to consistent case $manuf =~ s/(\w+)/\u\L$1/g; - # Replace any spaces with underscores - $manuf =~ s/\s+/_/g; + # Remove all spaces + $manuf =~ s/\s+//g; + # Truncate all names to a reasonable length, say 10 characters. + $manuf = substr($manuf, 0, 10); if ($manuf =~ /\Q$origmanuf\E/i) { return $manuf; |