summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Df.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2003-04-15 22:33:39 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2003-04-15 22:33:39 (GMT)
commit4f6535b588e96b23d4c019fd90feb90362332340 (patch)
tree90e7e3f54deceb9d226a119774bbffa42765e277 /fortran/src/H5Df.c
parentdaf98a37cd427eede79e3823cb4b70648efd07a3 (diff)
downloadhdf5-4f6535b588e96b23d4c019fd90feb90362332340.zip
hdf5-4f6535b588e96b23d4c019fd90feb90362332340.tar.gz
hdf5-4f6535b588e96b23d4c019fd90feb90362332340.tar.bz2
[svn-r6684]
Purpose: Added copyright statement; cleaned code and fixed bugs for Windows and Cray T90IEEE Description: Fortran files did not have copyright statement; VL types did not work on T90IEEE since I never brought the correct code from 1.4 branch; there were compilation warnings on Windows; some character parameters were not passed correctly to C stubs causing tests to fail on Windows. Solution: Added copyright statement and clean the code. Platforms tested: CRAY T90IEEE, arabica, modi4 with parallel, Windows 2000 Only static tests (both debug and release) passed on Windows. DLLs have multiple problems ;-) Misc. update:
Diffstat (limited to 'fortran/src/H5Df.c')
-rw-r--r--fortran/src/H5Df.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 3f2e5b9..dc6ac43 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -1,3 +1,19 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* This files contains C stubs for H5D Fortran APIs */
+
#include "H5f90.h"
/*----------------------------------------------------------------------------
@@ -1138,7 +1154,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
c_buf = (hvl_t *)malloc(num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
- tmp = buf;
+ tmp = (int *)buf;
for (i=0; i < num_elem; i++) {
c_buf[i].len = (size_t)len[i];
c_buf[i].p = tmp;
@@ -1406,7 +1422,11 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
hid_t c_file_space_id;
hid_t c_xfer_prp;
herr_t status;
+#if defined (_UNICOS)
+ double *tmp;
+#else
float *tmp;
+#endif
size_t max_len;
hvl_t *c_buf;
@@ -1424,7 +1444,11 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
c_buf = (hvl_t *)malloc(num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
- tmp = buf;
+#if defined (_UNICOS)
+ tmp = (double *)buf;
+#else
+ tmp = (float *)buf;
+#endif
for (i=0; i < num_elem; i++) {
c_buf[i].len = (size_t)len[i];
c_buf[i].p = tmp;
@@ -1496,7 +1520,11 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
if ( status >=0 ) {
for (i=0; i < num_elem; i++) {
len[i] = (size_t_f)c_buf[i].len;
+#if defined (_UNICOS)
+ memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(double));
+#else
memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(float));
+#endif
}
}
ret_value = num_elem;