diff options
-rw-r--r-- | fortran/Makefile.in | 2 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 2 | ||||
-rw-r--r-- | fortran/src/H5f90kit.c | 2 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 2 | ||||
-rw-r--r-- | fortran/test/Makefile.in | 2 | ||||
-rw-r--r-- | fortran/test/fortranlib_test_F03.f90 | 4 | ||||
-rw-r--r-- | fortran/test/tH5T_F03.f90 | 41 | ||||
-rw-r--r-- | fortran/testpar/Makefile.in | 2 |
8 files changed, 46 insertions, 11 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 888736a..806eb30 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -219,7 +219,6 @@ FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GPFS = @GPFS@ GREP = @GREP@ -H5BLD_STATIC = @H5BLD_STATIC@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -234,7 +233,6 @@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF5_USE_SHLIB = @HDF5_USE_SHLIB@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ HDF_FORTRAN2003 = @HDF_FORTRAN2003@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 5da455b..06c2632 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -190,7 +190,6 @@ FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GPFS = @GPFS@ GREP = @GREP@ -H5BLD_STATIC = @H5BLD_STATIC@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -205,7 +204,6 @@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF5_USE_SHLIB = @HDF5_USE_SHLIB@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ HDF_FORTRAN2003 = @HDF_FORTRAN2003@ diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index 059685e..0bc721f 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -53,7 +53,7 @@ HD5f2cstring(_fcd fdesc, size_t len) /* Search for the end of the string */ str = _fcdtocp(fdesc); - for(i = (int)len - 1; i >= 0 && !HDisgraph((int)str[i]); i--) + for(i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--) /*EMPTY*/; /* Allocate C string */ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 164f856..069846a5 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -307,7 +307,6 @@ FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GPFS = @GPFS@ GREP = @GREP@ -H5BLD_STATIC = @H5BLD_STATIC@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -322,7 +321,6 @@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF5_USE_SHLIB = @HDF5_USE_SHLIB@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ HDF_FORTRAN2003 = @HDF_FORTRAN2003@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 33f1022..e42b080 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -290,7 +290,6 @@ FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GPFS = @GPFS@ GREP = @GREP@ -H5BLD_STATIC = @H5BLD_STATIC@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -305,7 +304,6 @@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF5_USE_SHLIB = @HDF5_USE_SHLIB@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ HDF_FORTRAN2003 = @HDF_FORTRAN2003@ diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.f90 index b674452..c8830d6 100644 --- a/fortran/test/fortranlib_test_F03.f90 +++ b/fortran/test/fortranlib_test_F03.f90 @@ -117,6 +117,10 @@ PROGRAM fortranlibtest_F03 CALL write_test_status(ret_total_error, ' Testing writing/reading string datatypes, using C_LOC', total_error) ret_total_error = 0 + CALL vl_test_special_char(ret_total_error) + CALL write_test_status(ret_total_error, ' Testing string datatypes containing control characters', total_error) + + ret_total_error = 0 CALL test_create(ret_total_error) CALL write_test_status(ret_total_error, & ' Testing filling functions', & diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 index 2cf0a84..7c99856 100644 --- a/fortran/test/tH5T_F03.f90 +++ b/fortran/test/tH5T_F03.f90 @@ -2800,6 +2800,47 @@ SUBROUTINE t_string(total_error) END SUBROUTINE t_string +SUBROUTINE vl_test_special_char(cleanup, total_error) + + USE hdf5 + IMPLICIT NONE + + INTERFACE + SUBROUTINE setup_buffer(data_in, line_lengths, char_type) + USE hdf5 + USE ISO_C_BINDING + IMPLICIT NONE + CHARACTER(len=*), DIMENSION(:) :: data_in + INTEGER(size_t), DIMENSION(:) :: line_lengths + CHARACTER(KIND=C_CHAR,LEN=*) :: char_type + END SUBROUTINE setup_buffer + END INTERFACE + + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" + INTEGER, PARAMETER :: line_length = 10 + INTEGER(hid_t) :: file + INTEGER(hid_t) :: dataset0 + CHARACTER(len=line_length), DIMENSION(1:100) :: data_in + CHARACTER(len=line_length), DIMENSION(1:100) :: data_out + INTEGER(size_t), DIMENSION(1:100) :: line_lengths + INTEGER(hid_t) :: string_id, space, dcpl + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) + INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) + INTEGER, PARAMETER :: ncontrolchar = 7 + CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & + (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) + INTEGER :: i, j, n, error + n = 8 + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) !------------------------------------------------------------------------- ! Function: test_nbit diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 5faf18c..1cbc87e 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -217,7 +217,6 @@ FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GPFS = @GPFS@ GREP = @GREP@ -H5BLD_STATIC = @H5BLD_STATIC@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -232,7 +231,6 @@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF5_USE_SHLIB = @HDF5_USE_SHLIB@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ HDF_FORTRAN2003 = @HDF_FORTRAN2003@ |