Ethereal-dev: Re: [Ethereal-dev] ethereal manuf manuf.tmpl

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Fri, 13 Dec 2002 10:29:16 +0100
On Thu, Dec 12, 2002 at 05:18:56PM -0600, Gerald Combs wrote:
> On Thu, 12 Dec 2002, Joerg Mayer wrote:
> In this particular case someone from TippingPoint asked me to change their
> entry.  Since we picked up the "bad" entry from the IEEE, it had to be
> overridden in manuf.tmpl.  Once the IEEE fixes their entry we should
> probably remove ours.

OK, I see it now.

> I think it's useful to manually beautify entries despite the extra work
> involved.  

The problem I see is that there are ~300 Entries in manuf.tmpl right now.
Without any further automatic help, watching these entries each time we
do a make-manuf looks quite time consuming.

Looking at the old and new TippingPoint entries got me thinking: I don't
really like the _ at all, so I created a small patch that will remove spaces
completely instead of replacing them with _.
Please give me some feedback whether to apply it or not.

 Ciao
     Jörg

--
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.
Changelog: <jmayer@xxxxxxxxx>
	make-manuf: Don't separate the words by _, use InterCaps instead.

Index: make-manuf
===================================================================
RCS file: /usr/local/cvsroot/ethereal/make-manuf,v
retrieving revision 1.9
diff -p -u -r1.9 make-manuf
--- make-manuf	19 Nov 2002 09:47:37 -0000	1.9
+++ make-manuf	13 Dec 2002 08:52:04 -0000
@@ -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;