aboutsummaryrefslogtreecommitdiffstats
path: root/epan/range.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-16 08:33:40 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-16 08:33:40 +0000
commitb2543fed6c24a62b5029ca3027779a87e90c17a7 (patch)
tree16d0e461562ff58b56a85d16234f408773488e48 /epan/range.h
parent64394fdef2e0e732003bbb09cba1137f68156b92 (diff)
Make the nranges member of a range_t be the number of ranges, not the
number of ranges - 1, and update loops that iterate over all the ranges appropriately. Make "range_convert_str()" return a success/failure indication, and check it. Rewrite it to do more checks, and not to blithely ignore unknown characters. svn path=/trunk/; revision=12313
Diffstat (limited to 'epan/range.h')
-rw-r--r--epan/range.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/epan/range.h b/epan/range.h
index 314f3c5ed7..8f6f43f6ba 100644
--- a/epan/range.h
+++ b/epan/range.h
@@ -48,9 +48,18 @@ typedef struct range {
range_admin_t ranges[MaxRange];
} range_t;
+/*
+ * Return value from range_convert_str().
+ */
+typedef enum {
+ CVT_NO_ERROR,
+ CVT_SYNTAX_ERROR,
+ CVT_TOO_MANY_SUBRANGES
+} convert_ret_t;
+
extern void range_init(range_t *range);
-extern void range_convert_str(range_t *range, const gchar *es,
+extern convert_ret_t range_convert_str(range_t *range, const gchar *es,
guint32 max_value);
extern gboolean value_is_in_range(range_t *range, guint32 val);