summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perform/pio_perf.c37
-rw-r--r--perform/sio_perf.c35
-rw-r--r--tools/h5copy/h5copy.c1
-rw-r--r--tools/h5diff/h5diff_main.c5
-rw-r--r--tools/h5dump/h5dump.c281
-rw-r--r--tools/h5dump/h5dump_ddl.c212
-rw-r--r--tools/h5dump/h5dump_defines.h10
-rw-r--r--tools/h5dump/h5dump_xml.c794
-rwxr-xr-xtools/h5import/h5import.c3
-rw-r--r--tools/h5jam/h5jam.c3
-rw-r--r--tools/h5repack/h5repack_main.c3
-rw-r--r--tools/h5stat/h5stat.c1
-rw-r--r--tools/lib/h5tools.c22
-rw-r--r--tools/lib/h5tools.h4
-rw-r--r--tools/lib/h5tools_dump.c6
-rw-r--r--tools/lib/h5tools_utils.c39
16 files changed, 783 insertions, 673 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 411fb12..9cbd65d 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -288,14 +288,14 @@ struct options {
unsigned interleaved; /* Interleaved vs. contiguous blocks */
unsigned collective; /* Collective vs. independent I/O */
unsigned dim2d; /* 1D vs. 2D geometry */
- int print_times; /* print times as well as throughputs */
- int print_raw; /* print raw data throughput info */
+ int print_times; /* print times as well as throughputs */
+ int print_raw; /* print raw data throughput info */
off_t h5_alignment; /* alignment in HDF5 file */
off_t h5_threshold; /* threshold for alignment in HDF5 file */
- int h5_use_chunks; /* Make HDF5 dataset chunked */
- int h5_write_only; /* Perform the write tests only */
+ int h5_use_chunks; /* Make HDF5 dataset chunked */
+ int h5_write_only; /* Perform the write tests only */
unsigned h5_use_mpi_posix; /* Use MPI-posix VFD for HDF5 I/O (instead of MPI-I/O VFD) */
- int verify; /* Verify data correctness */
+ int verify; /* Verify data correctness */
};
typedef struct _minmax {
@@ -339,6 +339,11 @@ main(int argc, char **argv)
int exit_value = EXIT_SUCCESS;
struct options *opts = NULL;
+#ifndef STANDALONE
+ /* Initialize h5tools lib */
+ h5tools_init();
+#endif
+
output = stdout;
/* initialize MPI and get the maximum num of processors we started with */
@@ -678,7 +683,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
/*
* Show various statistics
*/
- /* Write statistics */
+ /* Write statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw write" times */
@@ -744,7 +749,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
if (!parms.h5_write_only) {
- /* Read statistics */
+ /* Read statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw read" times */
@@ -1098,10 +1103,10 @@ print_indent(register int indent)
MPI_Comm_rank(pio_comm_g, &myrank);
if (myrank == 0) {
- indent *= TAB_SPACE;
+ indent *= TAB_SPACE;
- for (; indent > 0; --indent)
- fputc(' ', output);
+ for (; indent > 0; --indent)
+ fputc(' ', output);
}
}
@@ -1126,11 +1131,11 @@ static void
print_io_api(long io_types)
{
if (io_types & PIO_POSIX)
- HDfprintf(output, "posix ");
+ HDfprintf(output, "posix ");
if (io_types & PIO_MPI)
- HDfprintf(output, "mpiio ");
+ HDfprintf(output, "mpiio ");
if (io_types & PIO_HDF5)
- HDfprintf(output, "phdf5 ");
+ HDfprintf(output, "phdf5 ");
HDfprintf(output, "\n");
}
@@ -1139,7 +1144,7 @@ report_parameters(struct options *opts)
{
int rank = comm_world_rank_g;
- print_version("HDF5 Library"); /* print library version */
+ print_version("HDF5 Library"); /* print library version */
HDfprintf(output, "rank %d: ==== Parameters ====\n", rank);
HDfprintf(output, "rank %d: IO API=", rank);
@@ -1560,7 +1565,7 @@ parse_size_directive(const char *size)
* Return: Nothing
* Programmer: Bill Wendling, 31. October 2001
* Modifications:
- * Added 2D testing (Christian Chilan, 10. August 2005)
+ * Added 2D testing (Christian Chilan, 10. August 2005)
*/
static void
usage(const char *prog)
@@ -1570,7 +1575,7 @@ usage(const char *prog)
MPI_Comm_rank(pio_comm_g, &myrank);
if (myrank == 0) {
- print_version(prog);
+ print_version(prog);
printf("usage: %s [OPTIONS]\n", prog);
printf(" OPTIONS\n");
printf(" -h, --help Print a usage message and exit\n");
diff --git a/perform/sio_perf.c b/perform/sio_perf.c
index d852a45..8900e2e 100644
--- a/perform/sio_perf.c
+++ b/perform/sio_perf.c
@@ -295,15 +295,15 @@ struct options {
int buf_rank; /* Rank */
int order_rank; /* Rank */
int chk_rank; /* Rank */
- int print_times; /* print times as well as throughputs */
- int print_raw; /* print raw data throughput info */
+ int print_times; /* print times as well as throughputs */
+ int print_raw; /* print raw data throughput info */
off_t h5_alignment; /* alignment in HDF5 file */
off_t h5_threshold; /* threshold for alignment in HDF5 file */
- int h5_use_chunks; /* Make HDF5 dataset chunked */
- int h5_write_only; /* Perform the write tests only */
- int h5_extendable; /* Perform the write tests only */
+ int h5_use_chunks; /* Make HDF5 dataset chunked */
+ int h5_write_only; /* Perform the write tests only */
+ int h5_extendable; /* Perform the write tests only */
unsigned h5_use_mpi_posix; /* Use MPI-posix VFD for HDF5 I/O (instead of MPI-I/O VFD) */
- int verify; /* Verify data correctness */
+ int verify; /* Verify data correctness */
vfdtype vfd; /* File driver */
};
@@ -343,6 +343,11 @@ main(int argc, char **argv)
int exit_value = EXIT_SUCCESS;
struct options *opts = NULL;
+#ifndef STANDALONE
+ /* Initialize h5tools lib */
+ h5tools_init();
+#endif
+
output = stdout;
opts = parse_command_line(argc, argv);
@@ -553,7 +558,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
/*
* Show various statistics
*/
- /* Write statistics */
+ /* Write statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw write" times */
@@ -599,7 +604,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
output_results(opts,"Write Open-Close",write_gross_mm_table,parms.num_iters,raw_size);
if (!parms.h5_write_only) {
- /* Read statistics */
+ /* Read statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw read" times */
@@ -810,10 +815,10 @@ output_report(const char *fmt, ...)
static void
print_indent(register int indent)
{
- indent *= TAB_SPACE;
+ indent *= TAB_SPACE;
- for (; indent > 0; --indent)
- fputc(' ', output);
+ for (; indent > 0; --indent)
+ fputc(' ', output);
}
static void
@@ -837,9 +842,9 @@ static void
print_io_api(long io_types)
{
if (io_types & SIO_POSIX)
- HDfprintf(output, "posix ");
+ HDfprintf(output, "posix ");
if (io_types & SIO_HDF5)
- HDfprintf(output, "hdf5 ");
+ HDfprintf(output, "hdf5 ");
HDfprintf(output, "\n");
}
@@ -849,7 +854,7 @@ report_parameters(struct options *opts)
int i, rank;
rank = opts->dset_rank;
- print_version("HDF5 Library"); /* print library version */
+ print_version("HDF5 Library"); /* print library version */
HDfprintf(output, "==== Parameters ====\n");
HDfprintf(output, "IO API=");
@@ -1343,7 +1348,7 @@ parse_size_directive(const char *size)
static void
usage(const char *prog)
{
- print_version(prog);
+ print_version(prog);
printf("usage: %s [OPTIONS]\n", prog);
printf(" OPTIONS\n");
printf(" -h Print an usage message and exit\n");
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index 71bde66..1a9a8eb 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -219,6 +219,7 @@ main (int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+
/* initialize h5tools lib */
h5tools_init();
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index a014a9e..51a49c2 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -81,11 +81,14 @@ int main(int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+
+ /* Initialize h5tools lib */
+ h5tools_init();
+
/*-------------------------------------------------------------------------
* process the command-line
*-------------------------------------------------------------------------
*/
-
parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options);
/*-------------------------------------------------------------------------
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 90bbfec..73bfd13 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -230,35 +230,35 @@ leave(int ret)
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s [OPTIONS] file\n", prog);
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " -h, --help Print a usage message and exit\n");
- HDfprintf(stdout, " -n, --contents Print a list of the file contents and exit\n");
- HDfprintf(stdout, " -B, --superblock Print the content of the super block\n");
- HDfprintf(stdout, " -H, --header Print the header only; no data is displayed\n");
- HDfprintf(stdout, " -A, --onlyattr Print the header and value of attributes\n");
- HDfprintf(stdout, " -i, --object-ids Print the object ids\n");
- HDfprintf(stdout, " -r, --string Print 1-byte integer datasets as ASCII\n");
- HDfprintf(stdout, " -e, --escape Escape non printing characters\n");
- HDfprintf(stdout, " -V, --version Print version number and exit\n");
- HDfprintf(stdout, " -a P, --attribute=P Print the specified attribute\n");
- HDfprintf(stdout, " -d P, --dataset=P Print the specified dataset\n");
- HDfprintf(stdout, " -y, --noindex Do not print array indices with the data\n");
- HDfprintf(stdout, " -p, --properties Print dataset filters, storage layout and fill value\n");
- HDfprintf(stdout, " -f D, --filedriver=D Specify which driver to open the file with\n");
- HDfprintf(stdout, " -g P, --group=P Print the specified group and all members\n");
- HDfprintf(stdout, " -l P, --soft-link=P Print the value(s) of the specified soft link\n");
- HDfprintf(stdout, " -o F, --output=F Output raw data into file F\n");
- HDfprintf(stdout, " -b B, --binary=B Binary file output, of form B\n");
- HDfprintf(stdout, " -t P, --datatype=P Print the specified named datatype\n");
- HDfprintf(stdout, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n");
- HDfprintf(stdout, " sets the number of columns to the maximum (65535).\n");
- HDfprintf(stdout, " Default width is 80 columns.\n");
- HDfprintf(stdout, " -m T, --format=T Set the floating point output format\n");
- HDfprintf(stdout, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n");
- HDfprintf(stdout, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n");
- HDfprintf(stdout,
+ HDfflush(rawoutstream);
+ HDfprintf(rawoutstream, "usage: %s [OPTIONS] file\n", prog);
+ HDfprintf(rawoutstream, " OPTIONS\n");
+ HDfprintf(rawoutstream, " -h, --help Print a usage message and exit\n");
+ HDfprintf(rawoutstream, " -n, --contents Print a list of the file contents and exit\n");
+ HDfprintf(rawoutstream, " -B, --superblock Print the content of the super block\n");
+ HDfprintf(rawoutstream, " -H, --header Print the header only; no data is displayed\n");
+ HDfprintf(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n");
+ HDfprintf(rawoutstream, " -i, --object-ids Print the object ids\n");
+ HDfprintf(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n");
+ HDfprintf(rawoutstream, " -e, --escape Escape non printing characters\n");
+ HDfprintf(rawoutstream, " -V, --version Print version number and exit\n");
+ HDfprintf(rawoutstream, " -a P, --attribute=P Print the specified attribute\n");
+ HDfprintf(rawoutstream, " -d P, --dataset=P Print the specified dataset\n");
+ HDfprintf(rawoutstream, " -y, --noindex Do not print array indices with the data\n");
+ HDfprintf(rawoutstream, " -p, --properties Print dataset filters, storage layout and fill value\n");
+ HDfprintf(rawoutstream, " -f D, --filedriver=D Specify which driver to open the file with\n");
+ HDfprintf(rawoutstream, " -g P, --group=P Print the specified group and all members\n");
+ HDfprintf(rawoutstream, " -l P, --soft-link=P Print the value(s) of the specified soft link\n");
+ HDfprintf(rawoutstream, " -o F, --output=F Output raw data into file F\n");
+ HDfprintf(rawoutstream, " -b B, --binary=B Binary file output, of form B\n");
+ HDfprintf(rawoutstream, " -t P, --datatype=P Print the specified named datatype\n");
+ HDfprintf(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n");
+ HDfprintf(rawoutstream, " sets the number of columns to the maximum (65535).\n");
+ HDfprintf(rawoutstream, " Default width is 80 columns.\n");
+ HDfprintf(rawoutstream, " -m T, --format=T Set the floating point output format\n");
+ HDfprintf(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n");
+ HDfprintf(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n");
+ HDfprintf(rawoutstream,
" -M L, --packedbits=L Print packed bits as unsigned integers, using mask\n"
" format L for an integer dataset specified with\n"
" option -d. L is a list of offset,length values,\n"
@@ -266,69 +266,69 @@ usage(const char *prog)
" the data value and length is the number of bits of\n"
" the mask.\n"
);
- HDfprintf(stdout, " -R, --region Print dataset pointed by region references\n");
- HDfprintf(stdout, " -x, --xml Output in XML using Schema\n");
- HDfprintf(stdout, " -u, --use-dtd Output in XML using DTD\n");
- HDfprintf(stdout, " -D U, --xml-dtd=U Use the DTD or schema at U\n");
- HDfprintf(stdout, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n");
- HDfprintf(stdout, " \":\": no namespace, default: \"hdf5:\"\n");
- HDfprintf(stdout, " E.g., to dump a file called `-f', use h5dump -- -f\n");
- HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they\n");
- HDfprintf(stdout, " occur.\n");
- HDfprintf(stdout, " --no-compact-subset Disable compact form of subsetting and allow the use\n");
- HDfprintf(stdout, " of \"[\" in datset names.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " Subsetting is available by using the following options with a dataset\n");
- HDfprintf(stdout, " attribute. Subsetting is done by selecting a hyperslab from the data.\n");
- HDfprintf(stdout, " Thus, the options mirror those for performing a hyperslab selection.\n");
- HDfprintf(stdout, " One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.\n");
- HDfprintf(stdout, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n");
- HDfprintf(stdout, " each dimension. START is optional and will default to 0 in each dimension.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " -s START, --start=START Offset of start of subsetting selection\n");
- HDfprintf(stdout, " -S STRIDE, --stride=STRIDE Hyperslab stride\n");
- HDfprintf(stdout, " -c COUNT, --count=COUNT Number of blocks to include in selection\n");
- HDfprintf(stdout, " -k BLOCK, --block=BLOCK Size of block in hyperslab\n");
- HDfprintf(stdout, " START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the\n");
- HDfprintf(stdout, " number of dimensions in the dataspace being queried\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " D - is the file driver to use in opening the file. Acceptable values\n");
- HDfprintf(stdout, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n");
- HDfprintf(stdout, " the file driver flag, the file will be opened with each driver in\n");
- HDfprintf(stdout, " turn and in the order specified above until one driver succeeds\n");
- HDfprintf(stdout, " in opening the file.\n");
- HDfprintf(stdout, " F - is a filename.\n");
- HDfprintf(stdout, " P - is the full path from the root group to the object.\n");
- HDfprintf(stdout, " N - is an integer greater than 1.\n");
- HDfprintf(stdout, " T - is a string containing the floating point format, e.g '%%.3f'\n");
- HDfprintf(stdout, " U - is a URI reference (as defined in [IETF RFC 2396],\n");
- HDfprintf(stdout, " updated by [IETF RFC 2732])\n");
- HDfprintf(stdout, " B - is the form of binary output: NATIVE for a memory type, FILE for the\n");
- HDfprintf(stdout, " file type, LE or BE for pre-existing little or big endian types.\n");
- HDfprintf(stdout, " Must be used with -o (output file) and it is recommended that\n");
- HDfprintf(stdout, " -d (dataset) is used. B is an optional argument, defaults to NATIVE\n");
- HDfprintf(stdout, " Q - is the sort index type. It can be \"creation_order\" or \"name\" (default)\n");
- HDfprintf(stdout, " Z - is the sort order type. It can be \"descending\" or \"ascending\" (default)\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " Examples:\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " 1) Attribute foo of the group /bar_none in file quux.h5\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " h5dump -a /bar_none/foo quux.h5\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " 2) Selecting a subset from dataset /foo in file quux.h5\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " h5dump -d /foo -s \"0,1\" -S \"1,1\" -c \"2,3\" -k \"2,2\" quux.h5\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'\n");
- HDfprintf(stdout, " using a little-endian type\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " h5dump -d /dset -b LE -o out.bin quux.h5\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " h5dump -d /dset -M 0,1,4,3 quux.h5\n");
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, " -R, --region Print dataset pointed by region references\n");
+ HDfprintf(rawoutstream, " -x, --xml Output in XML using Schema\n");
+ HDfprintf(rawoutstream, " -u, --use-dtd Output in XML using DTD\n");
+ HDfprintf(rawoutstream, " -D U, --xml-dtd=U Use the DTD or schema at U\n");
+ HDfprintf(rawoutstream, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n");
+ HDfprintf(rawoutstream, " \":\": no namespace, default: \"hdf5:\"\n");
+ HDfprintf(rawoutstream, " E.g., to dump a file called `-f', use h5dump -- -f\n");
+ HDfprintf(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n");
+ HDfprintf(rawoutstream, " occur.\n");
+ HDfprintf(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n");
+ HDfprintf(rawoutstream, " of \"[\" in datset names.\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " Subsetting is available by using the following options with a dataset\n");
+ HDfprintf(rawoutstream, " attribute. Subsetting is done by selecting a hyperslab from the data.\n");
+ HDfprintf(rawoutstream, " Thus, the options mirror those for performing a hyperslab selection.\n");
+ HDfprintf(rawoutstream, " One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.\n");
+ HDfprintf(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n");
+ HDfprintf(rawoutstream, " each dimension. START is optional and will default to 0 in each dimension.\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " -s START, --start=START Offset of start of subsetting selection\n");
+ HDfprintf(rawoutstream, " -S STRIDE, --stride=STRIDE Hyperslab stride\n");
+ HDfprintf(rawoutstream, " -c COUNT, --count=COUNT Number of blocks to include in selection\n");
+ HDfprintf(rawoutstream, " -k BLOCK, --block=BLOCK Size of block in hyperslab\n");
+ HDfprintf(rawoutstream, " START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the\n");
+ HDfprintf(rawoutstream, " number of dimensions in the dataspace being queried\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " D - is the file driver to use in opening the file. Acceptable values\n");
+ HDfprintf(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n");
+ HDfprintf(rawoutstream, " the file driver flag, the file will be opened with each driver in\n");
+ HDfprintf(rawoutstream, " turn and in the order specified above until one driver succeeds\n");
+ HDfprintf(rawoutstream, " in opening the file.\n");
+ HDfprintf(rawoutstream, " F - is a filename.\n");
+ HDfprintf(rawoutstream, " P - is the full path from the root group to the object.\n");
+ HDfprintf(rawoutstream, " N - is an integer greater than 1.\n");
+ HDfprintf(rawoutstream, " T - is a string containing the floating point format, e.g '%%.3f'\n");
+ HDfprintf(rawoutstream, " U - is a URI reference (as defined in [IETF RFC 2396],\n");
+ HDfprintf(rawoutstream, " updated by [IETF RFC 2732])\n");
+ HDfprintf(rawoutstream, " B - is the form of binary output: NATIVE for a memory type, FILE for the\n");
+ HDfprintf(rawoutstream, " file type, LE or BE for pre-existing little or big endian types.\n");
+ HDfprintf(rawoutstream, " Must be used with -o (output file) and it is recommended that\n");
+ HDfprintf(rawoutstream, " -d (dataset) is used. B is an optional argument, defaults to NATIVE\n");
+ HDfprintf(rawoutstream, " Q - is the sort index type. It can be \"creation_order\" or \"name\" (default)\n");
+ HDfprintf(rawoutstream, " Z - is the sort order type. It can be \"descending\" or \"ascending\" (default)\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " Examples:\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " 1) Attribute foo of the group /bar_none in file quux.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " h5dump -a /bar_none/foo quux.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " 2) Selecting a subset from dataset /foo in file quux.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " h5dump -d /foo -s \"0,1\" -S \"1,1\" -c \"2,3\" -k \"2,2\" quux.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'\n");
+ HDfprintf(rawoutstream, " using a little-endian type\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " h5dump -d /dset -b LE -o out.bin quux.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " h5dump -d /dset -M 0,1,4,3 quux.h5\n");
+ HDfprintf(rawoutstream, "\n");
}
@@ -454,9 +454,8 @@ table_list_free(void)
table_list.nalloc = table_list.nused = 0;
} /* end table_list_free() */
-
/*-------------------------------------------------------------------------
- * Function: set_output_file
+ * Function: set_data_output_file
*
* Purpose: Open fname as the output file for dataset raw data.
* Set rawdatastream as its file stream.
@@ -472,7 +471,7 @@ table_list_free(void)
*-------------------------------------------------------------------------
*/
static int
-set_output_file(const char *fname, int is_bin)
+set_data_output_file(const char *fname, int is_bin)
{
FILE *f; /* temporary holding place for the stream pointer
* so that rawdatastream is changed only when succeeded */
@@ -502,6 +501,70 @@ set_output_file(const char *fname, int is_bin)
}
/*-------------------------------------------------------------------------
+ * Function: set_output_file
+ *
+ * Purpose: Open fname as the output file for raw output.
+ * Set rawoutstream as its file stream.
+ *
+ * Return: 0 -- succeeded
+ * negative -- failed
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+set_output_file(const char *fname)
+{
+ FILE *f; /* temporary holding place for the stream pointer
+ * so that rawoutstream is changed only when succeeded */
+
+ if (rawoutstream && rawoutstream != stdout) {
+ if (fclose(rawoutstream))
+ perror("closing rawoutstream");
+ else
+ rawoutstream = NULL;
+ }
+
+ if ((f = fopen(fname, "w")) != NULL) {
+ rawoutstream = f;
+ return 0;
+ }
+
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: set_error_file
+ *
+ * Purpose: Open fname as the error output file for dataset raw error.
+ * Set rawerrorstream as its file stream.
+ *
+ * Return: 0 -- succeeded
+ * negative -- failed
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+set_error_file(const char *fname)
+{
+ FILE *f; /* temporary holding place for the stream pointer
+ * so that rawerrorstream is changed only when succeeded */
+
+ if (rawerrorstream && rawerrorstream != stderr) {
+ if (fclose(rawerrorstream))
+ perror("closing rawerrorstream");
+ else
+ rawerrorstream = NULL;
+ }
+
+ if ((f = fopen(fname, "w")) != NULL) {
+ rawerrorstream = f;
+ return 0;
+ }
+
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
* Function: set_binary_form
*
* Purpose: set the binary form of output by translating from a string input
@@ -1031,13 +1094,13 @@ parse_start:
case 'o':
if ( bin_output ) {
- if (set_output_file(opt_arg, 1) < 0) {
+ if (set_data_output_file(opt_arg, 1) < 0) {
usage(h5tools_getprogname());
goto error;
}
}
else {
- if (set_output_file(opt_arg, 0) < 0) {
+ if (set_data_output_file(opt_arg, 0) < 0) {
usage(h5tools_getprogname());
goto error;
}
@@ -1058,7 +1121,7 @@ parse_start:
}
bin_output = TRUE;
if (outfname!=NULL) {
- if (set_output_file(outfname, 1) < 0) {
+ if (set_data_output_file(outfname, 1) < 0) {
/* failed to set output file */
usage(h5tools_getprogname());
goto error;
@@ -1448,12 +1511,12 @@ main(int argc, const char *argv[])
begin_obj(h5tools_dump_header_format->filebegin, fname, h5tools_dump_header_format->fileblockbegin);
}
else {
- HDfprintf(stdout, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ HDfprintf(rawoutstream, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
/* alternative first element, depending on schema or DTD. */
if (useschema) {
if (strcmp(xmlnsprefix,"") == 0) {
- HDfprintf(stdout, "<HDF5-File xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"%s\">\n",
+ HDfprintf(rawoutstream, "<HDF5-File xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"%s\">\n",
xml_dtd_uri);
}
else {
@@ -1465,7 +1528,7 @@ main(int argc, const char *argv[])
indx = strrchr(ns,(int)':');
if (indx) *indx = '\0';
- HDfprintf(stdout, "<%sHDF5-File xmlns:%s=\"http://hdfgroup.org/HDF5/XML/schema/HDF5-File\" "
+ HDfprintf(rawoutstream, "<%sHDF5-File xmlns:%s=\"http://hdfgroup.org/HDF5/XML/schema/HDF5-File\" "
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
"xsi:schemaLocation=\"http://hdfgroup.org/HDF5/XML/schema/HDF5-File "
"http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd\">\n",xmlnsprefix,ns);
@@ -1473,17 +1536,17 @@ main(int argc, const char *argv[])
}
}
else {
- HDfprintf(stdout, "<!DOCTYPE HDF5-File PUBLIC \"HDF5-File.dtd\" \"%s\">\n", xml_dtd_uri);
- HDfprintf(stdout, "<HDF5-File>\n");
+ HDfprintf(rawoutstream, "<!DOCTYPE HDF5-File PUBLIC \"HDF5-File.dtd\" \"%s\">\n", xml_dtd_uri);
+ HDfprintf(rawoutstream, "<HDF5-File>\n");
}
}
if (!doxml) {
if (display_fi) {
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
dump_fcontents(fid);
end_obj(h5tools_dump_header_format->fileend,h5tools_dump_header_format->fileblockend);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
goto done;
}
@@ -1502,7 +1565,7 @@ main(int argc, const char *argv[])
dump_function_table->dump_group_function(gid, "/" );
if (!doxml)
dump_indent -= COL;
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
}
if(H5Gclose(gid) < 0) {
@@ -1524,15 +1587,15 @@ main(int argc, const char *argv[])
hand[i].func(fid, hand[i].obj, hand[i].subset_info, 1, NULL);
}
}
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
}
if (!doxml) {
end_obj(h5tools_dump_header_format->fileend, h5tools_dump_header_format->fileblockend);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
}
else {
- HDfprintf(stdout, "</%sHDF5-File>\n", xmlnsprefix);
+ HDfprintf(rawoutstream, "</%sHDF5-File>\n", xmlnsprefix);
}
done:
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index 8117238..d00b9e8 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -49,7 +49,7 @@ dump_datatype(hid_t type)
ctx.cur_column = dump_indent;
h5dump_type_table = type_table;
- h5tools_dump_datatype(stdout, outputformat, &ctx, type);
+ h5tools_dump_datatype(rawoutstream, outputformat, &ctx, type);
h5dump_type_table = NULL;
}
@@ -77,7 +77,7 @@ dump_dataspace(hid_t space)
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
- h5tools_dump_dataspace(stdout, outputformat, &ctx, space);
+ h5tools_dump_dataspace(rawoutstream, outputformat, &ctx, space);
}
@@ -134,7 +134,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo
outputformat = &string_dataformat;
h5dump_type_table = type_table;
- h5tools_dump_attribute(stdout, outputformat, &ctx, oid, attr_name, attr_id, display_ai, display_char);
+ h5tools_dump_attribute(rawoutstream, outputformat, &ctx, oid, attr_name, attr_id, display_ai, display_char);
h5dump_type_table = NULL;
if(attr_id < 0) {
@@ -264,19 +264,19 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
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);
@@ -287,7 +287,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
}
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--;
@@ -298,14 +298,14 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
}
else if(found_obj->displayed) {
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);
ctx.indent_level++;
@@ -314,12 +314,12 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\"", HARDLINK, found_obj->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);
@@ -330,7 +330,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
}
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);
H5Dclose(obj);
goto done;
@@ -383,7 +383,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
h5tools_str_append(&buffer, "%s \"%s\" %s",
h5tools_dump_header_format->softlinkbegin, name,
h5tools_dump_header_format->softlinkblockbegin);
- 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++;
@@ -396,18 +396,18 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
/* print the value of a soft link */
/* Standard DDL: no modification */
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, "LINKTARGET \"%s\"", targbuf);
- 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);
@@ -418,7 +418,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
}
if(HDstrlen(h5tools_dump_header_format->softlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkend);
- 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(targbuf);
break;
@@ -428,14 +428,14 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
HDassert(targbuf);
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->extlinkbegin, name,
h5tools_dump_header_format->extlinkblockbegin);
- 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(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) {
indentation(dump_indent);
@@ -457,20 +457,20 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
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, "TARGETFILE \"%s\"", filename);
- 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, "TARGETPATH \"%s\"", targname);
- 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 the external link */
dump_extlink(group, name, targname);
@@ -478,7 +478,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
} /* end else */
} /* end 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);
@@ -489,35 +489,35 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
}
if(HDstrlen(h5tools_dump_header_format->extlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkend);
- 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(targbuf);
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, "%s \"%s\" %s",
h5tools_dump_header_format->udlinkbegin, name,
h5tools_dump_header_format->udlinkblockbegin);
- 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, "LINKCLASS %d", linfo->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.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);
if(HDstrlen(h5tools_dump_header_format->udlinkblockend)) {
@@ -527,7 +527,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
}
if(HDstrlen(h5tools_dump_header_format->udlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->udlinkend);
- 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;
} /* end switch */
@@ -618,7 +618,7 @@ dump_named_datatype(hid_t tid, const char *name)
h5tools_str_append(&buffer, "%s \"%s\" %s",
h5tools_dump_header_format->datatypebegin, name,
h5tools_dump_header_format->datatypeblockbegin);
- 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);
H5Oget_info(tid, &oinfo);
@@ -639,7 +639,7 @@ dump_named_datatype(hid_t tid, const char *name)
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\"", HARDLINK, found_obj->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);
goto done;
}
else
@@ -648,13 +648,13 @@ dump_named_datatype(hid_t tid, const char *name)
/* Render the element */
h5tools_str_reset(&buffer);
- h5tools_print_datatype(stdout, &buffer, outputformat, &ctx, tid, FALSE);
+ h5tools_print_datatype(rawoutstream, &buffer, outputformat, &ctx, tid, FALSE);
if(H5Tget_class(tid) != H5T_COMPOUND) {
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);
/* print attributes */
dump_indent += COL;
@@ -687,7 +687,7 @@ done:
}
if(HDstrlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeend);
- 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);
}
@@ -779,7 +779,7 @@ dump_group(hid_t gid, const char *name)
h5tools_str_append(&buffer, "%s \"%s\" %s",
h5tools_dump_header_format->groupbegin, name,
h5tools_dump_header_format->groupblockbegin);
- 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;
@@ -800,10 +800,10 @@ dump_group(hid_t gid, const char *name)
} /* end if */
if(display_oid) {
- h5tools_dump_oid(stdout, outputformat, &ctx, gid);
+ h5tools_dump_oid(rawoutstream, outputformat, &ctx, gid);
}
- h5tools_dump_comment(stdout, outputformat, &ctx, gid);
+ h5tools_dump_comment(rawoutstream, outputformat, &ctx, gid);
H5Oget_info(gid, &oinfo);
@@ -825,7 +825,7 @@ dump_group(hid_t gid, const char *name)
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\"", HARDLINK, found_obj->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);
}
else {
found_obj->displayed = TRUE;
@@ -882,7 +882,7 @@ dump_group(hid_t gid, const char *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);
@@ -893,7 +893,7 @@ dump_group(hid_t gid, const char *name)
}
if(HDstrlen(h5tools_dump_header_format->groupend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->groupend);
- 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);
}
@@ -962,36 +962,36 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
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);
- h5tools_dump_comment(stdout, outputformat, &ctx, did);
+ h5tools_dump_comment(rawoutstream, outputformat, &ctx, did);
dump_indent += COL;
ctx.indent_level++;
type = H5Dget_type(did);
h5dump_type_table = type_table;
- h5tools_dump_datatype(stdout, outputformat, &ctx, type);
+ h5tools_dump_datatype(rawoutstream, outputformat, &ctx, type);
h5dump_type_table = NULL;
space = H5Dget_space(did);
- h5tools_dump_dataspace(stdout, outputformat, &ctx, space);
+ h5tools_dump_dataspace(rawoutstream, outputformat, &ctx, space);
H5Sclose(space);
if(display_oid) {
- h5tools_dump_oid(stdout, outputformat, &ctx, did);
+ h5tools_dump_oid(rawoutstream, outputformat, &ctx, did);
}
if(display_dcpl) {
h5dump_type_table = type_table;
- h5tools_dump_dcpl(stdout, outputformat, &ctx, dcpl_id, type, did);
+ h5tools_dump_dcpl(rawoutstream, outputformat, &ctx, dcpl_id, type, did);
h5dump_type_table = NULL;
}
H5Pclose(dcpl_id);
@@ -1004,25 +1004,25 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
for(i=0; i<data_loop; i++) {
if(display_packed_bits) {
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);
packed_data_mask = packed_mask[i];
packed_data_offset = packed_offset[i];
packed_data_length = packed_length[i];
h5tools_print_packed_bits(&buffer, 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);
}
switch(H5Tget_class(type)) {
case H5T_TIME:
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, "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.indent_level--;
break;
@@ -1038,7 +1038,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
case H5T_VLEN:
case H5T_ARRAY:
{
- h5tools_dump_data(stdout, outputformat, &ctx, did, TRUE, sset, display_ai, display_char);
+ h5tools_dump_data(rawoutstream, outputformat, &ctx, did, TRUE, sset, display_ai, display_char);
}
break;
@@ -1069,7 +1069,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *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);
@@ -1080,7 +1080,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
}
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);
h5tools_str_close(&buffer);
}
@@ -1131,7 +1131,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
if(obj_data == DATASET_DATA)
print_dataset = TRUE;
- h5tools_dump_data(stdout, outputformat, &ctx, obj_id, print_dataset, sset, display_index, display_char);
+ h5tools_dump_data(rawoutstream, outputformat, &ctx, obj_id, print_dataset, sset, display_index, display_char);
}
@@ -1185,23 +1185,23 @@ dump_fcpl(hid_t fid)
* SUPER_BLOCK
*-------------------------------------------------------------------------
*/
- HDfprintf(stdout, "\n%s %s\n",SUPER_BLOCK, BEGIN);
+ HDfprintf(rawoutstream, "\n%s %s\n",SUPER_BLOCK, BEGIN);
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %u\n","SUPERBLOCK_VERSION", finfo.super.version);
+ HDfprintf(rawoutstream, "%s %u\n","SUPERBLOCK_VERSION", finfo.super.version);
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %u\n","FREELIST_VERSION", finfo.free.version);
+ HDfprintf(rawoutstream, "%s %u\n","FREELIST_VERSION", finfo.free.version);
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %u\n","SYMBOLTABLE_VERSION", 0); /* Retain this for backward compatibility, for now (QAK) */
+ HDfprintf(rawoutstream, "%s %u\n","SYMBOLTABLE_VERSION", 0); /* Retain this for backward compatibility, for now (QAK) */
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %u\n","OBJECTHEADER_VERSION", finfo.sohm.version);
+ HDfprintf(rawoutstream, "%s %u\n","OBJECTHEADER_VERSION", finfo.sohm.version);
indentation(dump_indent + COL);
- HDfprintf(stdout,"%s %Hd\n","OFFSET_SIZE", (long long)off_size);
+ HDfprintf(rawoutstream,"%s %Hd\n","OFFSET_SIZE", (long long)off_size);
indentation(dump_indent + COL);
- HDfprintf(stdout,"%s %Hd\n","LENGTH_SIZE", (long long)len_size);
+ HDfprintf(rawoutstream,"%s %Hd\n","LENGTH_SIZE", (long long)len_size);
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %u\n","BTREE_RANK", sym_ik);
+ HDfprintf(rawoutstream, "%s %u\n","BTREE_RANK", sym_ik);
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %d\n","BTREE_LEAF", sym_lk);
+ HDfprintf(rawoutstream, "%s %d\n","BTREE_LEAF", sym_lk);
#ifdef SHOW_FILE_DRIVER
if (H5FD_CORE==fdriver)
@@ -1232,37 +1232,37 @@ dump_fcpl(hid_t fid)
/* Take out this because the driver used can be different from the
* standard output. */
/*indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %s\n","FILE_DRIVER", dname);*/
+ HDfprintf(rawoutstream, "%s %s\n","FILE_DRIVER", dname);*/
#endif
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %u\n","ISTORE_K", istore_ik);
+ HDfprintf(rawoutstream, "%s %u\n","ISTORE_K", istore_ik);
indentation(dump_indent + COL);
if(fs_strategy == H5F_FILE_SPACE_ALL_PERSIST)
- HDfprintf(stdout, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_ALL_PERSIST");
+ HDfprintf(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_ALL_PERSIST");
else if(fs_strategy == H5F_FILE_SPACE_ALL)
- HDfprintf(stdout, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_ALL");
+ HDfprintf(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_ALL");
else if(fs_strategy == H5F_FILE_SPACE_AGGR_VFD)
- HDfprintf(stdout, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_AGGR_VFD");
+ HDfprintf(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_AGGR_VFD");
else if(fs_strategy == H5F_FILE_SPACE_VFD)
- HDfprintf(stdout, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_VFD");
+ HDfprintf(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_VFD");
else
- HDfprintf(stdout, "%s %s\n", "FILE_SPACE_STRATEGY", "Unknown strategy");
+ HDfprintf(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "Unknown strategy");
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s %Hu\n","FREE_SPACE_THRESHOLD", fs_threshold);
+ HDfprintf(rawoutstream, "%s %Hu\n","FREE_SPACE_THRESHOLD", fs_threshold);
/*-------------------------------------------------------------------------
* USER_BLOCK
*-------------------------------------------------------------------------
*/
indentation(dump_indent + COL);
- HDfprintf(stdout, "USER_BLOCK %s\n",BEGIN);
+ HDfprintf(rawoutstream, "USER_BLOCK %s\n",BEGIN);
indentation(dump_indent + COL + COL);
- HDfprintf(stdout,"%s %Hu\n","USERBLOCK_SIZE", userblock);
+ HDfprintf(rawoutstream,"%s %Hu\n","USERBLOCK_SIZE", userblock);
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s\n",END);
+ HDfprintf(rawoutstream, "%s\n",END);
- HDfprintf(stdout, "%s",END);
+ HDfprintf(rawoutstream, "%s",END);
}
/*-------------------------------------------------------------------------
@@ -1281,7 +1281,7 @@ dump_fcpl(hid_t fid)
void
dump_fcontents(hid_t fid)
{
- HDfprintf(stdout, "%s %s\n",FILE_CONTENTS, BEGIN);
+ HDfprintf(rawoutstream, "%s %s\n",FILE_CONTENTS, BEGIN);
/* special case of unamed types in root group */
if (unamedtype) {
@@ -1289,14 +1289,14 @@ dump_fcontents(hid_t fid)
for (u = 0; u < type_table->nobjs; u++) {
if (!type_table->objs[u].recorded)
- HDfprintf(stdout, " %-10s /#"H5_PRINTF_HADDR_FMT"\n", "datatype", type_table->objs[u].objno);
+ HDfprintf(rawoutstream, " %-10s /#"H5_PRINTF_HADDR_FMT"\n", "datatype", type_table->objs[u].objno);
}
}
/* print objects in the files */
h5trav_print(fid);
- HDfprintf(stdout, " %s\n",END);
+ HDfprintf(rawoutstream, " %s\n",END);
}
/*-------------------------------------------------------------------------
@@ -1380,19 +1380,19 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
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->attributebegin, attr,
h5tools_dump_header_format->attributeblockbegin);
- 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("unable to open object \"%s\"\n", obj_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);
if(HDstrlen(h5tools_dump_header_format->attributeblockend)) {
@@ -1402,7 +1402,7 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe
}
if(HDstrlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeend);
- 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);
@@ -1415,7 +1415,7 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe
attr_data_output = display_attr_data;
h5dump_type_table = type_table;
- h5tools_dump_attribute(stdout, outputformat, &ctx, oid, attr, attr_id, display_ai, display_char);
+ h5tools_dump_attribute(rawoutstream, outputformat, &ctx, oid, attr, attr_id, display_ai, display_char);
h5dump_type_table = NULL;
if(attr_id < 0) {
@@ -1474,9 +1474,9 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if((dsetid = H5Dopen2(fid, dset, H5P_DEFAULT)) < 0) {
if (pe) {
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
begin_obj(h5tools_dump_header_format->datasetbegin, real_name, h5tools_dump_header_format->datasetblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
error_msg("unable to open dataset \"%s\"\n", real_name);
end_obj(h5tools_dump_header_format->datasetend, h5tools_dump_header_format->datasetblockend);
@@ -1577,12 +1577,12 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if(found_obj) {
if (found_obj->displayed) {
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(dump_indent);
begin_obj(h5tools_dump_header_format->datasetbegin, real_name, h5tools_dump_header_format->datasetblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(dump_indent + COL);
- HDfprintf(stdout, "%s \"%s\"\n", HARDLINK, found_obj->objname);
+ HDfprintf(rawoutstream, "%s \"%s\"\n", HARDLINK, found_obj->objname);
indentation(dump_indent);
end_obj(h5tools_dump_header_format->datasetend, h5tools_dump_header_format->datasetblockend);
}
@@ -1634,9 +1634,9 @@ handle_groups(hid_t fid, const char *group, void UNUSED *data, int pe, const cha
if((gid = H5Gopen2(fid, group, H5P_DEFAULT)) < 0) {
if (pe) {
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
begin_obj(h5tools_dump_header_format->groupbegin, real_name, h5tools_dump_header_format->groupblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
error_msg("unable to open group \"%s\"\n", real_name);
end_obj(h5tools_dump_header_format->groupend, h5tools_dump_header_format->groupblockend);
@@ -1691,15 +1691,15 @@ handle_links(hid_t fid, const char *links, void UNUSED * data, int UNUSED pe, co
}
else {
char *buf = (char *)HDmalloc(linfo.u.val_size);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
switch(linfo.type) {
case H5L_TYPE_SOFT: /* Soft link */
begin_obj(h5tools_dump_header_format->softlinkbegin, links, h5tools_dump_header_format->softlinkblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
if(H5Lget_val(fid, links, buf, linfo.u.val_size, H5P_DEFAULT) >= 0)
- HDfprintf(stdout, "LINKTARGET \"%s\"\n", buf);
+ HDfprintf(rawoutstream, "LINKTARGET \"%s\"\n", buf);
else {
error_msg("h5dump error: unable to get link value for \"%s\"\n", links);
h5tools_setstatus(EXIT_FAILURE);
@@ -1709,21 +1709,21 @@ handle_links(hid_t fid, const char *links, void UNUSED * data, int UNUSED pe, co
case H5L_TYPE_EXTERNAL:
begin_obj(h5tools_dump_header_format->udlinkbegin, links, h5tools_dump_header_format->udlinkblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
begin_obj(h5tools_dump_header_format->extlinkbegin, links, h5tools_dump_header_format->extlinkblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
if(H5Lget_val(fid, links, buf, linfo.u.val_size, H5P_DEFAULT) >= 0) {
const char *elink_file;
const char *elink_path;
if(H5Lunpack_elink_val(buf, linfo.u.val_size, NULL, &elink_file, &elink_path)>=0) {
indentation(COL);
- HDfprintf(stdout, "LINKCLASS %d\n", linfo.type);
+ HDfprintf(rawoutstream, "LINKCLASS %d\n", linfo.type);
indentation(COL);
- HDfprintf(stdout, "TARGETFILE \"%s\"\n", elink_file);
+ HDfprintf(rawoutstream, "TARGETFILE \"%s\"\n", elink_file);
indentation(COL);
- HDfprintf(stdout, "TARGETPATH \"%s\"\n", elink_path);
+ HDfprintf(rawoutstream, "TARGETPATH \"%s\"\n", elink_path);
}
else {
error_msg("h5dump error: unable to unpack external link value for \"%s\"\n", links);
@@ -1739,12 +1739,12 @@ handle_links(hid_t fid, const char *links, void UNUSED * data, int UNUSED pe, co
default:
begin_obj(h5tools_dump_header_format->udlinkbegin, links, h5tools_dump_header_format->udlinkblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
begin_obj(h5tools_dump_header_format->udlinkbegin, links, h5tools_dump_header_format->udlinkblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
- HDfprintf(stdout, "LINKCLASS %d\n", linfo.type);
+ HDfprintf(rawoutstream, "LINKCLASS %d\n", linfo.type);
end_obj(h5tools_dump_header_format->udlinkend, h5tools_dump_header_format->udlinkblockend);
break;
} /* end switch */
@@ -1798,9 +1798,9 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe, const
if(idx == type_table->nobjs) {
if (pe) {
/* unknown type */
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
begin_obj(h5tools_dump_header_format->datatypebegin, real_name, h5tools_dump_header_format->datatypeblockbegin);
- HDfprintf(stdout, "\n");
+ HDfprintf(rawoutstream, "\n");
indentation(COL);
error_msg("unable to open datatype \"%s\"\n", real_name);
end_obj(h5tools_dump_header_format->datatypeend, h5tools_dump_header_format->datatypeblockend);
diff --git a/tools/h5dump/h5dump_defines.h b/tools/h5dump/h5dump_defines.h
index a801cac..4af5360 100644
--- a/tools/h5dump/h5dump_defines.h
+++ b/tools/h5dump/h5dump_defines.h
@@ -26,20 +26,20 @@
#define begin_obj(obj,name,begin) \
do { \
if (name) \
- HDfprintf(stdout, "%s \"%s\" %s", (obj), (name), (begin)); \
+ HDfprintf(rawoutstream, "%s \"%s\" %s", (obj), (name), (begin)); \
else \
- HDfprintf(stdout, "%s %s", (obj), (begin)); \
+ HDfprintf(rawoutstream, "%s %s", (obj), (begin)); \
} while(0);
#define end_obj(obj,end) \
do { \
if(HDstrlen(end)) { \
- HDfprintf(stdout, "%s", end); \
+ HDfprintf(rawoutstream, "%s", end); \
if(HDstrlen(obj)) \
- HDfprintf(stdout, " "); \
+ HDfprintf(rawoutstream, " "); \
} \
if(HDstrlen(obj)) \
- HDfprintf(stdout, "%s", obj); \
+ HDfprintf(rawoutstream, "%s", obj); \
} while(0);
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;
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index b80cfe3..89701bd 100755
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -53,6 +53,9 @@ int main(int argc, char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+ /* Initialize h5tools lib */
+ h5tools_init();
+
(void) HDsetvbuf(stderr, (char *) NULL, _IOLBF, 0);
(void) HDsetvbuf(stdout, (char *) NULL, _IOLBF, 0);
diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c
index 2bc3462..923bc5a 100644
--- a/tools/h5jam/h5jam.c
+++ b/tools/h5jam/h5jam.c
@@ -237,6 +237,9 @@ main (int argc, const char *argv[])
H5Eget_auto2(H5E_DEFAULT, &func, &edata);
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+ /* Initialize h5tools lib */
+ h5tools_init();
+
parse_command_line (argc, argv);
if (ub_file == NULL) {
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index f0094d5..15b57b0 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -106,6 +106,9 @@ int main(int argc, const char **argv)
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+ /* Initialize h5tools lib */
+ h5tools_init();
+
/* update hyperslab buffer size from H5TOOLS_BUFSIZE env if exist */
if ( h5tools_getenv_update_hyperslab_bufsize() < 0)
HDexit(EXIT_FAILURE);
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index 21f77f2..e206f4f 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -1631,6 +1631,7 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
+
if((hand = parse_command_line(argc, argv))==NULL) {
goto done;
}
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index ef32cde..30b8f33 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -40,6 +40,8 @@ hid_t H5E_tools_g = -1;
hid_t H5E_tools_min_id_g = -1;
int compound_data;
FILE *rawdatastream; /* should initialize to stdout but gcc moans about it */
+FILE *rawoutstream; /* should initialize to stdout but gcc moans about it */
+FILE *rawerrorstream; /* should initialize to stderr but gcc moans about it */
int bin_output; /* binary output */
int bin_form; /* binary form */
int region_output; /* region output */
@@ -117,6 +119,10 @@ h5tools_init(void)
if (!rawdatastream)
rawdatastream = stdout;
+ if (!rawoutstream)
+ rawoutstream = stdout;
+ if (!rawerrorstream)
+ rawerrorstream = stderr;
h5tools_dump_init();
@@ -150,6 +156,18 @@ h5tools_close(void)
else
rawdatastream = NULL;
}
+ if (rawoutstream && rawoutstream != stdout) {
+ if (fclose(rawoutstream))
+ perror("closing rawoutstream");
+ else
+ rawoutstream = NULL;
+ }
+ if (rawerrorstream && rawerrorstream != stderr) {
+ if (fclose(rawerrorstream))
+ perror("closing rawerrorstream");
+ else
+ rawerrorstream = NULL;
+ }
/* Clean up the reference path table, if it's been used */
term_ref_path_table();
@@ -1047,7 +1065,7 @@ init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
*-------------------------------------------------------------------------
*/
int
-do_bin_output(FILE *stream, hid_t container, hsize_t nelmts, hid_t tid, void *_mem)
+do_bin_output(FILE *stream, FILE *err_stream, hid_t container, hsize_t nelmts, hid_t tid, void *_mem)
{
HERR_INIT(int, SUCCEED)
unsigned char *mem = (unsigned char*)_mem;
@@ -1059,7 +1077,7 @@ do_bin_output(FILE *stream, hid_t container, hsize_t nelmts, hid_t tid, void *_m
for (i = 0; i < nelmts; i++) {
if (render_bin_output(stream, container, tid, mem + i * size) < 0) {
- printf("\nError in writing binary stream\n");
+ HDfprintf(err_stream,"\nError in writing binary stream\n");
return FAIL;
}
}
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index a8f43b3..0f4b271 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -525,6 +525,8 @@ H5TOOLS_DLLVAR int packed_data_offset; /* offset of packed bits to display
H5TOOLS_DLLVAR int packed_data_length; /* lengtht of packed bits to display */
H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */
H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */
+H5TOOLS_DLLVAR FILE *rawoutstream; /* output stream for raw output */
+H5TOOLS_DLLVAR FILE *rawerrorstream; /* output stream for raw error */
H5TOOLS_DLLVAR int bin_output; /* binary output */
H5TOOLS_DLLVAR int bin_form; /* binary form */
H5TOOLS_DLLVAR int region_output; /* region output */
@@ -558,7 +560,7 @@ H5TOOLS_DLL void h5tools_simple_prefix(FILE *stream, const h5tool_format_t *i
H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum);
-H5TOOLS_DLL int do_bin_output(FILE *stream, hid_t container, hsize_t nelmts, hid_t tid, void *_mem);
+H5TOOLS_DLL int do_bin_output(FILE *stream, FILE *err_stream, hid_t container, hsize_t nelmts, hid_t tid, void *_mem);
H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem);
H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
hid_t container, int ndims, hid_t type_id, hssize_t nblocks, hsize_t *ptdata);
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 98945aa..9657b50 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -297,7 +297,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
/* binary dump */
if (bin_output) {
- do_bin_output(rawdatastream, container, nelmts, type, _mem);
+ do_bin_output(rawdatastream, rawoutstream, container, nelmts, type, _mem);
} /* end if */
else {
/* setup */
@@ -1754,7 +1754,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tool_format_t info_dflt;
/* Use default values */
if (!stream)
- stream = stdout;
+ stream = rawoutstream;
if (!info) {
HDmemset(&info_dflt, 0, sizeof info_dflt);
@@ -1826,7 +1826,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
/* Use default values */
if (!stream)
- stream = stdout;
+ stream = rawoutstream;
if (!info) {
HDmemset(&info_dflt, 0, sizeof(info_dflt));
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index dbe1875..4505609 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "h5tools.h"
#include "h5tools_utils.h"
#include "H5private.h"
#include "h5trav.h"
@@ -115,7 +116,7 @@ void parallel_print(const char* format, ...)
overflow_file = HDtmpfile();
if(overflow_file == NULL)
- HDfprintf(stderr, "warning: could not create overflow file. Output may be truncated.\n");
+ HDfprintf(rawerrorstream, "warning: could not create overflow file. Output may be truncated.\n");
else
bytes_written = HDvfprintf(overflow_file, format, ap);
}
@@ -151,9 +152,10 @@ error_msg(const char *fmt, ...)
va_list ap;
HDva_start(ap, fmt);
- HDfflush(stdout);
- HDfprintf(stderr, "%s error: ", h5tools_getprogname());
- HDvfprintf(stderr, fmt, ap);
+ HDfflush(rawdatastream);
+ HDfflush(rawoutstream);
+ HDfprintf(rawerrorstream, "%s error: ", h5tools_getprogname());
+ HDvfprintf(rawerrorstream, fmt, ap);
HDva_end(ap);
}
@@ -180,9 +182,10 @@ warn_msg(const char *fmt, ...)
va_list ap;
HDva_start(ap, fmt);
- HDfflush(stdout);
- HDfprintf(stderr, "%s warning: ", h5tools_getprogname());
- HDvfprintf(stderr, fmt, ap);
+ HDfflush(rawdatastream);
+ HDfflush(rawoutstream);
+ HDfprintf(rawerrorstream, "%s warning: ", h5tools_getprogname());
+ HDvfprintf(rawerrorstream, fmt, ap);
HDva_end(ap);
}
@@ -266,7 +269,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
}
else if (l_opts[i].has_arg == require_arg) {
if (opt_err)
- HDfprintf(stderr,
+ HDfprintf(rawerrorstream,
"%s: option required for \"--%s\" flag\n",
argv[0], arg);
@@ -276,7 +279,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
else {
if (arg[len] == '=') {
if (opt_err)
- HDfprintf(stderr,
+ HDfprintf(rawerrorstream,
"%s: no option required for \"%s\" flag\n",
argv[0], arg);
@@ -291,7 +294,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (l_opts[i].name == NULL) {
/* exhausted all of the l_opts we have and still didn't match */
if (opt_err)
- HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
+ HDfprintf(rawerrorstream, "%s: unknown option \"%s\"\n", argv[0], arg);
opt_opt = '?';
}
@@ -307,7 +310,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (opt_opt == ':' || (cp = HDstrchr(opts, opt_opt)) == 0) {
if (opt_err)
- HDfprintf(stderr, "%s: unknown option \"%c\"\n",
+ HDfprintf(rawerrorstream, "%s: unknown option \"%c\"\n",
argv[0], opt_opt);
/* if no chars left in this token, move to next token */
@@ -326,7 +329,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
}
else if (++opt_ind >= argc) {
if (opt_err)
- HDfprintf(stderr,
+ HDfprintf(rawerrorstream,
"%s: value expected for option \"%c\"\n",
argv[0], opt_opt);
@@ -385,10 +388,10 @@ indentation(int x)
{
if (x < h5tools_nCols) {
while (x-- > 0)
- printf(" ");
+ HDfprintf(rawoutstream, " ");
}
else {
- HDfprintf(stderr, "error: the indentation exceeds the number of cols.\n");
+ HDfprintf(rawerrorstream, "error: the indentation exceeds the number of cols.\n");
HDexit(1);
}
}
@@ -411,7 +414,7 @@ indentation(int x)
void
print_version(const char *progname)
{
- printf("%s: Version %u.%u.%u%s%s\n",
+ HDfprintf(rawoutstream, "%s: Version %u.%u.%u%s%s\n",
progname, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
((char *)H5_VERS_SUBRELEASE)[0] ? "-" : "", H5_VERS_SUBRELEASE);
}
@@ -491,9 +494,9 @@ dump_table(char* tablename, table_t *table)
{
unsigned u;
- printf("%s: # of entries = %d\n", tablename,table->nobjs);
+ HDfprintf(rawoutstream,"%s: # of entries = %d\n", tablename,table->nobjs);
for (u = 0; u < table->nobjs; u++)
- HDfprintf(stdout,"%a %s %d %d\n", table->objs[u].objno,
+ HDfprintf(rawoutstream,"%a %s %d %d\n", table->objs[u].objno,
table->objs[u].objname,
table->objs[u].displayed, table->objs[u].recorded);
}
@@ -914,7 +917,7 @@ int h5tools_getenv_update_hyperslab_bufsize(void)
{
/* TODO: later when pubilshed
- printf("Error: Invalid environment variable \"H5TOOLS_BUFSIZE\" : %s\n", env_str);
+ HDfprintf(rawerrorstream,"Error: Invalid environment variable \"H5TOOLS_BUFSIZE\" : %s\n", env_str);
*/
goto error;