From 12e929e1eccfe249b9a75a67c3f15cc4d1d534bc Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 29 Oct 2018 16:06:22 -0700 Subject: Fixed VOL example to use a platform-independent format specifier for size_t. --- examples/h5_vol_external_log_native.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c index d6e44db..d3a5dbd 100644 --- a/examples/h5_vol_external_log_native.c +++ b/examples/h5_vol_external_log_native.c @@ -131,7 +131,7 @@ visit_cb(hid_t oid, const char *name, if(H5Iget_type(oid) == H5I_GROUP) { len = H5VLget_driver_name(oid, n, 50); - printf ("Visiting GROUP VOL name = %s %zd\n", n, len); + printf ("Visiting GROUP VOL name = %s %lu\n", n, (unsigned long)len); } if(H5Iget_type(oid) == H5I_DATASET) printf("visiting dataset\n"); @@ -184,29 +184,29 @@ int main(int argc, char **argv) { file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); len = H5VLget_driver_name(file_id, name, 25); - printf ("FILE VOL name = %s %zd\n", name, len); + printf ("FILE VOL name = %s %lu\n", name, (unsigned long)len); group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(group_id, name, 50); - printf ("GROUP VOL name = %s %zd\n", name, len); + printf ("GROUP VOL name = %s %lu\n", name, (unsigned long)len); int_id = H5Tcopy(H5T_NATIVE_INT); H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT COMMIT name = %s %zd\n", name, len); + printf ("DT COMMIT name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Topen2(file_id, "int", H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OPEN name = %s %zd\n", name, len); + printf ("DT OPEN name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Oopen(file_id,"int",H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OOPEN name = %s %zd\n", name, len); + printf ("DT OOPEN name = %s %lu\n", name, (unsigned long)len); len = H5Fget_name(file_id, name, 50); - printf("name = %zd %s\n", len, name); + printf("name = %lu %s\n", (unsigned long)len, name); data = malloc (sizeof(int)*nelem); for(i=0;i Date: Tue, 30 Oct 2018 09:53:20 -0700 Subject: Updated MANIFEST file. --- MANIFEST | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index 5733a23..dd379de 100644 --- a/MANIFEST +++ b/MANIFEST @@ -650,7 +650,6 @@ ./src/H5FSmodule.h ./src/H5FSpkg.h ./src/H5FSprivate.h -./src/H5FSpublic.h ./src/H5FSsection.c ./src/H5FSstat.c ./src/H5FStest.c -- cgit v0.12 From 7a5e632c0dd6735269728328aa63a040e0d72e6e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 30 Oct 2018 10:32:17 -0700 Subject: Cleaned up VOL example. --- examples/h5_vol_external_log_native.c | 145 +++++++++++++++------------------- 1 file changed, 62 insertions(+), 83 deletions(-) diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c index d3a5dbd..26bae30 100644 --- a/examples/h5_vol_external_log_native.c +++ b/examples/h5_vol_external_log_native.c @@ -52,63 +52,63 @@ static const H5VL_class_t H5VL_log_g = { NULL, NULL, { /* attribute_cls */ - NULL, //H5VL_log_attr_create, /* create */ - NULL, //H5VL_log_attr_open, /* open */ - NULL, //H5VL_log_attr_read, /* read */ - NULL, //H5VL_log_attr_write, /* write */ - NULL, //H5VL_log_attr_get, /* get */ - NULL, //H5VL_log_attr_specific, /* specific */ - NULL, //H5VL_log_attr_optional, /* optional */ - NULL //H5VL_log_attr_close /* close */ + NULL, /* H5VL_log_attr_create, */ /* create */ + NULL, /* H5VL_log_attr_open, */ /* open */ + NULL, /* H5VL_log_attr_read, */ /* read */ + NULL, /* H5VL_log_attr_write, */ /* write */ + NULL, /* H5VL_log_attr_get, */ /* get */ + NULL, /* H5VL_log_attr_specific, */ /* specific */ + NULL, /* H5VL_log_attr_optional, */ /* optional */ + NULL /* H5VL_log_attr_close */ /* close */ }, { /* dataset_cls */ H5VL_log_dataset_create, /* create */ H5VL_log_dataset_open, /* open */ H5VL_log_dataset_read, /* read */ H5VL_log_dataset_write, /* write */ - NULL, //H5VL_log_dataset_get, /* get */ - NULL, //H5VL_log_dataset_specific, /* specific */ - NULL, //H5VL_log_dataset_optional, /* optional */ + NULL, /* H5VL_log_dataset_get, */ /* get */ + NULL, /* H5VL_log_dataset_specific, */ /* specific */ + NULL, /* H5VL_log_dataset_optional, */ /* optional */ H5VL_log_dataset_close /* close */ }, { /* datatype_cls */ H5VL_log_datatype_commit, /* commit */ H5VL_log_datatype_open, /* open */ H5VL_log_datatype_get, /* get_size */ - NULL, //H5VL_log_datatype_specific, /* specific */ - NULL, //H5VL_log_datatype_optional, /* optional */ + NULL, /* H5VL_log_datatype_specific, */ /* specific */ + NULL, /* H5VL_log_datatype_optional, */ /* optional */ H5VL_log_datatype_close /* close */ }, { /* file_cls */ - H5VL_log_file_create, /* create */ - H5VL_log_file_open, /* open */ - H5VL_log_file_get, /* get */ - NULL, //H5VL_log_file_specific, /* specific */ - NULL, //H5VL_log_file_optional, /* optional */ - H5VL_log_file_close /* close */ + H5VL_log_file_create, /* create */ + H5VL_log_file_open, /* open */ + H5VL_log_file_get, /* get */ + NULL, /* H5VL_log_file_specific, */ /* specific */ + NULL, /* H5VL_log_file_optional, */ /* optional */ + H5VL_log_file_close /* close */ }, { /* group_cls */ - H5VL_log_group_create, /* create */ - NULL, //H5VL_log_group_open, /* open */ - NULL, //H5VL_log_group_get, /* get */ - NULL, //H5VL_log_group_specific, /* specific */ - NULL, //H5VL_log_group_optional, /* optional */ - H5VL_log_group_close /* close */ + H5VL_log_group_create, /* create */ + NULL, /* H5VL_log_group_open, */ /* open */ + NULL, /* H5VL_log_group_get, */ /* get */ + NULL, /* H5VL_log_group_specific, */ /* specific */ + NULL, /* H5VL_log_group_optional, */ /* optional */ + H5VL_log_group_close /* close */ }, { /* link_cls */ - NULL, //H5VL_log_link_create, /* create */ - NULL, //H5VL_log_link_copy, /* copy */ - NULL, //H5VL_log_link_move, /* move */ - NULL, //H5VL_log_link_get, /* get */ - NULL, //H5VL_log_link_specific, /* specific */ - NULL, //H5VL_log_link_optional, /* optional */ + NULL, /* H5VL_log_link_create, */ /* create */ + NULL, /* H5VL_log_link_copy, */ /* copy */ + NULL, /* H5VL_log_link_move, */ /* move */ + NULL, /* H5VL_log_link_get, */ /* get */ + NULL, /* H5VL_log_link_specific, */ /* specific */ + NULL, /* H5VL_log_link_optional, */ /* optional */ }, { /* object_cls */ - H5VL_log_object_open, /* open */ - NULL, //H5VL_log_object_copy, /* copy */ - NULL, //H5VL_log_object_get, /* get */ - H5VL_log_object_specific, /* specific */ - NULL, //H5VL_log_object_optional, /* optional */ + H5VL_log_object_open, /* open */ + NULL, /* H5VL_log_object_copy, */ /* copy */ + NULL, /* H5VL_log_object_get, */ /* get */ + H5VL_log_object_specific, /* specific */ + NULL, /* H5VL_log_object_optional, */ /* optional */ }, { NULL, @@ -123,8 +123,7 @@ typedef struct H5VL_log_t { } H5VL_log_t; static herr_t -visit_cb(hid_t oid, const char *name, - const H5O_info_t *oinfo, void *udata) +visit_cb(hid_t oid, const char *name, const H5O_info_t *oinfo, void *udata) { ssize_t len; char n[25]; @@ -139,9 +138,11 @@ visit_cb(hid_t oid, const char *name, printf("visiting datatype\n"); return 1; -} /* end h5_verify_cached_stabs_cb() */ +} -int main(int argc, char **argv) { +int +main(int argc, char **argv) +{ const char file_name[]="large_dataset.h5"; const char group_name[]="/Group"; const char dataset_name[]="Data"; @@ -184,33 +185,33 @@ int main(int argc, char **argv) { file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); len = H5VLget_driver_name(file_id, name, 25); - printf ("FILE VOL name = %s %lu\n", name, (unsigned long)len); + printf("FILE VOL name = %s %lu\n", name, (unsigned long)len); group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(group_id, name, 50); - printf ("GROUP VOL name = %s %lu\n", name, (unsigned long)len); + printf("GROUP VOL name = %s %lu\n", name, (unsigned long)len); int_id = H5Tcopy(H5T_NATIVE_INT); H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT COMMIT name = %s %lu\n", name, (unsigned long)len); + printf("DT COMMIT name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Topen2(file_id, "int", H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OPEN name = %s %lu\n", name, (unsigned long)len); + printf("DT OPEN name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Oopen(file_id,"int",H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OOPEN name = %s %lu\n", name, (unsigned long)len); + printf("DT OPEN name = %s %lu\n", name, (unsigned long)len); len = H5Fget_name(file_id, name, 50); printf("name = %lu %s\n", (unsigned long)len, name); - data = malloc (sizeof(int)*nelem); - for(i=0;i Date: Tue, 30 Oct 2018 14:44:54 -0700 Subject: Removed a couple of extraneous commas from VOL example. --- examples/h5_vol_external_log_native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c index 26bae30..616214d 100644 --- a/examples/h5_vol_external_log_native.c +++ b/examples/h5_vol_external_log_native.c @@ -101,14 +101,14 @@ static const H5VL_class_t H5VL_log_g = { NULL, /* H5VL_log_link_move, */ /* move */ NULL, /* H5VL_log_link_get, */ /* get */ NULL, /* H5VL_log_link_specific, */ /* specific */ - NULL, /* H5VL_log_link_optional, */ /* optional */ + NULL /* H5VL_log_link_optional, */ /* optional */ }, { /* object_cls */ H5VL_log_object_open, /* open */ NULL, /* H5VL_log_object_copy, */ /* copy */ NULL, /* H5VL_log_object_get, */ /* get */ H5VL_log_object_specific, /* specific */ - NULL, /* H5VL_log_object_optional, */ /* optional */ + NULL /* H5VL_log_object_optional, */ /* optional */ }, { NULL, -- cgit v0.12