diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1999-09-29 00:30:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1999-09-29 00:30:21 (GMT) |
commit | 4d5186a245fa6f86efbbb77a2b640b1369dd58f5 (patch) | |
tree | 38398a047a439c83c063a5c813e653f8eefb966b /src/H5FDmulti.c | |
parent | dd266011176b9003e38aa9ff55a6557a6e2e53c4 (diff) | |
download | hdf5-4d5186a245fa6f86efbbb77a2b640b1369dd58f5.zip hdf5-4d5186a245fa6f86efbbb77a2b640b1369dd58f5.tar.gz hdf5-4d5186a245fa6f86efbbb77a2b640b1369dd58f5.tar.bz2 |
[svn-r1689] Mainly adding support for "native" variable-length strings (C only currently),
but I fixed lots of misc. compiler warnings in other code and also tracked down
the memory overwrite bug that was causing the development branch to core dump
on most machines.
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 004e07e..b484812 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -27,8 +27,12 @@ #undef MIN #define MIN(X,Y) ((X)<(Y)?(X):(Y)) +#ifndef FALSE #define FALSE 0 +#endif +#ifndef TRUE #define TRUE 1 +#endif /* Loop through all mapped files */ #define UNIQUE_MEMBERS(MAP,LOOPVAR) { \ @@ -679,7 +683,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, p = buf + 8 + nseen*2*8; UNIQUE_MEMBERS(file->fa.memb_map, mt) { size_t n = strlen(file->fa.memb_name[mt]) + 1; - strcpy(p, file->fa.memb_name[mt]); + strcpy((char *)p, file->fa.memb_name[mt]); p += n; for (i=n; i%8; i++) *p++ = '\0'; } END_MEMBERS; @@ -761,8 +765,8 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /* Decode name templates */ UNIQUE_MEMBERS(map, mt) { - size_t n = strlen(buf)+1; - memb_name[_unmapped] = buf; + size_t n = strlen((char *)buf)+1; + memb_name[_unmapped] = (char *)buf; buf += (n+7) & ~0x0007; } END_MEMBERS; |