diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-06-19 18:59:24 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-06-19 18:59:24 (GMT) |
commit | 0b008afcb4db1afa4e7eddfd9f83f50c309305eb (patch) | |
tree | b05fe756356b94cd1acefc273b7f9b4a6272b8e3 /src/H5.c | |
parent | fd78a6021d4627eff17046e90126c1c665320bd1 (diff) | |
download | hdf5-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.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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') { |