Commit b0cd60b9 authored by Cedric Roux's avatar Cedric Roux
Browse files

- Reduced indentation of signals dissect view

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4399 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent ebba5542
...@@ -51,13 +51,13 @@ int array_dissect_from_buffer( ...@@ -51,13 +51,13 @@ int array_dissect_from_buffer(
for (i = 0; i < (items - zero_counter); i++) for (i = 0; i < (items - zero_counter); i++)
type->child->type_dissect_from_buffer ( type->child->type_dissect_from_buffer (
type->child, ui_set_signal_text_cb, user_data, buffer, parent_offset, 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) if (zero_counter > 0)
{ {
int length = 0; int length = 0;
char cbuf[50]; 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); length = sprintf(cbuf, "[%d .. %d] ", i, items -1);
......
...@@ -37,7 +37,7 @@ int enum_type_dissect_from_buffer( ...@@ -37,7 +37,7 @@ int enum_type_dissect_from_buffer(
values->parent = type; values->parent = type;
values->type_dissect_from_buffer( values->type_dissect_from_buffer(
values, ui_set_signal_text_cb, user_data, buffer, offset, parent_offset, 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; break;
} }
} }
......
...@@ -65,7 +65,7 @@ int field_dissect_from_buffer( ...@@ -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) { 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);) DISPLAY_BRACE(ui_set_signal_text_cb(user_data, "{", 1);)
ui_set_signal_text_cb(user_data, "\n", 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) { if (type_child->type == TYPE_FUNDAMENTAL || type_child->type == TYPE_POINTER) {
indent_child = 0; indent_child = 0;
......
...@@ -18,7 +18,7 @@ int reference_dissect_from_buffer( ...@@ -18,7 +18,7 @@ int reference_dissect_from_buffer(
if (type->child != NULL) if (type->child != NULL)
type->child->type_dissect_from_buffer(type->child, ui_set_signal_text_cb, type->child->type_dissect_from_buffer(type->child, ui_set_signal_text_cb,
user_data, buffer, offset, parent_offset, user_data, buffer, offset, parent_offset,
type->name == NULL ? indent: indent+4); type->name == NULL ? indent: indent + DISPLAY_TAB_SIZE);
if (type->name) { if (type->name) {
INDENTED(stdout, indent, fprintf(stdout, "</%s>\n", type->name)); INDENTED(stdout, indent, fprintf(stdout, "</%s>\n", type->name));
} }
......
...@@ -35,7 +35,7 @@ int struct_dissect_from_buffer( ...@@ -35,7 +35,7 @@ int struct_dissect_from_buffer(
type->members_child[i]->type_dissect_from_buffer ( type->members_child[i]->type_dissect_from_buffer (
type->members_child[i], ui_set_signal_text_cb, user_data, type->members_child[i], ui_set_signal_text_cb, user_data,
buffer, offset, parent_offset, buffer, offset, parent_offset,
type->name == NULL ? indent : indent + 4); type->name == NULL ? indent : indent + DISPLAY_TAB_SIZE);
} }
DISPLAY_BRACE( DISPLAY_BRACE(
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
# define DISPLAY_TYPE(tYPE) # define DISPLAY_TYPE(tYPE)
#endif #endif
#define DISPLAY_TAB_SIZE (2)
#if (ENABLE_DISPLAY_PARSE_INFO != 0) #if (ENABLE_DISPLAY_PARSE_INFO != 0)
# define DISPLAY_PARSE_INFO(tYPE, nAME, oFFSET, pARENToFFSET) \ # define DISPLAY_PARSE_INFO(tYPE, nAME, oFFSET, pARENToFFSET) \
{ \ { \
......
...@@ -72,7 +72,7 @@ int union_dissect_from_buffer( ...@@ -72,7 +72,7 @@ int union_dissect_from_buffer(
if (type->members_child[union_child] != NULL) if (type->members_child[union_child] != NULL)
type->members_child[union_child]->type_dissect_from_buffer( type->members_child[union_child]->type_dissect_from_buffer(
type->members_child[union_child], ui_set_signal_text_cb, user_data, 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) { if (type->name) {
DISPLAY_TYPE("Uni"); DISPLAY_TYPE("Uni");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment