diff options
Diffstat (limited to 'hl/fortran')
-rw-r--r-- | hl/fortran/Makefile.am | 2 | ||||
-rw-r--r-- | hl/fortran/examples/ex_ds1.f90 | 42 | ||||
-rw-r--r-- | hl/fortran/examples/run-hlfortran-ex.sh.in | 2 | ||||
-rw-r--r-- | hl/fortran/src/H5DSfc.c | 62 | ||||
-rw-r--r-- | hl/fortran/src/H5LTf90proto.h | 8 | ||||
-rw-r--r-- | hl/fortran/src/H5LTfc.c | 12 | ||||
-rw-r--r-- | hl/fortran/src/H5TBfc.c | 14 | ||||
-rw-r--r-- | hl/fortran/test/Makefile.am | 2 |
8 files changed, 72 insertions, 72 deletions
diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am index 7d24770..801702c 100644 --- a/hl/fortran/Makefile.am +++ b/hl/fortran/Makefile.am @@ -10,7 +10,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -# +# # This makefile mostly just reinvokes make in the various subdirectories # but does so in the correct order. You can alternatively invoke make from # each subdirectory manually. diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90 index 14e2b0c..b31ac8e 100644 --- a/hl/fortran/examples/ex_ds1.f90 +++ b/hl/fortran/examples/ex_ds1.f90 @@ -18,7 +18,7 @@ PROGRAM example_ds IMPLICIT NONE - INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset + INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset INTEGER, PARAMETER :: DIM_DATA = 12 INTEGER, PARAMETER :: DIM1_SIZE = 3 INTEGER, PARAMETER :: DIM2_SIZE = 4 @@ -33,13 +33,13 @@ PROGRAM example_ds INTEGER(hid_t) :: fid ! file ID INTEGER(hid_t) :: did ! dataset ID INTEGER(hid_t) :: dsid ! DS dataset ID - INTEGER :: rankds = 1 ! rank of DS dataset - INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of data dataset - INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! data of data dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset - REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! data of DS 1 dataset - REAL, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! data of DS 2 dataset + INTEGER :: rankds = 1 ! rank of DS dataset + INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of data dataset + INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! data of data dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset + REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! data of DS 1 dataset + REAL, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! data of DS 2 dataset INTEGER :: err INTEGER :: num_scales INTEGER(size_t) :: name_len @@ -56,7 +56,7 @@ PROGRAM example_ds ! create a file using default properties CALL H5Fcreate_f("ex_ds1.h5",H5F_ACC_TRUNC_F, fid, err) - ! make a dataset + ! make a dataset CALL H5LTmake_dataset_int_f(fid, DSET_NAME, rank,dims,buf, err) ! make a DS dataset for the first dimension @@ -69,7 +69,7 @@ PROGRAM example_ds ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 ! and then detach it. !------------------------------------------------------------------------- - + ! get the dataset id for DSET_NAME CALL H5Dopen_f(fid, DSET_NAME, did, err) @@ -82,11 +82,11 @@ PROGRAM example_ds ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 CALL H5DSattach_scale_f(did, dsid, DIM1, err) - ! Test if dimension Scale Attached + ! Test if dimension Scale Attached CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) WRITE(*,'(/,5X,3(A,1X),I0,A,L1)') 'Is',TRIM(DS_1_NAME),& 'attached to dimension',DIM1,' ... ',is_attached - + ! Check to see how many Dimension Scales are attached @@ -103,11 +103,11 @@ PROGRAM example_ds CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) WRITE(*,'(/,5X,3(A,1X),I0,A,L1)') 'Is',TRIM(DS_1_NAME),& 'attached to dimension',DIM1,' ... ',is_attached - + !------------------------------------------------------------------------- ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 1 !------------------------------------------------------------------------- - + WRITE(*,'(/,5A,I0)') & 'Set Dimension Scale "', TRIM(DS_1_NAME), '" to "', TRIM(DSET_NAME), '" at dimension ', DIM1 @@ -123,11 +123,11 @@ PROGRAM example_ds name = '' CALL H5DSget_scale_name_f(dsid, name, name_len, err) - WRITE(*,'(/,5X,A,A)') 'The Dimension Scale name is ... ', name(1:name_len) + WRITE(*,'(/,5X,A,A)') 'The Dimension Scale name is ... ', name(1:name_len) ! Setting Dimension Scale Label - WRITE(*,'(/,A,I0)') "Setting Dimension Scale label ""X"" for dimension ", DIM1 + WRITE(*,'(/,A,I0)') "Setting Dimension Scale label ""X"" for dimension ", DIM1 CALL H5DSset_label_f(did, DIM1, "X", err) @@ -139,11 +139,11 @@ PROGRAM example_ds ! close DS id CALL H5Dclose_f(dsid, err) - + !------------------------------------------------------------------------- ! attach the DS_2_NAME dimension scale to DSET_NAME !------------------------------------------------------------------------- - + ! get the DS dataset id CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) @@ -163,7 +163,7 @@ PROGRAM example_ds name = '' CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - WRITE(*,'(/,5X,A,A)') 'The Dimension Scale name is ... ', name(1:name_len) + WRITE(*,'(/,5X,A,A)') 'The Dimension Scale name is ... ', name(1:name_len) ! Setting Dimension Scale Label @@ -177,13 +177,13 @@ PROGRAM example_ds label_len = 25 label = '' CALL H5DSget_label_f(did, DIM2, label, label_len, err) - + WRITE(*,'(/,5X,A,I0,2A,/)') 'Dimension Scale Label for dimension ', DIM2, ' is ... ', label(1:label_len) ! close DS id CALL H5Dclose_f(dsid, err) - ! close file + ! close file CALL H5Fclose_f(fid, err) END PROGRAM example_ds diff --git a/hl/fortran/examples/run-hlfortran-ex.sh.in b/hl/fortran/examples/run-hlfortran-ex.sh.in index d7de8e3..86acd27 100644 --- a/hl/fortran/examples/run-hlfortran-ex.sh.in +++ b/hl/fortran/examples/run-hlfortran-ex.sh.in @@ -80,5 +80,5 @@ rm *.o rm *.h5 echo -exit $EXIT_VALUE +exit $EXIT_VALUE diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index 0bb594d..f99fa4d 100644 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -33,15 +33,15 @@ *------------------------------------------------------------------------- */ int_f -h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) +h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) { char *c_dimname = NULL; int_f ret_value = 0; - + /* * convert FORTRAN name to C name */ - + if(*dimnamelen != 0) if(NULL == (c_dimname = (char *)HD5f2cstring(dimname, (size_t)*dimnamelen))) HGOTO_DONE(FAIL) @@ -78,17 +78,17 @@ h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) *------------------------------------------------------------------------- */ int_f -h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; - + /* * call H5DSset_scale function. */ - + if(H5DSattach_scale( (hid_t)*did, (hid_t)*dsid, (unsigned)*idx ) < 0) HGOTO_DONE(FAIL) - + done: return ret_value; @@ -111,17 +111,17 @@ h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; - + /* * call H5DSset_scale function. */ - + if(H5DSdetach_scale( (hid_t)*did, (hid_t)*dsid, (unsigned)*idx ) < 0) HGOTO_DONE(FAIL) - + done: return ret_value; @@ -144,11 +144,11 @@ h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) +h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) { int_f ret_value = 0; htri_t c_is_attached; - + /* * call H5DSis_attached function. */ @@ -157,7 +157,7 @@ h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) HGOTO_DONE(FAIL) *is_attached = (int_f)c_is_attached; - + done: return ret_value; @@ -179,20 +179,20 @@ h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) *------------------------------------------------------------------------- */ int_f -h5dsis_scale_c( hid_t_f *did, int_f *is_scale) +h5dsis_scale_c( hid_t_f *did, int_f *is_scale) { int_f ret_value = 0; htri_t c_is_scale; - + /* * call H5DSis_scale function. */ - + if((c_is_scale=H5DSis_scale( (hid_t)*did )) < 0) HGOTO_DONE(FAIL) *is_scale = (int_f)c_is_scale; - + done: return ret_value; @@ -215,15 +215,15 @@ h5dsis_scale_c( hid_t_f *did, int_f *is_scale) *------------------------------------------------------------------------- */ int_f -h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) +h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) { char *c_label = NULL; int_f ret_value = 0; - + /* * convert FORTRAN name to C name */ - + if(NULL == (c_label = (char *)HD5f2cstring(label, (size_t)*labellen))) HGOTO_DONE(FAIL) @@ -258,7 +258,7 @@ h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) *------------------------------------------------------------------------- */ int_f -h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) +h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) { char *c_label = NULL; ssize_t size_c = -1; @@ -273,18 +273,18 @@ h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) /* * call H5DSget_label function. */ - + if( (size_c = H5DSget_label( (hid_t)*did, (unsigned)*idx, c_label, (size_t)*size+1)) < 0) HGOTO_DONE(FAIL) /* * Convert C name to FORTRAN and place it in the given buffer */ - + HD5packFstring(c_label, _fcdtocp(label), (size_t)*size); done: - *size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the + *size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the * trailing NULL in the length calculation, Ref. HDFFV-7596 */ if(c_label) HDfree(c_label); return ret_value; @@ -307,7 +307,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) +h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) { char *c_scale_name = NULL; ssize_t size_c = -1; @@ -322,7 +322,7 @@ h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) /* * call H5DSget_scale_name function. */ - + if( (size_c = H5DSget_scale_name( (hid_t)*did, c_scale_name, (size_t)*size+1)) < 0) HGOTO_DONE(FAIL) @@ -354,17 +354,17 @@ done: *------------------------------------------------------------------------- */ int_f -h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) +h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) { int_f ret_value = 0; - + /* * call H5DSset_scale function. */ - + if( (*num_scales = (int_f)H5DSget_num_scales( (hid_t)*did, (unsigned)*idx)) < 0) HGOTO_DONE(FAIL) - + done: return ret_value; diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 031db2c..44a2fee 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -174,9 +174,9 @@ h5ltread_dataset_string_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltpath_valid_c(hid_t_f *loc_id, - _fcd path, - size_t_f *pathlen, +h5ltpath_valid_c(hid_t_f *loc_id, + _fcd path, + size_t_f *pathlen, int_f *check_object_valid_c); /*------------------------------------------------------------------------- @@ -429,7 +429,7 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen2, size_t_f *lenmax, _fcd field_names, - size_t_f *maxlen_out); + size_t_f *maxlen_out); #endif /* _H5LTf90proto_H */ diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 0f8a58f..3597c3a 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -438,7 +438,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, else goto done; } - + if (ret < 0) goto done; @@ -512,7 +512,7 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, /* * Convert C name to FORTRAN and place it in the given buffer */ - HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buf_size); + HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buf_size); ret_value = 0; @@ -893,9 +893,9 @@ done: */ int_f -h5ltpath_valid_c(hid_t_f *loc_id, - _fcd path, - size_t_f *pathlen, +h5ltpath_valid_c(hid_t_f *loc_id, + _fcd path, + size_t_f *pathlen, int_f *check_object_valid_c) { htri_t ret = -1; @@ -907,7 +907,7 @@ h5ltpath_valid_c(hid_t_f *loc_id, */ if( NULL == (c_path = (char *)HD5f2cstring(path, (size_t)*pathlen))) goto done; - + check_object_valid = FALSE; if(*check_object_valid_c == 1) check_object_valid = TRUE; diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index 331f0bc..285cd84 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -142,7 +142,7 @@ int_f h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size, size_t_f *field_offset, hid_t_f *field_types, hsize_t_f *chunk_size, - void *fill_data, int_f *compress, + void *fill_data, int_f *compress, size_t_f *char_len_field_names, /* field_names lengths */ size_t_f *max_char_size_field_names, /* char len of fields */ char *field_names, @@ -233,7 +233,7 @@ done: /*------------------------------------------------------------------------- * Function: h5tbread_table_c * -* Purpose: Call H5TBread_table using F2003 features +* Purpose: Call H5TBread_table using F2003 features * * Return: Success: 0, Failure: -1 * @@ -261,7 +261,7 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel */ if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) HGOTO_DONE(FAIL) - + if(NULL == (c_dst_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) if(NULL == (c_dst_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) @@ -270,7 +270,7 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel for(i = 0; i < c_nfields; i++) { c_dst_offset[i] = (size_t)dst_offset[i]; c_dst_sizes[i] = (size_t)dst_sizes[i]; - } /* end for */ + } /* end for */ /* * call H5TBread_table function. @@ -514,7 +514,7 @@ h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name * call H5TBinsert_field function. */ - if(H5TBinsert_field((hid_t)*loc_id, c_name, c_name1, (hid_t)*field_type, + if(H5TBinsert_field((hid_t)*loc_id, c_name, c_name1, (hid_t)*field_type, (hsize_t)*position, NULL, buf) < 0) HGOTO_DONE(FAIL) @@ -683,7 +683,7 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n if(H5TBget_field_info((hid_t)*loc_id, c_name, c_field_names, c_field_sizes, c_field_offsets, &c_type_size) < 0) HGOTO_DONE(FAIL) - + /* return values */ /* names array */ @@ -709,7 +709,7 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n field_offsets[i] = (size_t_f)c_field_offsets[i]; } /* end for */ - *maxlen_out = (size_t_f)length; + *maxlen_out = (size_t_f)length; done: if(c_name) diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am index 0552aaa..5d1ab2e 100644 --- a/hl/fortran/test/Makefile.am +++ b/hl/fortran/test/Makefile.am @@ -36,7 +36,7 @@ check_PROGRAMS=$(TEST_PROG) LIBOBJS=$(top_builddir)/fortran/test/tf_gen.o -LDADD=$(LIBOBJS) $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) +LDADD=$(LIBOBJS) $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs tstds_SOURCES=tstds.F90 |