summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>2000-04-19 18:14:36 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>2000-04-19 18:14:36 (GMT)
commit395326672ca315c4c2fea30de233c3a412fb69d9 (patch)
tree56084046d058ce7420f2a80a3e2aebe5d4e8e45b /tools
parent173260ac41a9e674a09d7db039ae16f67ba5ae97 (diff)
downloadhdf5-395326672ca315c4c2fea30de233c3a412fb69d9.zip
hdf5-395326672ca315c4c2fea30de233c3a412fb69d9.tar.gz
hdf5-395326672ca315c4c2fea30de233c3a412fb69d9.tar.bz2
[svn-r2156] changed a comment that is no longer relevant and moved some code around in the dump_simple_prefix
funtion. all i did was take some code that was common to both the if and then conditions out.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5tools.c51
1 files changed, 18 insertions, 33 deletions
diff --git a/tools/h5tools.c b/tools/h5tools.c
index 97a06fa..9e3f620 100644
--- a/tools/h5tools.c
+++ b/tools/h5tools.c
@@ -1109,46 +1109,31 @@ h5dump_simple_prefix(FILE *stream, const h5dump_t *info,
/* Write new prefix to output */
if (ctx->indent_level >= 0) {
- if (0==elmtno && 0==secnum && info->line_1st) {
- fputs(h5dump_str_fmt(&prefix, 0, info->line_1st), stream);
- } else if (secnum && info->line_cont) {
- fputs(h5dump_str_fmt(&prefix, 0, info->line_cont),
- stream);
- } else {
- fputs(h5dump_str_fmt(&prefix, 0, info->line_pre), stream);
- }
- templength = h5dump_str_len(&prefix);
indentlevel = ctx->indent_level;
- for (i = 0; i < indentlevel; i++){
- fputs(h5dump_str_fmt(&prefix, 0, info->line_indent), stream);
- templength += h5dump_str_len(&prefix);
- }
} else {
/* this is because sometimes we dont print out all the header
* info for the data(like the tattr-2.ddl example. if that happens
* the ctx->indent_level a negative so we need to skip the above
- * and just print out 2 indent levels. maybe the 2 should be a value
- * of the ctx struct?? */
- if (0==elmtno && 0==secnum && info->line_1st) {
- fputs(h5dump_str_fmt(&prefix, 0, info->line_1st), stream);
- } else if (secnum && info->line_cont) {
- fputs(h5dump_str_fmt(&prefix, 0, info->line_cont),
- stream);
- } else {
- fputs(h5dump_str_fmt(&prefix, 0, info->line_pre), stream);
- }
- templength = h5dump_str_len(&prefix);
+ * and just print out the default indent levels. */
indentlevel = ctx->default_indent_level;
- for (i = 0; i < indentlevel; i++){
- fputs(h5dump_str_fmt(&prefix, 0, info->line_indent), stream);
- templength += h5dump_str_len(&prefix);
- }
- }
- /* for (i = 0; i < indentlevel; i++){
- fputs(h5dump_str_fmt(&prefix, 0, info->line_indent), stream);
- templength += h5dump_str_len(&prefix);
}
-*/
+
+ if (0==elmtno && 0==secnum && info->line_1st) {
+ fputs(h5dump_str_fmt(&prefix, 0, info->line_1st), stream);
+ } else if (secnum && info->line_cont) {
+ fputs(h5dump_str_fmt(&prefix, 0, info->line_cont),
+ stream);
+ } else {
+ fputs(h5dump_str_fmt(&prefix, 0, info->line_pre), stream);
+ }
+ templength = h5dump_str_len(&prefix);
+ for (i = 0; i < indentlevel; i++){
+ fputs(h5dump_str_fmt(&prefix, 0, info->line_indent), stream);
+ templength += h5dump_str_len(&prefix);
+ }
+
+
+
ctx->cur_column = ctx->prev_prefix_len = templength;
ctx->cur_elmt = 0;