diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-22 22:45:21 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-22 22:45:21 +0000 |
commit | 8d0dc2a3a3df2d19e606de22952d278b1b963b70 (patch) | |
tree | 06069467e334d94c30e29c9cf3c987cb2305743b /epan/value_string.h | |
parent | bcc271cb476b7535f0d53939df2430f28fcf69cc (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10187 f5534014-38df-0310-8fa8-9805f1628bb7
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 *); |