From 500eb99cd9ae9503344998b811e4856a2bb6bfb2 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 27 Feb 2010 19:01:27 +0000 Subject: Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats to a "time_fmt.h" file, included by the headers that use it. Have abs_time_to_str() and abs_time_secs_to_str() take the date format value, rather than a Boolean "show this as UTC" flag, as an argument. Document the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS and VCDU dissectors, rather than having those dissectors do the formatting themselves. svn path=/trunk/; revision=32034 --- epan/to_str.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'epan/to_str.h') diff --git a/epan/to_str.h b/epan/to_str.h index 86e487b036..7f139f46c1 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -28,24 +28,13 @@ #include #include "nstime.h" +#include "time_fmt.h" #include #define GUID_STR_LEN 37 #define MAX_IP_STR_LEN 16 #define MAX_ADDR_STR_LEN 256 -/* - * Resolution of a time stamp. - */ -typedef enum { - TO_STR_TIME_RES_T_SECS, /* seconds */ - TO_STR_TIME_RES_T_DSECS, /* deciseconds */ - TO_STR_TIME_RES_T_CSECS, /* centiseconds */ - TO_STR_TIME_RES_T_MSECS, /* milliseconds */ - TO_STR_TIME_RES_T_USECS, /* microseconds */ - TO_STR_TIME_RES_T_NSECS /* nanoseconds */ -} to_str_time_res_t; - /* * These are utility functions which convert various types to strings, * but for which no more specific module applies. @@ -73,8 +62,8 @@ extern gchar* vines_addr_to_str(const guint8 *addrp); extern gchar* time_secs_to_str(gint32); extern gchar* time_secs_to_str_unsigned(guint32); extern gchar* time_msecs_to_str(gint32); -extern gchar* abs_time_to_str(nstime_t*, gboolean); -extern gchar* abs_time_secs_to_str(time_t, gboolean); +extern gchar* abs_time_to_str(nstime_t*, absolute_time_display_e fmt); +extern gchar* abs_time_secs_to_str(time_t, absolute_time_display_e fmt); extern void display_signed_time(gchar *, int, gint32, gint32, to_str_time_res_t); extern void display_epoch_time(gchar *, int, time_t, gint32, to_str_time_res_t); -- cgit v1.2.3