Ethereal-dev: [Ethereal-dev] Enumerated preferences now have two strings for each value

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 23 May 2004 19:32:26 -0700
I've added a "description" member to the "enum_val_t" structure; the
values for an enumerated preference now have both "name", which is a
short name that should be chosen to make it convenient to use on the
command line with a "-o" flag (no spaces, no capital letters, no
punctuation other than '-' or '_' in lieu of spaces), and "description",
which is descriptive text (which can have spaces, capital letters,
punctuation, etc.) for use in the GUI.

I've converted the existing "enum_val_t"s to use the existing string as
the description (except for the new COTP preference, where the existing
values were short names - I added descriptive strings for those), and
added new strings for the short name.

Either the name or the description can be used in the "-o" flag or in
the preferences file, for backwards compatibility.  The description is
currently written to the preferences file when the file is saved; this
is also for compatibility reasons, i.e.  so that you won't get as many
errors (and ignored preference settings) if you save a file under a
newer version of Ethereal and read it in an older version.  (Eventually
we should perhaps convert it to write out the short name - that'd allow
the description to be changed without breaking as many things, although
it'd still break reading preference files saved with the old description
strings.)