aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main_proto_draw.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-01-19 19:18:51 +0000
committerGuy Harris <guy@alum.mit.edu>2010-01-19 19:18:51 +0000
commit982cfc5410f9d3bcfaadb6cced9733d941b5e948 (patch)
tree88eea2eb94ca6cc1b744606682b8f4feb2bcb95e /gtk/main_proto_draw.c
parent4b8554fa3cc53c5696716eee7464723f2be3915c (diff)
From Jakub Zawadzki: get rid of redundant BYTE_VIEW_WIDTH and
BIT_VIEW_WIDTH definitions in favor of BYTES_PER_LINE and BITS_PER_LINE. While we're at it, move the definition of BYTE_VIEW_SEP down among the other definitions. svn path=/trunk/; revision=31570
Diffstat (limited to 'gtk/main_proto_draw.c')
-rw-r--r--gtk/main_proto_draw.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk/main_proto_draw.c b/gtk/main_proto_draw.c
index ae74607587..f7e0da7e73 100644
--- a/gtk/main_proto_draw.c
+++ b/gtk/main_proto_draw.c
@@ -79,11 +79,6 @@
#endif
-#define BYTE_VIEW_WIDTH 16
-#define BYTE_VIEW_SEP 8
-
-#define BIT_VIEW_WIDTH 8
-
#define E_BYTE_VIEW_TREE_PTR "byte_view_tree_ptr"
#define E_BYTE_VIEW_TREE_VIEW_PTR "byte_view_tree_view_ptr"
#define E_BYTE_VIEW_NDIGITS_KEY "byte_view_ndigits"
@@ -242,6 +237,7 @@ collapse_tree(GtkTreeView *tree_view, GtkTreeIter *iter,
#define MAX_OFFSET_LEN 8 /* max length of hex offset of bytes */
#define BYTES_PER_LINE 16 /* max byte values in a line */
#define BITS_PER_LINE 8 /* max bit values in a line */
+#define BYTE_VIEW_SEP 8 /* insert a space every BYTE_VIEW_SEP bytes */
#define HEX_DUMP_LEN (BYTES_PER_LINE*3 + 1)
/* max number of characters hex dump takes -
2 digits plus trailing blank
@@ -1247,10 +1243,10 @@ packet_hex_print_common(GtkWidget *bv, const guint8 *pd, int len, int bstart,
j = i;
switch (recent.gui_bytes_view) {
case BYTES_HEX:
- k = i + BYTE_VIEW_WIDTH;
+ k = i + BYTES_PER_LINE;
break;
case BYTES_BITS:
- k = i + BIT_VIEW_WIDTH;
+ k = i + BITS_PER_LINE;
break;
default:
g_assert_not_reached();