summaryrefslogtreecommitdiffstats
path: root/tools
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 /tools
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...
Diffstat (limited to 'tools')
-rw-r--r--tools/h5ls.c76
-rw-r--r--tools/h5toh4.c4
2 files changed, 40 insertions, 40 deletions
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*);