aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-08-24 19:45:28 +0000
committerGuy Harris <guy@alum.mit.edu>2002-08-24 19:45:28 +0000
commit6e56c25c9d3008168a0a354e63fb034a7c33ee9d (patch)
tree36f6a2878bbfcc97aeb97b89e828348674cffbaf /epan/proto.h
parentfedaad1874b3bd34e1b0908f68557bcac5a5ebc7 (diff)
From Ulf Lamping: add a new FT_FLOAT type, for single-precision
floating-point numbers, and display all the significant digits for both single-precision and double-precision floating-point numbers in the protocol tree, not just what "%g" does (6 digits). Put in comments explaining how the length of filter strings is computed, and fix some of the computations. svn path=/trunk/; revision=6081
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 0a70b9d363..64973ad99e 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.34 2002/08/02 21:29:39 jmayer Exp $
+ * $Id: proto.h,v 1.35 2002/08/24 19:45:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -388,6 +388,26 @@ proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint
gint length, guint32 value, const char *format, ...);
#endif
+/* Add a FT_FLOAT to a proto_tree */
+extern proto_item *
+proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, float value);
+
+extern proto_item *
+proto_tree_add_float_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, float value);
+
+#if __GNUC__ >= 2
+extern proto_item *
+proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, float value, const char *format, ...)
+ __attribute__((format (printf, 7, 8)));
+#else
+extern proto_item *
+proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, float value, const char *format, ...);
+#endif
+
/* Add a FT_DOUBLE to a proto_tree */
extern proto_item *
proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,