Ethereal-dev: Re: [Ethereal-dev] Patch: value_string convenience macros

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, 22 Feb 2004 14:48:05 -0800
On Thu, Feb 19, 2004 at 12:58:41PM -0500, Peter J. Creath wrote:
> The patch attached adds the VS_DEF(x) and VS_END macros.

Checked in.

> They let 
> you define value_string arrays in a somewhat more convenient fashion 
> when dealing with enums:

...or when dealing with #defines...

...but *ONLY* in those cases where the string corresponding to the value
happens to be the enum or #define name, which is very often not the case
for value_string tables - because, for one thing, people might not
happen to just know the name in question or that name might not be
descriptive enough, or because the name might have extra information in
it such as the IPSEC_ in the #defines for various security levels in the
IP security option.