diff options
Diffstat (limited to 'tools/h5dump/h5dump_xml.c')
-rw-r--r-- | tools/h5dump/h5dump_xml.c | 794 |
1 files changed, 397 insertions, 397 deletions
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index 94e4d28..e6f8043 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -156,19 +156,19 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s \"%s\" %s", h5tools_dump_header_format->datasetbegin, name, h5tools_dump_header_format->datasetblockbegin); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -179,7 +179,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU } if(HDstrlen(h5tools_dump_header_format->datasetend)) h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; @@ -203,7 +203,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU xml_name_to_XID(prefix, parentxid, sizeof(parentxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -216,31 +216,31 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU t_obj_path, /* H5Path */ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); xml_name_to_XID(found_obj->objname, pointerxid, sizeof(pointerxid), 1); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDatasetPtr OBJ-XID=\"%s\" H5Path=\"%s\"/>", xmlnsprefix, pointerxid,t_objname); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataset>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_name); HDfree(t_obj_path); @@ -326,7 +326,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU if (res == 0) { /* target obj found */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -343,12 +343,12 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU targetxid, /* TargetObj */ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { /* dangling link -- omit from xml attributes */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -364,7 +364,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU t_targbuf, /* TargetPath */ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } HDfree(t_prefix); @@ -409,7 +409,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU xml_name_to_XID(prefix, parentxid, sizeof(parentxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -427,7 +427,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU targname, /* TargetPath*/ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_prefix); HDfree(t_name); @@ -452,7 +452,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU xml_name_to_XID(prefix, parentxid, sizeof(parentxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -468,7 +468,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNU linfo->type, /* LinkClass */ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_prefix); HDfree(t_name); @@ -828,38 +828,38 @@ xml_print_datatype(hid_t type, unsigned in_group) as it's name. */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDataTypePtr OBJ-XID=\"/%s\"/>", xmlnsprefix, dtxid); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { /* point to the NDT by name */ char *t_objname = xml_escape_the_name(found_obj->objname); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDataTypePtr OBJ-XID=\"%s\" H5Path=\"%s\"/>", xmlnsprefix, dtxid, t_objname); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_objname); } HDfree(dtxid); } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- h5dump error: unknown committed type. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_setstatus(EXIT_FAILURE); } } @@ -868,12 +868,12 @@ xml_print_datatype(hid_t type, unsigned in_group) switch (H5Tget_class(type)) { case H5T_INTEGER: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; /* <hdf5:IntegerType ByteOrder="bo" Sign="torf" Size="bytes"/> */ @@ -881,7 +881,7 @@ xml_print_datatype(hid_t type, unsigned in_group) sgn = H5Tget_sign(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -915,16 +915,16 @@ xml_print_datatype(hid_t type, unsigned in_group) sz = H5Tget_size(type); h5tools_str_append(&buffer, "%lu", (unsigned long)sz); h5tools_str_append(&buffer, "\" />"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_FLOAT: @@ -935,16 +935,16 @@ xml_print_datatype(hid_t type, unsigned in_group) ord = H5Tget_order(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -971,45 +971,45 @@ xml_print_datatype(hid_t type, unsigned in_group) h5tools_str_append(&buffer, "\" SignBitLocation=\"%lu\" ", (unsigned long)spos); h5tools_str_append(&buffer, "ExponentBits=\"%lu\" ExponentLocation=\"%lu\" ", (unsigned long)esize, (unsigned long)epos); h5tools_str_append(&buffer, "MantissaBits=\"%lu\" MantissaLocation=\"%lu\" />", (unsigned long)msize, (unsigned long)mpos); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_TIME: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sTimeType />",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_str_append(&buffer, "<!-- H5T_TIME: not yet implemented -->"); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_STRING: @@ -1020,17 +1020,17 @@ xml_print_datatype(hid_t type, unsigned in_group) is_vlstr = H5Tis_variable_str(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1057,16 +1057,16 @@ xml_print_datatype(hid_t type, unsigned in_group) else { h5tools_str_append(&buffer, "H5T_STR_ERROR\"/>"); } - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_BITFIELD: @@ -1074,16 +1074,16 @@ xml_print_datatype(hid_t type, unsigned in_group) ord = H5Tget_order(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1103,33 +1103,33 @@ xml_print_datatype(hid_t type, unsigned in_group) size = H5Tget_size(type); h5tools_str_append(&buffer, "\" Size=\"%lu\"/>", (unsigned long)size); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_OPAQUE: /* <hdf5:OpaqueType Tag="tag" Size="bytes" /> */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; mname = H5Tget_tag(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1137,16 +1137,16 @@ xml_print_datatype(hid_t type, unsigned in_group) HDfree(mname); size = H5Tget_size(type); h5tools_str_append(&buffer, "Size=\"%lu\"/>", (unsigned long)size); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_COMPOUND: @@ -1156,12 +1156,12 @@ xml_print_datatype(hid_t type, unsigned in_group) nmembers = H5Tget_nmembers(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sCompoundType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); /* List each member Field of the type */ /* <hdf5:Field FieldName="name" > */ @@ -1176,12 +1176,12 @@ xml_print_datatype(hid_t type, unsigned in_group) t_fname = xml_escape_the_name(mname); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sField FieldName=\"%s\">",xmlnsprefix, t_fname); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(mname); HDfree(t_fname); @@ -1189,12 +1189,12 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; xml_print_datatype(mtype,0); @@ -1202,80 +1202,80 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent -= COL; ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sField>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } dump_indent -= COL; ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sCompoundType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_REFERENCE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; /* Only Object references supported at this time */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sReferenceType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sObjectReferenceType />",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sReferenceType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_ENUM: @@ -1283,62 +1283,62 @@ xml_print_datatype(hid_t type, unsigned in_group) nmembs = H5Tget_nmembers(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent += COL; ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sEnumType Nelems=\"%d\">",xmlnsprefix, nmembs); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); xml_print_enum(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sEnumType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent -= COL; ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAtomicType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_VLEN: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sVLType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); super = H5Tget_super(type); dump_indent += COL; ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent += COL; ctx.indent_level++; xml_print_datatype(super,0); @@ -1346,22 +1346,22 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent -= COL; ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sVLType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); H5Tclose(super); break; @@ -1372,14 +1372,14 @@ xml_print_datatype(hid_t type, unsigned in_group) /* Print lead-in */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sArrayType Ndims=\"",xmlnsprefix); ndims = H5Tget_array_ndims(type); h5tools_str_append(&buffer, "%u\">", ndims); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); /* Get array information */ H5Tget_array_dims2(type, dims); @@ -1388,12 +1388,12 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; for (i = 0; i < ndims; i++) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sArrayDimension DimSize=\"%u\"/>", xmlnsprefix, (int) dims[i]); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.indent_level--; @@ -1401,12 +1401,12 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent += COL; ctx.indent_level++; xml_print_datatype(super,0); @@ -1414,34 +1414,34 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_indent -= COL; ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sArrayType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); /* Close array base type */ H5Tclose(super); break; default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- unknown datatype -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_setstatus(EXIT_FAILURE); break; } @@ -1521,48 +1521,48 @@ xml_dump_datatype(hid_t type) */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDataTypePtr OBJ-XID=\"%s\"/>", xmlnsprefix, dtxid); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { /* pointer to a named datatype already in XML */ char *t_objname = xml_escape_the_name(found_obj->objname); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDataTypePtr OBJ-XID=\"%s\" H5Path=\"%s\" />", xmlnsprefix, dtxid, t_objname); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_objname); } HDfree(dtxid); } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- h5dump error: unknown committed type. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; xml_print_datatype(type, 0); @@ -1570,12 +1570,12 @@ xml_dump_datatype(hid_t type) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataType>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.indent_level--; dump_indent -= COL; @@ -1638,12 +1638,12 @@ xml_dump_dataspace(hid_t space) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataspace>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; switch (space_type) { @@ -1651,12 +1651,12 @@ xml_dump_dataspace(hid_t space) /* scalar dataspace (just a tag, no XML attrs. defined */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sScalarDataspace />",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5S_SIMPLE: @@ -1664,56 +1664,56 @@ xml_dump_dataspace(hid_t space) /* <hdf5:SimpleDataspace Ndims="nd"> */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sSimpleDataspace Ndims=\"%d\">",xmlnsprefix, ndims); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); /* print the <hdf5:Dimension> elements */ ctx.indent_level++; for (i = 0; i < ndims; i++) { if (maxsize[i] == H5S_UNLIMITED) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" MaxDimSize=\"UNLIMITED\"/>", xmlnsprefix,size[i]); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else if (maxsize[i] == (hsize_t) 0) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" MaxDimSize=\"%" H5_PRINTF_LL_WIDTH "u\"/>", xmlnsprefix,size[i], size[i]); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" MaxDimSize=\"%" H5_PRINTF_LL_WIDTH "u\"/>", xmlnsprefix, size[i], maxsize[i]); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } } ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sSimpleDataspace>", xmlnsprefix ); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; #ifdef TMP @@ -1722,35 +1722,35 @@ xml_dump_dataspace(hid_t space) /* null dataspace (just a tag, no XML attrs. defined */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNullDataspace />",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; #endif /* TMP */ case H5S_NO_CLASS: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- unknown dataspace -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataspace>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; h5tools_str_close(&buffer); @@ -1821,22 +1821,22 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU outputformat = &string_dataformat; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; @@ -1857,7 +1857,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU datactx.need_prefix = TRUE; datactx.indent_level = ctx.indent_level; datactx.cur_column = ctx.cur_column; - status = h5tools_dump_dset(stdout, outputformat, &datactx, obj_id, -1, NULL); + status = h5tools_dump_dset(rawoutstream, outputformat, &datactx, obj_id, -1, NULL); } } else { @@ -1906,7 +1906,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU datactx.need_prefix = TRUE; datactx.indent_level = ctx.indent_level; datactx.cur_column = ctx.cur_column; - status = h5tools_dump_mem(stdout, outputformat, &datactx, obj_id, p_type, space, buf); + status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); } /* Reclaim any VL memory, if necessary */ if (vl_data) @@ -1923,12 +1923,12 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "Unable to print data."); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; @@ -1944,17 +1944,17 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_str_close(&buffer); } @@ -2013,12 +2013,12 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info, outputformat = &string_dataformat; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAttribute Name=\"%s\">", xmlnsprefix, t_aname); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_aname); if ((attr_id = H5Aopen(attr, attr_name, H5P_DEFAULT)) >= 0) { @@ -2049,44 +2049,44 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info, dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Time data not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<hdf5:Data>"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; @@ -2094,112 +2094,112 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info, case H5T_COMPOUND: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Note: format of compound data not specified -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL, 0); break; case H5T_REFERENCE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); if (!H5Tequal(type, H5T_STD_REF_OBJ)) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Note: Region references not supported -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); xml_print_refs(attr_id, ATTRIBUTE_DATA); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_VLEN: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Note: format of VL data not specified -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL, 0); break; default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Unknown datatype: %d -->", H5Tget_class(type)); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; } } @@ -2207,32 +2207,32 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info, /* The case of an attribute never yet written ?? * Or dataspace is H5S_NULL. */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.indent_level--; dump_indent -= COL; @@ -2242,12 +2242,12 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info, H5Aclose(attr_id); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAttribute>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_str_close(&buffer); return SUCCEED; @@ -2257,22 +2257,22 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info, ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- h5dump error: unable to open attribute. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sAttribute>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_str_close(&buffer); @@ -2357,7 +2357,7 @@ xml_dump_named_datatype(hid_t type, const char *name) */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2366,13 +2366,13 @@ xml_dump_named_datatype(hid_t type, const char *name) xmlnsprefix, name, dtxid, parentxid, HDstrcmp(prefix,"") ? t_prefix : "/"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { H5O_info_t oinfo; /* Object info */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2381,7 +2381,7 @@ xml_dump_named_datatype(hid_t type, const char *name) xmlnsprefix, t_name, dtxid, t_tmp, parentxid, (HDstrcmp(prefix, "") ? t_prefix : "/")); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); /* Check uniqueness of named datatype */ H5Oget_info(type, &oinfo); @@ -2409,22 +2409,22 @@ xml_dump_named_datatype(hid_t type, const char *name) xml_name_to_XID(found_obj->objname, pointerxid, sizeof(pointerxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDatatypePtr OBJ-XID=\"%s\" H5Path=\"%s\"/>", xmlnsprefix, pointerxid, t_objname); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sNamedDataType>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_objname); goto done; } @@ -2437,12 +2437,12 @@ xml_dump_named_datatype(hid_t type, const char *name) dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; @@ -2451,23 +2451,23 @@ xml_dump_named_datatype(hid_t type, const char *name) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sNamedDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); done: @@ -2607,13 +2607,13 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID("/", grpxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">", xmlnsprefix, grpxid, "/"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { t_objname = xml_escape_the_name(found_obj->objname); @@ -2622,7 +2622,7 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID(par, parentxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2630,7 +2630,7 @@ xml_dump_group(hid_t gid, const char *name) "Parents=\"%s\" H5ParentPaths=\"%s\">", xmlnsprefix,t_name, grpxid, get_next_xid(), t_objname, parentxid, par_name); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_objname); HDfree(par_name); @@ -2642,7 +2642,7 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID(par, parentxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2650,7 +2650,7 @@ xml_dump_group(hid_t gid, const char *name) "Parents=\"%s\" H5ParentPaths=\"%s\" />", xmlnsprefix, ptrstr, t_objname, parentxid, par_name); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; @@ -2666,13 +2666,13 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID("/", grpxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">", xmlnsprefix, grpxid, "/"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { char *t_tmp = xml_escape_the_name(tmp); @@ -2682,14 +2682,14 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID(par, parentxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" " "Parents=\"%s\" H5ParentPaths=\"%s\" >", xmlnsprefix,t_name, grpxid, t_tmp, parentxid, par_name); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_tmp); HDfree(par_name); @@ -2752,7 +2752,7 @@ xml_dump_group(hid_t gid, const char *name) char *parentxid = (char *)HDmalloc(100); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2773,7 +2773,7 @@ xml_dump_group(hid_t gid, const char *name) HDfree(t_tmp); HDfree(par_name); } - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_name); HDfree(grpxid); @@ -2825,7 +2825,7 @@ xml_dump_group(hid_t gid, const char *name) } ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2833,7 +2833,7 @@ xml_dump_group(hid_t gid, const char *name) h5tools_str_append(&buffer, "</%sRootGroup>", xmlnsprefix); else h5tools_str_append(&buffer, "</%sGroup>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_str_close(&buffer); @@ -2958,23 +2958,23 @@ xml_print_refs(hid_t did, int source) if (!path) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", "NULL"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { char *t_path = xml_escape_the_string(path, -1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", t_path); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_path); } ctx.indent_level--; @@ -3124,23 +3124,23 @@ xml_print_strs(hid_t did, int source) if (!onestring) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "NULL"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { char *t_onestring = xml_escape_the_string(onestring, (int) str_size); if (t_onestring) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", t_onestring); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_onestring); } } @@ -3235,7 +3235,7 @@ check_filters(hid_t dcpl) if (filter == H5Z_FILTER_DEFLATE) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3248,36 +3248,36 @@ check_filters(hid_t dcpl) h5tools_str_append(&buffer, "%d", cd_values[0]); } h5tools_str_append(&buffer, "\"/>"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } else if (filter == H5Z_FILTER_FLETCHER32) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sFletcher32 />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } else if (filter == H5Z_FILTER_SHUFFLE) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sShuffle />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } else if (filter == H5Z_FILTER_SZIP) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3318,7 +3318,7 @@ check_filters(hid_t dcpl) h5tools_str_append(&buffer, "Header=\"Raw\""); } h5tools_str_append(&buffer, "/>"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } else { @@ -3371,12 +3371,12 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; @@ -3389,126 +3389,126 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) const char * path = lookup_ref_path(*(hobj_ref_t *) buf); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); if (!path) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", "NULL"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { char *t_path = xml_escape_the_string(path, -1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", t_path); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_path); } ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else if (H5Tget_class(type) == H5T_STRING) { /* ????? */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- String fill values not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { /* all other data */ switch (H5Tget_class(type)) { case H5T_INTEGER: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%d\"", *(int *) buf); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_FLOAT: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%f\"", *(float *) buf); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_BITFIELD: case H5T_OPAQUE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); sz = H5Tget_size(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3518,126 +3518,126 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) buf = (char *) buf + sizeof(unsigned int); } h5tools_str_append(&buffer, "\""); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_ENUM: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); name = H5Tget_member_name(type, *(unsigned *) buf); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "\"%s\"", name); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_ARRAY: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Array fill values not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_TIME: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Time fill not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_COMPOUND: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Compound fill not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_VLEN: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- VL fill not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Unknown fill datatype: %d -->", H5Tget_class(type)); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; } } @@ -3646,12 +3646,12 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; @@ -3738,14 +3738,14 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) xml_name_to_XID(prefix, pstr, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataset Name=\"%s\" OBJ-XID=\"%s\" H5Path= \"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">", xmlnsprefix, t_name, rstr, t_tmp, pstr, strcmp(prefix, "") ? t_prefix : "/"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_name); HDfree(t_tmp); @@ -3769,24 +3769,24 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sStorageLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sChunkedLayout ", xmlnsprefix); ndims = H5Pget_chunk(dcpl, maxdims, chsize); h5tools_str_append(&buffer, "Ndims=\"%d\">", ndims); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; @@ -3794,21 +3794,21 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) for (i = 0; i < ndims; i++) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sChunkDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" />", xmlnsprefix, chsize[i]); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sRequiredFilter>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; @@ -3817,33 +3817,33 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sRequiredFilter>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sChunkedLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sStorageLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; HDfree(chsize); @@ -3852,60 +3852,60 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sStorageLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sContiguousLayout/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sStorageLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } else if (H5D_COMPACT == H5Pget_layout(dcpl)) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sStorageLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sCompactLayout/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sStorageLayout>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } /* and check for external.... ?? */ @@ -3916,7 +3916,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3957,30 +3957,30 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) } h5tools_str_append(&buffer, "\""); h5tools_str_append(&buffer, ">"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sFillValue>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); H5Pfill_value_defined(dcpl, &fvstatus); if (fvstatus == H5D_FILL_VALUE_UNDEFINED || (fvstatus == H5D_FILL_VALUE_DEFAULT && ft == H5D_FILL_TIME_IFSET)) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoFill/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } else { @@ -3988,23 +3988,23 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) } ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sFillValue>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sFillValueInfo>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; dump_indent -= COL; @@ -4052,48 +4052,48 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Time data not yet implemented. -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; break; case H5T_COMPOUND: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Note: format of compound data not specified -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; @@ -4104,68 +4104,68 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) case H5T_REFERENCE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); if (!H5Tequal(type, H5T_STD_REF_OBJ)) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Note: Region references not supported -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); xml_print_refs(did, DATASET_DATA); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataFromFile>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; case H5T_VLEN: ctx.indent_level--; dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Note: format of VL data not specified -->"); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; dump_indent += COL; @@ -4177,36 +4177,36 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) break; default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<!-- Unknown datatype: %d -->", H5Tget_class(type)); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); break; } } @@ -4215,30 +4215,30 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sData>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; } @@ -4247,12 +4247,12 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) H5Pclose(dcpl); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataset>", xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); h5tools_str_close(&buffer); } @@ -4316,22 +4316,22 @@ xml_print_enum(hid_t type) super = H5Tget_super(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); xml_print_datatype(super,0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sDataType>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); /* * Determine what datatype to use for the native values. To simplify @@ -4377,41 +4377,41 @@ xml_print_enum(hid_t type) char *t_name = xml_escape_the_name(name[i]); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sEnumElement>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", t_name); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); HDfree(t_name); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sEnumElement>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sEnumValue>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4429,16 +4429,16 @@ xml_print_enum(hid_t type) h5tools_str_append(&buffer,"%" H5_PRINTF_LL_WIDTH "d", *((long long *) ((void *) (value + i * dst_size)))); } - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(stdout, outputformat, &ctx, 0, 0); + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, 0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "</%sEnumValue>",xmlnsprefix); - h5tools_render_element(stdout, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, outputformat->line_ncols, 0, 0); } ctx.indent_level--; dump_indent -= COL; |