diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-02-22 22:45:21 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-02-22 22:45:21 +0000 |
commit | 5d2df19a7a955883b890229f346ecfbed86fa812 (patch) | |
tree | 06069467e334d94c30e29c9cf3c987cb2305743b /epan/value_string.h | |
parent | 48531970f3a418ecaf0f04ac385d217b36f7bce9 (diff) |
From Peter J. Creath: add a convenience macro for value_string tables
where the values all have #defines or enum values and the corresponding
strings are just the #define or enum value names.
svn path=/trunk/; revision=10187
Diffstat (limited to 'epan/value_string.h')
-rw-r--r-- | epan/value_string.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/value_string.h b/epan/value_string.h index d4f5759554..3ffb379389 100644 --- a/epan/value_string.h +++ b/epan/value_string.h @@ -1,7 +1,7 @@ /* value_string.h * Definitions for value_string structures and routines * - * $Id: value_string.h,v 1.4 2003/12/01 23:41:44 guy Exp $ + * $Id: value_string.h,v 1.5 2004/02/22 22:45:21 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -35,6 +35,9 @@ typedef struct _value_string { gchar *strptr; } value_string; +#define VS_DEF(x) { x, #x } +#define VS_END { 0, NULL } + extern gchar* match_strval(guint32, const value_string*); extern gchar* val_to_str(guint32, const value_string *, const char *); |