aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x11.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-03-29 00:26:23 +0000
committerEvan Huus <eapache@gmail.com>2013-03-29 00:26:23 +0000
commit37600a157ba2036a79a5ebf466b31b8eee19244e (patch)
tree05b5db07655ce39ffe0c9c42c62d30a0c389b8df /epan/dissectors/packet-x11.c
parent6f19d87f4e3aaa5872bdec1d9f4e50d85eee193d (diff)
Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
Diffstat (limited to 'epan/dissectors/packet-x11.c')
-rw-r--r--epan/dissectors/packet-x11.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c
index e0217ea549..6d49ee6c79 100644
--- a/epan/dissectors/packet-x11.c
+++ b/epan/dissectors/packet-x11.c
@@ -1331,7 +1331,7 @@ static void atom(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
else {
header_field_info *hfi = proto_registrar_get_nth(hf);
if (hfi -> strings)
- interpretation = match_strval(v, cVALS(hfi -> strings));
+ interpretation = try_val_to_str(v, cVALS(hfi -> strings));
}
if (!interpretation) interpretation = "error in Xlib client program ?";
proto_tree_add_uint_format(t, hf, tvb, *offsetp, 4, v, "%s: %u (%s)",
@@ -2219,7 +2219,7 @@ static guint32 field8(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
const gchar *enumValue = NULL;
if (hfi -> strings)
- enumValue = match_strval(v, cVALS(hfi -> strings));
+ enumValue = try_val_to_str(v, cVALS(hfi -> strings));
if (enumValue)
proto_tree_add_uint_format(t, hf, tvb, *offsetp, 1, v,
hfi -> display == BASE_DEC ? "%s: %u (%s)" : "%s: 0x%02x (%s)",
@@ -2238,7 +2238,7 @@ static guint32 field16(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
const gchar *enumValue = NULL;
if (hfi -> strings)
- enumValue = match_strval(v, cVALS(hfi -> strings));
+ enumValue = try_val_to_str(v, cVALS(hfi -> strings));
if (enumValue)
proto_tree_add_uint_format(t, hf, tvb, *offsetp, 2, v,
hfi -> display == BASE_DEC ? "%s: %u (%s)" : "%s: 0x%02x (%s)",
@@ -2258,7 +2258,7 @@ static guint32 field32(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
const gchar *nameAsChar = hfi -> name;
if (hfi -> strings)
- enumValue = match_strval(v, cVALS(hfi -> strings));
+ enumValue = try_val_to_str(v, cVALS(hfi -> strings));
if (enumValue)
proto_tree_add_uint_format(t, hf, tvb, *offsetp, 4, v,
hfi -> display == BASE_DEC ? "%s: %u (%s)" : "%s: 0x%08x (%s)",
@@ -3037,7 +3037,7 @@ static void tryExtension(int opcode, tvbuff_t *tvb, packet_info *pinfo, int *off
const gchar *extension;
void (*func)(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, guint byte_order);
- extension = match_strval(opcode, state->opcode_vals);
+ extension = try_val_to_str(opcode, state->opcode_vals);
if (!extension)
return;