diff options
-rw-r--r-- | epan/column-utils.c | 60 | ||||
-rw-r--r-- | epan/dfilter/dfvm.c | 8 | ||||
-rw-r--r-- | epan/dfilter/drange.c | 18 | ||||
-rw-r--r-- | epan/dfilter/drange.h | 8 | ||||
-rw-r--r-- | epan/dfilter/semcheck.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-sna.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-tn3270.c | 2 | ||||
-rw-r--r-- | epan/frame_data.c | 2 | ||||
-rw-r--r-- | epan/ftypes/ftypes.c | 6 | ||||
-rw-r--r-- | epan/packet.h | 6 | ||||
-rw-r--r-- | epan/to_str.c | 30 | ||||
-rw-r--r-- | epan/to_str.h | 18 | ||||
-rw-r--r-- | gtk/main_proto_draw.c | 4 | ||||
-rw-r--r-- | gtk/voip_calls_dlg.c | 4 | ||||
-rw-r--r-- | print.c | 8 |
15 files changed, 93 insertions, 93 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index e4876f4a6e..9e04f45c35 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -704,32 +704,32 @@ set_rel_time(frame_data *fd, gchar *buf) case(TS_PREC_FIXED_SEC): case(TS_PREC_AUTO_SEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 1000000000, SECS); + (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 1000000000, TO_STR_TIME_RES_T_SECS); break; case(TS_PREC_FIXED_DSEC): case(TS_PREC_AUTO_DSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 100000000, DSECS); + (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 100000000, TO_STR_TIME_RES_T_DSECS); break; case(TS_PREC_FIXED_CSEC): case(TS_PREC_AUTO_CSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 10000000, CSECS); + (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 10000000, TO_STR_TIME_RES_T_CSECS); break; case(TS_PREC_FIXED_MSEC): case(TS_PREC_AUTO_MSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 1000000, MSECS); + (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 1000000, TO_STR_TIME_RES_T_MSECS); break; case(TS_PREC_FIXED_USEC): case(TS_PREC_AUTO_USEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 1000, USECS); + (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs / 1000, TO_STR_TIME_RES_T_USECS); break; case(TS_PREC_FIXED_NSEC): case(TS_PREC_AUTO_NSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs, NSECS); + (gint32) fd->rel_ts.secs, fd->rel_ts.nsecs, TO_STR_TIME_RES_T_NSECS); break; default: g_assert_not_reached(); @@ -754,32 +754,32 @@ set_delta_time(frame_data *fd, gchar *buf) case(TS_PREC_FIXED_SEC): case(TS_PREC_AUTO_SEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 1000000000, SECS); + (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 1000000000, TO_STR_TIME_RES_T_SECS); break; case(TS_PREC_FIXED_DSEC): case(TS_PREC_AUTO_DSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 100000000, DSECS); + (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 100000000, TO_STR_TIME_RES_T_DSECS); break; case(TS_PREC_FIXED_CSEC): case(TS_PREC_AUTO_CSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 10000000, CSECS); + (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 10000000, TO_STR_TIME_RES_T_CSECS); break; case(TS_PREC_FIXED_MSEC): case(TS_PREC_AUTO_MSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 1000000, MSECS); + (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 1000000, TO_STR_TIME_RES_T_MSECS); break; case(TS_PREC_FIXED_USEC): case(TS_PREC_AUTO_USEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 1000, USECS); + (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs / 1000, TO_STR_TIME_RES_T_USECS); break; case(TS_PREC_FIXED_NSEC): case(TS_PREC_AUTO_NSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs, NSECS); + (gint32) fd->del_cap_ts.secs, fd->del_cap_ts.nsecs, TO_STR_TIME_RES_T_NSECS); break; default: g_assert_not_reached(); @@ -804,32 +804,32 @@ set_delta_time_dis(frame_data *fd, gchar *buf) case(TS_PREC_FIXED_SEC): case(TS_PREC_AUTO_SEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 1000000000, SECS); + (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 1000000000, TO_STR_TIME_RES_T_SECS); break; case(TS_PREC_FIXED_DSEC): case(TS_PREC_AUTO_DSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 100000000, DSECS); + (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 100000000, TO_STR_TIME_RES_T_DSECS); break; case(TS_PREC_FIXED_CSEC): case(TS_PREC_AUTO_CSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 10000000, CSECS); + (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 10000000, TO_STR_TIME_RES_T_CSECS); break; case(TS_PREC_FIXED_MSEC): case(TS_PREC_AUTO_MSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 1000000, MSECS); + (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 1000000, TO_STR_TIME_RES_T_MSECS); break; case(TS_PREC_FIXED_USEC): case(TS_PREC_AUTO_USEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 1000, USECS); + (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs / 1000, TO_STR_TIME_RES_T_USECS); break; case(TS_PREC_FIXED_NSEC): case(TS_PREC_AUTO_NSEC): display_signed_time(buf, COL_MAX_LEN, - (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs, NSECS); + (gint32) fd->del_dis_ts.secs, fd->del_dis_ts.nsecs, TO_STR_TIME_RES_T_NSECS); break; default: g_assert_not_reached(); @@ -931,32 +931,32 @@ set_epoch_time(frame_data *fd, gchar *buf) case(TS_PREC_FIXED_SEC): case(TS_PREC_AUTO_SEC): display_epoch_time(buf, COL_MAX_LEN, - fd->abs_ts.secs, fd->abs_ts.nsecs / 1000000000, SECS); + fd->abs_ts.secs, fd->abs_ts.nsecs / 1000000000, TO_STR_TIME_RES_T_SECS); break; case(TS_PREC_FIXED_DSEC): case(TS_PREC_AUTO_DSEC): display_epoch_time(buf, COL_MAX_LEN, - fd->abs_ts.secs, fd->abs_ts.nsecs / 100000000, DSECS); + fd->abs_ts.secs, fd->abs_ts.nsecs / 100000000, TO_STR_TIME_RES_T_DSECS); break; case(TS_PREC_FIXED_CSEC): case(TS_PREC_AUTO_CSEC): display_epoch_time(buf, COL_MAX_LEN, - fd->abs_ts.secs, fd->abs_ts.nsecs / 10000000, CSECS); + fd->abs_ts.secs, fd->abs_ts.nsecs / 10000000, TO_STR_TIME_RES_T_CSECS); break; case(TS_PREC_FIXED_MSEC): case(TS_PREC_AUTO_MSEC): display_epoch_time(buf, COL_MAX_LEN, - fd->abs_ts.secs, fd->abs_ts.nsecs / 1000000, MSECS); + fd->abs_ts.secs, fd->abs_ts.nsecs / 1000000, TO_STR_TIME_RES_T_MSECS); break; case(TS_PREC_FIXED_USEC): case(TS_PREC_AUTO_USEC): display_epoch_time(buf, COL_MAX_LEN, - fd->abs_ts.secs, fd->abs_ts.nsecs / 1000, USECS); + fd->abs_ts.secs, fd->abs_ts.nsecs / 1000, TO_STR_TIME_RES_T_USECS); break; case(TS_PREC_FIXED_NSEC): case(TS_PREC_AUTO_NSEC): display_epoch_time(buf, COL_MAX_LEN, - fd->abs_ts.secs, fd->abs_ts.nsecs, NSECS); + fd->abs_ts.secs, fd->abs_ts.nsecs, TO_STR_TIME_RES_T_NSECS); break; default: g_assert_not_reached(); @@ -1117,32 +1117,32 @@ col_set_time(column_info *cinfo, gint el, nstime_t *ts, char *fieldname) case(TS_PREC_FIXED_SEC): case(TS_PREC_AUTO_SEC): display_signed_time(cinfo->col_buf[col], COL_MAX_LEN, - (gint32) ts->secs, ts->nsecs / 1000000000, SECS); + (gint32) ts->secs, ts->nsecs / 1000000000, TO_STR_TIME_RES_T_SECS); break; case(TS_PREC_FIXED_DSEC): case(TS_PREC_AUTO_DSEC): display_signed_time(cinfo->col_buf[col], COL_MAX_LEN, - (gint32) ts->secs, ts->nsecs / 100000000, DSECS); + (gint32) ts->secs, ts->nsecs / 100000000, TO_STR_TIME_RES_T_DSECS); break; case(TS_PREC_FIXED_CSEC): case(TS_PREC_AUTO_CSEC): display_signed_time(cinfo->col_buf[col], COL_MAX_LEN, - (gint32) ts->secs, ts->nsecs / 10000000, CSECS); + (gint32) ts->secs, ts->nsecs / 10000000, TO_STR_TIME_RES_T_CSECS); break; case(TS_PREC_FIXED_MSEC): case(TS_PREC_AUTO_MSEC): display_signed_time(cinfo->col_buf[col], COL_MAX_LEN, - (gint32) ts->secs, ts->nsecs / 1000000, MSECS); + (gint32) ts->secs, ts->nsecs / 1000000, TO_STR_TIME_RES_T_MSECS); break; case(TS_PREC_FIXED_USEC): case(TS_PREC_AUTO_USEC): display_signed_time(cinfo->col_buf[col], COL_MAX_LEN, - (gint32) ts->secs, ts->nsecs / 1000, USECS); + (gint32) ts->secs, ts->nsecs / 1000, TO_STR_TIME_RES_T_USECS); break; case(TS_PREC_FIXED_NSEC): case(TS_PREC_AUTO_NSEC): display_signed_time(cinfo->col_buf[col], COL_MAX_LEN, - (gint32) ts->secs, ts->nsecs, NSECS); + (gint32) ts->secs, ts->nsecs, TO_STR_TIME_RES_T_NSECS); break; default: g_assert_not_reached(); diff --git a/epan/dfilter/dfvm.c b/epan/dfilter/dfvm.c index 6dad6a82b1..c4656edc46 100644 --- a/epan/dfilter/dfvm.c +++ b/epan/dfilter/dfvm.c @@ -155,23 +155,23 @@ dfvm_dump(FILE *f, GPtrArray *insns) range_item = range_list->data; switch (range_item->ending) { - case UNINITIALIZED: + case DRANGE_NODE_END_T_UNINITIALIZED: fprintf(f, "?"); break; - case LENGTH: + case DRANGE_NODE_END_T_LENGTH: fprintf(f, "%d:%d", range_item->start_offset, range_item->length); break; - case OFFSET: + case DRANGE_NODE_END_T_OFFSET: fprintf(f, "%d-%d", range_item->start_offset, range_item->end_offset); break; - case TO_THE_END: + case DRANGE_NODE_END_T_TO_THE_END: fprintf(f, "%d:", range_item->start_offset); break; diff --git a/epan/dfilter/drange.c b/epan/dfilter/drange.c index 13a52f5ad4..218b8f3c01 100644 --- a/epan/dfilter/drange.c +++ b/epan/dfilter/drange.c @@ -35,7 +35,7 @@ drange_node_new(void) new_range_node->start_offset = 0; new_range_node->length = 0; new_range_node->end_offset = 0; - new_range_node->ending = UNINITIALIZED; + new_range_node->ending = DRANGE_NODE_END_T_UNINITIALIZED; return new_range_node; } @@ -50,28 +50,28 @@ drange_node_free(drange_node* drnode) gint drange_node_get_start_offset(drange_node* drnode) { - g_assert(drnode->ending != UNINITIALIZED); + g_assert(drnode->ending != DRANGE_NODE_END_T_UNINITIALIZED); return drnode->start_offset; } gint drange_node_get_length(drange_node* drnode) { - g_assert(drnode->ending == LENGTH); + g_assert(drnode->ending == DRANGE_NODE_END_T_LENGTH); return drnode->length; } gint drange_node_get_end_offset(drange_node* drnode) { - g_assert(drnode->ending == OFFSET); + g_assert(drnode->ending == DRANGE_NODE_END_T_OFFSET); return drnode->end_offset; } drange_node_end_t drange_node_get_ending(drange_node* drnode) { - g_assert(drnode->ending != UNINITIALIZED); + g_assert(drnode->ending != DRANGE_NODE_END_T_UNINITIALIZED); return drnode->ending; } @@ -86,21 +86,21 @@ void drange_node_set_length(drange_node* drnode, gint length) { drnode->length = length; - drnode->ending = LENGTH; + drnode->ending = DRANGE_NODE_END_T_LENGTH; } void drange_node_set_end_offset(drange_node* drnode, gint offset) { drnode->end_offset = offset; - drnode->ending = OFFSET; + drnode->ending = DRANGE_NODE_END_T_OFFSET; } void drange_node_set_to_the_end(drange_node* drnode) { - drnode->ending = TO_THE_END; + drnode->ending = DRANGE_NODE_END_T_TO_THE_END; } /* drange constructor */ @@ -167,7 +167,7 @@ gint drange_get_max_start_offset(drange* dr) { return dr->max_start_offset; } static void update_drange_with_node(drange *dr, drange_node *drnode) { - if(drnode->ending == TO_THE_END){ + if(drnode->ending == DRANGE_NODE_END_T_TO_THE_END){ dr->has_total_length = FALSE; } else if(dr->has_total_length){ diff --git a/epan/dfilter/drange.h b/epan/dfilter/drange.h index e5d5be1f22..cededf01f4 100644 --- a/epan/dfilter/drange.h +++ b/epan/dfilter/drange.h @@ -37,10 +37,10 @@ */ typedef enum { - UNINITIALIZED, - LENGTH, - OFFSET, - TO_THE_END + DRANGE_NODE_END_T_UNINITIALIZED, + DRANGE_NODE_END_T_LENGTH, + DRANGE_NODE_END_T_OFFSET, + DRANGE_NODE_END_T_TO_THE_END } drange_node_end_t; typedef struct _drange_node { diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c index 5b083e5f2a..9d8032f5e9 100644 --- a/epan/dfilter/semcheck.c +++ b/epan/dfilter/semcheck.c @@ -363,7 +363,7 @@ check_drange_node_sanity(gpointer data, gpointer user_data) switch (drange_node_get_ending(drnode)) { - case LENGTH: + case DRANGE_NODE_END_T_LENGTH: length = drange_node_get_length(drnode); if (length <= 0) { if (!args->err) { @@ -379,7 +379,7 @@ check_drange_node_sanity(gpointer data, gpointer user_data) } break; - case OFFSET: + case DRANGE_NODE_END_T_OFFSET: /* * Make sure the start offset isn't beyond the end * offset. This applies to negative offsets too. @@ -405,10 +405,10 @@ check_drange_node_sanity(gpointer data, gpointer user_data) } break; - case TO_THE_END: + case DRANGE_NODE_END_T_TO_THE_END: break; - case UNINITIALIZED: + case DRANGE_NODE_END_T_UNINITIALIZED: default: g_assert_not_reached(); } diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c index 7697e78773..3df50e9d72 100644 --- a/epan/dissectors/packet-sna.c +++ b/epan/dissectors/packet-sna.c @@ -2565,7 +2565,7 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); /* SNA data should be printed in EBCDIC, not ASCII */ - pinfo->fd->flags.encoding = CHAR_EBCDIC; + pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; if (tree) { @@ -2600,7 +2600,7 @@ dissect_sna_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); /* SNA data should be printed in EBCDIC, not ASCII */ - pinfo->fd->flags.encoding = CHAR_EBCDIC; + pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; if (tree) { diff --git a/epan/dissectors/packet-tn3270.c b/epan/dissectors/packet-tn3270.c index 5c0fc8efdf..4290b9136d 100644 --- a/epan/dissectors/packet-tn3270.c +++ b/epan/dissectors/packet-tn3270.c @@ -3801,7 +3801,7 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "TN3270"); - pinfo->fd->flags.encoding = CHAR_EBCDIC; + pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; /* Do we have a conversation for this connection? */ conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, diff --git a/epan/frame_data.c b/epan/frame_data.c index 68b383df24..e0c631a1c9 100644 --- a/epan/frame_data.c +++ b/epan/frame_data.c @@ -203,7 +203,7 @@ frame_data_init(frame_data *fdata, guint32 num, fdata->abs_ts.secs = phdr->ts.secs; fdata->abs_ts.nsecs = phdr->ts.nsecs; fdata->flags.passed_dfilter = 0; - fdata->flags.encoding = CHAR_ASCII; + fdata->flags.encoding = PACKET_CHAR_ENC_CHAR_ASCII; fdata->flags.visited = 0; fdata->flags.marked = 0; fdata->flags.ref_time = 0; diff --git a/epan/ftypes/ftypes.c b/epan/ftypes/ftypes.c index 49b1a20f27..0cd51aa692 100644 --- a/epan/ftypes/ftypes.c +++ b/epan/ftypes/ftypes.c @@ -354,21 +354,21 @@ slice_func(gpointer data, gpointer user_data) /* Check the end type and set the length */ - if (ending == TO_THE_END) { + if (ending == DRANGE_NODE_END_T_TO_THE_END) { length = field_length - start_offset; if (length <= 0) { slice_data->slice_failure = TRUE; return; } } - else if (ending == LENGTH) { + else if (ending == DRANGE_NODE_END_T_LENGTH) { length = drange_node_get_length(drnode); if (start_offset + length > (int) field_length) { slice_data->slice_failure = TRUE; return; } } - else if (ending == OFFSET) { + else if (ending == DRANGE_NODE_END_T_OFFSET) { end_offset = drange_node_get_end_offset(drnode); if (end_offset < 0) { end_offset = field_length + end_offset; diff --git a/epan/packet.h b/epan/packet.h index 50b8f7965f..d68f80a976 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -79,9 +79,9 @@ typedef struct _packet_counts { /* Types of character encodings */ typedef enum { - CHAR_ASCII = 0, /* ASCII */ - CHAR_EBCDIC = 1 /* EBCDIC */ -} char_enc; + PACKET_CHAR_ENC_CHAR_ASCII = 0, /* ASCII */ + PACKET_CHAR_ENC_CHAR_EBCDIC = 1 /* EBCDIC */ +} packet_char_enc; extern void packet_init(void); extern void packet_cleanup(void); diff --git a/epan/to_str.c b/epan/to_str.c index dcd070eab2..88a7590984 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -403,7 +403,7 @@ abs_time_secs_to_str(time_t abs_time, gboolean show_as_utc) void display_signed_time(gchar *buf, int buflen, gint32 sec, gint32 frac, - time_res_t units) + to_str_time_res_t units) { /* If the fractional part of the time stamp is negative, print its absolute value and, if the seconds part isn't @@ -422,27 +422,27 @@ display_signed_time(gchar *buf, int buflen, gint32 sec, gint32 frac, } switch (units) { - case SECS: + case TO_STR_TIME_RES_T_SECS: g_snprintf(buf, buflen, "%d", sec); break; - case DSECS: + case TO_STR_TIME_RES_T_DSECS: g_snprintf(buf, buflen, "%d.%01d", sec, frac); break; - case CSECS: + case TO_STR_TIME_RES_T_CSECS: g_snprintf(buf, buflen, "%d.%02d", sec, frac); break; - case MSECS: + case TO_STR_TIME_RES_T_MSECS: g_snprintf(buf, buflen, "%d.%03d", sec, frac); break; - case USECS: + case TO_STR_TIME_RES_T_USECS: g_snprintf(buf, buflen, "%d.%06d", sec, frac); break; - case NSECS: + case TO_STR_TIME_RES_T_NSECS: g_snprintf(buf, buflen, "%d.%09d", sec, frac); break; } @@ -451,7 +451,7 @@ display_signed_time(gchar *buf, int buflen, gint32 sec, gint32 frac, void display_epoch_time(gchar *buf, int buflen, time_t sec, gint32 frac, - time_res_t units) + to_str_time_res_t units) { double elapsed_secs; @@ -476,27 +476,27 @@ display_epoch_time(gchar *buf, int buflen, time_t sec, gint32 frac, } switch (units) { - case SECS: + case TO_STR_TIME_RES_T_SECS: g_snprintf(buf, buflen, "%0.0f", elapsed_secs); break; - case DSECS: + case TO_STR_TIME_RES_T_DSECS: g_snprintf(buf, buflen, "%0.0f.%01d", elapsed_secs, frac); break; - case CSECS: + case TO_STR_TIME_RES_T_CSECS: g_snprintf(buf, buflen, "%0.0f.%02d", elapsed_secs, frac); break; - case MSECS: + case TO_STR_TIME_RES_T_MSECS: g_snprintf(buf, buflen, "%0.0f.%03d", elapsed_secs, frac); break; - case USECS: + case TO_STR_TIME_RES_T_USECS: g_snprintf(buf, buflen, "%0.0f.%06d", elapsed_secs, frac); break; - case NSECS: + case TO_STR_TIME_RES_T_NSECS: g_snprintf(buf, buflen, "%0.0f.%09d", elapsed_secs, frac); break; } @@ -555,7 +555,7 @@ rel_time_to_secs_str(nstime_t *rel_time) buf=ep_alloc(REL_TIME_SECS_LEN); display_signed_time(buf, REL_TIME_SECS_LEN, (gint32) rel_time->secs, - rel_time->nsecs, NSECS); + rel_time->nsecs, TO_STR_TIME_RES_T_NSECS); return buf; } diff --git a/epan/to_str.h b/epan/to_str.h index a606c620f3..a6c7c86ce0 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -38,13 +38,13 @@ * Resolution of a time stamp. */ typedef enum { - SECS, /* seconds */ - DSECS, /* deciseconds */ - CSECS, /* centiseconds */ - MSECS, /* milliseconds */ - USECS, /* microseconds */ - NSECS /* nanoseconds */ -} time_res_t; + 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, @@ -76,8 +76,8 @@ 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 void display_signed_time(gchar *, int, gint32, gint32, time_res_t); -extern void display_epoch_time(gchar *, int, time_t, gint32, time_res_t); +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); extern gchar* rel_time_to_str(nstime_t*); extern gchar* rel_time_to_secs_str(nstime_t*); diff --git a/gtk/main_proto_draw.c b/gtk/main_proto_draw.c index f7e0da7e73..6c2724ed0b 100644 --- a/gtk/main_proto_draw.c +++ b/gtk/main_proto_draw.c @@ -1333,10 +1333,10 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart, while (i < k) { if (i < len) { - if (encoding == CHAR_ASCII) { + if (encoding == PACKET_CHAR_ENC_CHAR_ASCII) { c = pd[i]; } - else if (encoding == CHAR_EBCDIC) { + else if (encoding == PACKET_CHAR_ENC_CHAR_EBCDIC) { c = EBCDIC_to_ASCII1(pd[i]); } else { diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c index 34093427f2..6dd71c84f6 100644 --- a/gtk/voip_calls_dlg.c +++ b/gtk/voip_calls_dlg.c @@ -135,8 +135,8 @@ static void add_to_clist(voip_calls_info_t* strinfo) g_snprintf(field[CALL_COL_START_TIME], 15, "%i.%03i", strinfo->start_sec, strinfo->start_usec/1000); g_snprintf(field[CALL_COL_STOP_TIME], 15, "%i.%03i", strinfo->stop_sec, strinfo->stop_usec/1000); -/* xxx display_signed_time(data[0], sizeof(field[CALL_COL_START_TIME]), strinfo->start_sec, strinfo->start_usec, USECS); */ -/* display_signed_time(data[1], sizeof(field[CALL_COL_STOP_TIME]), strinfo->stop_sec, strinfo->stop_usec, USECS); */ +/* xxx display_signed_time(data[0], sizeof(field[CALL_COL_START_TIME]), strinfo->start_sec, strinfo->start_usec, TO_STR_TIME_RES_T_USECS); */ +/* display_signed_time(data[1], sizeof(field[CALL_COL_STOP_TIME]), strinfo->stop_sec, strinfo->stop_usec, TO_STR_TIME_RES_T_USECS); */ g_snprintf(field[CALL_COL_INITIAL_SPEAKER], 30, "%s", get_addr_name(&(strinfo->initial_speaker))); g_snprintf(field[CALL_COL_FROM], 50, "%s", strinfo->from_identity); g_snprintf(field[CALL_COL_TO], 50, "%s", strinfo->to_identity); @@ -56,7 +56,7 @@ typedef struct { GSList *src_list; print_dissections_e print_dissections; gboolean print_hex_for_data; - char_enc encoding; + packet_char_enc encoding; epan_dissect_t *edt; } print_data; @@ -87,7 +87,7 @@ static void proto_tree_write_node_pdml(proto_node *node, gpointer data); static const guint8 *get_field_data(GSList *src_list, field_info *fi); static void write_pdml_field_hex_value(write_pdml_data *pdata, field_info *fi); static gboolean print_hex_data_buffer(print_stream_t *stream, const guchar *cp, - guint length, char_enc encoding); + guint length, packet_char_enc encoding); static void ps_clean_string(unsigned char *out, const unsigned char *in, int outbuf_size); static void print_escaped_xml(FILE *fh, const char *unescaped_string); @@ -845,7 +845,7 @@ print_hex_data(print_stream_t *stream, epan_dissect_t *edt) static gboolean print_hex_data_buffer(print_stream_t *stream, const guchar *cp, - guint length, char_enc encoding) + guint length, packet_char_enc encoding) { register unsigned int ad, i, j, k, l; guchar c; @@ -903,7 +903,7 @@ print_hex_data_buffer(print_stream_t *stream, const guchar *cp, line[j++] = binhex[c>>4]; line[j++] = binhex[c&0xf]; j++; - if (encoding == CHAR_EBCDIC) { + if (encoding == PACKET_CHAR_ENC_CHAR_EBCDIC) { c = EBCDIC_to_ASCII1(c); } line[k++] = c >= ' ' && c < 0x7f ? c : '.'; |