summaryrefslogtreecommitdiffstats
path: root/test/tattr.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-23 21:19:17 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-23 21:19:17 (GMT)
commitc8d2f1e17a828016487bb7661f3eff4135c92226 (patch)
treeb20e7514d7cf64ba6f8b21723b8e45bd4235f346 /test/tattr.c
parent8821a3c0156e28a7fd49508c0b471361a9344984 (diff)
downloadhdf5-c8d2f1e17a828016487bb7661f3eff4135c92226.zip
hdf5-c8d2f1e17a828016487bb7661f3eff4135c92226.tar.gz
hdf5-c8d2f1e17a828016487bb7661f3eff4135c92226.tar.bz2
[svn-r537] Changes since 19980722
---------------------- ./src/H5A.c ./src/H5Apublic.h ./test/tattr.c Switched the order of the second and third argument of H5Aget_name() to make it consistent with other functions that take buffers and buffer sizes. ./src/H5G.c ./src/H5Gpublic.h ./src/H5Gprivate.h The H5Gget_comment() function returns the size of the comment including the null terminator. If the object has no comment then zero is returned. If an error occurs then a negative value is returned. ./MANIFEST ./tools/Makefile.in ./tools/h5tools.h [NEW] ./tools/h5dump.c [NEW] Created a library for printing values of datasets in a way that looks nice. It's not done yet, but I needed it for debugging the contents of files from Jim Reus. ./tools/h5ls.c Added the `-d' and `--dump' options which cause the contents of a dataset to be printed. Added `-w N' and `--width=N' options to control how wide the raw data output should be. If you want single-column output then say `-w1'. Printing dataset values can now handle datasets of any integer or floating point atomic type. As a special case, integers which are one byte wide are treated a character strings for now. Sample output: $ h5ls --dump --width=60 banana.hdf ARCHIVE 0:0:0:744 Dataset {52/Inf} Data: (0) "U struct complex { double R; double I; };\012V" (43) " double;\012" U 0:0:0:2500 Dataset {256/512} Data: printing of compound data types is not implemented yet V 0:0:0:3928 Dataset {256/512} Data: (0) 0, 0.015625, 0.03125, 0.046875, 0.0625, (5) 0.078125, 0.09375, 0.109375, 0.125, 0.140625, (10) 0.15625, 0.171875, 0.1875, 0.203125, 0.21875, (15) 0.234375, 0.25, 0.265625, 0.28125, 0.296875, ...
Diffstat (limited to 'test/tattr.c')
-rw-r--r--test/tattr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/tattr.c b/test/tattr.c
index b9cfa0f..e373d34 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -494,7 +494,7 @@ test_attr_compound_read(void)
} /* end if */
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR4_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR4_NAME);
@@ -830,7 +830,7 @@ test_attr_mult_read(void)
} /* end if */
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr, ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR1_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR1_NAME);
@@ -838,7 +838,7 @@ test_attr_mult_read(void)
} /* end if */
/* Verify Name with too small of a buffer */
- name_len=H5Aget_name(attr,attr_name,HDstrlen(ATTR1_NAME));
+ name_len=H5Aget_name(attr,HDstrlen(ATTR1_NAME), attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
HDstrcpy(temp_name,ATTR1_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR1_NAME)-1]='\0'; /* truncate it to match the one retrieved */
@@ -896,7 +896,7 @@ test_attr_mult_read(void)
} /* end if */
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR2_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR2_NAME);
@@ -904,7 +904,7 @@ test_attr_mult_read(void)
} /* end if */
/* Verify Name with too small of a buffer */
- name_len=H5Aget_name(attr,attr_name,HDstrlen(ATTR2_NAME));
+ name_len=H5Aget_name(attr,HDstrlen(ATTR2_NAME), attr_name);
VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
HDstrcpy(temp_name,ATTR2_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR2_NAME)-1]='\0'; /* truncate it to match the one retrieved */
@@ -967,7 +967,7 @@ test_attr_mult_read(void)
} /* end if */
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR3_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR3_NAME);
@@ -975,7 +975,7 @@ test_attr_mult_read(void)
} /* end if */
/* Verify Name with too small of a buffer */
- name_len=H5Aget_name(attr,attr_name,HDstrlen(ATTR3_NAME));
+ name_len=H5Aget_name(attr,HDstrlen(ATTR3_NAME), attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
HDstrcpy(temp_name,ATTR3_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR3_NAME)-1]='\0'; /* truncate it to match the one retrieved */
@@ -1133,7 +1133,7 @@ test_attr_delete(void)
CHECK(attr, FAIL, "H5Aopen_idx");
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr,ATTR_NAME_LEN,attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR1_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR1_NAME);
@@ -1149,7 +1149,7 @@ test_attr_delete(void)
CHECK(attr, FAIL, "H5Aopen_idx");
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR3_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR3_NAME);
@@ -1173,7 +1173,7 @@ test_attr_delete(void)
CHECK(attr, FAIL, "H5Aopen_idx");
/* Verify Name */
- name_len=H5Aget_name(attr,attr_name,ATTR_NAME_LEN);
+ name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
if(HDstrcmp(attr_name,ATTR3_NAME)) {
printf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR3_NAME);