aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-03-14 05:41:59 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-03-14 05:41:59 +0000
commit3ffdba25d190b7cef66f919c07c1dfe5a4a05164 (patch)
treeba63ca9a8c9187f4146328e651b41f87d02eed00 /print.c
parent68caa3a83467a799f462750238cef3a1f6733b98 (diff)
Boost the maximum amount of indentation put into text output.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4939 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'print.c')
-rw-r--r--print.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/print.c b/print.c
index 84432dd2cc..d36311a604 100644
--- a/print.c
+++ b/print.c
@@ -1,7 +1,7 @@
/* print.c
* Routines for printing packet analysis trees.
*
- * $Id: print.c,v 1.41 2002/02/18 01:08:38 guy Exp $
+ * $Id: print.c,v 1.42 2002/03/14 05:41:59 guy Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -145,6 +145,8 @@ get_field_data(GSList *src_list, field_info *fi)
return NULL; /* not found */
}
+#define MAX_INDENT 160
+
/* Print a tree's data, and any child nodes, in plain text */
static
void proto_tree_print_node_text(GNode *node, gpointer data)
@@ -153,7 +155,7 @@ void proto_tree_print_node_text(GNode *node, gpointer data)
print_data *pdata = (print_data*) data;
int i;
int num_spaces;
- char space[41];
+ char space[MAX_INDENT+1];
const guint8 *pd;
gchar label_str[ITEM_LABEL_LENGTH];
gchar *label_ptr;
@@ -173,14 +175,14 @@ void proto_tree_print_node_text(GNode *node, gpointer data)
/* Prepare the tabs for printing, depending on tree level */
num_spaces = pdata->level * 4;
- if (num_spaces > 40) {
- num_spaces = 40;
+ if (num_spaces > MAX_INDENT) {
+ num_spaces = MAX_INDENT;
}
for (i = 0; i < num_spaces; i++) {
space[i] = ' ';
}
/* The string is NUL-terminated */
- space[num_spaces] = 0;
+ space[num_spaces] = '\0';
/* Print the text */
fprintf(pdata->fh, "%s%s\n", space, label_ptr);