summaryrefslogtreecommitdiffstats
path: root/fortran/test/t.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
commit427ff7da2848042f68ecfadf5a321b1d8077e9db (patch)
tree73024b1954031fbb724c2d96a485590348e5cc22 /fortran/test/t.c
parent9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff)
downloadhdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2
[svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
Diffstat (limited to 'fortran/test/t.c')
-rw-r--r--fortran/test/t.c38
1 files changed, 26 insertions, 12 deletions
diff --git a/fortran/test/t.c b/fortran/test/t.c
index 3109523..0299869 100644
--- a/fortran/test/t.c
+++ b/fortran/test/t.c
@@ -28,11 +28,10 @@
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5_fixname_c(_fcd base_name, int_f *base_namelen, hid_t_f* fapl, _fcd full_name, int_f *full_namelen)
+nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl, _fcd full_name, size_t_f *full_namelen)
{
int ret_value = -1;
char *c_base_name;
- int c_base_namelen;
char *c_full_name;
hid_t c_fapl;
@@ -43,8 +42,7 @@ nh5_fixname_c(_fcd base_name, int_f *base_namelen, hid_t_f* fapl, _fcd full_name
/*
* Convert FORTRAN name to C name
*/
- c_base_namelen = *base_namelen;
- c_base_name = (char *)HD5f2cstring(base_name, c_base_namelen);
+ c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
if (c_base_name == NULL) goto DONE;
c_full_name = (char *) HDmalloc((size_t)*full_namelen + 1);
if (c_full_name == NULL) goto DONE;
@@ -53,10 +51,11 @@ nh5_fixname_c(_fcd base_name, int_f *base_namelen, hid_t_f* fapl, _fcd full_name
* Call h5_fixname function.
*/
if (NULL != h5_fixname(c_base_name, c_fapl, c_full_name, (size_t)*full_namelen + 1)) {
- HD5packFstring(c_full_name, _fcdtocp(full_name), *full_namelen);
- ret_value = 0;
- goto DONE;
+ HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
+ ret_value = 0;
+ goto DONE;
}
+
DONE:
if (NULL != c_base_name) HDfree(c_base_name);
if (NULL != c_full_name) HDfree(c_full_name);
@@ -75,12 +74,11 @@ DONE:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5_cleanup_c(_fcd base_name, int_f *base_namelen, hid_t_f* fapl)
+nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl)
{
char filename[1024];
int ret_value = -1;
char *c_base_name[1];
- int c_base_namelen;
hid_t c_fapl;
/*
@@ -91,8 +89,7 @@ nh5_cleanup_c(_fcd base_name, int_f *base_namelen, hid_t_f* fapl)
/*
* Convert FORTRAN name to C name
*/
- c_base_namelen = *base_namelen;
- c_base_name[0] = (char *)HD5f2cstring(base_name, c_base_namelen);
+ c_base_name[0] = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
if (c_base_name[0] == NULL) goto DONE;
/*
@@ -104,10 +101,27 @@ nh5_cleanup_c(_fcd base_name, int_f *base_namelen, hid_t_f* fapl)
}
*/
h5_fixname(c_base_name[0], c_fapl, filename, sizeof(filename));
- remove(filename);
+ HDremove(filename);
ret_value =0;
+
DONE:
if (NULL != c_base_name[0]) HDfree(c_base_name[0]);
return ret_value;
}
+
+/*----------------------------------------------------------------------------
+ * Name: h5_exit_c
+ * Purpose: Call 'exit()' to terminate application
+ * Inputs: status - status for exit() to return
+ * Returns: none
+ * Programmer: Quincey Koziol
+ * Tuesday, December 14, 2004
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+void
+nh5_exit_c(int_f *status)
+{
+ HDexit((int)*status);
+} /* h5_exit_c */
+