diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-07-31 23:49:47 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-07-31 23:49:47 (GMT) |
commit | e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18 (patch) | |
tree | e3b6e42b691c6ddf7ef9714c132cb922ae28b096 /src/H5system.c | |
parent | 3146ddb5c2fc5e57b72eb2ecce697a7016f92b3a (diff) | |
download | hdf5-e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18.zip hdf5-e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18.tar.gz hdf5-e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18.tar.bz2 |
[svn-r23959] Bring revisions #23745 - 23862 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'src/H5system.c')
-rw-r--r-- | src/H5system.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/H5system.c b/src/H5system.c index a93a128..2a94028 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -189,7 +189,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) } /* Extra type modifiers */ - if(HDstrchr("ZHhlqLI", *s)) { + if(HDstrchr("zZHhlqLI", *s)) { switch(*s) { /*lint --e{506} Don't issue warnings about constant value booleans */ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ @@ -203,6 +203,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) break; case 'Z': + case 'z': if(sizeof(size_t) < sizeof(long)) modifier[0] = '\0'; else if(sizeof(size_t) == sizeof(long)) @@ -666,6 +667,30 @@ Wgetlogin() return NULL; } +int c99_snprintf(char* str, size_t size, const char* format, ...) +{ + int count; + va_list ap; + + va_start(ap, format); + count = c99_vsnprintf(str, size, format, ap); + va_end(ap); + + return count; +} + +int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) +{ + int count = -1; + + if (size != 0) + count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); + if (count == -1) + count = _vscprintf(format, ap); + + return count; +} + #endif |