diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Dependencies (renamed from src/.distdep) | 193 | ||||
-rw-r--r-- | src/H5.c | 29 | ||||
-rw-r--r-- | src/H5E.c | 16 | ||||
-rw-r--r-- | src/H5FDcore.c | 40 | ||||
-rw-r--r-- | src/H5FDfamily.c | 40 | ||||
-rw-r--r-- | src/H5FDgass.c | 3 | ||||
-rw-r--r-- | src/H5FDmpio.c | 8 | ||||
-rw-r--r-- | src/H5FDsec2.c | 30 | ||||
-rw-r--r-- | src/H5FDstdio.c | 16 | ||||
-rw-r--r-- | src/Makefile.in | 12 |
10 files changed, 271 insertions, 116 deletions
diff --git a/src/.distdep b/src/Dependencies index c25c67a..4ac2054 100644 --- a/src/.distdep +++ b/src/Dependencies @@ -1,3 +1,6 @@ +## This file is machine generated on GNU systems. +## Only temporary changes may be made here. + H5.lo: \ H5.c \ H5private.h \ @@ -30,7 +33,11 @@ H5.lo: \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ - H5HGpublic.h + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Rprivate.h \ + H5Zprivate.h H5A.lo: \ H5A.c \ H5private.h \ @@ -64,7 +71,10 @@ H5A.lo: \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ - H5Pprivate.h + H5Pprivate.h \ + H5Ppublic.h \ + H5Apkg.h \ + H5Aprivate.h H5AC.lo: \ H5AC.c \ H5private.h \ @@ -77,7 +87,9 @@ H5AC.lo: \ H5Fpublic.h \ H5Ipublic.h \ H5FDpublic.h \ - H5MMpublic.h + H5MMpublic.h \ + H5Eprivate.h \ + H5Epublic.h H5B.lo: \ H5B.c \ H5private.h \ @@ -139,7 +151,9 @@ H5D.lo: \ H5HLpublic.h \ H5MMprivate.h \ H5Pprivate.h \ - H5Ppublic.h + H5Ppublic.h \ + H5TBprivate.h \ + H5Vprivate.h H5E.lo: \ H5E.c \ H5private.h \ @@ -148,7 +162,9 @@ H5E.lo: \ H5api_adpt.h \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h H5F.lo: \ H5F.c \ H5FDcore.h \ @@ -191,7 +207,10 @@ H5F.lo: \ H5ACprivate.h \ H5ACpublic.h \ H5Eprivate.h \ - H5Epublic.h + H5Epublic.h \ + H5FDprivate.h \ + H5MMprivate.h \ + H5Pprivate.h H5Farray.lo: \ H5Farray.c \ H5private.h \ @@ -225,7 +244,8 @@ H5Farray.lo: \ H5Epublic.h \ H5Iprivate.h \ H5MFprivate.h \ - H5Pprivate.h + H5Pprivate.h \ + H5Ppublic.h H5Fistore.lo: \ H5Fistore.c \ H5private.h \ @@ -259,7 +279,10 @@ H5Fistore.lo: \ H5Epublic.h \ H5Iprivate.h \ H5MFprivate.h \ - H5MMprivate.h + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Vprivate.h H5FD.lo: \ H5FD.c \ H5private.h \ @@ -292,7 +315,10 @@ H5FDsec2.lo: \ H5Fpublic.h \ H5FDpublic.h \ H5MMpublic.h \ - H5FDsec2.h + H5FDsec2.h \ + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h H5FDfamily.lo: \ H5FDfamily.c \ H5private.h \ @@ -306,7 +332,10 @@ H5FDfamily.lo: \ H5Fpublic.h \ H5FDpublic.h \ H5MMpublic.h \ - H5FDfamily.h + H5FDfamily.h \ + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h H5FDmpio.lo: \ H5FDmpio.c \ H5private.h \ @@ -320,7 +349,10 @@ H5FDmpio.lo: \ H5Fpublic.h \ H5FDpublic.h \ H5MMpublic.h \ - H5FDmpio.h + H5FDmpio.h \ + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h H5FDcore.lo: \ H5FDcore.c \ H5private.h \ @@ -334,7 +366,10 @@ H5FDcore.lo: \ H5Fpublic.h \ H5FDpublic.h \ H5MMpublic.h \ - H5FDcore.h + H5FDcore.h \ + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h H5FDmulti.lo: \ H5FDmulti.c \ hdf5.h \ @@ -380,7 +415,10 @@ H5FDgass.lo: \ H5Fpublic.h \ H5FDpublic.h \ H5MMpublic.h \ - H5FDgass.h + H5FDgass.h \ + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h H5FDstdio.lo: \ H5FDstdio.c \ hdf5.h \ @@ -451,7 +489,9 @@ H5G.lo: \ H5ACpublic.h \ H5HLprivate.h \ H5HLpublic.h \ - H5Iprivate.h + H5Iprivate.h \ + H5MMprivate.h \ + H5RAprivate.h H5Gent.lo: \ H5Gent.c \ H5private.h \ @@ -470,7 +510,9 @@ H5Gent.lo: \ H5MMpublic.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Bprivate.h + H5Bprivate.h \ + H5Bpublic.h \ + H5HLprivate.h H5Gnode.lo: \ H5Gnode.c \ H5private.h \ @@ -508,7 +550,8 @@ H5Gnode.lo: \ H5Dpublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Pprivate.h + H5Pprivate.h \ + H5Ppublic.h H5Gstab.lo: \ H5Gstab.c \ H5private.h \ @@ -541,7 +584,9 @@ H5Gstab.lo: \ H5Rprivate.h \ H5Rpublic.h \ H5Sprivate.h \ - H5Spublic.h + H5Spublic.h \ + H5Dpublic.h \ + H5Zprivate.h H5HG.lo: \ H5HG.c \ H5private.h \ @@ -559,7 +604,10 @@ H5HG.lo: \ H5Epublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5MFprivate.h + H5MFprivate.h \ + H5MMprivate.h \ + H5Pprivate.h \ + H5Ppublic.h H5HL.lo: \ H5HL.c \ H5private.h \ @@ -591,7 +639,9 @@ H5I.lo: \ H5api_adpt.h \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h H5MF.lo: \ H5MF.c \ H5private.h \ @@ -604,8 +654,7 @@ H5MF.lo: \ H5Fprivate.h \ H5Fpublic.h \ H5FDpublic.h \ - H5MMpublic.h \ - H5FDprivate.h + H5MMpublic.h H5MM.lo: \ H5MM.c \ H5private.h \ @@ -647,7 +696,11 @@ H5O.lo: \ H5Rpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Dpublic.h + H5Dpublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Pprivate.h \ + H5Ppublic.h H5Oattr.lo: \ H5Oattr.c \ H5private.h \ @@ -676,7 +729,11 @@ H5Oattr.lo: \ H5Rpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Dpublic.h + H5Dpublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Apkg.h \ + H5Aprivate.h H5Ocomp.lo: \ H5Ocomp.c \ H5private.h \ @@ -763,7 +820,9 @@ H5Odtype.lo: \ H5Rpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Dpublic.h + H5Dpublic.h \ + H5Zprivate.h \ + H5Zpublic.h H5Oefl.lo: \ H5Oefl.c \ H5private.h \ @@ -792,7 +851,9 @@ H5Oefl.lo: \ H5Tpublic.h \ H5Rprivate.h \ H5Rpublic.h \ - H5Sprivate.h + H5Sprivate.h \ + H5Spublic.h \ + H5Dpublic.h H5Ofill.lo: \ H5Ofill.c \ H5private.h \ @@ -821,7 +882,11 @@ H5Ofill.lo: \ H5Rprivate.h \ H5Rpublic.h \ H5Sprivate.h \ - H5Spublic.h + H5Spublic.h \ + H5Dpublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Pprivate.h H5Olayout.lo: \ H5Olayout.c \ H5private.h \ @@ -850,7 +915,9 @@ H5Olayout.lo: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h \ - H5Zpublic.h + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h H5Omtime.lo: \ H5Omtime.c \ H5private.h \ @@ -932,7 +999,10 @@ H5Onull.lo: \ H5Tpublic.h \ H5Rprivate.h \ H5Rpublic.h \ - H5Sprivate.h + H5Sprivate.h \ + H5Spublic.h \ + H5Dpublic.h \ + H5Zprivate.h H5Osdspace.lo: \ H5Osdspace.c \ H5private.h \ @@ -1053,7 +1123,8 @@ H5P.lo: \ H5Eprivate.h \ H5Epublic.h \ H5FDprivate.h \ - H5MMprivate.h + H5MMprivate.h \ + H5Pprivate.h H5R.lo: \ H5R.c \ H5private.h \ @@ -1082,7 +1153,9 @@ H5R.lo: \ H5Rpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Zprivate.h + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h H5RA.lo: \ H5RA.c \ H5RAprivate.h \ @@ -1116,7 +1189,9 @@ H5RA.lo: \ H5Zpublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5Iprivate.h + H5Iprivate.h \ + H5MMprivate.h \ + H5Pprivate.h H5S.lo: \ H5S.c \ H5private.h \ @@ -1145,7 +1220,9 @@ H5S.lo: \ H5Rprivate.h \ H5Rpublic.h \ H5Sprivate.h \ - H5Spublic.h + H5Spublic.h \ + H5Dpublic.h \ + H5Zprivate.h H5Sall.lo: \ H5Sall.c \ H5private.h \ @@ -1174,7 +1251,9 @@ H5Sall.lo: \ H5Tprivate.h \ H5Tpublic.h \ H5Rprivate.h \ - H5Rpublic.h + H5Rpublic.h \ + H5Zprivate.h \ + H5Zpublic.h H5Shyper.lo: \ H5Shyper.c \ H5private.h \ @@ -1208,7 +1287,8 @@ H5Shyper.lo: \ H5Epublic.h \ H5Iprivate.h \ H5MMprivate.h \ - H5Pprivate.h + H5Pprivate.h \ + H5Ppublic.h H5Smpio.lo: \ H5Smpio.c \ H5private.h \ @@ -1237,7 +1317,9 @@ H5Smpio.lo: \ H5Tprivate.h \ H5Tpublic.h \ H5Rprivate.h \ - H5Rpublic.h + H5Rpublic.h \ + H5Zprivate.h \ + H5Zpublic.h H5Snone.lo: \ H5Snone.c \ H5private.h \ @@ -1266,7 +1348,9 @@ H5Snone.lo: \ H5Tprivate.h \ H5Tpublic.h \ H5Rprivate.h \ - H5Rpublic.h + H5Rpublic.h \ + H5Zprivate.h \ + H5Zpublic.h H5Spoint.lo: \ H5Spoint.c \ H5private.h \ @@ -1295,7 +1379,11 @@ H5Spoint.lo: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Rprivate.h + H5Rprivate.h \ + H5Rpublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Vprivate.h H5Sselect.lo: \ H5Sselect.c \ H5private.h \ @@ -1324,7 +1412,11 @@ H5Sselect.lo: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Rprivate.h + H5Rprivate.h \ + H5Rpublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Vprivate.h H5T.lo: \ H5T.c \ H5private.h \ @@ -1358,7 +1450,8 @@ H5T.lo: \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ - H5Pprivate.h + H5Pprivate.h \ + H5Ppublic.h H5Tbit.lo: \ H5Tbit.c \ H5private.h \ @@ -1381,8 +1474,7 @@ H5Tbit.lo: \ H5Tprivate.h \ H5Tpublic.h \ H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h + H5Gpublic.h H5Tconv.lo: \ H5Tconv.c \ H5Iprivate.h \ @@ -1408,7 +1500,10 @@ H5Tconv.lo: \ H5Rprivate.h \ H5Rpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h H5Tinit.lo: \ H5Tinit.c \ H5private.h \ @@ -1432,7 +1527,8 @@ H5Tinit.lo: \ H5Tprivate.h \ H5Tpublic.h \ H5Gprivate.h \ - H5Gpublic.h + H5Gpublic.h \ + H5Bprivate.h H5Tvlen.lo: \ H5Tvlen.c \ H5private.h \ @@ -1456,7 +1552,8 @@ H5Tvlen.lo: \ H5Tprivate.h \ H5Tpublic.h \ H5Gprivate.h \ - H5Gpublic.h + H5Gpublic.h \ + H5Bprivate.h H5TB.lo: \ H5TB.c \ H5private.h \ @@ -1465,7 +1562,9 @@ H5TB.lo: \ H5api_adpt.h \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h H5V.lo: \ H5V.c \ H5private.h \ @@ -1537,4 +1636,6 @@ H5Zdeflate.lo: \ H5MMpublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Fprivate.h + H5Fprivate.h \ + H5Fpublic.h \ + H5FDpublic.h @@ -1139,6 +1139,9 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds) * Added the `a' type letter for haddr_t arguments and `Mt' for * H5FD_mem_t arguments. * + * Robb Matzke, 1999-10-25 + * The `Ej' and `En' types are H5E_major_t and H5E_minor_t error + * types. We only print the integer value here. *------------------------------------------------------------------------- */ void @@ -1360,6 +1363,32 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) fprintf (out, "0x%lx", (unsigned long)error); } break; + + case 'j': + if (ptr) { + if (vp) { + fprintf(out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } + } else { + H5E_major_t n = va_arg(ap, H5E_major_t); + fprintf(out, "%d", (int)n); + } + break; + + case 'n': + if (ptr) { + if (vp) { + fprintf(out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } + } else { + H5E_minor_t n = va_arg(ap, H5E_minor_t); + fprintf(out, "%d", (int)n); + } + break; default: fprintf (out, "BADTYPE(E%c)", type[1]); @@ -539,19 +539,23 @@ H5E_push(H5E_major_t maj_num, H5E_minor_t min_num, const char *function_name, * Programmer: Quincey Koziol * Monday, October 18, 1999 * - * Notes: Basically a public API wrapper around the H5E_push function. + * Notes: Basically a public API wrapper around the H5E_push function. * * Modifications: * *------------------------------------------------------------------------- */ -__DLL__ herr_t H5Epush(const char *file, const char *func, - unsigned line, H5E_major_t maj, H5E_minor_t min, const char *str) +herr_t +H5Epush(const char *file, const char *func, unsigned line, H5E_major_t maj, + H5E_minor_t min, const char *str) { + herr_t ret_value; + FUNC_ENTER(H5Epush, FAIL); - - FUNC_LEAVE(H5E_push(maj,min,func,file,line,str)); -} /* end H5Epush() */ + H5TRACE6("e","ssIuEjEns",file,func,line,maj,min,str); + ret_value = H5E_push(maj, min, func, file, line, str); + FUNC_LEAVE(ret_value); +} /*------------------------------------------------------------------------- diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 6085e6f..888dabe 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -175,8 +175,8 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store) H5FD_core_fapl_t fa; FUNC_ENTER(H5FD_set_fapl_core, FAIL); + H5TRACE3("e","izb",fapl_id,increment,backing_store); - /* NO TRACE */ if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl"); fa.increment = increment; @@ -212,8 +212,8 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/, H5FD_core_fapl_t *fa; FUNC_ENTER(H5Pget_fapl_core, FAIL); + H5TRACE3("e","ixx",fapl_id,increment,backing_store); - /* NO TRACE */ if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl"); if (H5FD_CORE!=H5Pget_driver(fapl_id)) @@ -253,7 +253,8 @@ H5FD_core_fapl_get(H5FD_t *_file) FUNC_ENTER(H5FD_core_fapl_get, NULL); if (NULL==(fa=H5MM_calloc(sizeof(H5FD_core_fapl_t)))) - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); fa->increment = file->increment; fa->backing_store = (file->fd>=0); @@ -301,12 +302,14 @@ H5FD_core_open(const char *name, unsigned UNUSED flags, hid_t fapl_id, /* Open backing store */ if (fa && fa->backing_store && name && (fd=open(name, O_CREAT|O_TRUNC|O_RDWR, 0666))<0) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open backing store"); + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + "unable to open backing store"); } /* Create the new file struct */ if (NULL==(file=H5MM_calloc(sizeof(H5FD_core_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; if (name && *name) { file->name = HDstrdup(name); @@ -354,13 +357,15 @@ H5FD_core_flush(H5FD_t *_file) unsigned char *ptr = file->mem; if (0!=lseek(file->fd, 0, SEEK_SET)) - HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store"); + HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, + "error seeking in backing store"); while (size) { ssize_t n = write(file->fd, ptr, size); if (n<0 && EINTR==errno) continue; if (n<0) - HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "error writing backing store"); + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, + "error writing backing store"); ptr += (size_t)n; size -= (size_t)n; } @@ -398,7 +403,7 @@ H5FD_core_close(H5FD_t *_file) /* Flush */ if (H5FD_core_flush(_file)<0) - HRETURN_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "can't flush file"); + HRETURN_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file"); /* Release resources */ if (file->fd>=0) close(file->fd); @@ -434,23 +439,21 @@ H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) { const H5FD_core_t *f1 = (const H5FD_core_t*)_f1; const H5FD_core_t *f2 = (const H5FD_core_t*)_f2; + int ret_value; FUNC_ENTER(H5FD_core_cmp, FAIL); if (NULL==f1->name && NULL==f2->name) { - if (f1<f2) - HRETURN(-1); - if (f1>f2) - HRETURN(1); + if (f1<f2) HRETURN(-1); + if (f1>f2) HRETURN(1); HRETURN(0); } - if (NULL==f1->name) - HRETURN(-1); - if (NULL==f2->name) - HRETURN(1); + if (NULL==f1->name) HRETURN(-1); + if (NULL==f2->name) HRETURN(1); - FUNC_LEAVE(HDstrcmp(f1->name, f2->name)); + ret_value = HDstrcmp(f1->name, f2->name); + FUNC_LEAVE(ret_value); } @@ -652,7 +655,8 @@ H5FD_core_write(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr, if (NULL==file->mem) x = H5MM_malloc(new_eof); else x = H5MM_realloc(file->mem, new_eof); if (!x) - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate memory block"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "unable to allocate memory block"); file->mem = x; file->eof = new_eof; } diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index f9d0c51..a6a5548 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -169,8 +169,8 @@ H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size, hid_t memb_fapl_id) herr_t ret_value=FAIL; H5FD_family_fapl_t fa; - /*NO TRACE*/ FUNC_ENTER(H5FD_set_fapl_family, FAIL); + H5TRACE3("e","ihi",fapl_id,memb_size,memb_fapl_id); /* Check arguments */ if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) @@ -215,8 +215,8 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size/*out*/, { H5FD_family_fapl_t *fa; - /*NO TRACE*/ FUNC_ENTER(H5Pget_fapl_family, FAIL); + H5TRACE3("e","ixx",fapl_id,memb_size,memb_fapl_id); if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl"); @@ -257,7 +257,8 @@ H5FD_family_fapl_get(H5FD_t *_file) FUNC_ENTER(H5FD_family_fapl_get, NULL); if (NULL==(fa=H5MM_calloc(sizeof(H5FD_family_fapl_t)))) - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); fa->memb_size = file->memb_size; fa->memb_fapl_id = H5Pcopy(file->memb_fapl_id); @@ -291,7 +292,8 @@ H5FD_family_fapl_copy(const void *_old_fa) FUNC_ENTER(H5FD_family_fapl_copy, NULL); if (NULL==(new_fa=H5MM_malloc(sizeof(H5FD_family_fapl_t)))) - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); memcpy(new_fa, old_fa, sizeof(H5FD_family_fapl_t)); new_fa->memb_fapl_id = H5Pcopy(old_fa->memb_fapl_id); @@ -355,7 +357,8 @@ H5FD_family_dxpl_copy(const void *_old_dx) FUNC_ENTER(H5FD_family_dxpl_copy, NULL); if (NULL==(new_dx=H5MM_malloc(sizeof(H5FD_family_dxpl_t)))) - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); memcpy(new_dx, old_dx, sizeof(H5FD_family_dxpl_t)); new_dx->memb_dxpl_id = H5Pcopy(old_dx->memb_dxpl_id); @@ -432,7 +435,8 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, /* Initialize file from file access properties */ if (NULL==(file=H5MM_calloc(sizeof(H5FD_family_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate file struct"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "unable to allocate file struct"); if (H5P_DEFAULT==fapl_id) { file->memb_fapl_id = H5P_DEFAULT; file->memb_size = 1024*1024*1024; /*1GB*/ @@ -460,7 +464,8 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, int n = MAX(64, 2*file->amembs); H5FD_t **x = H5MM_realloc(file->memb, n*sizeof(H5FD_t*)); if (!x) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't reallocate members"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "unable to reallocate members"); file->amembs = n; file->memb = x; } @@ -478,7 +483,8 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, } H5E_END_TRY; if (!file->memb[file->nmembs]) { if (0==file->nmembs) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open member file"); + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + "unable to open member file"); H5Eclear(); break; } @@ -550,7 +556,8 @@ H5FD_family_close(H5FD_t *_file) } } if (nerrors) - HRETURN_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close member files"); + HRETURN_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, + "unable to close member files"); /* Clean up other stuff */ H5Pclose(file->memb_fapl_id); @@ -662,7 +669,8 @@ H5FD_family_set_eoa(H5FD_t *_file, haddr_t eoa) int n = MAX(64, 2*file->amembs); H5FD_t **x = H5MM_realloc(file->memb, n*sizeof(H5FD_t*)); if (!x) - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate memory block"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "unable to allocate memory block"); file->amembs = n; file->memb = x; file->nmembs = i; @@ -677,7 +685,8 @@ H5FD_family_set_eoa(H5FD_t *_file, haddr_t eoa) file->memb_fapl_id, file->memb_size); } H5E_END_TRY; if (NULL==file->memb[i]) - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "can't open member file"); + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, + "unable to open member file"); } /* Set the EOA marker for the member */ @@ -797,7 +806,8 @@ H5FD_family_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, assert(i<file->nmembs); if (H5FDread(file->memb[i], memb_dxpl_id, sub, req, buf)<0) - HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "member file read failed"); + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, + "member file read failed"); addr += req; buf += req; @@ -859,7 +869,8 @@ H5FD_family_write(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, assert(i<file->nmembs); if (H5FDwrite(file->memb[i], memb_dxpl_id, sub, req, buf)<0) - HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "member file write failed"); + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, + "member file write failed"); addr += req; buf += req; @@ -899,7 +910,8 @@ H5FD_family_flush(H5FD_t *_file) nerrors++; if (nerrors) - HRETURN_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "can't flush member files"); + HRETURN_ERROR(H5E_IO, H5E_BADVALUE, FAIL, + "unable to flush member files"); FUNC_LEAVE(SUCCEED); } diff --git a/src/H5FDgass.c b/src/H5FDgass.c index 96b7a1b..ec545f1 100644 --- a/src/H5FDgass.c +++ b/src/H5FDgass.c @@ -210,7 +210,6 @@ H5Pset_fapl_gass(hid_t fapl_id, GASS_Info info) herr_t ret_value=FAIL; H5FD_gass_fapl_t fa; - /*NO TRACE*/ FUNC_ENTER(H5FD_set_fapl_gass, FAIL); /* Check arguments */ @@ -256,8 +255,8 @@ H5Pget_fapl_gass(hid_t fapl_id, GASS_Info *info/*out*/) { H5FD_gass_fapl_t *fa; - /*NO TRACE*/ FUNC_ENTER(H5Pget_fapl_gass, FAIL); + H5TRACE2("e","ix",fapl_id,info); if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl"); diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index e495573..03db98e 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -235,8 +235,8 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) herr_t ret_value=FAIL; H5FD_mpio_fapl_t fa; - /*NO TRACE*/ FUNC_ENTER(H5FD_set_fapl_mpio, FAIL); + H5TRACE3("e","iMcMi",fapl_id,comm,info); /* Check arguments */ if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) @@ -288,8 +288,8 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/) { H5FD_mpio_fapl_t *fa; - /*NO TRACE*/ FUNC_ENTER(H5Pget_fapl_mpio, FAIL); + H5TRACE3("e","ixx",fapl_id,comm,info); if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl"); @@ -337,8 +337,8 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode) herr_t ret_value=FAIL; H5FD_mpio_dxpl_t dx; - /*NO TRACE*/ FUNC_ENTER(H5Pset_dxpl_mpio, FAIL); + H5TRACE2("e","iDt",dxpl_id,xfer_mode); /* Check arguments */ if (H5P_DATA_XFER!=H5Pget_class(dxpl_id)) @@ -381,8 +381,8 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/) { H5FD_mpio_dxpl_t *dx; - /*NO TRACE*/ FUNC_ENTER(H5Pget_dxpl_mpio, FAIL); + H5TRACE2("e","ix",dxpl_id,xfer_mode); if (H5P_DATA_XFER!=H5Pget_class(dxpl_id)) HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); 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; diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 4c3ca45..fd9efa0 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -10,7 +10,7 @@ * Notes: Ported to the new H5FD architecture on 10/18/99 - QAK * */ -#include "hdf5.h" +#include <hdf5.h> #include <assert.h> #include <stdlib.h> #include <sys/stat.h> @@ -198,15 +198,19 @@ H5FD_stdio_init(void) herr_t H5Pset_fapl_stdio(hid_t fapl_id) { - static const char *func="H5FDset_fapl_stdio"; /* Function Name for error reporting */ + static const char *func="H5FDset_fapl_stdio"; /*for error reporting*/ + + /*NO TRACE*/ /* Clear the error stack */ H5Eclear(); - if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) - H5Epush_ret(func, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1); - - return(H5Pset_driver(fapl_id, H5FD_STDIO, NULL)); + if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id)) { + H5Epush_ret(func, H5E_PLIST, H5E_BADTYPE, + "not a file access property list", -1); + } + + return H5Pset_driver(fapl_id, H5FD_STDIO, NULL); } diff --git a/src/Makefile.in b/src/Makefile.in index 0e179b5..82ef99d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -7,8 +7,6 @@ top_srcdir=@top_srcdir@ top_builddir=.. srcdir=@srcdir@ -VPATH=.:@srcdir@ -.PATH: . @srcdir@ @COMMENCE@ TRACE=perl $(top_srcdir)/bin/trace @@ -24,11 +22,11 @@ CLEAN=libhdf5.settings LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5E.c H5F.c H5Farray.c H5Fistore.c \ H5FD.c H5FDsec2.c H5FDfamily.c H5FDmpio.c H5FDcore.c H5FDmulti.c \ H5FDgass.c H5FDstdio.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c \ - H5I.c H5MF.c H5MM.c H5O.c H5Oattr.c H5Ocomp.c H5Ocont.c H5Odtype.c H5Oefl.c \ - H5Ofill.c H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c H5Osdspace.c \ - H5Oshared.c H5Ostab.c H5P.c H5R.c H5RA.c H5S.c H5Sall.c H5Shyper.c \ - H5Smpio.c H5Snone.c H5Spoint.c H5Sselect.c H5T.c H5Tbit.c H5Tconv.c \ - H5Tinit.c H5Tvlen.c H5TB.c H5V.c H5Z.c H5Zdeflate.c + H5I.c H5MF.c H5MM.c H5O.c H5Oattr.c H5Ocomp.c H5Ocont.c H5Odtype.c \ + H5Oefl.c H5Ofill.c H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c \ + H5Osdspace.c H5Oshared.c H5Ostab.c H5P.c H5R.c H5RA.c H5S.c H5Sall.c \ + H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c H5Sselect.c H5T.c H5Tbit.c \ + H5Tconv.c H5Tinit.c H5Tvlen.c H5TB.c H5V.c H5Z.c H5Zdeflate.c LIB_OBJ=$(LIB_SRC:.c=.lo) |