summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-06-15 14:58:25 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-06-15 14:58:25 (GMT)
commit1c0597aa74e5b8f6e091e6739a5f606c1219cf21 (patch)
tree9b06a4467aaba87c95e6e56431d9f7922e59275e
parent7a659a4d50d937ad0553624b22f060ca1300682b (diff)
downloadhdf5-1c0597aa74e5b8f6e091e6739a5f606c1219cf21.zip
hdf5-1c0597aa74e5b8f6e091e6739a5f606c1219cf21.tar.gz
hdf5-1c0597aa74e5b8f6e091e6739a5f606c1219cf21.tar.bz2
[svn-r1347]
Changes since 19990614 ---------------------- ./src/H5D.c Changed the way the plist_id argument of H5Dvlen_reclaim() is checked so that it's more specific and works when debugging is turned off. ./src/H5TB.c Removed an unused local variable. ./test/fillval.c ./test/h5test.c ./test/h5test.h Changed `basename' variables to `base_name' to prevent a warning about a global with the same name. ./tools/h5ls.c Changed `indent' variables to `ind' to prevent a warning about a global with the same name. ./tools/h5toh4.c Commented out declarations for things that normally appear in system header files since our definitions might be incompatible with the system and prevent h5toh4 from compiling. If all looks good on other systems then we can permanently remove these declarations...
-rw-r--r--src/.distdep77
-rw-r--r--src/H5TB.c1
-rw-r--r--test/.distdep64
-rw-r--r--test/fillval.c12
-rw-r--r--test/h5test.c10
-rw-r--r--test/h5test.h2
-rw-r--r--tools/h5ls.c76
-rw-r--r--tools/h5toh4.c4
8 files changed, 193 insertions, 53 deletions
diff --git a/src/.distdep b/src/.distdep
index ff75d73..8bcc7a7 100644
--- a/src/.distdep
+++ b/src/.distdep
@@ -1299,3 +1299,80 @@ H5Z.lo: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
+H5D.lo: \
+ H5D.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5ACprivate.h \
+ H5ACpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Dprivate.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5HLprivate.h \
+ H5HLpublic.h \
+ H5MFprivate.h \
+ H5MFpublic.h \
+ H5MMprivate.h \
+ H5MMpublic.h \
+ H5Pprivate.h \
+ H5Ppublic.h \
+ H5TBprivate.h
+H5T.lo: \
+ H5T.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Dprivate.h \
+ H5Dpublic.h \
+ H5Ipublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Iprivate.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5MMprivate.h
+H5TB.lo: \
+ H5TB.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5Eprivate.h
diff --git a/src/H5TB.c b/src/H5TB.c
index 88103c6..0396524 100644
--- a/src/H5TB.c
+++ b/src/H5TB.c
@@ -366,7 +366,6 @@ done:
herr_t
H5TB_resize_buf(hid_t tbuf_id, hsize_t size, void **ptr)
{
- herr_t ret_value = FAIL;
H5TB_t *tbuf, /* Pointer to temporary buffer */
*curr; /* Pointer to temp. buffer node */
void * old_ptr; /* Pointer to the previous buffer */
diff --git a/test/.distdep b/test/.distdep
index ea4b857..59fb5c4 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -974,3 +974,67 @@ enum.lo: \
../src/H5Fprivate.h \
../src/H5Rprivate.h \
../src/H5Tprivate.h
+h5test.lo: \
+ h5test.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MFpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+fillval.lo: \
+ fillval.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MFpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
diff --git a/test/fillval.c b/test/fillval.c
index a4b0fd1..28fa576 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -168,7 +168,7 @@ test_getset(void)
*-------------------------------------------------------------------------
*/
static int
-test_create(hid_t fapl, const char *basename, H5D_layout_t layout)
+test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
hid_t file=-1, space=-1, dcpl=-1, dset1=-1, dset2=-1, dset3=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
@@ -188,7 +188,7 @@ test_create(hid_t fapl, const char *basename, H5D_layout_t layout)
* conversion paths: small to large, large to small, and no conversion.
* They depend on `short' being smaller than `long'.
*/
- h5_fixname(basename, fapl, filename, sizeof filename);
+ h5_fixname(base_name, fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if ((space=H5Screate_simple(5, cur_size, cur_size))<0) goto error;
@@ -311,7 +311,7 @@ test_create(hid_t fapl, const char *basename, H5D_layout_t layout)
*-------------------------------------------------------------------------
*/
static int
-test_rdwr(hid_t fapl, const char *basename, H5D_layout_t layout)
+test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
hid_t file=-1, fspace=-1, mspace=-1, dcpl=-1, dset=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
@@ -335,7 +335,7 @@ test_rdwr(hid_t fapl, const char *basename, H5D_layout_t layout)
}
/* Create a file and dataset */
- h5_fixname(basename, fapl, filename, sizeof filename);
+ h5_fixname(base_name, fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if ((fspace=H5Screate_simple(5, cur_size, cur_size))<0) goto error;
@@ -454,7 +454,7 @@ test_rdwr(hid_t fapl, const char *basename, H5D_layout_t layout)
*-------------------------------------------------------------------------
*/
static int
-test_extend(hid_t fapl, const char *basename, H5D_layout_t layout)
+test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
hid_t file=-1, fspace=-1, mspace=-1, dcpl=-1, dset=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
@@ -539,7 +539,7 @@ test_extend(hid_t fapl, const char *basename, H5D_layout_t layout)
#endif
/* Create a file and dataset */
- h5_fixname(basename, fapl, filename, sizeof filename);
+ h5_fixname(base_name, fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
if ((fspace=H5Screate_simple(5, cur_size, max_size))<0) goto error;
diff --git a/test/h5test.c b/test/h5test.c
index 861b0f0..09b2f06 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -185,12 +185,12 @@ h5_reset(void)
*-------------------------------------------------------------------------
*/
char *
-h5_fixname(const char *basename, hid_t fapl, char *fullname, size_t size)
+h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
const char *prefix=NULL, *suffix=NULL;
H5F_driver_t driver;
- if (!basename || !fullname || size<1) return NULL;
+ if (!base_name || !fullname || size<1) return NULL;
/* First use the environment variable, then try the constant */
prefix = getenv("HDF5_PREFIX");
@@ -200,13 +200,13 @@ h5_fixname(const char *basename, hid_t fapl, char *fullname, size_t size)
/* Prepend the prefix value to the base name */
if (prefix && *prefix) {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, basename)==(int)size) {
+ if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name)==(int)size) {
return NULL; /*buffer is too small*/
}
- } else if (strlen(basename)>=size) {
+ } else if (strlen(base_name)>=size) {
return NULL; /*buffer is too small*/
} else {
- strcpy(fullname, basename);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
diff --git a/test/h5test.h b/test/h5test.h
index a5b81da..98f6060 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -56,7 +56,7 @@ extern "C" {
int h5_cleanup(hid_t fapl);
herr_t h5_errors(void *client_data);
-char *h5_fixname(const char *basename, hid_t fapl, char *fullname,
+char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
size_t size);
hid_t h5_fileaccess(void);
void h5_no_hwconv(void);
diff --git a/tools/h5ls.c b/tools/h5ls.c
index f525136..be46c14 100644
--- a/tools/h5ls.c
+++ b/tools/h5ls.c
@@ -66,7 +66,7 @@ static struct dispatch_t {
}
static herr_t list (hid_t group, const char *name, void *cd);
-static void display_type(hid_t type, int indent);
+static void display_type(hid_t type, int ind);
static char *fix_name(const char *path, const char *base);
@@ -284,7 +284,7 @@ display_string(FILE *stream, const char *s, hbool_t escape_spaces)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_native_type(hid_t type, int UNUSED indent)
+display_native_type(hid_t type, int UNUSED ind)
{
if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
printf("native signed char");
@@ -400,7 +400,7 @@ display_native_type(hid_t type, int UNUSED indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_ieee_type(hid_t type, int UNUSED indent)
+display_ieee_type(hid_t type, int UNUSED ind)
{
if (H5Tequal(type, H5T_IEEE_F32BE)) {
printf("IEEE 32-bit big-endian float");
@@ -434,7 +434,7 @@ display_ieee_type(hid_t type, int UNUSED indent)
*-------------------------------------------------------------------------
*/
static void
-display_precision(hid_t type, int indent)
+display_precision(hid_t type, int ind)
{
size_t prec; /*precision */
H5T_pad_t plsb, pmsb; /*lsb and msb padding */
@@ -449,7 +449,7 @@ display_precision(hid_t type, int indent)
*/
if (8*H5Tget_size(type)!=(prec=H5Tget_precision(type))) {
printf("\n%*s(%lu bit%s of precision beginning at bit %lu)",
- indent, "", (unsigned long)prec, 1==prec?"":"s",
+ ind, "", (unsigned long)prec, 1==prec?"":"s",
(unsigned long)H5Tget_offset(type));
H5Tget_pad(type, &plsb, &pmsb);
@@ -488,7 +488,7 @@ display_precision(hid_t type, int indent)
}
}
if (plsb_s || pmsb_s) {
- printf("\n%*s(", indent, "");
+ printf("\n%*s(", ind, "");
if (plsb_s) {
nbits = H5Tget_offset(type);
printf("%lu %s bit%s at bit 0",
@@ -527,7 +527,7 @@ display_precision(hid_t type, int indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_int_type(hid_t type, int indent)
+display_int_type(hid_t type, int ind)
{
H5T_order_t order; /*byte order value */
const char *order_s=NULL; /*byte order string */
@@ -571,7 +571,7 @@ display_int_type(hid_t type, int indent)
*/
printf("%lu-bit%s%s integer",
(unsigned long)(8*H5Tget_size(type)), order_s, sign_s);
- display_precision(type, indent);
+ display_precision(type, ind);
return TRUE;
}
@@ -593,7 +593,7 @@ display_int_type(hid_t type, int indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_float_type(hid_t type, int indent)
+display_float_type(hid_t type, int ind)
{
H5T_order_t order; /*byte order value */
const char *order_s=NULL; /*byte order string */
@@ -630,7 +630,7 @@ display_float_type(hid_t type, int indent)
*/
printf("%lu-bit%s floating-point",
(unsigned long)(8*H5Tget_size(type)), order_s);
- display_precision(type, indent);
+ display_precision(type, ind);
/* Print sizes, locations, and other information about each field */
H5Tget_fields (type, &spos, &epos, &esize, &mpos, &msize);
@@ -650,13 +650,13 @@ display_float_type(hid_t type, int indent)
norm_s = ", unknown normalization";
break;
}
- printf("\n%*s(significant for %lu bit%s at bit %lu%s)", indent, "",
+ printf("\n%*s(significant for %lu bit%s at bit %lu%s)", ind, "",
(unsigned long)msize, 1==msize?"":"s", (unsigned long)mpos,
norm_s);
printf("\n%*s(exponent for %lu bit%s at bit %lu, bias is 0x%lx)",
- indent, "", (unsigned long)esize, 1==esize?"":"s",
+ ind, "", (unsigned long)esize, 1==esize?"":"s",
(unsigned long)epos, (unsigned long)ebias);
- printf("\n%*s(sign bit at %lu)", indent, "", (unsigned long)spos);
+ printf("\n%*s(sign bit at %lu)", ind, "", (unsigned long)spos);
/* Display internal padding */
if (1+esize+msize<H5Tget_precision(type)) {
@@ -676,7 +676,7 @@ display_float_type(hid_t type, int indent)
pad_s = "unknown";
break;
}
- printf("\n%*s(internal padding bits are %s)", indent, "", pad_s);
+ printf("\n%*s(internal padding bits are %s)", ind, "", pad_s);
}
return TRUE;
}
@@ -699,7 +699,7 @@ display_float_type(hid_t type, int indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_cmpd_type(hid_t type, int indent)
+display_cmpd_type(hid_t type, int ind)
{
char *name=NULL; /*member name */
int ndims; /*dimensionality */
@@ -716,7 +716,7 @@ display_cmpd_type(hid_t type, int indent)
/* Name and offset */
name = H5Tget_member_name(type, i);
- printf("\n%*s\"", indent+4, "");
+ printf("\n%*s\"", ind+4, "");
n = display_string(stdout, name, FALSE);
printf("\"%*s +%-4lu ", MAX(0, 16-n), "",
(unsigned long)H5Tget_member_offset(type, i));
@@ -745,12 +745,12 @@ display_cmpd_type(hid_t type, int indent)
/* Data type */
subtype = H5Tget_member_type(type, i);
- display_type(subtype, indent+4);
+ display_type(subtype, ind+4);
H5Tclose(subtype);
}
size = H5Tget_size(type);
printf("\n%*s} %lu byte%s",
- indent, "", (unsigned long)size, 1==size?"":"s");
+ ind, "", (unsigned long)size, 1==size?"":"s");
return TRUE;
}
@@ -772,7 +772,7 @@ display_cmpd_type(hid_t type, int indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_enum_type(hid_t type, int indent)
+display_enum_type(hid_t type, int ind)
{
char **name=NULL; /*member names */
unsigned char *value=NULL; /*value array */
@@ -788,7 +788,7 @@ display_enum_type(hid_t type, int indent)
nmembs = H5Tget_nmembers(type);
super = H5Tget_super(type);
printf("enum ");
- display_type(super, indent+4);
+ display_type(super, ind+4);
printf(" {");
/*
@@ -825,7 +825,7 @@ display_enum_type(hid_t type, int indent)
/* Print members */
for (i=0; i<nmembs; i++) {
- printf("\n%*s", indent+4, "");
+ printf("\n%*s", ind+4, "");
nchars = display_string(stdout, name[i], TRUE);
printf("%*s = ", MAX(0, 16-nchars), "");
@@ -849,8 +849,8 @@ display_enum_type(hid_t type, int indent)
free(value);
H5Tclose(super);
- if (0==nmembs) printf("\n%*s <empty>", indent+4, "");
- printf("\n%*s}", indent, "");
+ if (0==nmembs) printf("\n%*s <empty>", ind+4, "");
+ printf("\n%*s}", ind, "");
return TRUE;
}
@@ -872,7 +872,7 @@ display_enum_type(hid_t type, int indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_string_type(hid_t type, int UNUSED indent)
+display_string_type(hid_t type, int UNUSED ind)
{
H5T_str_t pad;
const char *pad_s=NULL;
@@ -962,7 +962,7 @@ display_string_type(hid_t type, int UNUSED indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_reference_type(hid_t type, int UNUSED indent)
+display_reference_type(hid_t type, int UNUSED ind)
{
if (H5T_REFERENCE!=H5Tget_class(type)) return FALSE;
@@ -996,7 +996,7 @@ display_reference_type(hid_t type, int UNUSED indent)
*-------------------------------------------------------------------------
*/
static hbool_t
-display_opaque_type(hid_t type, int indent)
+display_opaque_type(hid_t type, int ind)
{
char *tag;
size_t size;
@@ -1006,7 +1006,7 @@ display_opaque_type(hid_t type, int indent)
size = H5Tget_size(type);
printf("%lu-byte opaque type", (unsigned long)size);
if ((tag=H5Tget_tag(type))) {
- printf("\n%*s(tag = \"", indent, "");
+ printf("\n%*s(tag = \"", ind, "");
display_string(stdout, tag, FALSE);
printf("\")");
free(tag);
@@ -1021,7 +1021,7 @@ display_opaque_type(hid_t type, int indent)
* Purpose: Prints a data type definition. The definition is printed
* without any leading space or trailing line-feed (although
* there might be line-feeds inside the type definition). The
- * first line is assumed to have INDENT characters before it on
+ * first line is assumed to have IND characters before it on
* the same line (printed by the caller).
*
* Return: void
@@ -1036,7 +1036,7 @@ display_opaque_type(hid_t type, int indent)
*-------------------------------------------------------------------------
*/
static void
-display_type(hid_t type, int indent)
+display_type(hid_t type, int ind)
{
H5T_class_t data_class = H5Tget_class(type);
H5G_stat_t sb;
@@ -1059,15 +1059,15 @@ display_type(hid_t type, int indent)
}
/* Print the type */
- if (display_native_type(type, indent) ||
- display_ieee_type(type, indent) ||
- display_int_type(type, indent) ||
- display_float_type(type, indent) ||
- display_cmpd_type(type, indent) ||
- display_enum_type(type, indent) ||
- display_string_type(type, indent) ||
- display_reference_type(type, indent) ||
- display_opaque_type(type, indent)) {
+ if (display_native_type(type, ind) ||
+ display_ieee_type(type, ind) ||
+ display_int_type(type, ind) ||
+ display_float_type(type, ind) ||
+ display_cmpd_type(type, ind) ||
+ display_enum_type(type, ind) ||
+ display_string_type(type, ind) ||
+ display_reference_type(type, ind) ||
+ display_opaque_type(type, ind)) {
return;
}
diff --git a/tools/h5toh4.c b/tools/h5toh4.c
index 34cc1c8..30224c6 100644
--- a/tools/h5toh4.c
+++ b/tools/h5toh4.c
@@ -1,5 +1,3 @@
-
-
/******************************************************************************
Description: This file contains routines to translate H5 files to H4 files.
@@ -45,9 +43,11 @@ extern int get_tableflag(int, int);
extern int set_tableflag(int, int);
extern char* get_objectname(int, int);
+#if 0 /*these are defined elsewhere, possibly incompatible --rpm 19990614 */
extern int optind;
extern void perror(const char *);
extern int errno;
+#endif
typedef herr_t (*H5G_operator_t)(hid_t, const char*, void*);