diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-10-13 21:28:53 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-10-13 21:28:53 (GMT) |
commit | 5389806ce86337bad48fe293b4faabd8c8c61b53 (patch) | |
tree | 0cb9dbd4c8abe67fdc7db50191ba9551bb69dd6b | |
parent | 6fd7f81615780776b3e78860e9f386ac55994db9 (diff) | |
download | hdf5-5389806ce86337bad48fe293b4faabd8c8c61b53.zip hdf5-5389806ce86337bad48fe293b4faabd8c8c61b53.tar.gz hdf5-5389806ce86337bad48fe293b4faabd8c8c61b53.tar.bz2 |
[svn-r757] Added code for object references.
-rw-r--r-- | src/.distdep | 648 | ||||
-rw-r--r-- | src/H5.c | 73 | ||||
-rw-r--r-- | src/H5D.c | 233 | ||||
-rw-r--r-- | src/H5Distore.c | 2 | ||||
-rw-r--r-- | src/H5Dprivate.h | 2 | ||||
-rw-r--r-- | src/H5E.c | 1 | ||||
-rw-r--r-- | src/H5Epublic.h | 7 | ||||
-rw-r--r-- | src/H5F.c | 6 | ||||
-rw-r--r-- | src/H5Fistore.c | 2 | ||||
-rw-r--r-- | src/H5Fprivate.h | 18 | ||||
-rw-r--r-- | src/H5I.c | 4 | ||||
-rw-r--r-- | src/H5R.c | 400 | ||||
-rw-r--r-- | src/H5Rpublic.h | 31 | ||||
-rw-r--r-- | src/hdf5.h | 1 |
14 files changed, 1025 insertions, 403 deletions
diff --git a/src/.distdep b/src/.distdep index da590af..d76c013 100644 --- a/src/.distdep +++ b/src/.distdep @@ -1,3 +1,67 @@ +H5.o: \ + H5.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Zpublic.h \ + H5Rpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h +H5A.o: \ + H5A.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Apkg.h \ + H5Aprivate.h H5AC.o: \ H5AC.c \ H5private.h \ @@ -29,6 +93,14 @@ H5B.o: \ H5MFprivate.h \ H5MFpublic.h \ H5MMprivate.h +H5E.o: \ + H5E.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Eprivate.h H5Farray.o: \ H5Farray.c \ H5private.h \ @@ -114,6 +186,34 @@ H5Flow.o: \ H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h +H5Fmpio.o: \ + H5Fmpio.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Dprivate.h \ + H5Dpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5MMprivate.h \ + H5MMpublic.h H5Fsec2.o: \ H5Fsec2.c \ H5private.h \ @@ -204,6 +304,53 @@ H5Gnode.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h +H5Gstab.o: \ + H5Gstab.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Gpkg.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HLprivate.h \ + H5HLpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h +H5HG.o: \ + H5HG.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h H5HL.o: \ H5HL.c \ H5private.h \ @@ -222,6 +369,14 @@ H5HL.o: \ H5MFprivate.h \ H5MFpublic.h \ H5MMprivate.h +H5I.o: \ + H5I.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Eprivate.h H5MF.o: \ H5MF.c \ H5private.h \ @@ -391,6 +546,29 @@ H5Oefl.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h +H5Ofill.o: \ + H5Ofill.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h H5Olayout.o: \ H5Olayout.c \ H5private.h \ @@ -547,106 +725,71 @@ H5Ostab.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h -H5Sall.o: \ - H5Sall.c \ +H5P.o: \ + H5P.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ + H5Iprivate.h \ H5Ipublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h -H5Spoint.o: \ - H5Spoint.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Vprivate.h -H5Tbit.o: \ - H5Tbit.c \ - H5private.h \ - H5public.h \ - H5config.h \ H5Eprivate.h \ H5Epublic.h \ + H5MMprivate.h +H5RA.o: \ + H5RA.c \ + H5RAprivate.h \ + H5RApublic.h \ H5Ipublic.h \ - H5Iprivate.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h -H5V.o: \ - H5V.c \ - H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Dprivate.h \ + H5Dpublic.h \ + H5private.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ H5Sprivate.h \ - H5Spublic.h -H5Z.o: \ - H5Z.c \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h +H5S.o: \ + H5S.c \ H5private.h \ H5public.h \ H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h \ H5MMprivate.h \ H5MMpublic.h \ H5Oprivate.h \ @@ -660,89 +803,71 @@ H5Z.o: \ H5Bpublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5.o: \ - H5.c \ + H5Tprivate.h +H5Sall.o: \ + H5Sall.c \ H5private.h \ H5public.h \ H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5Iprivate.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Zpublic.h \ + H5Ipublic.h \ H5Sprivate.h \ H5Spublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h -H5A.o: \ - H5A.c \ +H5Shyper.o: \ + H5Shyper.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Ipublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ + H5Vprivate.h \ H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Apkg.h \ - H5Aprivate.h -H5D.o: \ - H5D.c \ + H5MMpublic.h +H5Smpio.o: \ + H5Smpio.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Ipublic.h \ - H5ACprivate.h \ - H5ACpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ @@ -752,87 +877,37 @@ H5D.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HLprivate.h \ - H5HLpublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5TBprivate.h -H5E.o: \ - H5E.c \ + H5Tpublic.h +H5Spoint.o: \ + H5Spoint.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Ipublic.h \ - H5Eprivate.h -H5Gstab.o: \ - H5Gstab.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Ipublic.h \ H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Gpkg.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5HLprivate.h \ - H5HLpublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h -H5HG.o: \ - H5HG.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h -H5I.o: \ - H5I.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h -H5Ofill.o: \ - H5Ofill.c \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Vprivate.h +H5Sselect.o: \ + H5Sselect.c \ H5private.h \ H5public.h \ H5config.h \ @@ -842,8 +917,8 @@ H5Ofill.o: \ H5Iprivate.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ @@ -851,24 +926,28 @@ H5Ofill.o: \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h -H5P.o: \ - H5P.c \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Zprivate.h \ + H5Zpublic.h +H5T.o: \ + H5T.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Dprivate.h \ + H5Dpublic.h \ H5Ipublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ @@ -879,50 +958,87 @@ H5P.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ + H5Iprivate.h \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h -H5R.o: \ - H5R.c \ +H5Tbit.o: \ + H5Tbit.c \ H5private.h \ H5public.h \ H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Iprivate.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Gprivate.h +H5Tconv.o: \ + H5Tconv.c \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h -H5S.o: \ - H5S.c \ - H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ + H5private.h \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ - H5Bpublic.h \ + H5Bpublic.h +H5Tinit.o: \ + H5Tinit.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Tpkg.h \ H5HGprivate.h \ H5HGpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ H5Tprivate.h -H5Shyper.o: \ - H5Shyper.c \ +H5TB.o: \ + H5TB.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Eprivate.h +H5V.o: \ + H5V.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Sprivate.h \ - H5Spublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ @@ -930,30 +1046,24 @@ H5Shyper.o: \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Vprivate.h \ - H5MMprivate.h \ - H5MMpublic.h -H5Sselect.o: \ - H5Sselect.c \ + H5Sprivate.h \ + H5Spublic.h +H5Z.o: \ + H5Z.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Iprivate.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ @@ -961,24 +1071,27 @@ H5Sselect.o: \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h -H5T.o: \ - H5T.c \ +H5D.o: \ + H5D.c \ H5private.h \ H5public.h \ H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ + H5Iprivate.h \ H5Ipublic.h \ + H5ACprivate.h \ + H5ACpublic.h \ H5Fprivate.h \ H5Fpublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ @@ -993,26 +1106,24 @@ H5T.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Iprivate.h \ H5Eprivate.h \ H5Epublic.h \ - H5MMprivate.h -H5TB.o: \ - H5TB.c \ + H5HLprivate.h \ + H5HLpublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5TBprivate.h +H5R.o: \ + H5R.c \ H5private.h \ H5public.h \ H5config.h \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h -H5Fmpio.o: \ - H5Fmpio.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ H5Dprivate.h \ H5Dpublic.h \ H5Fprivate.h \ @@ -1031,10 +1142,11 @@ H5Fmpio.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5MMprivate.h \ - H5MMpublic.h -H5G.o: \ - H5G.c \ + H5Eprivate.h \ + H5Epublic.h \ + H5Rprivate.h +H5F.o: \ + H5F.c \ H5private.h \ H5public.h \ H5config.h \ @@ -1059,79 +1171,15 @@ H5G.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Gpkg.h \ + H5Iprivate.h \ H5ACprivate.h \ H5ACpublic.h \ - H5HLprivate.h \ - H5HLpublic.h -H5Smpio.o: \ - H5Smpio.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h -H5Tconv.o: \ - H5Tconv.c \ - H5Iprivate.h \ - H5Ipublic.h \ - H5public.h \ - H5config.h \ - H5private.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h -H5Tinit.o: \ - H5Tinit.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ - H5MMpublic.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Tprivate.h -H5F.o: \ - H5F.c \ + H5MMpublic.h +H5G.o: \ + H5G.c \ H5private.h \ H5public.h \ H5config.h \ @@ -1156,10 +1204,10 @@ H5F.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Iprivate.h \ - H5ACprivate.h \ - H5ACpublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h + H5Gpkg.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5HLprivate.h \ + H5HLpublic.h @@ -53,6 +53,7 @@ FILE *fdopen(int fd, const char *mode); #include <H5Iprivate.h> /*atoms */ #include <H5MMprivate.h> /*memory management */ #include <H5Pprivate.h> /*property lists */ +#include <H5Rpublic.h> /* References */ #include <H5Sprivate.h> /*data spaces */ #include <H5Tprivate.h> /*data types */ #include <H5Zprivate.h> /*filters */ @@ -1911,6 +1912,78 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } break; + case 'r': + if (ptr) { + if (vp) { + fprintf (out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } + } else { + href_t ref = va_arg (ap, href_t); + switch (ref.type) { + case H5R_BADTYPE: + fprintf (out, "H5R_BADTYPE"); + break; + case H5R_OBJECT: + fprintf (out, "H5R_OBJECT"); + break; + case H5R_DATASET_REGION: + fprintf (out, "H5R_DATASET_REGION"); + break; + case H5R_INTERNAL: + fprintf (out, "H5R_INTERNAL"); + break; + case H5R_MAXTYPE: + fprintf (out, "H5R_MAXTYPE"); + break; + default: + fprintf (out, "BADTYPE(%ld)", (long)ref.type); + break; + } + } + break; + + case 'R': + switch (type[1]) { + case 't': + if (ptr) { + if (vp) { + fprintf(out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } + } else { + H5R_type_t reftype = va_arg(ap, H5R_type_t); + switch (reftype) { + case H5R_BADTYPE: + fprintf(out, "H5R_BADTYPE"); + break; + case H5R_OBJECT: + fprintf(out, "H5R_OBJECT"); + break; + case H5R_DATASET_REGION: + fprintf(out, "H5R_DATASET_REGION"); + break; + case H5R_INTERNAL: + fprintf(out, "H5R_INTERNAL"); + break; + case H5R_MAXTYPE: + fprintf(out, "H5R_MAXTYPE"); + break; + default: + fprintf(out, "BADTYPE(%ld)", (long)reftype); + break; + } + } + break; + + default: + fprintf(out, "BADTYPE(S%c)", type[1]); + goto error; + } + break; + case 'S': switch (type[1]) { case 'c': @@ -32,10 +32,6 @@ static char RcsId[] = "@(#)$Revision$"; #include <H5Vprivate.h> /* Vector and array functions */ #include <H5Zprivate.h> /* Data filters */ -#ifdef QAK -int qak_debug=0; -#endif /* QAK */ - #define PABLO_MASK H5D_mask /* @@ -802,6 +798,52 @@ H5Dextend(hid_t dset_id, const hsize_t *size) FUNC_LEAVE (SUCCEED); } + + +/*------------------------------------------------------------------------- + * Function: H5D_new + * + * Purpose: Creates a new, empty dataset structure + * + * Return: Success: Pointer to a new dataset descriptor. + * + * Failure: NULL + * + * Errors: + * + * Programmer: Quincey Koziol + * Monday, October 12, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +H5D_t * +H5D_new(const H5D_create_t *create_parms) +{ + H5D_t *ret_value = NULL; /*return value */ + + FUNC_ENTER(H5D_new, NULL); + + /* check args */ + /* Nothing to check */ + + if (NULL==(ret_value = H5MM_calloc(sizeof(H5D_t)))) { + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); + } + if(create_parms!=NULL) + ret_value->create_parms = H5P_copy (H5P_DATASET_CREATE, create_parms); + else + ret_value->create_parms = H5P_copy (H5P_DATASET_CREATE, &H5D_create_dflt); + H5F_addr_undef(&(ret_value->ent.header)); + + /* Success */ + +done: + FUNC_LEAVE(ret_value); +} /* end H5D_new() */ + /*------------------------------------------------------------------------- * Function: H5D_create @@ -871,13 +913,11 @@ H5D_create(H5G_entry_t *loc, const char *name, const H5T_t *type, } /* Initialize the dataset object */ - if (NULL==(new_dset = H5MM_calloc(sizeof(H5D_t)))) { - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, + if (NULL==(new_dset = H5D_new(create_parms))) { + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } - H5F_addr_undef(&(new_dset->ent.header)); new_dset->type = H5T_copy(type, H5T_COPY_ALL); - new_dset->create_parms = H5P_copy (H5P_DATASET_CREATE, create_parms); efl = &(new_dset->create_parms->efl); /* Total raw data size */ @@ -1078,6 +1118,8 @@ H5D_create(H5G_entry_t *loc, const char *name, const H5T_t *type, * Modifications: * Robb Matzke, 9 Jun 1998 * The data space message is no longer cached in the dataset struct. + * Quincey Koziol, 12 Oct 1998 + * Moved guts of function into H5D_open_oid * *------------------------------------------------------------------------- */ @@ -1086,8 +1128,6 @@ H5D_open(H5G_entry_t *loc, const char *name) { H5D_t *dataset = NULL; /*the dataset which was found */ H5D_t *ret_value = NULL; /*return value */ - intn i; - H5S_t *space = NULL; FUNC_ENTER(H5D_open, NULL); @@ -1095,52 +1135,93 @@ H5D_open(H5G_entry_t *loc, const char *name) assert (loc); assert (name && *name); - if (NULL==(dataset = H5MM_calloc(sizeof(H5D_t)))) { - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, + if (NULL==(dataset = H5D_new(NULL))) { + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } - dataset->create_parms = H5P_copy (H5P_DATASET_CREATE, &H5D_create_dflt); - H5F_addr_undef(&(dataset->ent.header)); - /* Open the dataset object */ + /* Find the dataset object */ if (H5G_find(loc, name, NULL, &(dataset->ent)) < 0) { - HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); } + /* Open the dataset object */ + if (H5D_open_oid(dataset, NULL) < 0) { + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); + } + + /* Success */ + ret_value = dataset; + +done: + FUNC_LEAVE(ret_value); +} /* end H5D_open() */ + +/*------------------------------------------------------------------------- + * Function: H5D_open_oid + * + * Purpose: Opens a dataset for access. + * + * Return: SUCCEED/FAIL + * + * Errors: + * + * Programmer: Quincey Koziol + * Monday, October 12, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_open_oid(H5D_t *dataset, H5G_entry_t *ent) +{ + herr_t ret_value = FAIL; /*return value */ + intn i; + H5S_t *space = NULL; + + FUNC_ENTER(H5D_open_oid, FAIL); + + /* check args */ + assert (dataset); + + /* Copy over the symbol table information if it's provided */ + if(ent!=NULL) + HDmemcpy(&(dataset->ent),ent,sizeof(H5G_entry_t)); + + /* Find the dataset object */ if (H5O_open(&(dataset->ent)) < 0) { - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open"); } /* Get the type and space */ if (NULL==(dataset->type=H5O_read(&(dataset->ent), H5O_DTYPE, 0, NULL))) { - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load type info from dataset header"); } if (NULL==(space=H5S_read (&(dataset->ent)))) { - HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, + HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data space info from dataset header"); } /* Get the optional fill value message */ - if (NULL==H5O_read(&(dataset->ent), H5O_FILL, 0, - &(dataset->create_parms->fill))) { - H5E_clear(); - HDmemset(&(dataset->create_parms->fill), 0, - sizeof(dataset->create_parms->fill)); + if (NULL==H5O_read(&(dataset->ent), H5O_FILL, 0, &(dataset->create_parms->fill))) { + H5E_clear(); + HDmemset(&(dataset->create_parms->fill), 0, + sizeof(dataset->create_parms->fill)); } /* Get the optional filters message */ - if (NULL==H5O_read (&(dataset->ent), H5O_PLINE, 0, - &(dataset->create_parms->pline))) { - H5E_clear (); - HDmemset (&(dataset->create_parms->pline), 0, - sizeof(dataset->create_parms->pline)); + if (NULL==H5O_read (&(dataset->ent), H5O_PLINE, 0, &(dataset->create_parms->pline))) { + H5E_clear (); + HDmemset (&(dataset->create_parms->pline), 0, + sizeof(dataset->create_parms->pline)); } #ifdef HAVE_PARALLEL /* If MPIO is used, no filter support yet. */ - if (dataset->ent.file->shared->access_parms->driver == H5F_LOW_MPIO && - dataset->create_parms->pline.nfilters>0){ - HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL, + if (dataset.ent.file->shared->access_parms->driver == H5F_LOW_MPIO && + dataset->create_parms->pline.nfilters>0){ + HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "Parallel IO does not support filters yet"); } #endif @@ -1152,36 +1233,35 @@ H5D_open(H5G_entry_t *loc, const char *name) * them. */ if (NULL==H5O_read(&(dataset->ent), H5O_LAYOUT, 0, &(dataset->layout))) { - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, - "unable to read data layout message"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to read data layout message"); } switch (dataset->layout.type) { - case H5D_CONTIGUOUS: - dataset->create_parms->layout = H5D_CONTIGUOUS; - break; + case H5D_CONTIGUOUS: + dataset->create_parms->layout = H5D_CONTIGUOUS; + break; - case H5D_CHUNKED: - /* - * Chunked storage. The creation plist's dimension is one less than - * the chunk dimension because the chunk includes a dimension for the - * individual bytes of the data type. - */ - dataset->create_parms->layout = H5D_CHUNKED; - dataset->create_parms->chunk_ndims = dataset->layout.ndims - 1; - for (i = 0; i < dataset->layout.ndims - 1; i++) { - dataset->create_parms->chunk_size[i] = dataset->layout.dim[i]; - } - break; + case H5D_CHUNKED: + /* + * Chunked storage. The creation plist's dimension is one less than + * the chunk dimension because the chunk includes a dimension for the + * individual bytes of the data type. + */ + dataset->create_parms->layout = H5D_CHUNKED; + dataset->create_parms->chunk_ndims = dataset->layout.ndims - 1; + for (i = 0; i < dataset->layout.ndims - 1; i++) { + dataset->create_parms->chunk_size[i] = dataset->layout.dim[i]; + } + break; - default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, NULL, "not implemented yet"); + default: + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "not implemented yet"); } /* Get the external file list message, which might not exist */ - if (NULL==H5O_read (&(dataset->ent), H5O_EFL, 0, - &(dataset->create_parms->efl)) && - !H5F_addr_defined (&(dataset->layout.addr))) { - HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, + if (NULL==H5O_read (&(dataset->ent), H5O_EFL, 0, &(dataset->create_parms->efl)) && + !H5F_addr_defined (&(dataset->layout.addr))) { + HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, "storage address is undefined an no external file list"); } @@ -1190,35 +1270,34 @@ H5D_open(H5G_entry_t *loc, const char *name) * This is especially important for parallel I/O where the B-tree must * be fully populated before I/O can happen. */ - if ((dataset->ent.file->intent & H5F_ACC_RDWR) && - H5D_CHUNKED==dataset->layout.type) { - if (H5D_init_storage(dataset, space)<0) { - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, - "unable to initialize file storage"); - } + if ((dataset->ent.file->intent & H5F_ACC_RDWR) && H5D_CHUNKED==dataset->layout.type) { + if (H5D_init_storage(dataset, space)<0) { + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to initialize file storage"); + } } /* Success */ - ret_value = dataset; + ret_value = SUCCEED; - done: +done: if (space) - H5S_close (space); - if (!ret_value && dataset) { - if (H5F_addr_defined(&(dataset->ent.header))) { - H5O_close(&(dataset->ent)); - } - if (dataset->type) { - H5T_close(dataset->type); - } - if (dataset->create_parms) { - H5P_close (H5P_DATASET_CREATE, dataset->create_parms); - } - dataset->ent.file = NULL; - H5MM_xfree(dataset); + H5S_close (space); + if (ret_value==FAIL && dataset) { + if (H5F_addr_defined(&(dataset->ent.header))) { + H5O_close(&(dataset->ent)); + } + if (dataset->type) { + H5T_close(dataset->type); + } + if (dataset->create_parms) { + H5P_close (H5P_DATASET_CREATE, dataset->create_parms); + } + dataset->ent.file = NULL; + H5MM_xfree(dataset); } FUNC_LEAVE(ret_value); -} +} /* end H5D_open_oid() */ /*------------------------------------------------------------------------- * Function: H5D_close diff --git a/src/H5Distore.c b/src/H5Distore.c index ed0659e..fc78c89 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1173,7 +1173,7 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout, const H5O_fill_t *fill, const hssize_t offset[], hbool_t relax, intn *idx_hint/*in,out*/) { - uintn idx; /*hash index number */ + uintn idx=0; /*hash index number */ hbool_t found = FALSE; /*already in cache? */ H5F_rdcc_t *rdcc = &(f->shared->rdcc);/*raw data chunk cache*/ H5F_rdcc_ent_t *ent = NULL; /*cache entry */ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 1f23d82..f89e9b3 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -81,5 +81,7 @@ herr_t H5D_extend (H5D_t *dataset, const hsize_t *size); H5G_entry_t *H5D_entof (H5D_t *dataset); H5T_t *H5D_typeof (H5D_t *dset); H5S_t *H5D_get_space(H5D_t *dset); +H5D_t * H5D_new(const H5D_create_t *create_parms); +herr_t H5D_open_oid(H5D_t *dataset, H5G_entry_t *ent); #endif @@ -58,6 +58,7 @@ static const H5E_major_mesg_t H5E_major_mesg_g[] = { {H5E_PLINE, "Data filters layer"}, {H5E_EFL, "External file list"}, {H5E_RAGGED, "Ragged array layer"}, + {H5E_REFERENCE, "References layer"}, }; static const H5E_minor_mesg_t H5E_minor_mesg_g[] = { diff --git a/src/H5Epublic.h b/src/H5Epublic.h index fed1296..06a087c 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -72,9 +72,10 @@ typedef enum H5E_major_t { H5E_STORAGE, /*data storage */ H5E_PLIST, /*Property lists */ H5E_ATTR, /*Attribute */ - H5E_PLINE, /*Data filters */ - H5E_EFL, /*External file list */ - H5E_RAGGED /*Ragged arrays */ + H5E_PLINE, /*Data filters */ + H5E_EFL, /*External file list */ + H5E_RAGGED, /*Ragged arrays */ + H5E_REFERENCE /*References */ } H5E_major_t; /* Declare an enumerated type which holds all the valid minor HDF error codes */ @@ -1687,7 +1687,7 @@ H5Fclose(hid_t file_id) */ static herr_t H5F_mount(H5G_entry_t *loc, const char *name, H5F_t *child, - const H5F_mprop_t *plist) + const H5F_mprop_t __unused__ *plist) { H5G_t *mount_point = NULL; /*mount point group */ H5G_entry_t *mp_ent = NULL; /*mount point symbol table entry*/ @@ -1809,7 +1809,7 @@ H5F_unmount(H5G_entry_t *loc, const char *name) H5G_entry_t *ent = NULL; /*temporary symbol table entry */ herr_t ret_value = FAIL; /*return value */ uintn i; /*coutners */ - intn lt, rt, md, cmp; /*binary search indices */ + intn lt, rt, md=(-1), cmp; /*binary search indices */ FUNC_ENTER(H5F_unmount, FAIL); assert(loc); @@ -1909,7 +1909,7 @@ herr_t H5F_mountpoint(H5G_entry_t *find/*in,out*/) { H5F_t *parent = find->file; - intn lt, rt, md, cmp; + intn lt, rt, md=(-1), cmp; H5G_entry_t *ent = NULL; FUNC_ENTER(H5F_mountpoint, FAIL); diff --git a/src/H5Fistore.c b/src/H5Fistore.c index ed0659e..fc78c89 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1173,7 +1173,7 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout, const H5O_fill_t *fill, const hssize_t offset[], hbool_t relax, intn *idx_hint/*in,out*/) { - uintn idx; /*hash index number */ + uintn idx=0; /*hash index number */ hbool_t found = FALSE; /*already in cache? */ H5F_rdcc_t *rdcc = &(f->shared->rdcc);/*raw data chunk cache*/ H5F_rdcc_ent_t *ent = NULL; /*cache entry */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 74e67d0..8ba9613 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -1,13 +1,13 @@ /**************************************************************************** - * NCSA HDF * - * Software Development Group * - * National Center for Supercomputing Applications * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * For conditions of distribution and use, see the accompanying * - * hdf/COPYING file. * - * * + * NCSA HDF * + * Software Development Group * + * National Center for Supercomputing Applications * + * University of Illinois at Urbana-Champaign * + * 605 E. Springfield, Champaign IL 61820 * + * * + * For conditions of distribution and use, see the accompanying * + * hdf/COPYING file. * + * * ****************************************************************************/ /* $Id$ */ @@ -159,11 +159,7 @@ H5I_init_interface(void) * Make certain the ID types don't overflow the number of bits allocated * for them in an ID. */ -#if 0 - assert((int)H5I_MAXID<=(int)pow((double)2.0,(double)GROUP_BITS)); -#else assert(H5I_MAXID<=(1<<GROUP_BITS)); -#endif /* Registers the cleanup routine with the exit chain */ ret_value = H5_add_exit(&H5I_term_interface); @@ -16,10 +16,13 @@ static char RcsId[] = "@(#)$Revision$"; /* $Id$ */ -#include <H5private.h> /* Generic Functions */ -#include <H5Iprivate.h> /* ID Functions */ -#include <H5Eprivate.h> /* Error handling */ -#include <H5Rprivate.h> /* Data-space functions */ +#include <H5private.h> /* Generic Functions */ +#include <H5Iprivate.h> /* ID Functions */ +#include <H5Dprivate.h> /* Datasets */ +#include <H5Eprivate.h> /* Error handling */ +#include <H5Gprivate.h> /* Groups */ +#include <H5Rprivate.h> /* References */ +#include <H5Sprivate.h> /* Dataspaces */ /* Interface initialization */ #define PABLO_MASK H5R_mask @@ -28,6 +31,13 @@ static intn interface_initialize_g = FALSE; static herr_t H5R_init_interface(void); static void H5R_term_interface(void); +/* Static functions */ +static herr_t H5R_create(href_t *ref, H5G_entry_t *loc, const char *name, + H5R_type_t ref_type, H5S_t *space); +static hid_t H5R_dereference(href_t *ref); +static H5S_t * H5R_get_space(href_t *ref); +static H5R_type_t H5R_get_type(href_t *ref); + /*-------------------------------------------------------------------------- NAME @@ -65,7 +75,7 @@ H5R_init_interface(void) USAGE void H5R_term_interface() RETURNS - SUCCEED/FAIL + void DESCRIPTION Release the atom group and any other resources allocated. GLOBAL VARIABLES @@ -81,3 +91,383 @@ H5R_term_interface(void) H5I_destroy_group(H5I_REFERENCE); } /* end H5R_term_interface() */ + +/*-------------------------------------------------------------------------- + NAME + H5R_create + PURPOSE + Creates a particular kind of reference for the user + USAGE + herr_t H5R_create(ref, loc, name, ref_type, space) + href_t *ref; OUT: Reference created + H5G_entry_t *loc; IN: File location used to locate object pointed to + const char *name; IN: Name of object at location LOC_ID of object + pointed to + H5R_type_t ref_type; IN: Type of reference to create + H5S_t *space; IN: Dataspace ID with selection, used for Dataset + Region references. + + RETURNS + SUCCEED/FAIL + DESCRIPTION + Creates a particular type of reference specified with REF_TYPE, in the + space pointed to by REF. The LOC_ID and NAME are used to locate the object + pointed to and the SPACE_ID is used to choose the region pointed to (for + Dataset Region references). + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static herr_t +H5R_create(href_t *ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type, H5S_t __unused__ *space) +{ + H5G_stat_t sb; /* Stat buffer for retrieving OID */ + herr_t ret_value = FAIL; + + FUNC_ENTER(H5R_create, FAIL); + + assert(ref); + assert(loc); + assert(name); + assert(ref_type>H5R_BADTYPE || ref_type<H5R_MAXTYPE); + + if (H5G_get_objinfo (loc, name, 0, &sb)<0) + HGOTO_ERROR (H5E_REFERENCE, H5E_NOTFOUND, FAIL, "unable to stat object"); + + /* Set information for reference */ + ref->type=ref_type; + ref->objno[0]=sb.objno[0]; + ref->objno[1]=sb.objno[1]; + ref->file=loc->file; + + /* Return success */ + ret_value=SUCCEED; + +done: + FUNC_LEAVE(ret_value); +} /* end H5R_create() */ + + +/*-------------------------------------------------------------------------- + NAME + H5Rcreate + PURPOSE + Creates a particular kind of reference for the user + USAGE + herr_t H5Rcreate(ref, loc_id, name, ref_type, space_id) + href_t *ref; OUT: Reference created + hid_t loc_id; IN: Location ID used to locate object pointed to + const char *name; IN: Name of object at location LOC_ID of object + pointed to + H5R_type_t ref_type; IN: Type of reference to create + hid_t space_id; IN: Dataspace ID with selection, used for Dataset + Region references. + + RETURNS + SUCCEED/FAIL + DESCRIPTION + Creates a particular type of reference specified with REF_TYPE, in the + space pointed to by REF. The LOC_ID and NAME are used to locate the object + pointed to and the SPACE_ID is used to choose the region pointed to (for + Dataset Region references). + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5Rcreate(href_t *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id) +{ + H5G_entry_t *loc = NULL; /* File location */ + H5S_t *space = NULL; /* Pointer to dataspace containing region */ + herr_t ret_value = FAIL; + + FUNC_ENTER(H5Rcreate, FAIL); + H5TRACE5("e","*risRti",ref,loc_id,name,ref_type,space_id); + + /* Check args */ + if(ref==NULL) + HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); + if (NULL==(loc=H5G_loc (loc_id))) + HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); + if (!name || !*name) + HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); + if(ref_type<=H5R_BADTYPE || ref_type>=H5R_MAXTYPE) + HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type"); + if(ref_type!=H5R_OBJECT) + HRETURN_ERROR (H5E_ARGS, H5E_UNSUPPORTED, FAIL, "reference type not supported"); + if (space_id!=(-1) && (H5I_DATASPACE!=H5I_get_type (space_id) || NULL==(space=H5I_object (space_id)))) + HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); + + /* Create reference */ + if ((ret_value=H5R_create(ref,loc,name,ref_type,space))<0) + HGOTO_ERROR (H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to create reference"); + +done: + FUNC_LEAVE(ret_value); +} /* end H5Rcreate() */ + + +/*-------------------------------------------------------------------------- + NAME + H5R_dereference + PURPOSE + Opens the HDF5 object referenced. + USAGE + hid_t H5R_dereference(ref) + href_t *ref; IN: Reference to open. + + RETURNS + Valid ID on success, FAIL on failure + DESCRIPTION + Given a reference to some object, open that object and return an ID for + that object. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Currently only set up to work with references to datasets + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static hid_t +H5R_dereference(href_t *ref) +{ + H5D_t *dataset; /* Pointer to dataset to open */ + H5G_entry_t ent; /* Symbol table entry */ + hid_t ret_value = FAIL; + + FUNC_ENTER(H5R_dereference, FAIL); + + assert(ref); + + /* + * Switch on object type, when we implement that feature, always try to + * open a dataset for now + */ + /* Allocate the dataset structure */ + if (NULL==(dataset = H5D_new(NULL))) { + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); + } + + /* Initialize the symbol table entry */ + HDmemset(&ent,0,sizeof(H5G_entry_t)); + HDmemcpy(&(ent.header),ref->objno,sizeof(haddr_t)); + ent.type=H5G_NOTHING_CACHED; + ent.file=ref->file; + + /* Open the dataset object */ + if (H5D_open_oid(dataset, &ent) < 0) { + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); + } + + /* Create an atom for the dataset */ + if ((ret_value = H5I_register(H5I_DATASET, dataset)) < 0) { + H5D_close(dataset); + HRETURN_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, + "can't register dataset"); + } + +done: + FUNC_LEAVE(ret_value); +} /* end H5R_dereference() */ + + +/*-------------------------------------------------------------------------- + NAME + H5Rdereference + PURPOSE + Opens the HDF5 object referenced. + USAGE + hid_t H5Rdereference(ref) + href_t *ref; IN: Reference to open. + + RETURNS + Valid ID on success, FAIL on failure + DESCRIPTION + Given a reference to some object, open that object and return an ID for + that object. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hid_t +H5Rdereference(href_t *ref) +{ + hid_t ret_value = FAIL; + + FUNC_ENTER(H5Rdereference, FAIL); + H5TRACE1("i","*r",ref); + + /* Check args */ + if(ref==NULL) + HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); + + /* Create reference */ + if ((ret_value=H5R_dereference(ref))<0) + HGOTO_ERROR (H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable dereference object"); + +done: + FUNC_LEAVE(ret_value); +} /* end H5Rdereference() */ + + +/*-------------------------------------------------------------------------- + NAME + H5R_get_space + PURPOSE + Retrieves a dataspace with the region pointed to selected. + USAGE + H5S_t *H5R_get_space(ref) + href_t *ref; IN: Reference to open. + + RETURNS + Pointer to the dataspace on success, NULL on failure + DESCRIPTION + Given a reference to some object, creates a copy of the dataset pointed + to's dataspace and defines a selection in the copy which is the region + pointed to. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static H5S_t * +H5R_get_space(href_t __unused__ *ref) +{ + H5S_t *ret_value = NULL; + + FUNC_ENTER(H5R_get_space, NULL); + + assert(ref); + +#ifdef LATER +done: +#endif /* LATER */ + FUNC_LEAVE(ret_value); +} /* end H5R_get_space() */ + + +/*-------------------------------------------------------------------------- + NAME + H5Rget_space + PURPOSE + Retrieves a dataspace with the region pointed to selected. + USAGE + hid_t H5Rget_space(ref) + href_t *ref; IN: Reference to open. + + RETURNS + Valid ID on success, FAIL on failure + DESCRIPTION + Given a reference to some object, creates a copy of the dataset pointed + to's dataspace and defines a selection in the copy which is the region + pointed to. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hid_t +H5Rget_space(href_t *ref) +{ + H5S_t *space = NULL; + hid_t ret_value = FAIL; + + FUNC_ENTER(H5Rget_space, FAIL); + H5TRACE1("i","*r",ref); + + /* Check args */ + if(ref==NULL) + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); + + /* Create reference */ + if ((space=H5R_get_space(ref))==NULL) + HGOTO_ERROR (H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create dataspace"); + + /* Atomize */ + if ((ret_value=H5I_register (H5I_DATASPACE, space))<0) + HGOTO_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom"); + +done: + FUNC_LEAVE(ret_value); +} /* end H5Rget_space() */ + + +/*-------------------------------------------------------------------------- + NAME + H5R_get_type + PURPOSE + Retrieves the type of a reference. + USAGE + H5R_type_t H5R_get_type(ref) + href_t *ref; IN: Reference to open. + + RETURNS + Reference type on success, <0 on failure + DESCRIPTION + Given a reference to some object, returns the type of reference. See + list of valid H5R_type_t in H5Rpublic.h + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static H5R_type_t +H5R_get_type(href_t *ref) +{ + H5R_type_t ret_value = H5R_BADTYPE; + + FUNC_ENTER(H5R_get_type, H5R_BADTYPE); + + assert(ref); + + ret_value=ref->type; + +#ifdef LATER +done: +#endif /* LATER */ + FUNC_LEAVE(ret_value); +} /* end H5R_get_type() */ + + +/*-------------------------------------------------------------------------- + NAME + H5Rget_type + PURPOSE + Retrieves the type of a reference. + USAGE + H5R_type_t H5Rget_space(ref) + href_t *ref; IN: Reference to open. + + RETURNS + Valid reference type on success, <0 on failure + DESCRIPTION + Given a reference to some object, returns the type of reference. See + list of valid H5R_type_t in H5Rpublic.h + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +H5R_type_t +H5Rget_type(href_t *ref) +{ + H5R_type_t ret_value = H5R_BADTYPE; + + FUNC_ENTER(H5Rget_type, FAIL); + H5TRACE1("Rt","*r",ref); + + /* Check args */ + if(ref==NULL) + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); + + /* Create reference */ + if ((ret_value=H5R_get_type(ref))<0) + HGOTO_ERROR (H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to check reference type"); + +done: + FUNC_LEAVE(ret_value); +} /* end H5Rget_type() */ + diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index 6d6abb3..121a853 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -20,6 +20,32 @@ #include <H5public.h> #include <H5Ipublic.h> +/* + * Reference types allowed. + */ +typedef enum { + H5R_BADTYPE = (-1), /* invalid Reference Type */ + H5R_OBJECT, /* Object reference */ + H5R_DATASET_REGION, /* Dataset Region Reference */ + H5R_INTERNAL, /* Internal Reference */ + H5R_MAXTYPE /* highest type in group (Invalid as true type)*/ +} H5R_type_t; + +/* Reference structure for user's code */ +typedef struct { + H5R_type_t type; /* Type of reference information in union */ + unsigned long objno[2]; /* OID of object referenced */ + struct H5F_t *file; /* Pointer to the file the reference is in */ + union { /* union to hold structs */ + struct { + } obj; /* Object reference structure */ + struct { + } dreg; /* Dataset Region reference structure */ + struct { + } intrl; /* Internal reference structure */ + }u; +} href_t; + /* Publicly visible datastructures */ #ifdef __cplusplus @@ -27,6 +53,11 @@ extern "C" { #endif /* Functions in H5R.c */ +herr_t H5Rcreate(href_t *ref, hid_t loc_id, const char *name, + H5R_type_t ref_type, hid_t space_id); +hid_t H5Rdereference(href_t *ref); +hid_t H5Rget_space(href_t *ref); +H5R_type_t H5Rget_type(href_t *ref); #ifdef __cplusplus } @@ -33,6 +33,7 @@ #include <H5MMpublic.h> /* Core memory management */ #include <H5Opublic.h> /* Object headers */ #include <H5Ppublic.h> /* Property lists */ +#include <H5Rpublic.h> /* References */ #include <H5RApublic.h> /* Ragged arrays */ #include <H5Spublic.h> /* Dataspaces */ #include <H5Tpublic.h> /* Datatypes */ |