summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-08-06 21:32:33 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-08-06 21:32:33 (GMT)
commitacd04a1aa67b182623f26979515ab8dd5b978f11 (patch)
tree7a65e24c03e9e2d7db021e6f89603f5bab458a78 /src/H5.c
parentde875442351b3ddd204b65d371536e63de6be8ff (diff)
downloadhdf5-acd04a1aa67b182623f26979515ab8dd5b978f11.zip
hdf5-acd04a1aa67b182623f26979515ab8dd5b978f11.tar.gz
hdf5-acd04a1aa67b182623f26979515ab8dd5b978f11.tar.bz2
[svn-r579] Changes since 19980806
---------------------- ./config/solaris2.5 Hopefully set up now so it honors the CC and CFLAGS variables and understands solaris cc flags. ./test/big.c Checks to see if creating lots of large sparse files exceeds the user disk quota and skips the test. It also checks that we can actually open ~64 files at once. ./doc/html/Files.html ./src/H5A.c ./src/H5Aprivate.h ./src/H5F.c ./src/H5Fpublic.h Added the H5Fflush() function which takes any object as an argument as long as the object is in some way associated with a file. This required an H5A_entof() ./src/H5.c ./src/H5Flow.c The `%a' format of HDfprintf() now allows a field width and justification flag etc, like the other formats. The old H5F_addr_print() was recoded to call HDfprintf() instead of vice versa.
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/H5.c b/src/H5.c
index 84e6018..94291c0 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -452,9 +452,7 @@ H5close (void)
* prints an `hsize_t' value as a hex number right justified and
* zero filled in an 18-character field.
*
- * The conversion `a' refers to an `haddr_t*' type. Field widths
- * and other flags are ignored and the address is printed by
- * calling H5F_addr_print().
+ * The conversion `a' refers to an `haddr_t*' type.
*
* Bugs: Return value will be incorrect if `%a' appears in the format
* string.
@@ -666,8 +664,32 @@ HDfprintf (FILE *stream, const char *fmt, ...)
case 'a':
if (1) {
haddr_t *x = va_arg (ap, haddr_t*);
- H5F_addr_print (stream, x);
- n = 0;
+ if (x && H5F_addr_defined(x)) {
+ sprintf(template, "%%%s%s%s%s%s",
+ leftjust?"-":"", plussign?"+":"",
+ ldspace?" ":"", prefix?"#":"",
+ zerofill?"0":"");
+ if (fwidth>0) {
+ sprintf(template+strlen(template), "%d", fwidth);
+ }
+ if (sizeof(x->offset)==SIZEOF_INT) {
+ strcat(template, "d");
+ } else if (sizeof(x->offset)==SIZEOF_LONG) {
+ strcat(template, "ld");
+ } else if (sizeof(x->offset)==SIZEOF_LONG_LONG) {
+ strcat(template, PRINTF_LL_WIDTH);
+ strcat(template, "d");
+ }
+ n = fprintf(stream, template, x->offset);
+ } else {
+ strcpy(template, "%");
+ if (leftjust) strcat(template, "-");
+ if (fwidth) {
+ sprintf(template+strlen(template), "%d", fwidth);
+ }
+ strcat(template, "s");
+ fprintf(stream, template, x?"UNDEF":"NULL");
+ }
}
break;