diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-18 18:20:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-18 18:20:31 (GMT) |
commit | 8a75f17670000b64440890e710b2f9053d2ae31e (patch) | |
tree | 6b705b544427f7cbb82ed15fda7a121fdb1e6428 /src/H5F.c | |
parent | 3c3a1388df917a17e863a59675e2d4ba4606af15 (diff) | |
download | hdf5-8a75f17670000b64440890e710b2f9053d2ae31e.zip hdf5-8a75f17670000b64440890e710b2f9053d2ae31e.tar.gz hdf5-8a75f17670000b64440890e710b2f9053d2ae31e.tar.bz2 |
[svn-r15232] Description:
Bring back revisions 14700:14800 from the trunk
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.5.2 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 41 |
1 files changed, 40 insertions, 1 deletions
@@ -990,6 +990,9 @@ done: * Programmer: Robb Matzke * matzke@llnl.gov * Jul 18 1997 + * Modifications: + * Vailin Choi, April 2, 2008 + * Free f->extpath * *------------------------------------------------------------------------- */ @@ -1091,6 +1094,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) /* Free the non-shared part of the file */ f->name = H5MM_xfree(f->name); + f->extpath = H5MM_xfree(f->extpath); f->mtab.child = H5MM_xfree(f->mtab.child); f->mtab.nalloc = 0; if(H5FO_top_dest(f) < 0) @@ -1101,6 +1105,8 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_dest() */ + + /*------------------------------------------------------------------------- * Function: H5F_open @@ -1180,6 +1186,9 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) * Modified H5F_flush call to take one flag instead of * multiple Boolean flags. * + * Vailin Choi, 2008-04-02 + * To formulate path for later searching of target file for external link + * via H5_build_extpath(). *------------------------------------------------------------------------- */ H5F_t * @@ -1376,6 +1385,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t d HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match") } /* end if */ + /* formulate the absolute path for later search of target file for external link */ + if (H5_build_extpath(name, &file->extpath) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build extpath") + /* Success */ ret_value = file; @@ -2175,6 +2188,33 @@ H5F_get_intent(const H5F_t *f) /*------------------------------------------------------------------------- + * Function: H5F_get_extpath + * + * Purpose: Retrieve the file's 'extpath' flags + * This is used by H5L_extern_traverse() to retrieve the main file's location + * when searching the target file. + * + * Return: 'extpath' on success/abort on failure (shouldn't fail) + * + * Programmer: Vailin Choi, April 2, 2008 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +char * +H5F_get_extpath(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_extpath) + + HDassert(f); + + FUNC_LEAVE_NOAPI(f->extpath) +} /* end H5F_get_extpath() */ + + +/*------------------------------------------------------------------------- * Function: H5F_sizeof_addr * * Purpose: Quick and dirty routine to retrieve the size of the file's size_t @@ -3664,4 +3704,3 @@ H5Fget_info(hid_t obj_id, H5F_info_t *finfo) done: FUNC_LEAVE_API(ret_value) } /* end H5Fget_info() */ - |