summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-06-19 18:59:24 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-06-19 18:59:24 (GMT)
commit0b008afcb4db1afa4e7eddfd9f83f50c309305eb (patch)
treeb05fe756356b94cd1acefc273b7f9b4a6272b8e3 /src/H5.c
parentfd78a6021d4627eff17046e90126c1c665320bd1 (diff)
downloadhdf5-0b008afcb4db1afa4e7eddfd9f83f50c309305eb.zip
hdf5-0b008afcb4db1afa4e7eddfd9f83f50c309305eb.tar.gz
hdf5-0b008afcb4db1afa4e7eddfd9f83f50c309305eb.tar.bz2
[svn-r4020] Purpose:
Bug Fix Description: On some platforms, long long is printed with the "ll" modifier. HDfprintf didn't handle this case. Solution: Added code which checks if there's an "ll" modifier on the template. If so, then it uses that as the modifier. Platforms tested: Kelgia and Dangermouse
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5.c b/src/H5.c
index 2c40405..ea2793a 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -752,7 +752,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
fmt += 2;
nout++;
} else if ('%'==fmt[0]) {
- s = fmt+1;
+ s = fmt + 1;
/* Flags */
while (HDstrchr ("-+ #", *s)) {
@@ -821,7 +821,14 @@ HDfprintf (FILE *stream, const char *fmt, ...)
HDstrcpy (modifier, PRINTF_LL_WIDTH);
}
break;
-
+ case 'l':
+ /* takes care of "long long (ll)" modifiers */
+ if (*(s + 1) == 'l') {
+ HDstrcpy(modifier, "ll");
+ s++;
+ break;
+ }
+ /* FALL THROUGH */
default:
/* Handle 'll' for long long types */
if(*s=='l' && *(s+1)=='l') {