summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-11-01 15:21:16 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-11-01 15:21:16 (GMT)
commiteb8747499d505f2cdcb448fffb127eba48dcccd8 (patch)
tree1a83fbf43326af6be447995f1012e2fa6f969784 /src/H5FDsec2.c
parent7dec251c1a4d8c780a6f8833d51e0815648ec134 (diff)
downloadhdf5-eb8747499d505f2cdcb448fffb127eba48dcccd8.zip
hdf5-eb8747499d505f2cdcb448fffb127eba48dcccd8.tar.gz
hdf5-eb8747499d505f2cdcb448fffb127eba48dcccd8.tar.bz2
[svn-r1802] Changes since 19991019
---------------------- ./MANIFEST ./configure.in ./configure [REGENERATED] Added more checking for `make' features. ./Makefile.in ./doc/Makefile.in ./doc/html/Makefile.in ./doc/html/Tutor/Makefile.in ./examples/Makefile.in ./pablo/Makefile.in ./src/Makefile.in ./test/Makefile.in ./testpar/Makefile.in ./tools/Makefile.in ./config/commence.in ./config/conclude.in ./config/depend.in [REMOVED] ./config/depend1.in [NEW] ./config/depend2.in [NEW] ./config/depend3.in [NEW] ./config/depend4.in [NEW] ./config/dependN.in [NEW] The directory search stuff was moved into commence.in, thereby shortening the Makefile.in prologues. ./doc/html/Dependencies [NEW] ./doc/html/Tutor/Dependencies [NEW] ./examples/Dependencies [NEW] ./src/Dependencies [NEW] ./test/Dependencies [NEW] ./testpar/Dependencies [NEW] ./tools/Dependencies [NEW] The `.distdep' files were all renamed to `Dependencies' to make them more obvious. They are required (but may be empty) in every directory that has a Makefile.in that ends with @CONCLUDE@ (you'll get an obvious error from make if you forgot to create one). ./bin/trace ./src/H5.c Added H5E_major_t and H5E_minor_t although tracing only prints the integer value. ./src/H5E.c ./src/H5Epublic.h Added tracing information. ./src/H5FDcore.c ./src/H5FDfamily.c ./src/H5FDgass.c ./src/H5FDmpio.c ./src/H5FDsec2.c ./src/H5FDstdio.c Fixed places where FUNC_LEAVE() evaluated it's argument more than once. Added tracing information. Wrapped long lines. ./config/gnu-flags Fixed a syntax error when we don't have a gnu compiler.
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index f91e594..db92793 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -213,8 +213,8 @@ H5Pset_fapl_sec2(hid_t fapl_id)
{
herr_t ret_value=FAIL;
- /*NO TRACE*/
FUNC_ENTER(H5FD_set_fapl_sec2, FAIL);
+ H5TRACE1("e","i",fapl_id);
if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id))
HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl");
@@ -275,24 +275,25 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
/* Open the file */
if ((fd=HDopen(name, o_flags, 0666))<0)
- HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file");
+ HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file");
if (fstat(fd, &sb)<0) {
close(fd);
- HRETURN_ERROR(H5E_FILE, H5E_BADFILE, NULL, "can't fstat file");
+ HRETURN_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");
}
/* Create the new file struct */
if (NULL==(file=H5MM_calloc(sizeof(H5FD_sec2_t))))
- HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate file struct");
+ HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "unable to allocate file struct");
file->fd = fd;
file->eof = sb.st_size;
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
#ifdef WIN32
- filehandle = _get_osfhandle(fd);
- results = GetFileInformationByHandle(filehandle, &fileinfo);
- file->fileindexhi = fileinfo.nFileIndexHigh;
- file->fileindexlo = fileinfo.nFileIndexLow;
+ filehandle = _get_osfhandle(fd);
+ results = GetFileInformationByHandle(filehandle, &fileinfo);
+ file->fileindexhi = fileinfo.nFileIndexHigh;
+ file->fileindexlo = fileinfo.nFileIndexLow;
#else
file->device = sb.st_dev;
file->inode = sb.st_ino;
@@ -325,9 +326,9 @@ H5FD_sec2_close(H5FD_t *_file)
FUNC_ENTER(H5FD_sec2_close, FAIL);
if (H5FD_sec2_flush(_file)<0)
- HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't flush file");
+ HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to flush file");
if (close(file->fd)<0)
- HRETURN_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "can't close file");
+ HRETURN_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file");
H5MM_xfree(file);
@@ -516,7 +517,8 @@ H5FD_sec2_read(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr,
file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0) {
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
- HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "can't seek to proper position");
+ HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL,
+ "unable to seek to proper position");
}
/*
@@ -595,7 +597,8 @@ H5FD_sec2_write(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr,
file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0) {
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
- HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "can't seek to proper position");
+ HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL,
+ "unable to seek to proper position");
}
/*
@@ -655,7 +658,8 @@ H5FD_sec2_flush(H5FD_t *_file)
if (file->eoa>file->eof) {
if (-1==file_seek(file->fd, file->eoa-1, SEEK_SET))
- HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "can't seek to proper position");
+ HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL,
+ "unable to seek to proper position");
if (write(file->fd, "", 1)!=1)
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed");
file->eof = file->eoa;