summaryrefslogtreecommitdiffstats
path: root/src/H5Fstdio.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-09-08 19:15:44 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-09-08 19:15:44 (GMT)
commitb5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67 (patch)
tree790770464529c19e146112e5b48c77218132d8b7 /src/H5Fstdio.c
parent72a58073cd51996f34906f992a2377073df5bbc0 (diff)
downloadhdf5-b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67.zip
hdf5-b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67.tar.gz
hdf5-b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67.tar.bz2
[svn-r673] Changes since 19980908
---------------------- ./COPYING Reformatted as text instead of C. Removed zlib crew from the list of contributors since no zlib code is actually in the hdf5 library. ./INSTALL ./INSTALL.ascired ./MANIFEST Minor updates for Beta release including version number change. ./INSTALL_MAINT Added information about making a release. ./RELEASE Updated function list based on public header files. ./bin/checkposix Got rid of complaints about some obvious things. ./doc/html/H5.api.html ./doc/html/RM_H5F.html ./src/H5F.c ./src/H5Fpublic.h ./test/tfile.c Changed H5Fget_create_template() and H5Fget_access_template() to H5Fget_create_plist() and H5Fget_access_plist() since that conforms better to lots of other names. ./doc/html/Datatypes.html ./doc/html/ExternalFiles.html ./doc/html/Files.html ./doc/html/H5.api.html ./doc/html/H5.sample_code.html ./doc/html/RM_H5F.html ./doc/html/RM_H5Front.html Changed `template' to `property list', etc. ./doc/html/Ragged.html [NEW] Documentation for ragged arrays. ./src/H5Iprivate.h ./src/H5Ipublic.h ./src/H5I.c Changed the scope of some symbols to be more local. ./src/H5.c ./src/H5AC.c ./src/H5D.c ./src/H5E.c ./src/H5F.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fsec2.c ./src/H5Fsplit.c ./src/H5Fstdio.c ./src/H5G.c ./src/H5Gnode.c ./src/H5HG.c ./src/H5I.c ./src/H5O.c ./src/H5Ocomp.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Omtime.c ./src/H5Oname.c ./src/H5P.c ./src/H5S.c ./src/H5Shyper.c ./src/H5Tbit.c ./src/H5Tconv.c ./src/H5V.c ./src/H5Z.c ./src/H5private.h Fixed some violations of our naming scheme by adding HD to the beginning of all Posix functions.
Diffstat (limited to 'src/H5Fstdio.c')
-rw-r--r--src/H5Fstdio.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c
index db2b3e2..5fa8078 100644
--- a/src/H5Fstdio.c
+++ b/src/H5Fstdio.c
@@ -82,9 +82,9 @@ H5F_stdio_open(const char *name, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_stdio_open, NULL);
- if (access(name, F_OK) < 0) {
+ if (HDaccess(name, F_OK) < 0) {
if ((flags & H5F_ACC_CREAT) && (flags & H5F_ACC_RDWR)) {
- f = fopen(name, "wb+");
+ f = HDfopen(name, "wb+");
} else {
HRETURN_ERROR(H5E_IO, H5E_CANTOPENFILE, NULL,
"file doesn't exist and CREAT wasn't specified");
@@ -96,12 +96,12 @@ H5F_stdio_open(const char *name, const H5F_access_t __unused__ *access_parms,
} else if (flags & H5F_ACC_RDWR) {
if (flags & H5F_ACC_TRUNC)
- f = fopen(name, "wb+");
+ f = HDfopen(name, "wb+");
else
- f = fopen(name, "rb+");
+ f = HDfopen(name, "rb+");
} else {
- f = fopen(name, "rb");
+ f = HDfopen(name, "rb");
}
if (!f)
HRETURN_ERROR(H5E_IO, H5E_CANTOPENFILE, NULL, "fopen failed");
@@ -115,17 +115,17 @@ H5F_stdio_open(const char *name, const H5F_access_t __unused__ *access_parms,
lf->u.stdio.op = H5F_OP_SEEK;
lf->u.stdio.cur = 0;
H5F_addr_reset(&(lf->eof));
- if (fseek(lf->u.stdio.f, 0, SEEK_END) < 0) {
+ if (HDfseek(lf->u.stdio.f, 0, SEEK_END) < 0) {
lf->u.stdio.op = H5F_OP_UNKNOWN;
} else {
- hssize_t x = ftell (lf->u.stdio.f);
+ hssize_t x = HDftell (lf->u.stdio.f);
assert (x>=0);
H5F_addr_inc(&(lf->eof), (hsize_t)x);
}
/* The unique key */
if (key) {
- fstat(fileno(f), &sb);
+ HDfstat(fileno(f), &sb);
key->dev = sb.st_dev;
key->ino = sb.st_ino;
}
@@ -156,7 +156,7 @@ H5F_stdio_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
{
FUNC_ENTER(H5F_stdio_close, FAIL);
- if (fclose(lf->u.stdio.f) < 0) {
+ if (HDfclose(lf->u.stdio.f) < 0) {
HRETURN_ERROR(H5E_IO, H5E_CLOSEERROR, FAIL, "fclose failed");
}
lf->u.stdio.f = NULL;
@@ -234,7 +234,7 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "fseek64 failed");
}
#else
- if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
+ if (HDfseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed");
}
#endif
@@ -255,8 +255,8 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
* will advance the file position by N. If N is negative or an error
* occurs then the file position is undefined.
*/
- n = fread(buf, 1, size, lf->u.stdio.f);
- if (n <= 0 && ferror(lf->u.stdio.f)) {
+ n = HDfread(buf, 1, size, lf->u.stdio.f);
+ if (n <= 0 && HDferror(lf->u.stdio.f)) {
lf->u.stdio.op = H5F_OP_UNKNOWN;
HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "fread failed");
} else if (n < size) {
@@ -341,7 +341,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "fseek64 failed");
}
#else
- if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
+ if (HDfseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed");
}
#endif
@@ -353,7 +353,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
* advanced by the number of bytes read. Otherwise nobody knows where it
* is.
*/
- if (n != fwrite(buf, 1, size, lf->u.stdio.f)) {
+ if (n != HDfwrite(buf, 1, size, lf->u.stdio.f)) {
lf->u.stdio.op = H5F_OP_UNKNOWN;
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "fwrite failed");
}
@@ -400,7 +400,7 @@ H5F_stdio_flush(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
/*
* Flush
*/
- if (fflush(lf->u.stdio.f) < 0) {
+ if (HDfflush(lf->u.stdio.f) < 0) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "fflush failed");
}
FUNC_LEAVE(SUCCEED);