From b0cd60b9184904e581c2f19924a1c094eb4acd91 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 14 Nov 2013 13:06:32 +0000 Subject: [PATCH] - Reduced indentation of signals dissect view git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4399 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- common/utils/itti_analyzer/libparser/array_type.c | 4 ++-- common/utils/itti_analyzer/libparser/enum_type.c | 2 +- common/utils/itti_analyzer/libparser/field_type.c | 2 +- common/utils/itti_analyzer/libparser/reference_type.c | 2 +- common/utils/itti_analyzer/libparser/struct_type.c | 2 +- common/utils/itti_analyzer/libparser/types.h | 2 ++ common/utils/itti_analyzer/libparser/union_type.c | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/common/utils/itti_analyzer/libparser/array_type.c b/common/utils/itti_analyzer/libparser/array_type.c index 3d713dca02..2537839c55 100644 --- a/common/utils/itti_analyzer/libparser/array_type.c +++ b/common/utils/itti_analyzer/libparser/array_type.c @@ -51,13 +51,13 @@ int array_dissect_from_buffer( for (i = 0; i < (items - zero_counter); i++) type->child->type_dissect_from_buffer ( type->child, ui_set_signal_text_cb, user_data, buffer, parent_offset, - offset + i * type_child->size, type->name == NULL ? indent : indent + 4); + offset + i * type_child->size, type->name == NULL ? indent : indent + DISPLAY_TAB_SIZE); if (zero_counter > 0) { int length = 0; char cbuf[50]; - INDENTED_STRING(cbuf, type->name == NULL ? indent : indent + 4,); + INDENTED_STRING(cbuf, type->name == NULL ? indent : indent + DISPLAY_TAB_SIZE,); length = sprintf(cbuf, "[%d .. %d] ", i, items -1); diff --git a/common/utils/itti_analyzer/libparser/enum_type.c b/common/utils/itti_analyzer/libparser/enum_type.c index 063872dfa6..889d40a728 100644 --- a/common/utils/itti_analyzer/libparser/enum_type.c +++ b/common/utils/itti_analyzer/libparser/enum_type.c @@ -37,7 +37,7 @@ int enum_type_dissect_from_buffer( values->parent = type; values->type_dissect_from_buffer( values, ui_set_signal_text_cb, user_data, buffer, offset, parent_offset, - type->name == NULL ? indent: indent+4); + type->name == NULL ? indent: indent + DISPLAY_TAB_SIZE); break; } } diff --git a/common/utils/itti_analyzer/libparser/field_type.c b/common/utils/itti_analyzer/libparser/field_type.c index 225a75c8a2..44c7ae3d41 100644 --- a/common/utils/itti_analyzer/libparser/field_type.c +++ b/common/utils/itti_analyzer/libparser/field_type.c @@ -65,7 +65,7 @@ int field_dissect_from_buffer( if (type_child->type == TYPE_ARRAY || type_child->type == TYPE_STRUCT || type_child->type == TYPE_UNION) { DISPLAY_BRACE(ui_set_signal_text_cb(user_data, "{", 1);) ui_set_signal_text_cb(user_data, "\n", 1); - indent_child += 4; + indent_child += DISPLAY_TAB_SIZE; } if (type_child->type == TYPE_FUNDAMENTAL || type_child->type == TYPE_POINTER) { indent_child = 0; diff --git a/common/utils/itti_analyzer/libparser/reference_type.c b/common/utils/itti_analyzer/libparser/reference_type.c index dc485b1c9f..32e2f75c3e 100644 --- a/common/utils/itti_analyzer/libparser/reference_type.c +++ b/common/utils/itti_analyzer/libparser/reference_type.c @@ -18,7 +18,7 @@ int reference_dissect_from_buffer( if (type->child != NULL) type->child->type_dissect_from_buffer(type->child, ui_set_signal_text_cb, user_data, buffer, offset, parent_offset, - type->name == NULL ? indent: indent+4); + type->name == NULL ? indent: indent + DISPLAY_TAB_SIZE); if (type->name) { INDENTED(stdout, indent, fprintf(stdout, "\n", type->name)); } diff --git a/common/utils/itti_analyzer/libparser/struct_type.c b/common/utils/itti_analyzer/libparser/struct_type.c index 5ded6d914c..c4d6691828 100644 --- a/common/utils/itti_analyzer/libparser/struct_type.c +++ b/common/utils/itti_analyzer/libparser/struct_type.c @@ -35,7 +35,7 @@ int struct_dissect_from_buffer( type->members_child[i]->type_dissect_from_buffer ( type->members_child[i], ui_set_signal_text_cb, user_data, buffer, offset, parent_offset, - type->name == NULL ? indent : indent + 4); + type->name == NULL ? indent : indent + DISPLAY_TAB_SIZE); } DISPLAY_BRACE( diff --git a/common/utils/itti_analyzer/libparser/types.h b/common/utils/itti_analyzer/libparser/types.h index adb32fc9c4..bfd057b8e3 100644 --- a/common/utils/itti_analyzer/libparser/types.h +++ b/common/utils/itti_analyzer/libparser/types.h @@ -21,6 +21,8 @@ # define DISPLAY_TYPE(tYPE) #endif +#define DISPLAY_TAB_SIZE (2) + #if (ENABLE_DISPLAY_PARSE_INFO != 0) # define DISPLAY_PARSE_INFO(tYPE, nAME, oFFSET, pARENToFFSET) \ { \ diff --git a/common/utils/itti_analyzer/libparser/union_type.c b/common/utils/itti_analyzer/libparser/union_type.c index a37db03ad0..9de5cd4c3e 100644 --- a/common/utils/itti_analyzer/libparser/union_type.c +++ b/common/utils/itti_analyzer/libparser/union_type.c @@ -72,7 +72,7 @@ int union_dissect_from_buffer( if (type->members_child[union_child] != NULL) type->members_child[union_child]->type_dissect_from_buffer( type->members_child[union_child], ui_set_signal_text_cb, user_data, buffer, - offset, parent_offset, type->name == NULL ? indent : indent + 4); + offset, parent_offset, type->name == NULL ? indent : indent + DISPLAY_TAB_SIZE); if (type->name) { DISPLAY_TYPE("Uni");