From 7f214d6e0ded27bc44d354396eb72ff2f65f1f03 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Mon, 24 Jan 2022 15:41:03 -0600 Subject: Merge various cleanup java test, test files, comments (#1365) Plus some spelling corrections --- examples/h5_extlink.c | 4 ++-- java/examples/datasets/H5Ex_D_Sofloat.java | 13 +++++++++---- .../examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt | 8 ++++---- m4/aclocal_fc.f90 | 2 +- m4/aclocal_fc.m4 | 6 +++--- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/examples/h5_extlink.c b/examples/h5_extlink.c index f9d4046..61fd589 100644 --- a/examples/h5_extlink.c +++ b/examples/h5_extlink.c @@ -414,14 +414,14 @@ UD_hard_create(const char *link_name, hid_t loc_group, const void *udata, size_t token = *((H5O_token_t *)udata); - //! [H5Open_by_token_snip] + //! [H5Oopen_by_token_snip] /* Open the object this link points to so that we can increment * its reference count. This also ensures that the token passed * in points to a real object (although this check is not perfect!) */ target_obj = H5Oopen_by_token(loc_group, token); - //! [H5Open_by_token_snip] + //! [H5Oopen_by_token_snip] if (target_obj < 0) { ret_value = -1; diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index a42aba4..8edde09 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -21,6 +21,9 @@ ************************************************************/ package examples.datasets; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Locale; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; @@ -123,8 +126,9 @@ public class H5Ex_D_Sofloat { } // Print the maximum value. - System.out.println("Maximum value in write buffer is: " + max); - System.out.println("Minimum value in write buffer is: " + min); + DecimalFormat df = new DecimalFormat("#,##0.000000", new DecimalFormatSymbols(Locale.US)); + System.out.println("Maximum value in write buffer is: " + df.format(max)); + System.out.println("Minimum value in write buffer is: " + df.format(min)); // Create a new file using the default properties. try { @@ -308,8 +312,9 @@ public class H5Ex_D_Sofloat { } // Print the maximum value. - System.out.println("Maximum value in " + DATASETNAME + " is: " + max); - System.out.println("Minimum value in " + DATASETNAME + " is: " + min); + DecimalFormat df = new DecimalFormat("#,##0.000000", new DecimalFormatSymbols(Locale.US)); + System.out.println("Maximum value in " + DATASETNAME + " is: " + df.format(max)); + System.out.println("Minimum value in " + DATASETNAME + " is: " + df.format(min)); // End access to the dataset and release resources used by it. try { diff --git a/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt b/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt index 4d4b5d6..9025ce2 100644 --- a/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt +++ b/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt @@ -1,6 +1,6 @@ -Maximum value in write buffer is: 106.66666666666667 -Minimum value in write buffer is: 1.7692307692307692 +Maximum value in write buffer is: 106.666667 +Minimum value in write buffer is: 1.769231 Filter type is: H5Z_FILTER_SCALEOFFSET -Maximum value in DS1 is: 106.66169811320755 -Minimum value in DS1 is: 1.7692307692307692 +Maximum value in DS1 is: 106.661698 +Minimum value in DS1 is: 1.769231 diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 index 240a768..bcefab5 100644 --- a/m4/aclocal_fc.f90 +++ b/m4/aclocal_fc.f90 @@ -120,7 +120,7 @@ PROGRAM FC_AVAIL_KINDS k = SELECTED_REAL_KIND(ik,jk) IF(k.LT.0) EXIT exp IF(k.NE.prev_rkind)THEN - ! Check if we aleady have that kind + ! Check if we already have that kind new_kind = .TRUE. DO kk = 1, num_rkinds IF(k.EQ.list_rkinds(kk))THEN diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 49ff485..9d01f47 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -20,7 +20,7 @@ dnl Contains Macros for HDF5 Fortran dnl ********************************* dnl dnl Special characteristics that have no autoconf counterpart but that -dnl we need as part of the C++ support. To distinquish these, they +dnl we need as part of the C++ support. To distinguish these, they dnl have a [PAC] prefix. dnl dnl ------------------------------------------------------------------------- @@ -260,8 +260,8 @@ TEST_SRC="`sed -n '/PROGRAM FC_AVAIL_KINDS/,/END PROGRAM FC_AVAIL_KINDS/p' $srcd AC_RUN_IFELSE([$TEST_SRC], [ dnl The output from the above program will be: - dnl -- LINE 1 -- valid integer kinds (comma seperated list) - dnl -- LINE 2 -- valid real kinds (comma seperated list) + dnl -- LINE 1 -- valid integer kinds (comma separated list) + dnl -- LINE 2 -- valid real kinds (comma separated list) dnl -- LINE 3 -- max decimal precision for reals dnl -- LINE 4 -- number of valid integer kinds dnl -- LINE 5 -- number of valid real kinds -- cgit v0.12